Skip to content

Mischard

One Byte Too Far

450 points · 0 solved

strcpy(name, input) writes a NUL one byte past name[], truncating the adjacent key field's first byte to 0x00 — so the stored key 0x5A becomes usable as 0x5A XOR decryption of flag.enc.

flag.enc = 292f3e352135343f0538232e3f05352c3f2827
key (post-overwrite) = 0x5A

Hints0/2

Learn the technique/learn/c-systems-programming