San Diego CTF 2021: Lost in Transmission

Lost in Transmission

Category: Crypto

chal

EASY

I had my friend send me the flag, but it seems a bit…off.

Flag Message

https://cdn.discordapp.com/attachments/840007307761156097/840007905616986122/flag.dat

Solution

Given file seems to be binary blob, but actually it’s a flag where value of each byte has been doubled. I’ve solved the challenge as below.

>>> flag_encrypted = open('flag.dat', 'rb').read()
>>> flag_encrypted
b'\xe6\xc8\xc6\xe8\xcc\xf6\xae`\xdc\x88f\xe4\xcc\xaa\x98\xbe\xda\xb2\xbe\x8e``\xc8\xbe\xe6b\xa4\xfa'
>>> for i, j in zip(flag_encrypted[:6], 'sdctf{'):
...     print(i, ord(j))
... 
230 115
200 100
198 99
232 116
204 102
246 123

This is the moment, when I knew what’s going on ;-)

>>> for i in flag_encrypted:
...     print(chr(i//2), end='')
... 
sdctf{W0nD3rfUL_mY_G00d_s1R}

submit

Flag

sdctf{W0nD3rfUL_mY_G00d_s1R}

Privacy Policy
luc © 2021