Skip to content

03 · Hunting

Testing Methodology

10 min readIDOR Hunting

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.

  1. 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.
  2. 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.
  3. Use Account B normally. Walk through every feature. Capture every request in Burp’s history.
  4. Now swap into Account A’s session. Replay Account B’s requests with Account A’s cookies / tokens.
  5. 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.

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 header
Match: ^Authorization:.*$
Replace: Authorization: Bearer eyJhbGciOi...<ACCOUNT_A_TOKEN>
[x] Regex match [x] Enabled

Browse 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 (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.

  1. 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.

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.

What a vulnerable request/response pair looks like in practice:

Account B’s legitimate request (GET)

GET /api/v2/users/7011/invoices HTTP/2
Host: api.target.com
Authorization: Bearer <B's token>
Accept: application/json

Attacker request, same URL, A’s token (GET)

GET /api/v2/users/7011/invoices HTTP/2
Host: api.target.com
Authorization: Bearer <A's token>
Accept: application/json
# If response returns B's invoices ⇒ IDOR confirmed

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.

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/me
GET /api/users/me/notifications # try:
GET /api/users/1042/notifications
GET /api/account/settings # settings for account 1042?
GET /api/dashboard?userId=1042

If 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.

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.

  1. Send B’s request, GET /api/orders/47811, to Intruder.
  2. Mark 47811 as the payload position.
  3. Payload: numbers 47800, 47900, or a tighter band around an ID you minted.
  4. Sort by status, then compare Content-Length.
  5. 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.

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.

  1. Read. You saw someone else’s data.
  2. Scale. How many records? If the IDs enumerate, say so, and prove it with a sample.
  3. Sensitivity. Is it GDPR-relevant PII? PII plus mass access is a different severity than a nickname.
  4. Write. Can you change or delete it, on your own second account?
  5. Vertical. Can a normal user call GET /api/admin/users/1042, or use an admin’s ID?
  6. 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 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/8842 returns {"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}/deliveries returns payloads sent to another tenant’s endpoint: event ids, customer objects, sometimes secrets. Stripe-style evt_ 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-url returns 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 one 404. 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.

Connections4 backlinks · 2 outgoing · 3 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

IDOR HuntingFor educational and authorized bug bounty use only.