Fetching latest headlines…
My Favorite OS - Jerseyctf6
NORTH AMERICA
πŸ‡ΊπŸ‡Έ United Statesβ€’April 19, 2026

My Favorite OS - Jerseyctf6

0 views0 likes0 comments
Originally published byDev.to

Step 1 – Explore Available Commands

Start by running the help command in the terminal to see what actions are available.

Help commands

Step 2 – Log In as the Guest User

Use the provided login command to authenticate as the guest user. The server responds with an automatically generated JWT.

Login as guest user

Step 3 – Decode the JWT

Head to jwt.io and paste the token into the decoder. Inspect the payload section β€” you'll see something like:

{
  "username": "guest",
  "role": "user"
}

Our role is user. To access the admin panel, we need to change this to Admin. However, we can't just edit the token β€” the signature will break unless we sign it with the correct secret key.

Step 4 – Brute-Force the Secret Key

Since JWTs signed with HS256 use a symmetric secret key, we can attempt to crack it using Hashcat with a wordlist:

hashcat -a 0 -m 16500 <your_jwt_token> <path_to_wordlist>
  • -a 0 β€” dictionary attack mode
  • -m 16500 β€” hash type for JWT (HS256)

JwT Cracked

The secret key is revealed: windows98

Step 5 – Forge a New Token

Now that we have the secret key, go back to jwt.io and:

  1. Edit the payload β€” change "role": "user" to "role": "Admin"
  2. Enter windows98 as the secret in the Verify Signature section
  3. Copy the newly signed token

Step 6 – Access the Admin Panel

Use the forged token to send a request to the protected admin endpoint:

GET /admin/panel -H 'Authorization: Bearer <forged_token>'

Flag revealed

Flag

jctf{w1nd0ws98_1s_th3_b3st_0s_3v3r_937cn2}

Pwnsome References

Comments (0)

Sign in to join the discussion

Be the first to comment!