Skip to content

WebSockets

Alnoman Kamil edited this page Oct 10, 2024 · 7 revisions

Apprentice lab:
Manipulating WebSocket messages to exploit vulnerabilities

This online shop has a live chat feature implemented using WebSockets.
Chat messages that you submit are viewed by a support agent in real time.
To solve the lab, use a WebSocket message to trigger an alert() popup in the support agent's browser.

  • Solution

    1. Go to Live chat and type a message. Before sending intercept the request.
    2. Edit websocket-message (ef), adding an onerror XSS
      {"message":"<img src=x onerror=alert(1)>"}
      
Clone this wiki locally