hunt-csrf
하는 일
이 스킬은 계정 상태를 바꾸는 작업이 사이트 간 요청 위조로부터 보호되는지 테스트합니다. 로그인 세션, 프로필 변경, 기타 계정 작업을 허가받아 점검할 때 사용합니다.
사용하는 경우
- ✓양식이 계정 설정을 바꾸는데 유효한 토큰이 필요한지 확인하고 싶을 때.
- ✓사이트가 보호를 위해 Origin이나 Referer 헤더에만 의존할 때.
- ✓GraphQL이나 API 엔드포인트가 GET 요청으로 변경을 받을 수 있을 때.
스킬 링크
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-csrf/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“허가된 테스트에서 저희 프로필 수정 양식이 유효한 토큰 없이 다른 사이트에서 제출될 수 있는지 확인해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 같은 작업을 출처 헤더를 바꾸거나, 토큰을 빼거나, 테스트 페이지에서 보내 보고 변경이 여전히 일어나는지 확인합니다. 적절한 보호 없이 성공하는 작업을 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Shortcut: a raw HTTP client beats a real cross-origin page for header-check CSRF
A raw HTTP client (curl, Burp Repeater, any scripting client) is not a browser: it will send
whatever Origin/Referer header VALUE you set, from any path, on the same connection as your
authenticated cookie. Many apps that claim to defend against CSRF only do a naive string check
on the incoming Origin/Referer header (does it contain/equal some expected value?) rather than
real same-origin enforcement — you can satisfy that check directly by setting the header, with no
actual cross-site delivery (hosting an HTML page, a headless browser) required. This is faster and
more reliable than building a real attacker page for this exact pattern:
POST /profile HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Origin: https://a-domain-the-app-treats-as-trusted-or-attacker-controlled.example
Cookie: <authenticated session>
username=csrf_poc
If some text names a SPECIFIC origin/domain as the "expected" attacker page, that literal value is
often exactly what the server's check is looking for — try it verbatim in Origin (fall back to
Referer if Origin alone doesn't flip it). Only build a real cross-origin page (actual browser
delivery) when the target does genuine SameSite/fetch-based origin enforcement that a spoofed header
can't satisfy.
Autonomous Testing Priority
CSRF only matters on state-changing actions that a browser could be tricked into making cross-site.
Testing flow:
- GET the form endpoint to establish a baseline and check what fields exist (look for hidden
csrf_token,authenticity_token,_token,csrfmiddlewaretokenfields). - POST the state-changing action without any CSRF token field. Send only the functional parameters (email, amount, etc.).
- Use a "simple-request" Content-Type —
application/x-www-form-urlencoded,multipart/form-data, ORtext/plainare the three CORS "simple" content-types a cross-origin form can send with no preflight. A JSON endpoint is CSRF-resistant only if the server rejects those — if it also accepts atext/plainbody (common), craft atext/plainpayload that parses as valid JSON (see the JSON-CSRF-via-text/plain section). Don't skip a JSON endpoint on the assumption thatapplication/jsonalone is protective. - If the action succeeds (2xx, no "invalid token" error) → CSRF is confirmed.
High-value targets (in order of impact):
- Email/password change → account takeover
- Money transfer or payment → financial fraud
- Admin actions (role assignment, user deletion)
- OAuth social-account linking → persistent ATO
Token bypass techniques when a token IS present:
- Omit the token field entirely — some frameworks only validate if the field exists, not if it's absent
- Send an empty value (
_token=) — some validate format, not presence - Copy a token from another session — some tokens aren't tied to the session
Scope: Don't test CSRF on login forms (no existing session to exploit), logout (no real impact), or read-only GET endpoints.
Crown Jewel Targets
CSRF becomes high-value when it touches state-changing actions with account-level or financial consequences. The highest-paying targets are:
- Account takeover vectors: OAuth/SSO flows (RelayState manipulation), social account linking/unlinking (Oculus-Facebook, SocialClub), import-friends features that expose OAuth tokens
- Authentication infrastructure: Login CSRF, session fixation via CSRF, forced account association
- API endpoints accepting cross-origin POST: JSON APIs, heartbeat/activity APIs, anything that skips Content-Type enforcement
- Third-party integrations: Grafana, monitoring dashboards, embedded analytics — often lag on CSRF protections
- Social platforms: Twitter/X collections, friend imports, social graph mutations — high-volume, authenticated actions with real user impact
Asset types that pay most: Core product auth flows > API gateways > third-party integrations running on subdomains > admin panels.
Attack Surface Signals
URL Patterns
/oauth/authorize?RelayState=
/accounts/link
/import/friends
/api/v*/heartbeat
/api/v*/collect
/monitoring/* (Grafana, Prow, Prometheus)
/auth/saml/callback
/connect/* (social integrations)
Response Header Signals
# Missing or weak SameSite cookie attributes
Set-Cookie: session=abc123; HttpOnly # no SameSite = vulnerable
Set-Cookie: sess
자주 묻는 질문
사이트 간 요청 위조란 무엇인가요?
로그인된 브라우저가 사용자가 의도하지 않은 요청을 보내도록 속이는 공격입니다.
테스트에 실제 공격자 웹사이트가 꼭 필요한가요?
항상 그렇지는 않습니다. 서버가 헤더 텍스트만 확인한다면 직접 만든 요청만으로도 충분할 수 있다고 스킬은 설명합니다.
어떤 헤더를 테스트하나요?
먼저 Origin 헤더를 테스트하고, 필요하면 Referer 헤더로 넘어갑니다.
상세 정보
작성자의 원본 설명
Hunting skill for csrf vulnerabilities. Built from 15 public bug bounty reports including modern variants — SameSite=Lax sibling-subdomain bypass (Argo CD CVE-2024-22424), GraphQL mutations-via-GET (GitLab $3,370), framework-wide CSRF middleware disabled (Stripe Dashboard $5,000), path-traversal CSRF-token bypass (GitHub Enterprise CVE-2022-23732 $10k), Origin-omission bypass (TikTok $2,500), OAuth-state null-byte (Streamlabs), WebSocket CSRF / CSWSH (Coda), default-SameSite email-change → ATO (YoYo Games $400), social-account-link CSRF (HackerOne), JSON-CSRF via text/plain on email-change (Ti
인기도
- GitHub 스타
- 5.4k
- 순위
- #14903
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
apk-redteam-pipeline
5.4k에이전트가 APK 파일을 찾고 디컴파일하는 것부터 노출된 비밀 값을 확인하는 것까지, Android 앱의 보안 약점을 테스트하도록 돕습니다.
bugcrowd-reporting
5.4k에이전트가 올바른 범주를 고르고 범위 밖 이의에 답하며, Bugcrowd 취약점 보고서를 더 잘 쓰도록 돕습니다.
cloud-iam-deep
5.4k에이전트가 승인된 보안 테스트 중 찾은 클라우드 자격 증명이 AWS, Azure, Google Cloud에서 무엇에 접근할 수 있는지 확인하도록 돕습니다.
enterprise-vpn-attack
5.4k에이전트가 승인된 테스트 중 Cisco, Fortinet, Citrix 등의 VPN과 원격 접속 장비에서 알려진 약점을 확인하도록 돕습니다.