offensive-jwt

Featured

JWT attack methodology for penetration testers. Covers algorithm confusion (alg:none, RS256→HS256), weak HMAC secret brute force, kid parameter injection (SQLi, path traversal), jku/x5u/jwk header injection, JWKS cache poisoning, JWS/JWE confusion, timing attacks, and mobile JWT storage extraction. Use when testing JWT-based authentication, hunting auth bypass via token manipulation, or evaluating JWT implementation security in web or mobile apps.

Testing & QA 719 stars 91 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
95
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

## Overview Comprehensive JWT attack checklist for offensive security engagements. Follow steps in order; apply each technique to the current target context and track which items have been completed. ## Quick Reference: Misconfigurations to Check - Algorithm set to `none` — signature verification bypassed entirely - Algorithm switching between `RSA` and `HMAC` (confusion attack) - Weak or guessable HMAC secret (brute-forceable) - `kid`, `jku`, `jwk`, `x5u` header parameters accepted without validation - Expired or tampered tokens accepted by server - Sensitive data stored unencrypted in payload Useful tool: [JWT Tool](https://github.com/ticarpi/jwt_tool) ## Mechanisms JWTs (RFC 7519) consist of three Base64URL-encoded parts: `header.payload.signature`. **Signing algorithms:** | Algorithm | Type | Notes | |-----------|------|-------| | HS256/384/512 | Symmetric HMAC | Shared secret; confusion target | | RS256/384/512 | Asymmetric RSA | Public key can be misused as HMAC secret | | ES256/384/512 | Asymmetric ECDSA | | | PS256/384/512 | RSASSA-PSS | | | EdDSA (Ed25519/Ed448) | Asymmetric | | | none | Unsigned | Critically insecure | **Additional pitfalls:** - JWS/JWE confusion: server accepts encrypted token (JWE) where signed (JWS) is expected, or fails open on unexpected `typ`/`cty` - JWKS retrieval: SSRF via `jku`/`x5u`, insecure TLS, poisoned key caching, `kid` collisions - Token binding (DPoP, mTLS): incorrectly implemented allows replay from other clients ## Hunt:...

Details

Author
0xwilliamortiz
Repository
0xwilliamortiz/claude-red
Created
2 weeks ago
Last Updated
2 weeks ago
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

jwt

JWT (JSON Web Token) attack methodology. Covers algorithm confusion (RS256→HS256), none algorithm, weak secret cracking, kid injection, JKU header forgery, and claims manipulation.

1 Updated 5 days ago
sunilgentyala
Data & Documents Listed

sast-jwt

Detect insecure JWT (JSON Web Token) implementations in a codebase using a two-phase approach: first map all JWT issuance and verification sites to understand the token lifecycle and signing configuration, then check each verification site for exploitable weaknesses such as algorithm confusion, missing signature verification, weak secrets, header injection, and missing claim validation. Requires sast/architecture.md (run sast-analysis first). Outputs findings to sast/jwt-results.md. If no JWT usage is found in Phase 1, Phase 2 is skipped. Use when asked to find JWT, token forgery, or authentication bypass bugs.

0 Updated yesterday
reasonless-throne486
Data & Documents Featured

hunt-jwt-crypto

Hunt JWT cryptographic failures — alg:none signature-stripping and RS256→HS256 key-confusion that let an attacker forge a token for any identity (e.g. an admin) without knowing a secret. Use when the app authenticates with a JSON Web Token (an `eyJ...` Bearer token in the Authorization header, a cookie, or a login response). This skill OWNS JWT signature/crypto forgery (alg:none, key confusion, kid/jku header injection); hunt-ato covers JWT as one ATO path, hunt-auth-bypass covers SSO/SAML token trust, hunt-api-misconfig covers non-crypto JWT handling. Critical when a forged token grants access to another user's data or an admin-only endpoint.

3,766 Updated today
elementalsouls