Cyber Risks · PortSwigger Research

Lab: Manipulating Web Socket messages to exploit vulnerabilities

Summary: PortSwigger's WebSockets lab presents an online shop whose live chat runs over WebSockets, with messages viewed by a support agent in real time. The client HTML-encodes a typed '<' character before sending, but intercepting the WebSocket message in Burp Proxy and replacing it with the payload <img src=1 onerror='alert(1)'> triggers an alert in the browser, and the lab states this also happens in the support agent's browser.

What's compelling: The client-side encoding gave no protection once the message was edited in transit, so a support agent opening a chat message can be the one who executes the attacker's payload.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related