broken-access-control
Skill153 starsChanged 45 days agoMITView on GitHub
Replay captured requests with swapped identities and bumped object IDs to surface broken access control. Use when testing for IDOR or authz flaws.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- mahumadad/quarrytheir own version, first seen Nov 8, 2026
- thejefflarson/soundchecktheir own version, first seen Jul 31, 2026
- swapniltamse/claude-security-engineertheir own version, first seen May 25, 2026
- scholarly360/owasp-top10-web-skillstheir own version, first seen Apr 8, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- scholarly360/owasp-top10-web-skills★ 23same name
- thejefflarson/soundcheck★ 20same name
- mahumadad/quarry★ 1same name
- swapniltamse/claude-security-engineer★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- cdn-peekSkill
- http-request-smugglingSkill
- jwt-attacksSkill
- ssrf-oobSkill
- webapp-probeSkill
- blockchain-forensicsSkill
- foundry-pocSkill
- safe-huntSkill
- smart-contract-auditSkill
- cloud-bucket-bruteSkill
- infrastructure-auditSkill
- dylib-hijack-scanSkill
- endpoint-threat-huntSkill
- parse-securitySkill
- agentic-seoSkill
- agent-onboardingSkill
- context-window-to-skillSkill
- git-commitSkill
- keen-eyesSkill
- no-aispeakSkill
- secure-1pass-accessSkill
- self-improveSkill
- shadow-partnerSkill
- training-guideSkill
- variant-tableSkill
- auditor-quizSkill
- audit-scopeSkill
- evidence-captureSkill
- external-enumerationSkill
- gdocs-audit-reportSkill
- hackerone-reportSkill
- nuclei-suggestSkill
- pre-bountySkill
- sandboxed-audit-runnerSkill
- tiny-auditorSkill
- vm-labSkill
- llm-fuzz-toolsSkill
- mcp-server-pentestSkill
- prompt-injection-auditSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 153
Clean: - every captured request re-authorized correctly (lesser/anon identities were rejected or served a materially different response) …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Contents
- Scope & authorization
- Methodology (baseline, identity-swap, numeric IDOR)
- Runnable snippets
- IDOR numeric-parameter wordlist
- Thresholds (carry these exactly)
- Output
Scope & authorization
Only run against an application the user owns or is contractually engaged to test. This is an ACTIVE, aggressive check: it re-sends real requests to the target under different identities and with mutated object-ids, so it creates traffic, may read or touch other users' data, and can trip rate-limits or alerts. Use a staging environment or a maintenance window where you can, keep the identities and object-ids to accounts you control, and stop if you start returning data that clearly belongs to real third parties. If scope is unclear, ask before replaying.
Two things must exist before you start:
- A capture of the target's traffic taken as a privileged / higher-role user (from a proxy, HAR export, or your own request log). Each captured request gives you the method, URL, headers, query params, cookies, and body.
- At least one second identity to replay under - a lower-privileged user's session, and/or the unauthenticated (no-token, no-cookie) state. An identity is either a cookie (
name=value) or a bearer token (Authorization: Bearer ...).
This skill covers authorization replay and numeric IDOR on already-captured requests. It does not fuzz for hidden endpoints, mutate non-numeric/UUID object references, or bypass auth at the token layer (JWT tampering, session fixation) - note those as unrun if the target warrants a deeper pass.
Methodology (run in order; each step is a check with a result state)
- Inventory the capture. From the privileged capture, list each request as its parts: method, full URL, headers, query params, cookies, body. These are the units you replay; you never craft new endpoints, only re-send captured ones under new conditions.
- Baseline each request as the privileged user. Re-send it exactly as captured and record
status_codeand response body length. This is the reference every swapped-identity and mutated-id response is compared against, and it confirms the request still works before you draw conclusions from a difference. - Swap identity, replay unchanged (authorization check). For every captured request, replace only the identity - drop in each second identity's cookie or
Authorizationheader in place of the privileged one, leaving method, URL, params, and body identical. Compare each replay's(status_code, length)to the privileged baseline. Report a finding when a lesser or unauthenticated identity returns a success status with a body within 50 bytes of the privileged length (i.e.abs(length_diff) <= 50and no status change) - the low-priv session is being served the privileged response. The source's own trigger is the inverse framing: it flags a pair as differing whenlength_diff > 50or the status differs, so a non-differing successful pair across two different identities is the access-control failure. - Find numeric object-id params. In each captured request's query params, match parameter names against the IDOR wordlist below. Keep only params whose value parses as an integer - these are the candidate direct object references.
- Baseline the id param. Re-send the request with its original numeric id (under the identity that legitimately owns that object) and record
baseline_status("<code> <reason>") andbaseline_body_len(length of the parsed JSON response). Skip the param if the response is not JSON or the length is zero - there is nothing to compare. - Increment the id, twice (IDOR check). Send the same request twice more, changing only that one param: once at
original + 1(first_attempt_size_increase = 1), once atoriginal + 100(second_attempt_size_increase = 100). Record status and JSON length for each. Two offsets cover both a densely-packed id space (neighbour exists at +1) and a sparser one (+100 lands on another live object). - Decide IDOR. Report a finding when the +1 attempt returns the same status as the baseline AND either mutated attempt's JSON length differs from the baseline by at least
response_body_length_diff = 3. Same success status across a different id means the object still resolves under your identity; a body-length difference of >= 3 means you got a different object's data rather than an empty/error shell. Same status with a near-identical length is the ambiguous "same template, maybe empty" case and is not reported on its own. - Cross the two checks. The strongest finding is a captured request where an id-param increment (steps 4-7) succeeds and the same request replays successfully under a lower-privileged or unauthenticated identity (step 3): an object reference that is both enumerable and unprotected by the session.
Runnable snippets
Set the target and the privileged identity once. PRIV_COOKIE/PRIV_AUTH come from your privileged capture; LOW_COOKIE/LOW_AUTH are the second identity; empty strings are the unauthenticated case.
BASE="https://TARGET"
PRIV_COOKIE="session=PRIV_SESSION_VALUE"
PRIV_AUTH="Authorization: Bearer PRIV_TOKEN"
LOW_COOKIE="session=LOW_SESSION_VALUE"
LOW_AUTH="Authorization: Bearer LOW_TOKEN"# 2 baseline a captured request as the privileged user (status + body length)
curl -sk -o /dev/null -w '%{http_code} %{size_download}b\n' \
-H "$PRIV_AUTH" -b "$PRIV_COOKIE" "$BASE/api/report?client_id=1024"
# 3 authorization check: replay the SAME request under each identity, compare
REQ="/api/report?client_id=1024"
for id in "priv:$PRIV_AUTH:$PRIV_COOKIE" "low:$LOW_AUTH:$LOW_COOKIE" "anon:::"; do
name="${id%%:*}"; rest="${id#*:}"; auth="${rest%%:*}"; cook="${rest#*:}"
printf '%-5s ' "$name"
curl -sk -o /dev/null -w '%{http_code} %{size_download}b\n' \
${auth:+-H "$auth"} ${cook:+-b "$cook"} "$BASE$REQ"
done
# finding: a lesser/anon identity returns a success code with size within ~50b of priv# 4-7 numeric IDOR: replay one captured request three times, mutating one id param
import json, urllib.request, urllib.parse, ssl
ctx = ssl.create_default_context(); ctx.check_hostname = False; ctx.verify_mode = ssl.CERT_NONE
NUMERIC_IDOR_PARAMS = {
"client_id", "clientId", "clientid", "client",
"user_id", "userId", "userid", "user",
"document_id", "documentId", "documentid", "document",
"account", "account_id", "accountId", "accountid",
"project", "project_id", "projectId", "projectid",
"report_id", "reportId", "reportid", "report",
"file_id", "fileId", "fileid", "file",
}
RESPONSE_BODY_LENGTH_DIFF = 3
FIRST_ATTEMPT_SIZE_INCREASE = 1
SECOND_ATTEMPT_SIZE_INCREASE = 100
METHOD = "GET"
URL = "https://TARGET/api/report"
HEADERS = {"Authorization": "Bearer PRIV_TOKEN", "Cookie": "session=PRIV_SESSION_VALUE"}
PARAMS = {"client_id": "1024"}
BODY = None
def send(params):
qs = urllib.parse.urlencode(params)
url = f"{URL}?{qs}" if qs else URL
data = BODY.encode() if isinstance(BODY, str) else BODY
req = urllib.request.Request(url, data=data, method=METHOD, headers=HEADERS)
with urllib.request.urlopen(req, context=ctx) as r:
raw = r.read()
try:
body_len = len(json.loads(raw))
except Exception:
body_len = None
return f"{r.status} {r.reason}", body_len
for key, val in list(PARAMS.items()):
if key not in NUMERIC_IDOR_PARAMS:
continue
try:
base_val = int(val)
except ValueError:
continue
base_status, base_len = send({**PARAMS, key: base_val})
if not base_len:
continue
a1_status, a1_len = send({**PARAMS, key: base_val + FIRST_ATTEMPT_SIZE_INCREASE})
a2_status, a2_len = send({**PARAMS, key: base_val + SECOND_ATTEMPT_SIZE_INCREASE})
same_status = a1_status == base_status
len_moved = (a1_len is not None and abs(base_len - a1_len) >= RESPONSE_BODY_LENGTH_DIFF) or \
(a2_len is not None and abs(base_len - a2_len) >= RESPONSE_BODY_LENGTH_DIFF)
if same_status and len_moved:
print(f"IDOR: parameter {key}={base_val} seems iterable at {URL}")IDOR numeric-parameter wordlist
Match captured query-param names against this set; keep only values that parse as integers. It is the union of the two source checks plus their case/underscore enrichment (each snake_case seed also yields its camelCase, flatcase, and bare-prefix forms):
client_id, clientId, clientid, client
user_id, userId, userid, user
document_id, documentId, documentid, document
account, account_id, accountId, accountid
project, project_id, projectId, projectid
report_id, reportId, reportid, report
file_id, fileId, fileid, fileThresholds (carry these exactly)
| Constant | Value | Meaning |
| Authorization length tolerance | 50 bytes | Two identities whose responses differ by more than 50 bytes (or in status) are treated as different; a successful pair within 50 bytes is the access-control finding. |
response_body_length_diff | 3 | Minimum JSON-length delta between the baseline object and a mutated-id object to count the id as iterable. |
first_attempt_size_increase | 1 | First id offset (adjacent object). |
second_attempt_size_increase | 100 | Second id offset (sparse id space). |
Output
Finish with a request / check / result ledger over the captured requests you replayed, then a one-line verdict:
- Clean - every captured request re-authorized correctly (lesser/anon identities were rejected or served a materially different response) and no numeric id param proved iterable.
- Broken access control - name the failing request, the check that caught it (identity-swap, id-increment, or both), the identity/id that succeeded, and the observed status/length pair versus the privileged baseline. Fix: enforce per-object ownership checks server-side on every request (never trust a client-supplied id or the mere presence of a valid session), and return 403/404 uniformly so length and status do not leak object existence.
Report each captured request's true status - replayed or not-run - so coverage is honest; never present an unrun request as clean.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

