JWTKeyCracker is a command-line tool designed to brute-force the secret key used to sign JSON Web Tokens (JWTs) with HMAC algorithms (HS256, HS384, HS512).
It takes a JWT and a wordlist of potential keys and attempts to identify the correct signing secret.
- Splits the JWT into header, payload, and signature.
- Detects the signing algorithm from the JWT header.
- Iterates through the secretKey wordList to create jwt with header+"."+payload and secretKey.
- Compares the created jwt with original jwt.
- Prints the secret key if found.
- π Brute-force HMAC-based JWT secrets (HS256, HS384, HS512)
- π Custom wordlist support
- β±οΈ Execution time tracking
- π₯οΈ Clean and colorful console output `
Clone the repository and ensure you have Python 3 installed:
git clone https://github.com/yourusername/JWTKeyCracker.git
cd JWTKeyCrackerNo external libraries are required (only Python standard library).
python3 JWTKeyCracker.py -w <wordlist.txt> -t <JWT>| Flag | Description | Required |
|---|---|---|
-w |
Path to the wordlist containing keys | β |
-t |
The JWT you want to crack | β |
python3 JWTKeyCracker.py -w ./jwt_secrets.txt -t "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30"
Created By: Naku Tenshi
