hunt-idor · diff
git:20260923.82a4143 to git:20261114.84172f8
66 added, 43 removed. Audit A to A.
What this update changes in the checks
No check changed: every fixed check gives the same answer before and after this update.
A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.
---
name: hunt-idor
- description: IDOR/BOLA — differential testing, two-session comparison, privilege escalation. Every candidate must pass 7 gates.
+ description: IDOR/BOLA and tenant isolation testing with controlled identities, ownership controls, reproducible protected-content evidence and root-cause deduplication.
---
- # IDOR HUNTING — 3 BULLETS MAX
+ # Investigate object authorization
- **Core:** User A accessing User B's resource = vulnerability.
+ An identifier or HTTP 200 is a lead. Unauthorized access requires an established
+ policy, a controlled resource, a valid non-entitled identity and observed impact.
+ Use the engagement's scope, request budget and permitted actions throughout.
- ## DIFFERENTIAL
- ```bash
- TOKEN_A="attacker"; TOKEN_B="victim"; ID="victim-resource-id"
- # Baseline: A reads own data
- curl -s -H "Authorization: Bearer $TOKEN_A" "https://target.com/api/users/me"
- # Test: A reads B's data → should FAIL
- curl -s -H "Authorization: Bearer $TOKEN_A" "https://target.com/api/users/$ID"
- ```
+ ## Establish the policy and fixtures
- ## ENUMERATION
- ```bash
- # Sequential
- for id in $(seq 1 100); do
- code=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $TOKEN_A" "https://target.com/api/users/$id")
- [ "$code" == "200" ] && echo "[+] ID $id accessible"
- done
- # Method swap
- for m in GET PUT PATCH DELETE; do
- curl -s -o /dev/null -w "$m: %{http_code}\n" -X $m -H "Authorization: Bearer $TOKEN_A" "https://target.com/api/users/$ID"
- done
- # Old version
- curl -s -H "Authorization: Bearer $TOKEN_A" "https://target.com/api/v1/users/$ID"
- ```
+ 1. Read the supplied scope and source when available. Identify the route or
+ resolver, its authorization check and the resource's intended visibility.
+ 2. Use two controlled accounts. Record their roles, tenants and session validity.
+ Create disposable objects containing a synthetic owner-only canary. Establish
+ ownership through fixture creation or an entitled control, never the ID shape.
+ 3. Record the public/shared baseline. A public preview, deliberately shared object
+ or administrative permission is not an object-authorization bypass.
- ## STATE CHANGE
- ```bash
- # Before → Attack → After
- BEFORE=$(curl -s -H "Authorization: Bearer $TOKEN_A" "https://target.com/api/users/$ID")
- curl -s -X PUT -H "Authorization: Bearer $TOKEN_A" -d '{"email":"evil@test.com"}' "https://target.com/api/users/$ID"
- AFTER=$(curl -s -H "Authorization: Bearer $TOKEN_B" "https://target.com/api/users/$ID")
- # If email changed → WRITE IDOR
- ```
+ ## Run the differential
- ## ESCALATION
- ```
- IDOR read → enumerate all users → mass PII → Critical
- IDOR write → change email → password reset → ATO → Critical
- IDOR read → find admin → admin endpoint → Critical
- ```
+ Capture these requests with exchange IDs and report-safe artifact references:
- ## FALSE POSITIVES
- - Same data for all IDs → not IDOR
- - `/me` returns data → session reference, not resource ID
- - 200 but empty/null → not sensitive data
+ | Check | Required observation |
+ | --- | --- |
+ | Session validity | Each account can reach its own expected authenticated resource |
+ | Entitled control | Owner can read the test object and its protected canary |
+ | Non-entitled test | Other account requests that same object |
+ | Repeat | A distinct request independently reproduces the protected-content exposure |
+ | Negative control | The same operation is denied on a comparable non-entitled resource |
+ | Missing object | A known absent synthetic object distinguishes absence from denial |
+
+ Use `httpflow` sessions for isolated actors and `compare_actors` for the owner
+ and missing-object read controls. That action alone is not the full proof: capture
+ the independent repeat, session-validity and policy evidence separately. Stop and
+ record rate limits, stale sessions, errors and unavailable controls accurately.
+ Do not count those responses as successful repetitions.
+
+ Promote `authorization_review` through `tool_help` when its schema is not visible.
+ Use it to review recorded read observations offline. Supply
+ declared identities/resources, `confirmed_absent`, and observations with actual
+ exchange IDs, outcomes and report-safe protected-data labels. Follow `next_offset`
+ to inspect all matrix pairs. It flags missing proof and fixture contradictions;
+ it does not authenticate captures or independently validate a vulnerability.
+ Its evidence-supported pair count is not a distinct-root-cause count.
+
+ ## Explore related surfaces with a hypothesis
+
+ Trace the same object through REST, GraphQL fields, exports, downloads and API
+ versions where the source or observed navigation indicates a reachable surface.
+ Test horizontal, vertical and tenant boundaries separately. Keep each untested
+ surface visible. Prioritize paths with differing authorization middleware rather
+ than repeating a scan of already equivalent endpoints.
+
+ For an authorized write test, use a disposable object, record before/after state
+ from the entitled account, and verify restoration. A success response or returned
+ object does not prove a write took effect. Avoid test-account deletion or changes
+ to the authentication configuration needed by the assessment. Treat interrupted
+ writes as indeterminate and reconcile actual state before retrying.
+
+ ## Resolve and report
+
+ Reject public/shared access, empty bodies, expired sessions, cache artifacts and
+ differences limited to volatile metadata. Reconcile any claim that a resource is
+ both absent and returned. If a control is unavailable, record the missing proof
+ and keep the candidate inconclusive.
+
+ For a confirmed issue, preserve minimal synthetic proof, route/resolver source
+ references, preconditions, actual protected bytes or state change, reproduction
+ steps, remediation and remaining uncertainty. Deduplicate by the failed invariant,
+ boundary, operation and shared code path; retain affected endpoints as symptoms.
+ Assign severity from the demonstrated consequence and required privileges. Do
+ not promote an IDOR to Critical through hypothetical enumeration, PII or takeover.
+ Retest the fix on a fresh deployment and repeat the negative controls.