Cross-site request forgery abuses ambient authority (cookies, HTTP auth) across origins. Do not rely on CORS alone; enforce non-replayable tokens and strict origin checks for every state change.
Assess session model - Cookies with SameSite attrs, custom headers, tokens
Check defenses - Anti-CSRF tokens and Origin/Referer enforcement
Attempt preflightless delivery - Form POST, text/plain, multipart/form-data
Test navigation - Top-level GET navigation
Cross-browser validation - Behavior differs by SameSite and navigation context
Validation
Demonstrate a cross-origin page that triggers a state change without user interaction beyond visiting
Show that removing the anti-CSRF control (token/header) is accepted, or that Origin/Referer are not verified
Prove behavior across at least two browsers or contexts (top-level nav vs XHR/fetch)
Provide before/after state evidence for the same account
If defenses exist, show the exact condition under which they are bypassed (content-type, method override, null Origin)
False Positives
Token verification present and required; Origin/Referer enforced consistently
No cookies sent on cross-site requests (SameSite=Strict, no HTTP auth) and no state change via simple requests
Only idempotent, non-sensitive operations affected
Impact
Account state changes (email/password/MFA), session hijacking via login CSRF
Financial operations, administrative actions
Durable authorization changes (role/permission flips, key rotations) and data loss
Pro Tips
Prefer preflightless vectors (form-encoded, multipart, text/plain) and top-level GET if available
Test login/logout, OAuth connect/disconnect, and account linking first
Validate Origin/Referer behavior explicitly; do not assume frameworks enforce them
Toggle SameSite and observe differences across navigation vs XHR
For GraphQL, attempt GET queries or persisted queries that carry mutations
Always try method overrides and parser differentials
Combine with clickjacking when visual confirmations block CSRF
Summary
CSRF is eliminated only when state changes require a secret the attacker cannot supply and the server verifies the caller's origin. Tokens and Origin checks must hold across methods, content-types, and transports.
How to use it
Copy the folder
Take asdfgh1445/strix•csrf 测试 from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
Check the name does not clash
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.