Bandit Level 12 → Level 13

Level Goal

The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which you can work using mkdir. For example: mkdir /tmp/myname123. Then copy the datafile using cp, and rename it using mv (read the manpages!)

Commands you may need to solve this level

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd, mkdir, cp, mv, file

bandit12@bandit:~$ cp data.txt /tmp/jcruz123
bandit12@bandit:~$ cd /tmp/jcruz123
bandit12@bandit:/tmp/jcruz123$ ls
data.txt
bandit12@bandit:/tmp/jcruz123$ xxd -r ~/data.txt > data.txt
bandit12@bandit:/tmp/jcruz123$ file data.txt
data.txt: gzip compressed data, was "data2.bin",
last modified: Tue Oct 16 12:00:23 2018, max compression, from Unix
bandit12@bandit:/tmp/jcruz123$ zcat data.txt > new_data
bandit12@bandit:/tmp/jcruz123$ ls
data.txt  new_data
bandit12@bandit:/tmp/jcruz123$ file new_data
new_data: bzip2 compressed data, block size = 900k
bandit12@bandit:/tmp/jcruz123$ bzip2 -d new_data
bzip2: Can't guess original name for new_data -- using new_data.out
bandit12@bandit:/tmp/jcruz123$ ls
data.txt  new_data.out
bandit12@bandit:/tmp/jcruz123$ file new_data.out
new_data.out: gzip compressed data, was "data4.bin",
last modified: Tue Oct 16 12:00:23 2018, max compression, from Unix
bandit12@bandit:/tmp/jcruz123$ zcat new_data.out > newer_data
bandit12@bandit:/tmp/jcruz123$ ls
data.txt  new_data.out  newer_data
bandit12@bandit:/tmp/jcruz123$ file newer_data
newer_data: POSIX tar archive (GNU)
bandit12@bandit:/tmp/jcruz123$ tar -xvf newer_data
data5.bin
bandit12@bandit:/tmp/jcruz123$ file data5.bin
data5.bin: POSIX tar archive (GNU)
bandit12@bandit:/tmp/jcruz123$ tar -xvf data5.bin
data6.bin
bandit12@bandit:/tmp/jcruz123$ file data6.bin
data6.bin: bzip2 compressed data, block size = 900k
bandit12@bandit:/tmp/jcruz123$ bzip2 -d data6.bin
bzip2: Can't guess original name for data6.bin -- using data6.bin.out
bandit12@bandit:/tmp/jcruz123$ ls
data5.bin  data6.bin.out  data.txt  new_data.out  newer_data
bandit12@bandit:/tmp/jcruz123$ file data6.bin.out
data6.bin.out: POSIX tar archive (GNU)
bandit12@bandit:/tmp/jcruz123$ tar -xvf data6.bin.out
data8.bin
bandit12@bandit:/tmp/jcruz123$ file data8.bin
data8.bin: gzip compressed data, was "data9.bin",
last modified: Tue Oct 16 12:00:23 2018, max compression, from Unix
bandit12@bandit:/tmp/jcruz123$ zcat data8.bin > lost
bandit12@bandit:/tmp/jcruz123$ ls
data5.bin data6.bin.out data8.bin data.txt lost new_data.out newer_data
bandit12@bandit:/tmp/jcruz123$ file lost
lost: ASCII text
bandit12@bandit:/tmp/jcruz123$ cat lost
The password is 8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL