neothecapt/redteamagent/csrf-testing
Claude Code and agent skill by neothecapt/redteamagent
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Cross-site request forgery testing for state-changing operations
Install
npx vskill@latest install neothecapt/redteamagent/csrf-testingSKILL.md
The same SKILL.md was published earlier as neothecapt/redteamagent/csrf-testing.
CSRF Testing (Cross-Site Request Forgery)
When to Activate
- State-changing operations (POST, PUT, DELETE, PATCH)
- Cookie-based authentication
- Forms or API calls that modify user data, settings, or permissions
Tools
run_tool curl(manual request replay)- Burp Suite (generate CSRF PoC)
- Browser DevTools (inspect cookies, headers)
- Custom HTML PoC pages
Methodology
1. Identify CSRF Protections
- [ ] Check for CSRF token in forms (hidden field
csrf_token,_token,authenticity_token) - [ ] Check for CSRF token in headers (
X-CSRF-Token,X-XSRF-Token) - [ ] Check
SameSiteattribute on session cookies - [ ] Check
Referer/Originheader validation - [ ] Check custom headers requirement (e.g.,
X-Requested-With) - [ ] Check
Content-Typeenforcement (JSON only = partial protection)
2. Test Token Validation
- [ ] Remove CSRF token entirely — does request succeed?
- [ ] Submit empty token value
- [ ] Use token from another session / different user
- [ ] Reuse old/expired token
- [ ] Change token to arbitrary value
- [ ] Check if token is tied to session or independent
- [ ] Swap HTTP method: POST → GET (may skip token check)
3. Test SameSite Cookie Bypass
- [ ]
SameSite=None— no protection, full CSRF possible - [ ]
SameSite=Lax— test top-level GET navigation (form method=GET) - [ ]
SameSite=Lax— 2-minute window after cookie set (Chrome) - [ ] No SameSite set — defaults vary by browser (Lax in Chrome)
- [ ] Check if API uses cookies at all (vs Bearer tokens)
4. Test Referer/Origin Validation
- [ ] Remove
Refererheader entirely (use<meta name="referrer" content="no-referrer">) - [ ] Set Origin to
null(sandboxed iframe, data: URI) - [ ] Subdomain spoofing:
https://target.com.attacker.com - [ ] Prefix bypass:
https://attacker.com/target.com - [ ] Check regex flaws in validation
5. Build CSRF PoC
- [ ] Auto-submit form:
``html <form action="https://target/change-email" method="POST"> <input name="email" value="attacker@evil.com"> </form> <script>document.forms[0].submit()</script> ``
- [ ] Image tag for GET:
<img src="https://target/delete?id=1"> - [ ] XHR/fetch for JSON APIs (if CORS allows)
- [ ] Multipart form for file upload CSRF
6. High-Value Targets
- [ ] Password change (without current password)
- [ ] Email change
- [ ] Account settings modification
- [ ] Admin actions (create user, change roles)
- [ ] Financial transactions
- [ ] API key generation / rotation
7. Chained Attacks
- [ ] CSRF + Self-XSS = stored XSS via CSRF
- [ ] CSRF + login = login CSRF (force victim into attacker's account)
- [ ] CSRF + CORS misconfiguration
What to Record
- Endpoint and action vulnerable to CSRF
- Missing or bypassable protection mechanism
- Working PoC HTML
- Business impact of the forged action
- Severity: Medium (settings change) to High (account takeover, financial)
- Remediation: synchronizer token pattern, SameSite=Strict, Origin validation
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagent/skills/csrf-testing/SKILL.md
Popularity
- Repository stars
- 69
- Repository forks
- 13
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/neothecapt/redteamagent/csrf-testing)