본문으로 건너뛰기
Skillpedia
보안48k · #4866

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-csrf/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. 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:

  1. GET the form endpoint to establish a baseline and check what fields exist (look for hidden csrf_token, authenticity_token, _token, csrfmiddlewaretoken fields).
  2. POST the state-changing action without any CSRF token field. Send only the functional parameters (email, amount, etc.).
  3. Use a "simple-request" Content-Type — application/x-www-form-urlencoded, multipart/form-data, OR text/plain are 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 a text/plain body (common), craft a text/plain payload that parses as valid JSON (see the JSON-CSRF-via-text/plain section). Don't skip a JSON endpoint on the assumption that application/json alone is protective.
  4. 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의 영향을 받았을 때 가장 위험한 작업은 무엇인가요?

비밀번호 변경, 송금, 관리 작업, 계정 연결처럼 중요한 정보를 바꾸는 작업이 가장 위험합니다.

상세 정보

작성자의 원본 설명

Hunting skill for csrf vulnerabilities.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4866
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬