hunt-csrf
하는 일
이 도구는 웹사이트가 CSRF라는 공격에 취약한지 확인하도록 돕습니다. 이 공격은 사용자가 모르는 사이에 웹사이트가 사용자를 대신해 원하지 않는 작업을 수행하도록 속일 수 있습니다.
사용하는 경우
- ✓분석 권한이 있는 웹사이트의 보안을 테스트할 때.
- ✓통제된 환경에서 CSRF 공격이 어떻게 작동하는지 이해할 때.
- ✓웹사이트가 중요한 사용자 작업을 제대로 보호하는지 확인할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-csrf/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“'example.com'의 비밀번호 변경 페이지가 CSRF에 취약한지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 공격자가 웹사이트에 작업을 수행하도록 속이는 방식을 시뮬레이션합니다. 웹사이트가 요청 헤더처럼 가짜일 수 있는 정보를 신뢰해 민감한 작업을 수행하는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- Wait for explicit confirmation in the current conversation.
Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
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
…
자주 묻는 질문
CSRF란 무엇인가요?
CSRF(Cross-Site Request Forgery)는 이미 로그인된 웹사이트에서 사용자의 브라우저가 원하지 않는 작업을 실행하도록 속이는 공격입니다.
이 도구를 사용하려면 허가가 필요한가요?
네, 시스템 소유자의 명시적이고 서면으로 된 허가가 필요합니다. 무단 사용은 불법입니다.
CSRF의 영향을 받았을 때 가장 위험한 작업은 무엇인가요?
비밀번호 변경, 송금, 관리 작업, 계정 연결처럼 중요한 정보를 바꾸는 작업이 가장 위험합니다.
상세 정보
인기도
- GitHub 스타
- 48k
- 순위
- #4866
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.