jpskill.com
🛠️ 開発・MCP コミュニティ

idor-vulnerability-testing

This skill should be used when the user asks to "test for insecure direct object references," "find IDOR vulnerabilities," "exploit broken access control," "enumerate user IDs or object references," or "bypass authorization to access other users' data." It provides comprehensive guidance for detecting, exploiting, and remediating IDOR vulnerabilities in web applications.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o idor-vulnerability-testing.zip https://jpskill.com/download/20377.zip && unzip -o idor-vulnerability-testing.zip && rm idor-vulnerability-testing.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/20377.zip -OutFile "$d\idor-vulnerability-testing.zip"; Expand-Archive "$d\idor-vulnerability-testing.zip" -DestinationPath $d -Force; ri "$d\idor-vulnerability-testing.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して idor-vulnerability-testing.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → idor-vulnerability-testing フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

IDORの脆弱性テスト

目的

ウェブアプリケーションにおける不適切な直接オブジェクト参照(IDOR)の脆弱性を特定し、悪用するための体系的な手法を提供します。このスキルでは、データベースオブジェクト参照と静的ファイル参照の両方、パラメーター操作と列挙による検出技術、Burp Suiteを介した悪用、および不正アクセスからアプリケーションを保護するための修正戦略をカバーしています。

入力/前提条件

  • ターゲットウェブアプリケーション: ユーザー固有のリソースを持つアプリケーションのURL
  • 複数のユーザーアカウント: クロスユーザーアクセスを検証するための少なくとも2つのテストアカウント
  • Burp Suiteまたはプロキシツール: リクエスト操作のためのインターセプトプロキシ
  • 承認: セキュリティテストのための書面による許可
  • アプリケーションフローの理解: オブジェクトがどのように参照されるか(ID、ファイル名)の知識

出力/成果物

  • IDOR脆弱性レポート: 発見されたアクセス制御バイパスの文書化
  • 概念実証: ユーザーコンテキストをまたいだ不正なデータアクセスの証拠
  • 影響を受けるエンドポイント: 脆弱なAPIエンドポイントとパラメーターのリスト
  • 影響評価: データ露出の重大度の分類
  • 修正推奨事項: 特定された脆弱性に対する具体的な修正

コアワークフロー

1. IDOR脆弱性の種類を理解する

データベースオブジェクトへの直接参照

アプリケーションがユーザーが制御可能なパラメーターを介してデータベースレコードを参照する場合に発生します。

# Original URL (authenticated as User A)
example.com/user/profile?id=2023

# Manipulation attempt (accessing User B's data)
example.com/user/profile?id=2022

静的ファイルへの直接参照

アプリケーションが列挙可能なファイルパスまたはファイル名を公開する場合に発生します。

# Original URL (User A's receipt)
example.com/static/receipt/205.pdf

# Manipulation attempt (User B's receipt)
example.com/static/receipt/200.pdf

2. 偵察とセットアップ

複数のテストアカウントを作成する

Account 1: "attacker" - Primary testing account
Account 2: "victim" - Account whose data we attempt to access

オブジェクト参照を特定する

以下を含むリクエストをキャプチャして分析します。

  • URL内の数値ID: /api/user/123
  • パラメーター内の数値ID: ?id=123&action=view
  • リクエストボディ内の数値ID: {"userId": 123}
  • ファイルパス: /download/receipt_123.pdf
  • GUID/UUID: /profile/a1b2c3d4-e5f6-...

ユーザーIDをマッピングする

# Access user ID endpoint (if available)
GET /api/user-id/

# Note ID patterns:
# - Sequential integers (1, 2, 3...)
# - Auto-incremented values
# - Predictable patterns

3. 検出技術

URLパラメーター操作

# Step 1: Capture original authenticated request
GET /api/user/profile?id=1001 HTTP/1.1
Cookie: session=attacker_session

# Step 2: Modify ID to target another user
GET /api/user/profile?id=1000 HTTP/1.1
Cookie: session=attacker_session

# Vulnerable if: Returns victim's data with attacker's session

リクエストボディ操作

# Original POST request
POST /api/address/update HTTP/1.1
Content-Type: application/json
Cookie: session=attacker_session

{"id": 5, "userId": 1001, "address": "123 Attacker St"}

# Modified request targeting victim
{"id": 5, "userId": 1000, "address": "123 Attacker St"}

HTTPメソッドの切り替え

# Original GET request may be protected
GET /api/admin/users/1000 → 403 Forbidden

# Try alternative methods
POST /api/admin/users/1000 → 200 OK (Vulnerable!)
PUT /api/admin/users/1000 → 200 OK (Vulnerable!)

4. Burp Suiteによる悪用

手動による悪用

1. Configure browser proxy through Burp Suite
2. Login as "attacker" user
3. Navigate to profile/data page
4. Enable Intercept in Proxy tab
5. Capture request with user ID
6. Modify ID to victim's ID
7. Forward request
8. Observe response for victim's data

Intruderによる自動列挙

1. Send request to Intruder (Ctrl+I)
2. Clear all payload positions
3. Select ID parameter as payload position
4. Configure attack type: Sniper
5. Payload settings:
   - Type: Numbers
   - Range: 1 to 10000
   - Step: 1
6. Start attack
7. Analyze responses for 200 status codes

複数の位置に対するBattering Ram攻撃

# When same ID appears in multiple locations
PUT /api/addresses/§5§/update HTTP/1.1

{"id": §5§, "userId": 3}

Attack Type: Battering Ram
Payload: Numbers 1-1000

5. 一般的なIDORの場所

APIエンドポイント

/api/user/{id}
/api/profile/{id}
/api/order/{id}
/api/invoice/{id}
/api/document/{id}
/api/message/{id}
/api/address/{id}/update
/api/address/{id}/delete

ファイルダウンロード

/download/invoice_{id}.pdf
/static/receipts/{id}.pdf
/uploads/documents/{filename}
/files/reports/report_{date}_{id}.xlsx

クエリパラメーター

?userId=123
?orderId=456
?documentId=789
?file=report_123.pdf
?account=user@email.com

クイックリファレンス

IDORテストチェックリスト

テスト 方法 脆弱性の兆候
IDの増減 id=5id=4に変更 別のユーザーのデータを返す
犠牲者のIDを使用 既知の犠牲者IDに置き換える 犠牲者のリソースへのアクセスが許可される
範囲の列挙 ID 1-1000をテスト 他のユーザーの有効なレコードを見つける
負の値 id=-1またはid=0をテスト 予期しないデータまたはエラー
大きな値 id=99999999をテスト システム情報の開示
文字列ID id=user_123の形式を変更 ロジックバイパス
GUID操作 UUIDの一部を変更 予測可能なUUIDパターン

レスポンス分析

ステータスコード 解釈
200 OK 潜在的なIDOR - データ所有権を確認する
403 Forbidden アクセス制御が機能している
404 Not Found リソースが存在しない
401 Unauthorized 認証が必要
500 Error 潜在的な入力検証の問題

一般的な脆弱なパラメーター

パラメータータイプ
ユーザー識別子 userId, uid, `us
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

IDOR Vulnerability Testing

Purpose

Provide systematic methodologies for identifying and exploiting Insecure Direct Object Reference (IDOR) vulnerabilities in web applications. This skill covers both database object references and static file references, detection techniques using parameter manipulation and enumeration, exploitation via Burp Suite, and remediation strategies for securing applications against unauthorized access.

Inputs / Prerequisites

  • Target Web Application: URL of application with user-specific resources
  • Multiple User Accounts: At least two test accounts to verify cross-user access
  • Burp Suite or Proxy Tool: Intercepting proxy for request manipulation
  • Authorization: Written permission for security testing
  • Understanding of Application Flow: Knowledge of how objects are referenced (IDs, filenames)

Outputs / Deliverables

  • IDOR Vulnerability Report: Documentation of discovered access control bypasses
  • Proof of Concept: Evidence of unauthorized data access across user contexts
  • Affected Endpoints: List of vulnerable API endpoints and parameters
  • Impact Assessment: Classification of data exposure severity
  • Remediation Recommendations: Specific fixes for identified vulnerabilities

Core Workflow

1. Understand IDOR Vulnerability Types

Direct Reference to Database Objects

Occurs when applications reference database records via user-controllable parameters:

# Original URL (authenticated as User A)
example.com/user/profile?id=2023

# Manipulation attempt (accessing User B's data)
example.com/user/profile?id=2022

Direct Reference to Static Files

Occurs when applications expose file paths or names that can be enumerated:

# Original URL (User A's receipt)
example.com/static/receipt/205.pdf

# Manipulation attempt (User B's receipt)
example.com/static/receipt/200.pdf

2. Reconnaissance and Setup

Create Multiple Test Accounts

Account 1: "attacker" - Primary testing account
Account 2: "victim" - Account whose data we attempt to access

Identify Object References

Capture and analyze requests containing:

  • Numeric IDs in URLs: /api/user/123
  • Numeric IDs in parameters: ?id=123&action=view
  • Numeric IDs in request body: {"userId": 123}
  • File paths: /download/receipt_123.pdf
  • GUIDs/UUIDs: /profile/a1b2c3d4-e5f6-...

Map User IDs

# Access user ID endpoint (if available)
GET /api/user-id/

# Note ID patterns:
# - Sequential integers (1, 2, 3...)
# - Auto-incremented values
# - Predictable patterns

3. Detection Techniques

URL Parameter Manipulation

# Step 1: Capture original authenticated request
GET /api/user/profile?id=1001 HTTP/1.1
Cookie: session=attacker_session

# Step 2: Modify ID to target another user
GET /api/user/profile?id=1000 HTTP/1.1
Cookie: session=attacker_session

# Vulnerable if: Returns victim's data with attacker's session

Request Body Manipulation

# Original POST request
POST /api/address/update HTTP/1.1
Content-Type: application/json
Cookie: session=attacker_session

{"id": 5, "userId": 1001, "address": "123 Attacker St"}

# Modified request targeting victim
{"id": 5, "userId": 1000, "address": "123 Attacker St"}

HTTP Method Switching

# Original GET request may be protected
GET /api/admin/users/1000 → 403 Forbidden

# Try alternative methods
POST /api/admin/users/1000 → 200 OK (Vulnerable!)
PUT /api/admin/users/1000 → 200 OK (Vulnerable!)

4. Exploitation with Burp Suite

Manual Exploitation

1. Configure browser proxy through Burp Suite
2. Login as "attacker" user
3. Navigate to profile/data page
4. Enable Intercept in Proxy tab
5. Capture request with user ID
6. Modify ID to victim's ID
7. Forward request
8. Observe response for victim's data

Automated Enumeration with Intruder

1. Send request to Intruder (Ctrl+I)
2. Clear all payload positions
3. Select ID parameter as payload position
4. Configure attack type: Sniper
5. Payload settings:
   - Type: Numbers
   - Range: 1 to 10000
   - Step: 1
6. Start attack
7. Analyze responses for 200 status codes

Battering Ram Attack for Multiple Positions

# When same ID appears in multiple locations
PUT /api/addresses/§5§/update HTTP/1.1

{"id": §5§, "userId": 3}

Attack Type: Battering Ram
Payload: Numbers 1-1000

5. Common IDOR Locations

API Endpoints

/api/user/{id}
/api/profile/{id}
/api/order/{id}
/api/invoice/{id}
/api/document/{id}
/api/message/{id}
/api/address/{id}/update
/api/address/{id}/delete

File Downloads

/download/invoice_{id}.pdf
/static/receipts/{id}.pdf
/uploads/documents/{filename}
/files/reports/report_{date}_{id}.xlsx

Query Parameters

?userId=123
?orderId=456
?documentId=789
?file=report_123.pdf
?account=user@email.com

Quick Reference

IDOR Testing Checklist

Test Method Indicator of Vulnerability
Increment/Decrement ID Change id=5 to id=4 Returns different user's data
Use Victim's ID Replace with known victim ID Access granted to victim's resources
Enumerate Range Test IDs 1-1000 Find valid records of other users
Negative Values Test id=-1 or id=0 Unexpected data or errors
Large Values Test id=99999999 System information disclosure
String IDs Change format id=user_123 Logic bypass
GUID Manipulation Modify UUID portions Predictable UUID patterns

Response Analysis

Status Code Interpretation
200 OK Potential IDOR - verify data ownership
403 Forbidden Access control working
404 Not Found Resource doesn't exist
401 Unauthorized Authentication required
500 Error Potential input validation issue

Common Vulnerable Parameters

Parameter Type Examples
User identifiers userId, uid, user_id, account
Resource identifiers id, pid, docId, fileId
Order/Transaction orderId, transactionId, invoiceId
Message/Communication messageId, threadId, chatId
File references filename, file, document, path

Constraints and Limitations

Operational Boundaries

  • Requires at least two valid user accounts for verification
  • Some applications use session-bound tokens instead of IDs
  • GUID/UUID references harder to enumerate but not impossible
  • Rate limiting may restrict enumeration attempts
  • Some IDOR requires chained vulnerabilities to exploit

Detection Challenges

  • Horizontal privilege escalation (user-to-user) vs vertical (user-to-admin)
  • Blind IDOR where response doesn't confirm access
  • Time-based IDOR in asynchronous operations
  • IDOR in websocket communications

Legal Requirements

  • Only test applications with explicit authorization
  • Document all testing activities and findings
  • Do not access, modify, or exfiltrate real user data
  • Report findings through proper disclosure channels

Examples

Example 1: Basic ID Parameter IDOR

# Login as attacker (userId=1001)
# Navigate to profile page

# Original request
GET /api/profile?id=1001 HTTP/1.1
Cookie: session=abc123

# Response: Attacker's profile data

# Modified request (targeting victim userId=1000)
GET /api/profile?id=1000 HTTP/1.1
Cookie: session=abc123

# Vulnerable Response: Victim's profile data returned!

Example 2: IDOR in Address Update Endpoint

# Intercept address update request
PUT /api/addresses/5/update HTTP/1.1
Content-Type: application/json
Cookie: session=attacker_session

{
  "id": 5,
  "userId": 1001,
  "street": "123 Main St",
  "city": "Test City"
}

# Modify userId to victim's ID
{
  "id": 5,
  "userId": 1000,  # Changed from 1001
  "street": "Hacked Address",
  "city": "Exploit City"
}

# If 200 OK: Address created under victim's account

Example 3: Static File IDOR

# Download own receipt
GET /api/download/5 HTTP/1.1
Cookie: session=attacker_session

# Response: PDF of attacker's receipt (order #5)

# Attempt to access other receipts
GET /api/download/3 HTTP/1.1
Cookie: session=attacker_session

# Vulnerable Response: PDF of victim's receipt (order #3)!

Example 4: Burp Intruder Enumeration

# Configure Intruder attack
Target: PUT /api/addresses/§1§/update
Payload Position: Address ID in URL and body

Attack Configuration:
- Type: Battering Ram
- Payload: Numbers 0-20, Step 1

Body Template:
{
  "id": §1§,
  "userId": 3
}

# Analyze results:
# - 200 responses indicate successful modification
# - Check victim's account for new addresses

Example 5: Horizontal to Vertical Escalation

# Step 1: Enumerate user roles
GET /api/user/1 → {"role": "user", "id": 1}
GET /api/user/2 → {"role": "user", "id": 2}
GET /api/user/3 → {"role": "admin", "id": 3}

# Step 2: Access admin functions with discovered ID
GET /api/admin/dashboard?userId=3 HTTP/1.1
Cookie: session=regular_user_session

# If accessible: Vertical privilege escalation achieved

Troubleshooting

Issue: All Requests Return 403 Forbidden

Cause: Server-side access control is implemented Solution:

# Try alternative attack vectors:
1. HTTP method switching (GET → POST → PUT)
2. Add X-Original-URL or X-Rewrite-URL headers
3. Try parameter pollution: ?id=1001&id=1000
4. URL encoding variations: %31%30%30%30 for "1000"
5. Case variations for string IDs

Issue: Application Uses UUIDs Instead of Sequential IDs

Cause: Randomized identifiers reduce enumeration risk Solution:

# UUID discovery techniques:
1. Check response bodies for leaked UUIDs
2. Search JavaScript files for hardcoded UUIDs
3. Check API responses that list multiple objects
4. Look for UUID patterns in error messages
5. Try UUID v1 (time-based) prediction if applicable

Issue: Session Token Bound to User

Cause: Application validates session against requested resource Solution:

# Advanced bypass attempts:
1. Test for IDOR in unauthenticated endpoints
2. Check password reset/email verification flows
3. Look for IDOR in file upload/download
4. Test API versioning: /api/v1/ vs /api/v2/
5. Check mobile API endpoints (often less protected)

Issue: Rate Limiting Blocks Enumeration

Cause: Application implements request throttling Solution:

# Bypass techniques:
1. Add delays between requests (Burp Intruder throttle)
2. Rotate IP addresses (proxy chains)
3. Target specific high-value IDs instead of full range
4. Use different endpoints for same resources
5. Test during off-peak hours

Issue: Cannot Verify IDOR Impact

Cause: Response doesn't clearly indicate data ownership Solution:

# Verification methods:
1. Create unique identifiable data in victim account
2. Look for PII markers (name, email) in responses
3. Compare response lengths between users
4. Check for timing differences in responses
5. Use secondary indicators (creation dates, metadata)

Remediation Guidance

Implement Proper Access Control

# Django example - validate ownership
def update_address(request, address_id):
    address = Address.objects.get(id=address_id)

    # Verify ownership before allowing update
    if address.user != request.user:
        return HttpResponseForbidden("Unauthorized")

    # Proceed with update
    address.update(request.data)

Use Indirect References

# Instead of: /api/address/123
# Use: /api/address/current-user/billing

def get_address(request):
    # Always filter by authenticated user
    address = Address.objects.filter(user=request.user).first()
    return address

Server-Side Validation

# Always validate on server, never trust client input
def download_receipt(request, receipt_id):
    receipt = Receipt.objects.filter(
        id=receipt_id,
        user=request.user  # Critical: filter by current user
    ).first()

    if not receipt:
        return HttpResponseNotFound()

    return FileResponse(receipt.file)