Develop the method. A login just minted the session below. Decode it, recon the header and claims, and work out which single attack this server is actually vulnerable to. Start by asking: does tampering even get rejected? Then probe each avenue in turn — alg:none, cracking the HS256 key, and RS256→HS256 confusion against the published key. Only one of them reaches /method/which-attack/admin as admin; the others are correctly refused. Do not assume — test.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZW1vIiwidWlkIjoyLCJyb2xlIjoidXNlciIsImV4cCI6MTc4ODA2OTQwMn0.iPcIuKA9l3eSBDWHGjeV5HQG8tV5DfM6U7X-hD30QU4header
{
"alg": "HS256",
"typ": "JWT"
}payload{
"sub": "demo",
"uid": 2,
"role": "user",
"exp": 1788069402
}A sample RS256 token (role:user) — inspect its header, and ask whether handing the verifier an HS256 token keyed with that public key gets you anywhere:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InJhdGF1dGgtcnMyNTYtMjAyNiJ9.eyJzdWIiOiJkZW1vIiwidWlkIjoyLCJyb2xlIjoidXNlciIsImV4cCI6MTc4ODA2OTQwMn0.cW5m-FsKdqCKWn_pkBYr5qdxB9mactDulVl7hySJH4i2rY8kzKPpTehoyNPquxHA2FaGFFRcOIo5Fz3mvgF0NmDNMrQyDWhP1HRkjPNpUfuc9ZVzmYzV0JDORg6xctv-PsdDtlNrQ1tngjUJQeSUuvkLQ-LrFWbHgpUeK85i_Yb5BYmWp2OrRqI7GOTkgm-5nNkpPKZBQ9i9_s70cfMTOuwWiHmn5MsfabAW2Hkbu1S6jOq0pSCYASMYi6moRXisKwmJsjc0y6cHhSaTdRYyl00azum_4BJj_BrFyuOes_TCc-MNdDjpZ_UnclZ8I9RVmAU8Jzkwdf12RXWAgeUV_w
Present your forged token as the pp_which cookie, or as ?token=<jwt>. The signing key looks strong — that is not the same as being strong.
More hands-on practice → labs.hackxpert.com