AES-ABC
Problem
AES-ECB is bad, so I rolled my own cipher block chaining mechanism - Addition Block Chaining! You can find the source here: aes-abc.py. The AES-ABC flag is body.enc.ppm
Solution
Header is the first three lines of
body.enc.ppm
so save those.For the actual picture info extract from bytes to ints in blocks of 16 since that is what the encryption script does.
The encryption script encodes blocks by doing
(previous block + current block) % UMAX
so the decryption script does the opposite:(current - previous) % UMAX
.Run that for each block and convert back to bytes.
Copy the file header to a new image and append each block to that image.
Flag
picoCTF{d0Nt_r0ll_yoUr_0wN_aES}
Last updated