Skip to main content
Challenges JWT: weak key and admin signature
Web Medium Cracking the HS256 JWT secret key offline and unlocking the protected response with a role=admin token Solves: 2

JWT: weak key and admin signature

Author: CyberSamSU
Points
50

During a system authentication audit, you were handed the jwt_audit.zip archive. It contains three files:

  • session_curl.log — the HS256 JWT token obtained by the user via POST /api/v1/login, the 403 Forbidden response to the /api/v1/admin/vault endpoint, and the 401 rejection response for the alg=none attempt.
  • wordlist.txt — a list of suspected weak HMAC secret keys.
  • admin_vault.json — encrypted response entries that can only be decrypted with a valid role="admin" token signature and the secret key (a decoy entry is also included among them).

Task: using wordlist.txt, find the HS256 signing key offline, change the role field in the login payload to "admin", compute a new HS256 signature over compact JSON (with no whitespace and key order preserved), and decrypt the matching verify_tag entry in admin_vault.json to obtain the flag.

admin_vault.json specifies the key derivation rule: XOR with a key_i = SHA256(forged_sig_b64url + ":" + secret + ":" + str(i)) stream. Flag format: BAYROQ{...} (the last 16 characters are lowercase hexadecimal digits).

Attached files
jwt_audit.zip Log in to download
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −5 pts Log in
Hint 2 −10 pts Log in
Hint 3 −15 pts Log in
To submit a flag, log in.

First solvers

1. Mirjaxon Qaxxarov 25.11.2026
2. Odam 25.11.2026