Tooluck logoTooluck
SKILL.md

csrf-cross-site-request-forgery

Agent skill fromyaklang/hack-skills

CSRF testing playbook. Use when reviewing state-changing web flows, anti-CSRF defenses, SameSite behavior, JSON CSRF, login CSRF, and OAuth state handling.

How to install csrf-cross-site-request-forgery

install csrf-cross-site-request-forgery
# install the hack-skills pack with the skills CLI
npx skills add yaklang/hack-skills

# or add only this skill to Claude Code: copy the folder

skills/csrf-cross-site-request-forgery/

# into

~/.claude/skills/csrf-cross-site-request-forgery/ (all projects)

.claude/skills/csrf-cross-site-request-forgery/ (one project)

skills/csrf-cross-site-request-forgery/SKILL.md

MITFull file
1# SKILL: CSRF — Cross-Site Request Forgery — Expert Attack Playbook
2
3> **AI LOAD INSTRUCTION**: Expert CSRF techniques. Covers modern bypass vectors (SameSite gaps, custom header flaws, tokenless bypass patterns), JSON CSRF, multipart CSRF, chaining with XSS. Base models often present only basic CSRF without covering SameSite edge cases and common broken token implementations.
4
5## 0. RELATED ROUTING
6
7Also load:
8
9- [cors cross origin misconfiguration](../cors-cross-origin-misconfiguration/SKILL.md) when JSON endpoints become readable cross-origin
10- [oauth oidc misconfiguration](../oauth-oidc-misconfiguration/SKILL.md) when login, account linking, or callback binding relies on OAuth state
11
12---
13
14## 1. CORE CONCEPT
15
16CSRF exploits a victim's active session to perform state-changing requests **from the attacker's origin**.
17
18**Required conditions**:
191. Victim is authenticated (active session cookie)
202. Server identifies session via cookie only (no secondary check)
213. Attacker can predict/construct the valid request
224. Cookie is sent cross-origin (SameSite=None or legacy behavior)
23
24---
25
26## 2. FINDING CSRF TARGETS
27
28**High-value state-changing endpoints**:
29```
30- Password change ← account takeover
31- Email change ← account takeover
32- Add admin / change role ← privilege escalation
33- Bank/payment transfer ← financial impact
34- OAuth app authorization ← hijack oauth flow
35- Account deletion
36- Two-factor auth disable
37- SSH key / API key addition
38- Webhook configuration
39…

Excerpt shown under the repository's MIT license.

More skills in hack-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates