Documentation
README
WebSocket Security Testing
Objective
Exploit WebSocket implementation flaws including cross-site WebSocket hijacking (CSWSH), message injection, and authentication bypass.
Testing Methodology
Phase 1: Identify WebSocket Endpoints
# Look for WebSocket upgrade
curl -s -D- https://TARGET/ -H "Upgrade: websocket" -H "Connection: Upgrade"
# Check common paths
for path in /ws /socket /websocket /api/ws /chat /live /realtime; do
curl -s -D- "https://TARGET$path" \
-H "Upgrade: websocket" \
-H "Connection: Upgrade" \
-H "Sec-WebSocket-Version: 13" \
-H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" 2>/dev/null | head -1
done
Phase 2: Cross-Site WebSocket Hijacking (CSWSH)
Check if Origin header is validated:
This is the opening of the README. Read the full README on GitHub.