This online shop has a live chat feature implemented using .
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.
Upon accessing the lab, I enabled the FoxyProxy extension to intercept all the traffic through Burp Suite. After setting up the proxy, I navigated to the live chat page and started sending messages. I then checked my WebSocket History in Burp Suite's proxy, where I found all the messages being sent in the following format:
To execute a Cross-Site Scripting (XSS) attack, I sent this WebSocket message to the repeater and modified the message
value to:
Next, I clicked on the drop-down menu above the request box, selected "Send to server," and then clicked "Send."
Returning to the chat page, I saw an alert box pop up. Since the message was in the chat, all members present in the chat room would also see the alert box. This confirmed that the XSS vulnerability was successfully exploited, solving the lab.