3DSCTF 2016 : misc100-base3200

base3200 - One more message sent by R3cursiv3 Hacker was intercepted.
You challenge is to decode the message and reveal the flag.
The recovered message is on the attached zip file.

Solved by 89 Teams Created by @ea_sh

Solution

I received a zip file w/ a giant(45mb) msg.txt

..let's inspect header/footer:

loooks a true base64..

yes, after some cat msg.txt | base64 --decode >> n.txt, look at the file size reducing, it is enconded w/ a recursive base64, and the title gives the tip

Title=base3200.. 3200/64=50 <- it means, encoded w/ base64 50 times.

Wrote a py to decode 50 times

## base64x50 decoder used in misc100-base3200 @ 3dsctf-2k16
# @author intrd - http://dann.com.br/
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
import base64
# 3200/64 = 50
pontfile='msg.txt'
for x in range(0, 50):
with open(pontfile, 'r') as f:
de = f.readline()
f.close()
with open(pontfile,"w") as xx:
xx.write(base64.b64decode(de))
view raw base3200.py hosted with ❤ by GitHub

Flag: 3DS{CENSORED}