hunt-websocket
Fungsinya
Skill ini memeriksa pembajakan WebSocket dan socket.io, pemeriksaan setiap pesan yang lemah, dan celah kontrol akses. Skill ini untuk pengujian resmi fitur chat, dashboard langsung, dan perdagangan.
Kapan dipakai
- βSaat aplikasi memakai WebSocket untuk chat, data langsung, atau perdagangan.
- βSaat koneksi bergantung pada cookie browser dan Anda ingin memeriksa pemeriksaan origin.
- βKetika pesan istimewa mungkin diterima tanpa pemeriksaan izin ulang.
Link skill
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-websocket/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βAplikasi chat kami memakai WebSocket dengan cookie. Bisakah Anda memeriksa apakah situs lain bisa membuka socket sebagai pengguna yang sudah login dalam pengujian resmi kami?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memeriksa handshake dan pemeriksaan origin, lalu mengirim pesan yang diubah atau istimewa untuk melihat apakah diterima. Masalah yang terkonfirmasi dilaporkan beserta bukti.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
HUNT-WEBSOCKET β WebSocket Security
Crown Jewel Targets
CSWSH (Cross-Site WebSocket Hijacking) with a cookie-authenticated handshake and no CSRF/per-connection token = HighβCritical (real-time exfil of any logged-in victim's data).
Highest-value chains:
- CSWSH β data exfil / ATO β handshake authenticates via ambient cookie, no CSRF token, Origin not enforced β attacker page opens WS as the victim and streams their messages/PII/tokens. If the stream carries a session/refresh/CSRF token, this escalates to ATO.
- No per-message auth β HTTP/handshake auth present but individual WS frames are not re-authorized β privileged messages accepted (
deleteUser,getSecretConfig). - Message tampering β modify in-flight frames (price, qty, userId, amount) in trading/game/checkout apps β financial fraud.
- socket.io namespace / room authz bypass β connect to a privileged namespace or join another user's room without a permission check β cross-tenant real-time exfil.
- Handshake-layer Upgrade smuggling β a malformed
Upgrade/Connection/Sec-WebSocket-*handshake makes the front proxy and origin disagree on whether an upgrade occurred β request-smuggling tunnel.
Grounding β Reference Cases (read before hunting)
These are public, verifiable references. Use them to calibrate what a real WS finding looks like and how it was proven. Do not invent additional report IDs or payouts.
| # | Source / ID | Class | Lesson |
|---|---|---|---|
| 1 | PortSwigger Web Security Academy β "Cross-site WebSocket hijacking" (research + labs) | CSWSH | Canonical CSWSH model: cookie-auth handshake + no CSRF token + missing Origin check β attacker reads/sends as victim. The authoritative methodology. |
| 2 | Christian Schneider β "Cross-Site WebSocket Hijacking (CSWSH)" (original disclosure/write-up, 2013) | CSWSH | First public CSWSH technique: cookie-auth handshake + no Origin enforcement; PoC must prove victim-data receipt in the attacker browser, not just a 101. |
| 3 | Coda CSWSH (referenced in this repo's hunt-csrf set) | CSWSH | Real-time collab apps commonly authenticate the socket purely via cookie; Origin allow-listing was the missing control. |
| 4 | CVE-2020-7662 β websocket-extensions (Node) ReDoS |
DoS | A crafted Sec-WebSocket-Extensions header triggers catastrophic backtracking β handshake header is an attack surface, not just frames. |
| 5 | CVE-2024-37890 β ws (Node) DoS |
DoS | Many handshake request headers exhaust the server; confirms the handshake itself is parser-attackable pre-frames. |
| 6 | Outdated socket.io / Engine.IO stacks |
socket.io | Motivates the version-fingerprint step in Phase 7 β fingerprint the version, then check that release's known advisories. |
Only the four CVEs above are asserted with exact IDs because they are verifiable. For any case where you are not certain of the exact identifier, describe the technique with no citation β a wrong CVE is worse than none.
Phase 1 β Discover WebSocket Endpoints
# Grep JS for WS connections (handshake URLs, socket.io clients)
grep -rE "new WebSocket|io\(|io\.connect|socket\.io|new SockJS|signalr|Phoenix\.Socket|wss?://" \
recon/$TARGET/ --include="*.js" 2>/dev/null | \
grep -oE "(wss?://[^'\"]+|/[a-zA-Z0-9/_.-]*socket[^'\"]*|/signalr[^'\"]*|/cable\b)" | sort -u
# Crawl URLs for realtime hints
grep -iE "socket|/ws\b|websocket|stream|realtime|live|chat|events|/cable|/signalr|notifications" \
recon/$TARGET/urls.txt | sort -u
# Probe handshake (101 = upgrade supported)
curl -sI -o /dev/null -w "%{http_code}\n" \
-H "Connection: Upgrade" -H "Upgrade: websocket" \
-H "Sec-WebSocket-Version: 13" \
-H "Sec-WebSocket-Key: $(head -c16 /dev/urandom | base64)" \
"https://$TARGET/ws"
# socket.io polling handshake leaks version + sid
curl -s "https://$TARGET/socket.io/?EIO=4&transport=polling" | head -c 300; echo
# Non-standard WS ports
nmap -sV -p 80,443,3000,3001,8080,8443,8888,9000 $TARGET 2>/dev/null | grep open
In Burp Pro, use get_proxy_websocket_history (and the WebSockets tab) after browsing the app to enumerate live sockets, message schemas, and which frames carry auth-sensitive data.
Phase 2 β CSWSH (Cross-Site WebSocket Hijacking)
CSWSH requires THREE conditions together: (a) the handshake authenticates via an ambient credential (cookie sent automatically), (b) there is no unpredictable per-connection token in the handshake (no CSRF toke
Pertanyaan umum
Apa itu cross-site WebSocket hijacking?
Itu terjadi ketika situs lain membuka socket yang memakai cookie korban dan membaca data yang dialirkan.
Apakah setiap pesan diperiksa?
Ya. Skill ini menguji apakah setiap pesan diotorisasi, bukan hanya koneksi pertama.
Framework apa saja yang dicakup?
Skill ini menyebut socket.io, SignalR, dan Phoenix Channels.
Detail
Deskripsi asli dari pembuat
Hunt WebSocket vulnerabilities β Cross-Site WebSocket Hijacking (CSWSH), missing/weak Origin validation on the WS handshake, no per-message authentication, message tampering, socket.io namespace/room authorization bypass, and handshake-layer Upgrade smuggling. Use when target has WebSocket endpoints (ws:// or wss://), socket.io / SignalR / Phoenix Channels, real-time features, chat, live dashboards, notifications, or trading platforms.
Popularitas
- Bintang GitHub
- 5.4k
- Peringkat
- #14939
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
apk-redteam-pipeline
5.4kMembantu agent Anda menguji aplikasi Android untuk kelemahan keamanan, mulai dari mencari file APK dan melakukan dekompilasi hingga memeriksa rahasia yang terekspos.
bugcrowd-reporting
5.4kMembantu agent Anda menulis laporan kerentanan Bugcrowd yang lebih baik, dengan memilih kategori yang tepat dan menjawab keberatan out-of-scope.
cloud-iam-deep
5.4kMembantu agent Anda memeriksa apa yang bisa diakses oleh kredensial cloud yang ditemukan di AWS, Azure, atau Google Cloud, selama pengujian keamanan yang sudah diizinkan.
enterprise-vpn-attack
5.4kMembantu agent Anda memeriksa perangkat VPN dan akses jarak jauh dari Cisco, Fortinet, Citrix, dan lainnya untuk kelemahan yang diketahui selama pengujian yang sudah diizinkan.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.