03 · Hunting
Testing Methodology
A disciplined two-account workflow with Burp Suite (or Caido) is the foundation of IDOR hunting. This is the loop you should be able to execute in your sleep.
The two-account loop
Section titled “The two-account loop”- Create two accounts. Account A (Alice) is the attacker; Account B (Bob) is the victim. Same plan/tenant ideally, but also test cross-tenant if the app supports it.
- Populate both accounts with distinguishable data. On the victim account, mint real objects. Create an avatar, a shipping address, an order, a message, an API key, a nickname, a subscription, and a saved card if the app allows it. Seed a graph, not one row: org, project, document, attachment, comment, share. Record every edge in
id_sources.md. Glitter strings make the confirmation mechanical. - Use Account B normally. Walk through every feature. Capture every request in Burp’s history.
- Now swap into Account A’s session. Replay Account B’s requests with Account A’s cookies / tokens.
- Confirm. A successful IDOR returns Account B’s data while authenticated as Account A.
Some writeups label A as the victim and B as the attacker. This guide uses one convention throughout: Account A (Alice) attacks. Account B (Bob) is the victim, and you own both accounts. The response table does not care about the letters.
| What comes back as A, using B’s ID | Meaning | Next move |
|---|---|---|
200 and B’s data |
IDOR confirmed | Climb the ladder in this section, then write the report |
403 |
This path checks ownership | Next endpoint, or another costume (section 04) |
404 |
Maybe a hidden 403 | Retry B’s exact ID, other encodings, sibling paths |
200 and A’s own data |
The server resolved me from the session |
Hunt a second parameter: userId, account, owner |
200 and an empty body |
Can still be a leak | Diff length and headers against an ID that cannot exist |
500 |
The ID was parsed and something downstream broke | Note the parameter. Try a softer value. Stop if you are breaking the app. |
The Match & Replace shortcut
Section titled “The Match & Replace shortcut”Swapping cookies by hand on every request is slow. A Match & Replace rule that rewrites the Authorization header to Account A’s token does it for you. The full Burp and Caido setup (CA certificate, rules, session handling) is in the proxy configuration guide. The rule itself:
Burp Suite → Proxy → Match & Replace (CONFIG)
Type: Request headerMatch: ^Authorization:.*$Replace: Authorization: Bearer eyJhbGciOi...<ACCOUNT_A_TOKEN>[x] Regex match [x] EnabledBrowse as Account B. Burp rewrites each request to authenticate as Account A, and you watch which responses still return Account B’s data. The Autorize extension automates exactly this loop.
Autorize / AuthMatrix
Section titled “Autorize / AuthMatrix”Autorize (Burp/Caido) is the canonical IDOR-hunting extension. Paste Account A’s token into its configuration, then browse as Account B. Setup steps are in the proxy configuration guide. Autorize replays every request with Account A’s token and again unauthenticated.
- Color-coded results: Bypassed! means the replay saw the same data as the browser session. That is a candidate, not a report, until the body contains the other account’s glitter. Enforced! means the check held. Orange means the diff is ambiguous. Open those by hand.
Pick the right tool for the job, they are not interchangeable:
| Tool | Model | Best for |
|---|---|---|
| Autorize (Burp) | Auto-replays each request under a low-priv session + unauth; 3-way compare. | Fast passive sweep while you browse. Your default. |
| Auth Analyzer (Burp) | Extracts & substitutes session tokens across N configured sessions in parallel. | Apps with 3+ roles, or cross-site request forgery (CSRF) tokens and session refresh that Autorize chokes on. |
| AuthMatrix (Burp) | Manual users × roles × requests grid you populate and re-run. | Structured, repeatable regression across a whole role matrix. |
| Caido plugins | caido-community/autorize, /authmatrix, /authswap. |
Same workflows if Caido is your primary proxy, all actively maintained. |
Hash-diff the four sessions
Section titled “Hash-diff the four sessions”Send the same request four times. Compare status, length, body hash, and the headers that tell on a cache or a list: X-Cache, Age, CF-Cache-Status, ETag, X-Total-Count. A hash match across sessions is the signal. A length match with a different hash is a near-miss. Read it. X-Total-Count changing with someone else’s filter is an oracle even when the body is empty.
Report the edge, not only the leaf. “A can read B’s document” is a read. “A can attach B’s document to A’s project, then export it” is a chain. The second one scores.
The minimum viable test request
Section titled “The minimum viable test request”What a vulnerable request/response pair looks like in practice:
Account B’s legitimate request (GET)
GET /api/v2/users/7011/invoices HTTP/2Host: api.target.comAuthorization: Bearer <B's token>Accept: application/jsonAttacker request, same URL, A’s token (GET)
GET /api/v2/users/7011/invoices HTTP/2Host: api.target.comAuthorization: Bearer <A's token>Accept: application/json
# If response returns B's invoices ⇒ IDOR confirmedDon’t just test GET
Section titled “Don’t just test GET”The fastest way to leave money on the table is testing only read endpoints. The same identifier flowing through POST, PUT, PATCH, or DELETE often has different (or absent) authorization. Always re-test every parameter against every method the server accepts:
Per-endpoint method matrix
- GET, does it leak victim data?
- POST, can you create resources under the victim’s account?
- PUT / PATCH, can you mutate victim fields (email, password reset token, role)?
- DELETE, can you delete victim’s resources? Read the program policy first. Some programs ban delete. Do it on an object you created, or describe the capability and stop.
- OPTIONS, does the cross-origin resource sharing (CORS) preflight reveal allowed methods you didn’t see in the UI?
Write access beats read access. A leaked invoice is a finding. Editing the victim’s email, their webhook destination, or an order’s shipping address is a different finding. It is often the one that becomes account takeover or a physical-world impact. State the capability. Perform the state change on Account B, which you own.
Write IDOR, on an account you own (PATCH)
PATCH /api/address/1042{"street": "leet street"} # as A, against B's address
DELETE /api/messages/88401 # only if policy allows, and only on your object- Email change, then password reset. The reset lands in your inbox. That chain is account takeover, and the developers who checked “is the caller logged in?” never saw it.
- Webhook or destination URL. Their events start arriving at you.
- Shipping address on an order. Describe it. Change an order that belongs to your second account. Do not redirect a real customer’s package.
The boring endpoints
Section titled “The boring endpoints”Developers lock /me and leave the sibling that takes an ID wide open. Every “my stuff” route has a cousin.
/me and the window next to it (GET)
GET /api/users/meGET /api/users/me/notifications # try:GET /api/users/1042/notificationsGET /api/account/settings # settings for account 1042?GET /api/dashboard?userId=1042If the app has the object, the object has an ID, and the ID may be fetchable for the wrong person. Walk invoices, orders, receipts, tickets, shipments, chat messages, attachments, downloads, documents, PDFs, exports, backups, notifications, saved searches, wishlists, comments, reactions, and drafts. Drafts especially. Then API keys, OAuth tokens, webhooks, and integrations.
Burp Intruder on a small window
Section titled “Burp Intruder on a small window”Once one ID works, the question is whether the neighbors work. Keep the window small. A program that forbids brute force is telling you not to walk the keyspace. A few dozen neighbors is a proof. The whole integer space is a dump.
- Send B’s request,
GET /api/orders/47811, to Intruder. - Mark
47811as the payload position. - Payload: numbers
47800,47900, or a tighter band around an ID you minted. - Sort by status, then compare
Content-Length. - A run of
200s with the same length means that band is live. The survivors are IDs. Prove it with a handful of glitter hits, then stop.
The escalation ladder
Section titled “The escalation ladder”A confirmed read is the first rung. Climb before you file. Same endpoint, four different reports, four different payouts. The difference is how far you went.
- Read. You saw someone else’s data.
- Scale. How many records? If the IDs enumerate, say so, and prove it with a sample.
- Sensitivity. Is it GDPR-relevant PII? PII plus mass access is a different severity than a nickname.
- Write. Can you change or delete it, on your own second account?
- Vertical. Can a normal user call
GET /api/admin/users/1042, or use an admin’s ID? - Takeover. Email change, API key disclosure, phone binding. That is the rung where the bounty changes shape.
Calls to make with B’s ID, as low-privilege A
- GET /api/users/1042, profile, email, address, 2FA state
- PATCH /api/users/1042, email, or any field a password reset later trusts
- GET /api/admin/users/1042, admin routes, still authenticated as a normal user
- POST /api/orders/1042/pay, a state change on someone else’s object. Do it on B.
- DELETE, only with a helmet. Some programs prohibit it. Say what you tested and what you refused to test.
The object is a job
Section titled “The object is a job”The response is 202 Accepted. The leak is the polling endpoint. The worker runs as a service account and never re-checks ownership. Job-shaped objects are exports, reports, backups, imports, migrations, audit logs, bulk operations, and webhook deliveries.
- The export.
POST /api/exports {"userId": <B>}returns{"jobId": 8842}.GET /api/exports/8842returns{"status":"done","url":"https://storage.example/..."}. The worker read B’s rows with service credentials. The signed URL is the exfil. Sequential job ids make it a walk. Prove it on an export of your own second account, five jobs at most. - Webhook delivery logs.
GET /api/webhooks/{id}/deliveriesreturns payloads sent to another tenant’s endpoint: event ids, customer objects, sometimes secrets. Stripe-styleevt_ids are worth a small window. - Idempotency keys.
Idempotency-Key: <B's key>on a payment or create returns the cached response of B’s original request. This works when the cache is not scoped to the caller and the client chose the key string. - Signed-URL issuance.
POST /api/files/{id}/download-urlreturns a short-lived URL. If that route skips the ownership check, the URL is the bug. Fetch it from a clean browser with no session. - The link in the email. The export URL mailed to the account is often not bound to a session. Request it as B, open it in a private window. Do not forward a real customer’s link.
- The bus.
X-Event-Id, a Kafka offset, an SQS message id,GET /api/events/{id}. The event payload is the object. The consumer trusts the id.
Blind IDOR: when the response says nothing
Section titled “Blind IDOR: when the response says nothing”Not every IDOR echoes the victim’s data back. A PATCH or DELETE often returns a bland 200 {"success": true} whether or not it touched a foreign object. This is blind IDOR, and you confirm it by observing the side effect, not the response:
- Cross-check from the victim account. Fire the mutation as Account A against B’s object, then log into B and confirm the change landed.
- Watch an out-of-band signal. Did the victim get a notification email? Did a webhook fire? Did an audit-log entry appear?
- Diff the timing / status. A real object often returns
200/204; a non-existent one404. That difference alone is an existence oracle even when content is identical.
Next step: when a test returns 403, try the bypass techniques before you move on.
Open local graph around this page
IDOR HuntingFor educational and authorized bug bounty use only.