New advertisers: 50% off your first month with code FIRSTMONTHSee slots
yaklang avatar

Websocket Security

Reference guide for WebSocket security: handshake mechanics, cross-site WebSocket hijacking, testing tooling, and common flaws.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
5
skills.sh installs
4.1K
GitHub stars
2.7K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the WebSocket handshake, CSWSH exploitation steps, tool-based testing workflows, and a table of common vulnerability classes
  • Includes handshake examples (Sec-WebSocket-Key, Sec-WebSocket-Accept), a CSWSH proof-of-concept page, and wsrepl, ws-harness, and Burp extension usage
  • Explains CSWSH preconditions, including missing Origin validation and SameSite cookie behavior during the upgrade request
  • Designed for authorized tests of apps using real-time channels, chat, notifications, or WebSocket-backed APIs, with cross-loading to api-sec

Install

$ npx -y skills add yaklang/hack-skills --skill websocket-security -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

SKILL: WebSocket Security

AI LOAD INSTRUCTION: This skill covers WebSocket protocol basics, cross-site WebSocket hijacking (CSWSH), practical tooling bridges, and common vulnerability classes. Apply only in authorized tests; treat tokens and message content as sensitive. For REST/GraphQL companion testing, cross-load api-sec when present in the workspace.

0. QUICK START

During proxy or raw traffic review, watch for:

Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Version: 13
Sec-WebSocket-Protocol: optional-subprotocol

Server success response indicators:

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=

Routing note: in Burp/browser DevTools, filter for 101 and Upgrade: websocket; for deeper API testing, align authn/authz models through api-sec.


1. PROTOCOL BASICS

Client request (typical)

Details

Repository
github.com/yaklang/hack-skills
Category
Security
First seen
May 16, 2026

More from yaklang/hack-skills

All 102

Similar to Websocket Security

More Security