websocket-security

Assess WebSocket endpoints for handshake, session binding, and message-layer vulnerabilities.

5|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/DorianGallo/hack-skills-local --skill websocket-security-doriangallo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: websocket-security
Source: https://github.com/DorianGallo/hack-skills-local/tree/main/skills/websocket-security
Command: npx skills add https://github.com/DorianGallo/hack-skills-local --skill websocket-security-doriangallo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps security testers understand the WebSocket handshake and identify common WebSocket-specific weaknesses that lead to account takeover, data leakage, or injection paths in real-time applications.

Core Features & Use Cases

  • WebSocket protocol validation: Review Upgrade/Connection, Sec-WebSocket-Key, and 101 Switching Protocols behavior to confirm the endpoint is behaving correctly.
  • CSWSH threat modeling and testing: Detect missing Origin validation and assess whether browser cookies or session binding enable cross-site WebSocket hijacking.
  • Practical assessment workflow: Use a decision tree to triage endpoints, align auth models with REST via api-sec when applicable, and test message semantics and transport choices (ws:// vs wss://).
  • Advanced vulnerability angles: Cover message injection risks, binary message manipulation (Protobuf/MessagePack), Socket.IO namespace/event issues, and potential proxy/WAF interactions including smuggling concepts.

Quick Start

Use websocket-security to review the WebSocket handshake, check for missing Origin validation, and validate whether an attacker-controlled page could connect and send messages using a victim’s active session to the target endpoint.

Frequently Asked Questions about websocket-security

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

FAQPage Schema
How do I test for cross-site WebSocket hijacking?

Assess WebSocket endpoints by reviewing the Upgrade and Connection headers, Sec-WebSocket-Key, and the 101 Switching Protocols response to confirm the endpoint is behaving correctly during the handshake.

How do I test WebSocket message injection and binary deserialization vulnerabilities?

Test message injection by manipulating text and binary frames, targeting Protobuf and MessagePack deserialization, alongside Socket.IO namespace and event issues, to identify real-time account compromise or data leakage paths.

Can I use this approach to test Socket.IO transports and ws vs wss connections?

Yes, you can test Socket.IO transports by inspecting traffic and validating transport safety across ws versus wss, checking for auth token leakage, and probing proxy or WAF interactions for potential smuggling concepts.

What are common WebSocket security flaws and how do I triage them?

Common WebSocket security flaws include missing Origin validation, weak session binding, message injection, and auth token leakage. You triage them using a decision tree to align auth models and validate message semantics across frames.

Does WebSocket testing cover proxy and WAF interaction anomalies?

Yes, WebSocket testing covers proxy and WAF interactions by inspecting traffic for anomalies and potential smuggling concepts, validating header requirements like Origin, Host, and Cookies, and ensuring transport safety.