BurpSuite Labs - Json Web Token jwt
JWT authentication bypass via unverified signature
Enunciation
This lab uses a JWT-based mechanism for handling sessions. Due to implementation flaws, the server doesn't verify the signature of any JWTs that it receives.
To solve the lab, modify your session token to gain access to the admin panel at /admin
, then delete the user carlos
.
You can log in to your own account using the following credentials: wiener:peter
Solution
JWT authentication bypass via flawed signature verification
Enunciation
This lab uses a JWT-based mechanism for handling sessions. The server is insecurely configured to accept unsigned JWTs.
To solve the lab, modify your session token to gain access to the admin panel at /admin
, then delete the user carlos
.
You can log in to your own account using the following credentials: wiener:peter
Solution
JWT authentication bypass via weak signing key
Enunciation
This lab uses a JWT-based mechanism for handling sessions. It uses an extremely weak secret key to both sign and verify tokens. This can be easily brute-forced using a wordlist of common secrets.
To solve the lab, first brute-force the website's secret key. Once you've obtained this, use it to sign a modified session token that gives you access to the admin panel at /admin
, then delete the user carlos
.
You can log in to your own account using the following credentials: wiener:peter
Solution
Capture the JWT of wiener user and run hashcat with a well-known dictionary of jwt secrets such as https://github.com/wallarm/jwt-secrets/blob/master/jwt.secrets.list
Results:
Open JWT Editor, go to Keys tab and generate a new signature.
Send your request to repeater, go to JSON Web Token tab, modify username to administrator, click on Sign and select your signature. Modify endpoint to /admin and send request.
Trigger the delete user carlos endpoint:
JWT authentication bypass via jwk header injection
Enunciation
This lab uses a JWT-based mechanism for handling sessions. The server supports the jwk
parameter in the JWT header. This is sometimes used to embed the correct verification key directly in the token. However, it fails to check whether the provided key came from a trusted source.
To solve the lab, modify and sign a JWT that gives you access to the admin panel at /admin
, then delete the user carlos
.
You can log in to your own account using the following credentials: wiener:peter
Solution
Capture wiener JWT and send the request GET /admin to the Repeater module. Once there, go to JSON Web Token tab and:
JWT authentication bypass via jku header injection
Enunciation
This lab uses a JWT-based mechanism for handling sessions. The server supports the jku
parameter in the JWT header. However, it fails to check whether the provided URL belongs to a trusted domain before fetching the key.
To solve the lab, forge a JWT that gives you access to the admin panel at /admin
, then delete the user carlos
.
You can log in to your own account using the following credentials: wiener:peter
Solution
B
Enunciation
T
Solution
I
B
Enunciation
T
Solution
I
B
Enunciation
T
Solution
I
Last update: 2024-05-03 Created: May 2, 2024 16:07:28