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.eyJzdWIiOiJkZW1vIiwidWlkIjoyLCJyb2xlIjoidXNlciIsImV4cCI6MTc5MjU0NTI1Nn0.2JHUW93VAC3oXlQHhtW_z0DXfjquCqhdjgTmrjbc9b8header
{
"alg": "HS256",
"typ": "JWT"
}payload{
"sub": "demo",
"uid": 2,
"role": "user",
"exp": 1792545256
}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.eyJzdWIiOiJkZW1vIiwidWlkIjoyLCJyb2xlIjoidXNlciIsImV4cCI6MTc5MjU0NTI1Nn0.P2AdG-iav2ltoVcLDaTMUi8RnmhE4nnTmgfDbJ0NO3oiKj_oQuhdu9k00ava8S1PbBJI0yag3qSrgKzV6E3by6Gob92r_UUZ2JR40i_D8RLAnA1rc3JASWrq1F26za2M5-FhJuprQjyB63cq41Tt0Fov7g0HMlJ6UJ0ePzSxYTiF9yByTg9Af_9Xa0CLXnXTSKsuUooer_8mcXglYAKpXVJ7OH_Aetuxp1wI1CDxiPyJ2llbfQm-LyQOr3lHl_sur07KhHgWYdicyvxZOgYSTht367annPWIX7kfnad1HiwJ2NNikJPgWCoB8C8mIPtDtZOGO5d0NBqe5CCsqYhjRQ
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