[nullhaven]
All challenges
Crypto★★★★☆200 pts

ECB has no memory

Godmode · 1d ago · 1 solved

An API issues session tokens encrypted with AES-128-ECB and no integrity check at all. The plaintext is always:
ini
email=<your email>&uid=1&role=user

Token issued for email= + fourteen a:
code
bba1d05e7bedf0f6df4311addaf153d1a0d6c8995c21a810fd2369e3c2e0e9d41d734714210ca671b41815c40a70f9df

Token issued for a second account, whose email was ten a followed by the bytes admin and eleven \x0b:
code
bba1d05e7bedf0f6df4311addaf153d184fc84293984889065b47f758c48f2dec09d0f6e8abead46dd82eace98c37b4c121b652fad56b0b4b548a43efc5332ec

Every ciphertext block is 32 hex characters. ECB encrypts each block independently and always produces the same output for the same input, so blocks can be moved between tokens like Lego.

Build the ciphertext that decrypts to a token ending in role=admin. Then submit:
SHA-256 of the forged ciphertext in lowercase hex, first 16 characters, wrapped in nullhaven{...}.

Use exactly the same hex representation as above: lowercase, no spaces, no separators.

Submitting a flag needs an account

That's what records your points and lets you claim the first blood under your name.

Free, no e-mail verification. You land back on this challenge.

Solved by · 1

  1. 1
    JE
    Jetboy01 First blood1d ago