oauth-audit
Skill2 starsChanged 16 days agoMITView on GitHub
OAuth 2.0 / OpenID Connect flow audit for a Mythos engagement - redirect_uri mutations, state and login CSRF, code reuse, PKCE enforcement, missing iss, cross-client and identity binding, scope and response_mode checks, dynamic registration, device code and magic links, each proven by an authorization code or token arriving at an OAST host the agent controls, using the agent's own accounts. Use when recon or auth-session finds an authorization endpoint, a "log in with" button, /.well-known/openid-configuration, a /device or /register endpoint, or a magic-link login.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Lu1sDV/skillsmdtheir own version, first seen Nov 27, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Lu1sDV/skillsmd★ 2same 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 repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- account-takeoverSkill
- ai-appSkill
- api-protocolsSkill
- auth-sessionSkill
- business-logicSkill
- cache-poisoningSkill
- client-sideSkill
- cloud-exposureSkill
- continuousSkill
- cve-deep-diveSkill
- deep-serverSkill
- desyncSkill
- engagement-setupSkill
- exploitSkill
- race-conditionsSkill
- reconSkill
- reportSkill
- research-ingestSkill
- source-reviewSkill
- sso-federationSkill
- stored-xss-oastSkill
- supply-chain-inventorySkill
- supply-chainSkill
- takeoverSkill
- tenant-isolationSkill
- toolboxSkill
- trafficSkill
- web-scanSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 71
iss and cross-client: check metadata for iss support.
- Very specific: line 95
No brute force of codes, user_codes, state or magic-link tokens.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OAuth audit: the code reached my host, or the check held
An authorization-server 302 to a mutated redirect_uri is a hint, not a
finding. Proof is a code or token for the agent's own test account that
arrives at an OAST host the agent controls, or a token endpoint that answers
200 when it must not. Method and mutation lists live in
knowledge/web/oauth-oidc.md; token checks in knowledge/web/jwt.md. Read
the first before step 2.
Triage selects this skill (skills/registry.yaml) when the surface shows
/.well-known/openid-configuration, an authorize, token, introspect, userinfo
or device endpoint, a client_id, redirect_uri, response_type or
code_challenge parameter, or a redirect whose Location carries one of
those. It drives authflows, and needs auth-session first. Reset, MFA,
email change and session rotation are account-takeover, not this skill.
Prerequisites: scope.rules.allow_active; sessions from auth-session
(userA, userB, S=engagements/<dir>/sessions), run session-check
first; an OAST base as in stored-xss-oast (lab http://oast:8080, else
interactsh-client); the browser tool for the redirect flows. Registering
clients and other state changes also need allow_exploit, and a change you
cannot make on an object of your own is skipped with that reason (see
exploit). The authorization server is in scope only if scope.yaml lists
it: against a third-party IdP (Google, Microsoft, GitHub) test the target's
callback and token handling, never the IdP itself.
1. Map the flow
Record one login as userA with the browser tool. Write
engagements/<dir>/scan/oauth-flow.md: authorization and token endpoints,
client_id, response_type, redirect_uri, scope, where state/nonce
live, PKCE method, response_mode, and the discovery document
(/.well-known/openid-configuration: registration_endpoint,
device_authorization_endpoint, code_challenge_methods_supported,
authorization_response_iss_parameter_supported). Implicit or hybrid flow is a
candidate on its own. Mint one token per check into
scan/oauth-tokens.jsonl (token, check, request, ts), e.g.
python3 -c 'import secrets;print("mx-oa-"+secrets.token_hex(5))', and use
it as the redirect path: <oast>/<token>.
2. redirect_uri mutations
Send the authorization request as userA for each mutation in the knowledge
table, without following redirects, and read Location:
H=$(sed 's/.*/-H "&"/' $S/userA.headers | tr '\n' ' ') # session for the AS host
eval curl -s -o /dev/null -D- $H "'<authz>?response_type=code&client_id=<id>&scope=<s>&state=x&redirect_uri=<urlencoded mutation>'"Location on the mutated URI = candidate. Open that URL with the browser
tool as userA; abort the navigation to the callback and record the URL.
The code arriving at <oast>/<token> (or in Referer for an open-redirect
chain) with the unrelated-host control refused = reproduced. Stop at the
first accepted mutation.
3. Flow binding
- State / login CSRF: callback URL from
userA's unused flow, opened inuserB's context; control: alteredstate, and the callback in its own context. - Code reuse and binding: redeem one code twice, and with another
redirect_uri; control: first redemption, mangled code. - PKCE: redeem with no and with a wrong
code_verifier; authorize with no challenge and withplain. - iss and cross-client: check metadata for
isssupport; present a token minted for your second client to the app login and API. Mix-up needs an AS you run; without it,candidatewith the evidence. - Identity binding: IdP account with
userB's email unverified; asubthat differs from the email.
4. Scope, mode, optional endpoints
- scope and audience: over-broad
scopeat authorize and refresh; read the issued scope from the token or introspection and call an API that needs it. - response_mode / type:
token,id_token,response_mode=query; error branches (prompt=none, bad scope) validated like the success path. - Dynamic registration (
allow_exploit): one clientmythos-<token>with OAST URLs inlogo_uri,jwks_uri,sector_identifier_uri; an OAST hit is SSRF evidence for the web-scan SSRF row. Delete the client after. - Device code: at most 10 of your own
user_codes for entropy arithmetic; never guess a live code. - Magic links: open twice, open in another context,
Host/X-Forwarded-Hostpoisoning on your own address read from your own mailbox,Referrer-Policy, 5 to 10 own tokens for structure.
Rules
- Own accounts only; the leaked code or token must be
userA's oruserB's. - No brute force of codes,
user_codes, state or magic-link tokens. Respectrules.rate_limit_rpsandmax_requests. - A scanner or mail prefetch can burn a single-use code: attribute every OAST
hit by source and
User-Agentbefore counting it. - Clean up: delete registered clients, unlink test identities.
Closure states
Per exploit, every check ends in exactly one state in
findings/<id>.md:
| state | meaning here |
candidate | Location to a mutated URI, missing iss/PKCE metadata, implicit flow, version match; no OAST hit |
reproduced | OAST hit or 200 from the abused request with the negative control done, once by hand |
validated(proof) | stored PoC (findings/<id>.poc.sh plus the browser script) re-run in a fresh context gives the same hit |
rejected(reason) | the control also passed, enforced, by design, or not reproducible |
Record the exact request, the OAST log line or token response, the control and
the account used. Add an oauth row per check to scan/coverage.md.
Hand reproduced rows to exploit for the validator pass, then report.
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.

