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.

AI & Automation 3,234 stars 523 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
100
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
SnailSploit
Repository
SnailSploit/Claude-Red
Created
6 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category