idor
하는 일
이 스킬은 항목 ID를 소유권 확인 없이 쓰는 안전하지 않은 직접 객체 참조를 찾기 위한 플레이북입니다. 자신의 앱이나 테스트가 허가된 코드를 검토하는 개발자와 테스터를 위한 스킬입니다.
사용하는 경우
- ✓개발자가 URL이나 요청의 ID를 바꾸면 다른 사용자의 데이터가 노출되는지 확인해 달라고 요청할 때.
- ✓에이전트가 객체 ID를 받는 REST, GraphQL 또는 쿼리 문자열 엔드포인트를 검토할 때.
- ✓팀이 소유권 검사가 필요한 엔드포인트 목록을 원하는 경우.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/idor/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 API에서 주문 번호를 바꾸면 사용자가 다른 사람의 송장을 볼 수 있는지 확인해 주시겠어요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 객체 ID를 받는 엔드포인트를 찾고, 각각에 대해 세 가지를 확인합니다. 호출자가 누구인지, 객체가 그 사람의 것인지, 그리고 그 역할이 허용되는지입니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
IDOR Hunting Playbook
IDOR is the #1 source of bug bounty payouts because it's simple, ubiquitous, and scanners can't find it (authorization is business logic). Every endpoint that takes an object ID is a candidate.
1. Sources
- URL path segments:
/api/users/123/invoices/456 - Query string:
?user_id=123 - JSON body fields:
{"orderId": 123} - Headers used as auth scope:
X-Tenant-ID,X-Customer-Id - JWT claims that downstream handlers trust:
sub,tenant,role - WebSocket subscription filters
- GraphQL arguments (
user(id: 123))
2. Audit workflow
Step 1 — enumerate object-handling endpoints
# REST
grep -rE '@(Get|Post|Put|Delete|Patch)Mapping.*\{[a-zA-Z]+Id\}' /workspace/src # Spring
grep -rE 'router\.(get|post|put|delete)\([^)]*:id' /workspace/src # Express
grep -rE '@app\.route\([^)]*<[a-z]+:' /workspace/src # Flask
grep -rE 'resources?\s+:[a-z]+' /workspace/src # Rails
# GraphQL
grep -rE 'type Query|type Mutation' /workspace/src
grep -rE '\w+\(id: ID' /workspace/src
Step 2 — for each endpoint, answer three questions
- Does it check who the caller is? (auth middleware / decorator)
- Does it check whether the object belongs to the caller? (ownership check / tenant filter in the query)
- Does it check whether the caller's role permits the action? (RBAC / policy engine)
A "no" to question 2 = horizontal IDOR (read/write other users' data). A "no" to question 3 = vertical IDOR (regular user → admin action).
Step 3 — ownership-check grep patterns
# Django: should have .filter(user=request.user) on the queryset
grep -rE 'Model\.objects\.get\(pk=' /workspace/src | grep -v 'user=request\.user'
# Rails: should have current_user.posts.find(params[:id])
grep -rE 'Post\.find\(params\[:id\]\)' /workspace/src
# Spring: should have @PreAuthorize("#id == principal.id")
grep -rE 'findById\(id\)' /workspace/src | xargs -I{} grep -L '@PreAuthorize\|@PostAuthorize'
3. High-yield patterns
GraphQL IDOR via introspection
curl -X POST https://target.com/graphql \
-H 'Content-Type: application/json' \
-d '{"query":"{ __schema { types { name fields { name args { name type { name } } } } } }"}'
Any query field that takes an id arg and lacks a custom directive
(@auth(requires: OWNER)) is a candidate. Mutations are even higher
value — they often forget ownership checks.
JWT claim trust
If the handler pulls user_id from request.user.id but also accepts
a user_id query param as override for "admin features", check whether
the override path enforces the admin claim. Frequently broken.
Mass assignment via hidden fields
User.objects.create(**request.POST.dict())
# allows POST'ing is_staff=true
4. PoC workflow
Two-account diff:
- Create account A, note
sessionAcookie andobjectAID. - Create account B, note
sessionBcookie andobjectBID. curl -b sessionA /api/objects/<objectB>— should 403.- If it returns 200 with objectB data → confirmed IDOR.
For vertical escalation:
- Normal user cookie
sessionU. - Call admin endpoint:
curl -b sessionU -X POST /api/admin/users/<victim>/role -d '{"role":"admin"}'. - Watch the response code + subsequent
GET /api/users/<victim>.
5. UUID vs integer
Sequential integer IDs make IDOR trivial. UUIDv4 makes it harder but:
- UUIDs leak in logs, emails, public URLs, support tickets
- Many apps use UUIDv1 (time-based) which is partially predictable
- Enumeration through a listing endpoint still works
- Some APIs accept both UUID and numeric ID (dual primary key)
Always test UUID endpoints — the "it's a UUID so it's safe" assumption is one of the richest hunting grounds.
6. Success signals
- HTTP 200 where you expected 403/404
- Response body contains PII/data belonging to the other account
- Role field changed on victim account
- Subsequent admin action now permitted for low-priv session
Negative control: same request with your own account's ID. Should return 200 with identical shape. Anything that returns 404 for your own account but 200 for someone else's is a confirmation signal.
7. Default CVSS
| Variant | Vector | Score |
|---|---|---|
| Horizontal read (other user PII) | AV:N/AC:L/PR:L/UI |
자주 묻는 질문
안전하지 않은 직접 객체 참조란 무엇인가요?
앱이 요청의 ID로 항목을 가져오면서, 사용자가 그것을 볼 권한이 있는지 확인하지 않는 경우입니다.
이런 ID는 보통 어디에 나타나나요?
스킬은 URL 경로, 쿼리 문자열, JSON 본문, 헤더, JWT 클레임, GraphQL 인수를 나열합니다.
자동 스캐너가 이것을 찾기 어려운 이유는 무엇인가요?
스킬은 권한이 업무 규칙에 달려 있어서, 스캐너가 접근이 맞는지 판단하기 어렵다고 설명합니다.
상세 정보
작성자의 원본 설명
Hunt Insecure Direct Object Reference (CWE-639) — missing authorization checks on object IDs. Covers horizontal vs vertical privilege escalation, UUID vs integer guessing, and GraphQL introspection-driven IDOR discovery.
인기도
- GitHub 스타
- 6.5k
- 순위
- #13959
- 라이선스
- 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 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.