Chapter 4
Getting frames through
Four tools cover a manual test. None of them should be aimed at a flood.
Reach for the smallest tool that lets you send one clean frame and read the reply. Open Burp when you need full history, and save parallel bursts strictly for authorized race tests on your own accounts.
wscat is the fastest interactive terminal client when you just want to poke at a socket by hand. Install it and pass your own session cookie.
npm install -g wscatwscat -c "wss://target.com/ws" -H "Cookie: session=YOUR_SESSION"Type one JSON frame and read the reply.
Add -H "Origin: https://evil.example" when you are testing Origin.
Replace that host with one you control.
websocat
Section titled “websocat”websocat is the non-interactive client.
It can send a raw frame, repeat a file, and open more than one connection.
Read websocat --help before you depend on a flag.
This form sets a header without a guess about short flags.
websocat wss://target.com/ws --header "Cookie: session=YOUR_SESSION"Use it when you want a frame in a file, sent again, with the reply saved. Do not point a repeat loop at a target.
- Confirm the proxy path includes the socket host.
- Find the GET that returned status 101.
- Choose Create WebSocket session.
- Edit one frame and send it.
- Keep the original handshake in the report export.
Repeater rules apply. You can change a field, send, and compare the next frame. Intruder-style volume does not belong on a socket that has no per-frame limit. You already know the limit is missing after a few dozen frames.
Turbo Intruder
Section titled “Turbo Intruder”Turbo Intruder can send many frames on a captured socket. That makes Turbo Intruder the tool for a race. A high frame count can take the host down.
- Start from the extension’s own WebSocket example.
- Point it at a handshake from an account you own.
- Set the count to two before the first run.
- Raise the count only inside the program rules.
A coupon, a balance transfer, or a one-time subscribe is the usual race. Stop when two replies prove the state changed twice. You do not need a screenshot of a dead service. The race condition chapter in Bug Hunting for Beginners has the single-packet procedure.
One live socket per token
Section titled “One live socket per token”Some servers close a replay if that token already has a socket open. The second handshake dies, and it looks like a failed bug. Close the first socket, then replay. Or open the second socket with a different account. Record it if both sockets stay authenticated. That is its own checklist item. The server promised a single session and did not enforce it.
What not to install for this
Section titled “What not to install for this”A browser page you host is enough for the CSWSH proof.
You do not need a collector that forwards frames to another server.
console.log on a page you own is the proof.
A proxy history export is the attachment.
Next, Chapter 5 shows how to write the report.
Open local graph around this page
Linked from here
WebSocketFor authorized testing only.