TTPwire Vol. 1 · MITRE ATT&CK·Tagged

← All stories

Black Hills InfoSec

Can’t Stop, Won’t Stop Hijacking (CSWSH) WebSockets

BHIS · 2024-03-21 · Read original ↗

ATT&CK techniques detected

8 predictions
T1190Exploit Public-Facing Application
98%
“defend against this attack, the websocket server should block any requests during the http handshake with origin values outside of a strict allowlist. additionally, user session cookies should be set with samesite equal to lax or strict. real attack scenarios i ’ ve seen this vul…”
T1071.001Web Protocols
69%
“the user for real - time events. the differences between the traditional http connection and a websocket connection are illustrated below. notice that after the handshake, the websocket session remains connected and is bidirectional, while in a traditional http transaction the co…”
T1071.001Web Protocols
66%
“hijacked, the ready command is sent, and the chat history returned to the exploit server is base64 encoded inside a get parameter value. < script > / / creating a new websocket instance and connecting to the specified url var ws = new websocket ( ' wss : / / 0a4600e703cc3f7b867e3…”
T1190Exploit Public-Facing Application
64%
“websocket. if it ’ s not, then you likely have a finding to report, depending on the context. exploiting now that we have confirmed the server is vulnerable to cswsh, we can start crafting an exploit. our goal is to make a one - to - one malicious clone of the portswigger lab, pr…”
T1027.017SVG Smuggling
53%
“< / h2 > < a class = link - back href = ' https : / / portswigger. net / web - security / websockets / cross - site - websocket - hijacking / lab ' > back to lab description < svg version = 1. 1 id = layer _ 1 xmlns = ' http : / / www. w3. org / 2000 / svg ' xmlns : xlink = ' htt…”
T1190Exploit Public-Facing Application
43%
“the user for real - time events. the differences between the traditional http connection and a websocket connection are illustrated below. notice that after the handshake, the websocket session remains connected and is bidirectional, while in a traditional http transaction the co…”
T1611Escape to Host
35%
“/ academylabheader. css rel = stylesheet > < link href = https : / / 0a4600e703cc3f7b867e3026000f00da. web - security - academy. net / resources / css / labs. css rel = stylesheet > < title > cross - site websocket hijacking < / title > < / head > < body > < script src = " https …”
T1189Drive-by Compromise
30%
“the malicious website. this is allowed by the browser since the samesite flag for the session cookie was set to none. also, we see that the origin header is set to null ; this is because the webpage was not hosted on a web server with a domain name but instead a file on our hard …”

Summary

The WebSocket Protocol, standardized in 2011 with RFC 6455, enables full-duplex communication between clients and web servers over a single, persistent connection, resolving a longstanding limitation of HTTP that hindered […]

The post Can’t Stop, Won’t Stop Hijacking (CSWSH) WebSockets  appeared first on Black Hills Information Security, Inc..