Bandit Level 12

OverTheWire-Level Directory
Previous Level: 11

Level 12 Fight!

In order to begin you will need to use PuTTY or preferably Linux and use the following information

If you are currently in a level type “logout”

Now type “ssh bandit12@bandit.labs.overthewire.org -p 2220”
Password:”5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu”
We are now into level 12

For this level we are told

“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!)”

If you have done this before you will know that is most likely ROT13

“ls “ to show files/folders

We then see”data.txt”

To find the password we will need to copy this for modifications

“mkdir /tmp/bandit12” to create a tmp folder to work in

“cp data.txt /tmp/bandit12” copies “data.txt” into that folder

“cd /tmp/bandit12” moves into that folder

Next we should convert the hexdump into binary with “xxd”

“xxd -r data.txt data1.txt” will create a new hopefully Binary copy

Now we need to know the file type

“file data1.txt” will show us that it is a GZip file

“mv data1.txt data1.gz” will convert it to the proper format

“gzip -d data1.gz” will decompress the data

if we cat the data1 file it is still gibberish

“file data1” shows it as a bzip2 file

“mv data1 data1bz2” will convert it to a bzip2 file

“bzip2 -d data1.bz2” will decompress it again

This file will still be gibberish and is now a GZip file again

“mv data1.txt data1.gz” will convert it to the proper format

“gzip -d data1.gz” will decompress the data

Now it says it is a TAR archive

“mv data1 data1.tar”

“tar xvf data1.tar”

This will create a “data5.bin” file which is another TAR file

“mv data5 data5.tar”

“tar xvf data5.tar”

This will create a “data6.bin” file which is another BZip2 file

“mv data6.bin data6.bz2”

“bzip2 -d data6.bz2”

This will create a “data6” file which is another TAR file

“mv data6 data6.tar”

“tar xvf data6.tar”

This will create a “data6.bin” file which is another BZip2 file

“mv data6.bin data6.bz2”

“bzip2 -d data6.bz2”

This will create a “data6” file which is another TAR file

“mv data6 data6.tar”

“tar xvf data6.tar”

This will create a file named “data8.bin” which is a GZip file

“mv data8.bin data9.gz” will convert it to the proper format

“gzip -d data9.gz” will decompress the data

If we run “cat data9” WE FINALLY GET A PASSWORD!

“The password is 8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL”

Once again we can use
“ssh bandit13@bandit.labs.overthewire.org -p 2220”
and the password we just found to login to the next level

Next Level: 13