Q: What are some attack methods against JWT (JSON Web Tokens) (headers, payload, signature)?
A: Common JWT attack methods include:
- JWT Overwriting: Replacing a valid JWT with another valid JWT to maintain a session.
- Cryptanalysis: Brute-forcing or exploiting weaknesses in the JWT's encryption.
- Tampering: Modifying the payload or header to change the token's meaning or permissions.
- Payload Modification: Adding claims to escalate privileges.
- Signature Spoofing: Using a malicious signature to make a fake token appear valid.
- Brute Force: Trying to guess the secret key used to sign the JWT.
- Lifetime Extension: Creating a token with a longer expiry time than intended.
- Cache Exploitation: Stealing a valid JWT from a proxy or browser cache.
- Replay Attack: Reusing a previously captured valid JWT.
- Path Traversal: Using absolute paths in the JWT to access restricted resources.