← All challenges
Symmetric-key·hard·60 pts

Forge the Cookie

A session cookie is encrypted with AES-CBC. You don't have the key. You don't need it.

A service encrypts session cookies with AES-128-CBC before handing them to the browser. The plaintext structure never changes: userid=9001;admin=false, PKCS#7-padded out to two 16-byte blocks.

You want admin=false to become admin=true! (same length, so no padding shifts). You don't have the key, and you're not going to break AES — you're going to exploit CBC's block-chaining structure instead.

Give your answer as the exact 5 bytes (as hex, no spaces) you'd need to XOR into the right ciphertext block to make that flip happen — that's the flag: cct{those_5_bytes_as_hex}.

Plaintext (for reference — you would not normally know this)

userid=9001;admin=false

IV (hex)

37eb42a9092951466dffa1e1974d4aa0

Ciphertext (hex, 2 blocks)

247bb25db3cf943bb472ae6de44f2532fc54cbb081f6c2aaa92d98b49df94c1f

Hints

Checked entirely in your browser — nothing you submit here leaves your device.

Background on this technique

Up next

Move Fast →

A service encrypts short messages with RSA, e=3, and never bothers with padding. What could go wrong?