Descripción

This online shop has a live chat feature implemented using WebSockets.

It has an aggressive but flawed XSS filter.

To solve the lab, use a WebSocket message to trigger an alert() popup in the support agent’s browser.

Manipulating the WebSocket handshake to exploit vulnerabilities writeup

Entraremos en el laboratorio, en la opción de ‘Live chat’. Enviaremos un mensaje y lo capturaremos en ‘Proxy’ -> ‘WebSockets history’:

Enviaremos esta petición al ‘Repeater’ con Ctrl + R o Click derecho -> Send to Repeater. Ahora enviaremos el ataque XSS:

{"message":"<img src=1 onerror='alert(1)'>"}

Al hacerlo nos bloquearán la IP. En la ventana que aparece al pulsar ‘Reconnect’ pondremos el siguiente atributo:

X-Forwarded-For: 1.1.1.1

Haciendo creer al servidor que nuestra IP es ‘1.1.1.1’. Ahora enviaremos el siguiente código:

<img src=1 oNeRrOr=alert`1`>

Completando así el laboratorio:

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *