hunt-websocket

Tests WebSocket endpoints for CSWSH, missing message authentication, tampering, and namespace authorization bypasses.

10|3|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-websocket-baiqigo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-websocket
Source: https://github.com/baiqigo/baiqi-redteam-lab/tree/main/.agents/skills/hunt-websocket
Command: npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-websocket-baiqigo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires wscat, websocat.

What problem does it solve? WebSocket endpoints often skip the security controls applied to HTTP routes, leaving real-time features exposed to hijacking, tampering, and cross-tenant data leaks that standard web scanners miss. ## Core Features & Use Cases - CSWSH Detection: Validates Cross-Site WebSocket Hijacking with a three-condition model (ambient cookie auth, no per-connection token, no Origin enforcement) and requires out-of-band proof via Burp Collaborator. - Message-Layer Testing: Checks for missing per-message authorization, frame tampering on financial values, and socket.io/SignalR/Phoenix namespace and room authorization bypasses. - Handshake Smuggling: Probes Upgrade-header desync between front proxies and origins using HTTP Request Smuggler techniques. - Use Case: During an authorized bug bounty engagement against a trading platform, use this Skill to discover its socket.io endpoint, join a privileged namespace as a low-privilege user, and confirm cross-tenant event leakage with verifiable evidence. ## Quick Start Use the hunt-websocket skill to enumerate and test the WebSocket endpoints on my authorized target for CSWSH and message authorization flaws.

Frequently Asked Questions about hunt-websocket

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a WebSocket endpoint for CSWSH?

CSWSH testing requires three conditions together: cookie-based handshake authentication, no per-connection CSRF token, and no Origin enforcement. Host a PoC page on an attacker origin, open it while a separate victim account is logged in, and confirm you receive that victim's data with out-of-band exfiltration proof.

How to test socket.io namespace authorization?

Open the raw socket.io WebSocket, then send a CONNECT packet like 40/admin, to join a privileged namespace as a low-privilege user. The bug is confirmed only when you receive 42 event frames containing another tenant's data, not just a successful namespace acknowledgment.

Is a 101 response from a foreign Origin enough to confirm CSWSH?

No, a completed 101 handshake only proves the upgrade opened. Many servers accept the connection then send nothing or reject authenticated frames, so you must demonstrate actual receipt of a different account's data with a unique marker and OAST confirmation.

What tools are needed for WebSocket security testing?

The workflow uses wscat or websocat as CLI WebSocket clients, Burp Suite Pro for WebSocket history interception and replay, the HTTP Request Smuggler extension for handshake-upgrade smuggling, and Burp Collaborator for out-of-band proof of data receipt.

Can WebSocket frames be smuggled as HTTP requests after connection?

No, once a WebSocket is established, payloads are wrapped in WS frames and never re-parsed as HTTP by the proxy. WebSocket-related smuggling only exists at the handshake layer, where malformed Upgrade headers cause the front proxy and origin to disagree on the connection state.