3DSCTF2016 - Base3200

Published on:

Base3200 write-up
CTF: 3DSCTF 2016
URL: https://3dsctf.win/
CAT: stego

In this CTF challenge, a file 'base32000.zip' is provided. Once decompressed,
we get a large text file with no line terminators:

# ls -al
total 21944
drwxr-xr-x 2 user user     4096 Jan 13 09:44 . 
drwxr-xr-x 6 user user     4096 Jan 13 09:40 ..
-rw-r--r-- 1 user user 22454435 Dec 21 09:38 base32000.zip
# unzip base32000.zip 
Archive:  base32000.zip
  inflating: msg.txt                 
# file msg.txt 
msg.txt: ASCII text, with very long lines, with no line terminators

Using 'base64' we try to decode the file and see that we get a smaller file. Following
with some manual iterations we get smaller and smaller files, so in the end we automate
the process using an ad-hoc shell script 'base64_recursive_decoder.sh'.

Testing for 100 iterations we conclude that the flag was recursively encoded in base64, 50 times:

# base64_recursive_decoder.sh 100 3DS

Cadena encontrada en la Iteracion 50