🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More β†’
Socket
Book a DemoSign in
Socket

wshawk

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wshawk

Professional WebSocket security scanner with real vulnerability verification, session hijacking tests, and CVSS scoring

Source
pipPyPI
Version
3.0.6
Maintainers
1

WSHawk β€” Enterprise-Grade WebSocket Security Scanner & Web Penetration Testing Toolkit

Python 3.8+ PyPI version License: AGPL-3.0 Playwright Status: Production Adoption: 900+ Clones Community: 120+ Devs

WSHawk is an enterprise-grade, open-source WebSocket security scanner built for professional penetration testers and red teams. It performs automated vulnerability assessment over WebSocket connections using an adaptive Smart Payload Evolution (SPE) engine with real-time feedback loops and genetic payload mutation. Designed for high-performance environments at the ROT Independent Security Research Lab.

Starting with v3.0.6, we've transitioned to the AGPL-3.0 license to better protect the project while keeping it open for the community. This release includes the Headless DOM Invader powered by Playwright for real browser-based XSS verification and complex SSO auth flow recording/replay. Also includes a Context-Aware Heuristic Engine and WSHawk Browser Companion for seamless handshake interception.

[!IMPORTANT] Full Documentation:

Why WSHawk β€” Enterprise Security Features

  • Smart Payload Evolution β€” Genetic algorithm that mutates and evolves payloads based on server responses, WAF blocks, and timing signals
  • 22,000+ attack payloads across 11 categories (SQLi, XSS, CMDi, XXE, SSRF, NoSQLi, LFI, SSTI, LDAP, open redirect, CSV injection)
  • Real browser-based XSS verification via Playwright β€” confirms actual script execution, not just pattern matching
  • Blind vulnerability detection via OAST callbacks β€” catches XXE, SSRF, and DNS exfiltration that response-only scanners miss
  • Full-duplex WebSocket interceptor β€” MitM proxy with frame-by-frame forward, drop, and edit (similar to Burp Suite)
  • Session hijacking analysis β€” Token reuse, session fixation, privilege escalation, and impersonation testing
  • 22 web pentest tools β€” Crawler, fuzzer, port scanner, subdomain finder, WAF detector, CORS tester, SSL analyzer, and more
  • WAF-aware mutation engine β€” 8 bypass strategies (encoding, case variation, comment injection, polyglot, tag breaking)
  • CVSS v3.1 scoring β€” Industry-standard risk assessment for all findings
  • Enterprise integrations β€” Auto-push findings to Jira, DefectDojo, Slack, Discord, and Microsoft Teams
  • Professional reporting β€” HTML, JSON, PDF, CSV, and SARIF export formats
  • Native desktop app β€” Electron + Python hybrid with real-time streaming results on Linux, Windows, and macOS

⚑ Performance & Adoption Benchmarks

  • Community Adoption: 900+ repository clones within the last 14 days and active engagement from 120+ unique developers.
  • Scanning Velocity: Engineered in Go with raw syscall optimization, achieving 350,000+ executions per second in distributed fuzzer modules.
  • Payload Corpus: 22,000+ specialized attack vectors across 11 vulnerability categories.

Enterprise WebSocket Vulnerability Scanner

WSHawk's core engine performs enterprise-grade, stateful, bidirectional WebSocket security testing. Unlike traditional DAST scanners that only handle HTTP request-response, WSHawk maintains persistent WebSocket connections and analyzes asynchronous responses that may arrive long after the attack payload is sent β€” critical for real-world financial, healthcare, and SaaS applications.

Vulnerability Detection

CategoryTechnique
SQL InjectionError-based, time-based (SLEEP/WAITFOR), boolean-based blind
Cross-Site Scripting (XSS)Reflection analysis, context detection, DOM sink identification, browser verification
Command InjectionTiming attacks, command chaining (&&, |, ;), out-of-band detection
XML External Entity (XXE)Entity expansion, OAST callback detection, parameter entities
Server-Side Request Forgery (SSRF)Internal IP probing, cloud metadata access, DNS rebinding
NoSQL InjectionMongoDB operator injection ($gt, $ne, $regex, $where)
Path Traversal / LFIFile content markers (/etc/passwd, win.ini), encoding bypass

Smart Payload Engine

The SPE system adapts attack payloads in real-time:

  • Context Generator β€” Detects message format (JSON, XML, plaintext) and generates payloads matching the target's protocol schema
  • Feedback Loop β€” Analyzes server signals (errors, reflections, timing anomalies, WAF blocks) and adjusts strategy dynamically
  • Payload Evolver β€” Genetic algorithm that crossovers and mutates successful payloads to discover novel WAF bypasses

Web Application Penetration Testing Toolkit (Enhanced in v3.0.2)

The WSHawk Desktop application now ships with 22 HTTP security tools organized into six phases. We're building this out alongside the WebSocket scanner to give pentesters a single interface for both WebSocket and HTTP assessments.

Reconnaissance & Discovery Tools

ToolDescription
Web CrawlerBFS spider with form extraction, API endpoint discovery, robots.txt and sitemap.xml parsing
Subdomain FinderPassive enumeration via crt.sh (Certificate Transparency) and AlienVault OTX, plus active DNS brute-forcing with resolution validation
Technology FingerprinterIdentifies 35+ technologies (Nginx, Apache, WordPress, React, Cloudflare, etc.) from headers, cookies, and page content
DNS / WHOIS LookupFull record enumeration (A, AAAA, MX, NS, TXT, CNAME, SOA, SRV, CAA) with WHOIS registration data
TCP Port ScannerAsync connect scanner with service identification, banner grabbing, and preset port lists (top-100, web, database, full)

Vulnerability Scanning Tools

ToolDescription
HTTP FuzzerParameter fuzzing with Β§FUZZΒ§ markers, built-in wordlists, encoding options (URL/Base64/Hex), and heuristic vuln detection
Directory ScannerPath brute-forcing with extension permutation, recursive scanning, custom wordlists (up to 50K entries), and WAF-evasion throttling
Automated Vulnerability ScannerMulti-phase orchestrator: Crawl β†’ Header Analysis β†’ Directory Scan β†’ Fuzz β†’ Sensitive Data Scan, with auto-escalation (SQLi β†’ LFI chaining)
Security Header AnalyzerEvaluates HSTS, CSP, X-Frame-Options, X-Content-Type-Options, CORS, Server, and X-Powered-By with risk ratings
Sensitive Data FinderRegex detection for 30+ secret types β€” AWS keys, Google API keys, JWTs, GitHub tokens, database connection strings, internal IPs

Offensive Security Tools

ToolDescription
WAF DetectorPassive and active fingerprinting of 15+ WAFs (Cloudflare, AWS WAF, Akamai, Imperva, Sucuri, ModSecurity, F5 BIG-IP)
CORS Misconfiguration TesterProbes 6 attack patterns β€” wildcard origin, null origin, subdomain suffix attack, domain prefix injection, HTTP downgrade
SSL/TLS AnalyzerCertificate inspection, protocol version testing (TLS 1.0–1.3), weak cipher detection, expiry and self-signed checks
SSRF Prober40+ payloads targeting AWS/GCP/Azure metadata endpoints, internal services, DNS rebinding, and URL parser confusion
Open Redirect Scanner25+ bypass techniques with auto-detection of 20+ common redirect parameter names
Prototype Pollution Tester__proto__ and constructor.prototype injection via query params and JSON bodies with escalation detection

Exploit Generation & Attack Chaining

ToolDescription
CSRF Exploit ForgeGenerates proof-of-concept HTML pages β€” auto-submitting forms, Fetch API XHR, multipart β€” with CSRF token detection
Attack ChainerMulti-step HTTP attack sequencing with regex-based value extraction and {{variable}} templating across requests
Proxy CA GeneratorRoot Certificate Authority (RSA 4096-bit, 10-year validity) for HTTPS interception with per-host certificate signing
HTTP Request ForgeManual HTTP request builder (GET/POST/PUT/DELETE/PATCH/HEAD/OPTIONS) routed through Python to bypass browser CORS
Report GeneratorProfessional HTML reports with executive summary, severity charts, and remediation guidance. Also exports JSON, PDF, CSV, SARIF

WSHawk Desktop β€” Native Security Testing Application

A native Electron + Python desktop application with three operating modes:

ModeWhat You Get
StandardWebSocket scanner dashboard, request forge, findings panel, traffic history, system log
Advanced+ Payload blaster, real-time WebSocket interceptor, endpoint map, auth builder, mutation lab, scheduler, codec, comparer, notes
Web Pentest+ All 22 HTTP security tools with real-time streaming results

Desktop-Exclusive Features

  • Real-Time WebSocket Interceptor β€” Full-duplex MitM proxy with frame-by-frame forward, drop, and edit controls
  • Payload Blaster β€” High-speed WebSocket fuzzer with 11 payload categories and Smart Payload Evolution toggle
  • WebSocket Endpoint Map β€” Automated discovery via HTTP Upgrade probing, HTML crawling, and JavaScript source analysis
  • Auth Builder β€” Multi-step authentication sequence with regex token extraction and variable substitution
  • Exploit PoC Generator β€” One-click standalone Python exploit script for confirmed vulnerabilities
  • Session Persistence β€” Save and restore full assessment state to ~/.wshawk/sessions/
  • Scan History & Diffing β€” SQLite-backed history with vulnerability regression tracking between scans
  • HawkSearch β€” Ctrl+K command palette for instant navigation to any tool

Builds for: Linux (.pacman, .AppImage, .deb) Β· Windows (.exe NSIS installer) Β· macOS (.dmg)

Full Desktop Documentation β†’

Installation

Install via pip

pip install wshawk

# Optional: Browser-based XSS verification
playwright install chromium

Install on macOS (Homebrew)

Method 1: One-liner (Recommended)

brew install --cask https://raw.githubusercontent.com/regaan/homebrew-tap/main/Casks/wshawk.rb

Method 2: Stay Updated (Via Tap)

# Register the WSHawk tap
brew tap regaan/tap

# Install the cask
brew install --cask wshawk

Install on Kali Linux / Debian

WSHawk is available via the official Regaan APT repository.

# Add the WSHawk GPG key
curl -sSL https://regaan.github.io/wshawk-repo/wshawk_repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/wshawk-archive-keyring.gpg

# Add the WSHawk APT repository
echo "deb [signed-by=/usr/share/keyrings/wshawk-archive-keyring.gpg] https://regaan.github.io/wshawk-repo stable main" | sudo tee /etc/apt/sources.list.d/wshawk.list

# Install WSHawk
sudo apt update && sudo apt install wshawk

Install on Arch Linux

WSHawk is available in the Arch User Repository (AUR).

# Install WSHawk via yay
yay -S wshawk

Install via Docker

docker pull rothackers/wshawk:latest
docker run --rm rothackers/wshawk ws://target.com

See Docker Guide for detailed usage.

Build Desktop Application

git clone https://github.com/regaan/wshawk
cd wshawk

# Build Python sidecar binary
pip install -e . && pip install pyinstaller
pyinstaller wshawk-bridge.spec

# Build desktop installer
mkdir -p desktop/bin && cp dist/wshawk-bridge desktop/bin/
cd desktop && npm install && npm run dist

Quick Start Guide

WebSocket Scan (CLI)

wshawk ws://target.com

Interactive Mode

wshawk-interactive

Advanced Scan with All Features

wshawk-advanced ws://target.com --smart-payloads --playwright --full

Web Dashboard

export WSHAWK_WEB_PASSWORD='your-password'
wshawk --web --port 5000

Desktop Application

cd desktop && npm start

Python API

import asyncio
from wshawk.scanner_v2 import WSHawkV2

scanner = WSHawkV2("ws://target.com")
scanner.use_headless_browser = True
scanner.use_oast = True
asyncio.run(scanner.run_heuristic_scan())

Interface Comparison

CapabilityCLIWeb DashboardDesktop App
WebSocket Scannerβœ…βœ…βœ…
Web Pentest Toolkit (22 tools)β€”β€”βœ…
WebSocket Interceptor (MitM)β€”β€”βœ…
Payload Blaster / Fuzzerβ€”β€”βœ…
Endpoint Discovery Mapβ€”β€”βœ…
Scan Persistenceβ€”SQLiteSQLite + Sessions
Exploit PoC Exportβ€”β€”βœ…
Report FormatsHTMLHTMLHTML / JSON / PDF
Best ForCI/CD pipelinesTeams, SOCManual pentesting, red teams

Configuration

wshawk.yaml

python3 -m wshawk.config --generate
integrations:
  jira:
    api_token: "env:JIRA_TOKEN"
    project: "SEC"
  defectdojo:
    api_key: "env:DD_API_KEY"
    url: "https://defectdojo.your-org.com"
Environment VariableDescription
WSHAWK_BRIDGE_PORTBackend server port (default: 8080)
WSHAWK_WEB_PASSWORDWeb dashboard authentication password
WSHAWK_API_KEYAPI key for programmatic access

Defensive Validation Module

Blue team module for validating your WebSocket security controls:

wshawk-defensive ws://your-server.com
  • DNS Exfiltration Prevention β€” Validates egress filtering effectiveness
  • Bot Detection β€” Tests anti-bot measures against headless browser evasion
  • CSWSH Protection β€” Origin header validation with 216+ malicious origins
  • WSS Protocol Security β€” TLS versions, cipher suites, certificate chain, forward secrecy

See Defensive Validation Guide.

Security Warning β€” Fake Versions

Repackaged versions of WSHawk containing malware have been found on third-party download sites.

Download only from official sources:

Documentation

GuideDescription
V3.0.4 Release GuideAGPL-3.0 Transition, DOM Invader, Auth Flow Recorder β€” full technical reference
πŸ¦… Complete Enterprise GuideArchitecture, scanning engine, configuration, integrations
πŸ’» Desktop Reference ManualAll 22 tools, API reference, build instructions
Getting StartedFirst scan, output format, common use cases
Defensive ValidationBlue team security control testing
Vulnerability DetailsFull vulnerability coverage reference
Session Security TestsWebSocket session hijacking tests
Docker DeploymentContainer deployment guide

Responsible Use

WSHawk is designed for authorized penetration testing, bug bounty programs, security research, and education. Always obtain explicit permission before scanning any target.

The author is not responsible for misuse of this tool. Repackaged versions found on third-party download sites are not associated with this project.

License

AGPL-3.0 License β€” see LICENSE

Author

Regaan | Lead Researcher at ROT Independent Security Research Lab

Contributing

Contributions welcome β€” see CONTRIBUTING.md

Support

ChannelLink
IssuesGitHub Issues
Documentationdocs/
Emailsupport@rothackers.com

WSHawk v3.0.6 β€” Professional WebSocket Security Scanner & Interception Suite

Latest Updates (v3.0.6)

  • DOM Invader: Headless Playwright engine verifies XSS payloads in a real browser β€” zero false positives. Confirms alert(), eval(), DOM mutations, and injected script tags.
  • Auth Flow Recorder: Records complex SSO/OAuth login flows in a visible browser, then replays them headlessly to mint fresh tokens during long fuzzing runs.
  • Auto Session Reconnect: Payload Blaster detects session expiry and automatically replays the recorded auth flow to reconnect β€” no manual intervention needed.
  • AI Exploit Engine: Right-click any parameter in ReqForge to generate context-aware XSS/SQLi/SSTI payloads, auto-populated into the Payload Blaster.
  • Context-Aware Heuristic Fuzzing: Advanced payload generation engine with deep protocol awareness for high-accuracy vulnerability discovery.

Built for security professionals, by Regaan.

Keywords

websocket

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts