Burp Analysis

In this section, we will learn how to analyze and manipulate data sent over WebSocket connections in Burp.


Inspecting Messages

WebSockets History Tab

Located within Proxy β†’ WebSockets history

Features:

  • Lists all WebSocket messages

  • Filter to narrow down displayed messages

  • Message data displayed at bottom

Column
Description

URL

WebSocket endpoint

Direction

To server / To client

Length

Message size

Time

Timestamp


Manipulating Messages

Intercept

Burp Intercept works for WebSocket messages just like HTTP requests:

  • Enable Intercept

  • Send/receive message via WebSocket

  • Message is intercepted β†’ manipulate before forwarding

Example: Manipulate echoed message so browser sees incorrect response.

Repeater

Send WebSocket messages to Burp Repeater:

  • Set direction: To server or To client

  • Replay messages

  • Edit and send custom messages

  • Inject messages from server to client without prior client message

Manipulating Handshake

  1. Send any WebSocket message to Repeater

  2. Click disconnect/reconnect icon to manage connection

  3. Click pencil icon for WebSocket connection overview

Options:

Action
Description

Attach

Use different WebSocket connection

Clone

Establish new connection to same server (allows handshake manipulation)

New WebSocket

Connect to different server

Handshake manipulation:

  • Inject new HTTP headers

  • Change existing headers

  • Modify endpoint path


Question Walkthrough

Task: Manipulate WebSocket traffic to obtain the flag.

Source Code Analysis

Download and analyze:

In server.py:

Key finding: /admin endpoint responds with flag when receiving !get_admin_info

Method 1: Burp Repeater

  1. Open Burp browser, navigate to target

  2. Send any message to establish WebSocket connection

  3. Go to WebSockets history tab

  4. Send WebSocket message to Repeater

  5. Click Select WebSocket β†’ Clone

  6. Edit endpoint from /echo to /admin

  7. Connect

  8. Send message: !get_admin_info

  9. Flag returned in response!

Method 2: websocat (CLI)

Install websocat:

Send message:


Summary

Last updated