Lab · Easy-Intermediate · 25 min Solved
Broken auth (weak JWT)
A fake token checker accepts the dangerous alg=none trick. Forge an admin role — only here.
1) The idea
JWTs have a header that says how the signature was made. A buggy verifier that trusts alg=none skips the signature check.
2) Try it
Get a guest token, then edit the payload so role is admin and set the header alg to none with an empty signature.
Hint 1
Header and payload are base64url JSON. Signature can be empty when alg is none.
Hint 2
Header: {"alg":"none","typ":"JWT"} — payload role admin — signature empty.
3) The fix
Allow-list algorithms (e.g. only HS256/RS256). Reject none. Use a strong secret or asymmetric keys. Check audience/expiry. Prefer battle-tested libraries.
Simulated tools. They can only act on this lab's fake target inside the sandbox — there is no target field, no network, and nothing leaves your browser.
JWT forgerDecodes the guest token, re-signs it with alg=none and calls the fake /admin.
$ jwt-sim --alg none --role admin
Recon (headers & forms)Lists the fake target's simulated headers and input fields.
$ recon-sim
Real scanners against real sites without permission are illegal. Use these ideas only on systems you own or are authorized to test.