Aller au contenu
Skillpedia
Sécurité48k · #4909

hunt-websocket

Ce qu’il fait

Cet outil aide à trouver des failles de sécurité dans les connexions internet appelées WebSockets. Il vérifie si ces connexions peuvent être utilisées pour voler des informations ou effectuer des actions non autorisées.

Quand l’utiliser

  • ✓Lors du test de la sécurité d'un site web ou d'une application.
  • ✓Pour vérifier si des données sensibles peuvent être exposées via des connexions en temps réel.
  • ✓Lorsque vous cherchez à comprendre comment un attaquant pourrait manipuler des transactions ou des messages.

Lien du skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-websocket/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-websocket/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Vérifie la sécurité des WebSockets sur example.com”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil analyse la manière dont un site web établit ses connexions internet en temps réel. Il cherche des moyens de tromper ces connexions pour révéler des informations ou permettre des actions non autorisées, comme si c'était un utilisateur légitime.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

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" \

…
Questions fréquentes

Qu'est-ce qu'un WebSocket ?

C'est un moyen pour votre navigateur (ou votre application) et un serveur web d'échanger des données en temps réel, comme dans les chats ou les jeux en ligne.

Qu'est-ce que le CSWSH ?

C'est un type d'attaque (Cross-Site WebSocket Hijacking) où un attaquant tente de voler les données d'un utilisateur via une connexion WebSocket, en exploitant des failles d'authentification.

Ai-je besoin d'une autorisation pour utiliser cet outil ?

Oui, il est indispensable d'avoir une autorisation explicite et écrite du propriétaire du système avant d'utiliser cet outil. Un usage abusif est illégal.

Détails

Description originale de l’auteur

Hunt WebSocket vulnerabilities

repo: sickn33/agentic-awesome-skills

Popularité

Étoiles GitHub
48k
Position au classement
#4909
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires