Quick Assessment Workflow
Scope the Session Control
Remove cookies/headers one at a time to identify which token gates authorization.
Check Signature Enforcement
Flip a few bytes in the signature and replay. If accepted, signature validation is missing.
Attack Techniques
Algorithm: None
Some libraries acceptalg: none tokens without verification:
Attack → None Algorithm
RS256 → HS256 Confusion (CVE-2016-5431)
Change the algorithm from asymmetric RS256 to symmetric HS256, then sign with the public key as the secret:Brute-Force HMAC Secret (HS256)
Deriving JWT Secret from Leaked Config
Pattern observed in some workflow automation stacks:JWKS Spoofing (jku Header)
x5u Header Manipulation
Embedded JWK (CVE-2018-0114)
Attacker embeds a new public key in the JWT header, and the server uses it:kid (Key ID) Attacks
Path Traversal via kid
SQL Injection via kid
OS Command Injection via kid
ES256 Private Key Recovery (Same Nonce Reuse)
If ES256 uses the same nonce for two different tokens, the private key can be mathematically recovered. See ECDSA nonce reuse attack.JTI (JWT ID) Replay
If the max JTI length is small (e.g., 4 digits: 0001–9999), IDs will wrap around. Send 10000 requests between successful uses to replay an expired JTI.Cross-Service Relay Attack
If a shared JWT service issues tokens for multiple clients, a token issued for Client A might be accepted by Client B. Try signing up on another service using the same JWT service and replay the token.Expiry and Token Claims
Tools
jwt_tool
Decode, tamper, crack, and run automated attack modes (
-M at for all tests).Burp JWT Editor
Decode/re-sign in Repeater, generate custom keys, built-in attacks (none, HMAC confusion, embedded JWK, jku/x5u).
hashcat -m 16500
GPU-accelerated HS256 secret cracking.