websocket-security

Tests WebSocket endpoints for CSWSH, smuggling, injection, and authentication flaws.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/lNwNl/Praxis --skill websocket-security-lnwnl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: websocket-security
Source: https://github.com/lNwNl/Praxis/tree/main/skills/_disabled/websocket-security
Command: npx skills add https://github.com/lNwNl/Praxis --skill websocket-security-lnwnl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? WebSocket channels often bypass the security scrutiny applied to REST APIs, leaving handshake validation, origin checks, and message handling untested. This Skill provides a structured methodology for auditing WebSocket implementations during authorized penetration tests and CTF engagements. ## Core Features & Use Cases - Handshake and CSWSH Analysis: Verify Origin validation, cookie SameSite behavior, and session binding to detect cross-site WebSocket hijacking, with step-by-step exploitation patterns for lab environments. - Tooling Workflows: Covers wsrepl with auth plugins, ws-harness for bridging WebSocket to HTTP tools like sqlmap, and Burp extensions such as SocketSleuth and WebSocket Turbo Intruder. - Advanced Attack Coverage: Documents WebSocket smuggling through reverse proxies, Socket.IO namespace and event injection, binary message manipulation (Protobuf, MessagePack), and stored XSS via message broadcast. - Use Case: During an authorized assessment of a chat application, identify the wss:// endpoint, confirm the server accepts a forged Origin header, then demonstrate session hijacking by reading and writing messages as the victim user. ## Quick Start Use the websocket-security skill to test the target's WebSocket endpoint at wss://target.example.com/ws for missing Origin validation and CSWSH exposure.

Frequently Asked Questions about websocket-security

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

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

Intercept the upgrade request in Burp and change the Origin header to an attacker domain. If the server returns 101 Switching Protocols, it lacks Origin validation, and a malicious page can open a WebSocket using the victim's cookies.

What tools can intercept and fuzz WebSocket traffic?▼

wsrepl provides an interactive client with auth plugins for cookies and tokens, ws-harness bridges WebSocket to HTTP so tools like sqlmap can fuzz messages, and Burp's SocketSleuth and WebSocket Turbo Intruder handle interception and high-rate fuzzing.

Are cookies sent automatically in WebSocket connections?▼

Yes, cookies for the target domain are sent in the upgrade request. SameSite=Lax and Strict cookies are not sent cross-site, but SameSite=None or legacy cookies without the attribute may be, enabling CSWSH.

Can WebSocket connections bypass reverse proxy restrictions?▼

Yes, some proxies like Nginx pass raw TCP after the 101 upgrade and stop inspecting traffic. An attacker can tunnel raw HTTP requests through the WebSocket connection to reach restricted backend paths such as /admin.

How do I decode binary WebSocket messages using Protobuf or MessagePack?▼

Capture the binary frame, then decode it with protoc --decode_raw or msgpack-tools. Modify fields such as user_id or is_admin, re-encode, and resend to test whether the server re-validates deserialized values.