Level 10 -> Level 11

The goal of this level is to read the content of data.txt file and get the password by decoding base64 encoded data.

Base64 data can be easily encoded using the command base64 -d data.txt

Use the command ssh bandit11@localhost to connect to the level 11.

Enter the password and hit enter.

Successfully passed level 11.…

Level 11 -> Level 12

The goal of this level is to read the content of data.txt file and get the password where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions.

In this problem, lowercase and uppercase alphabets are translated by rotating by 13 positions i.e. A is written as N, B is written as O … and so on.

Here, tr command is useful to rotate back the letter to their original form.

Command used is cat data.txt | tr ‘N-ZA-Mn-za-m’ ‘A-Za-z’

Tr stands for translate and ‘N-ZA-Mn-za-m’ means that our input starts with the letter N and continues through the letter Z, then continues with the letter A through the letter M. Similarly, for lowercase letters. And we want to translate our input such that it gives us output that starts with letter A and continues through the letter Z.

Use the command ssh bandit12@localhost to connect to the level 12.

Enter the password and hit enter.

Successfully passed level 12.…

Level 12 -> Level 13

The goal of this level is to read the content of data.txt file which is a hexdump of a file that has been repeatedly compressed and get the password.

Use cat data.txt command to view how the hexdump looks like.

Step1 : Create a directory in /tmp directory and copy data.txt file into newly created directory.

Step2 : Firstly we need to reverse the hexdump. xxd creates a hex dump of a given file or standard input. It can also convert a hex dump back to its original binary form. xxd command with -r option performs reverse hexdump. So, here we will use command as: cat data.txt | xxd -r > data. “> data” is used to send the binary form of the file in the file named data.

Step3 : File command is used to check the type of file (i.e. data). It is a gzip compressed data file.

Gzip is a type of file format which is used by unix or linux systems to compress HTTP data before sending to the client. It can shrink the file upto 80% and improve the page load time and decreased bandwidth consumption. .gz — Indicates a file extension compressed by the gzip algorithm.

Step4 : So, now we will move the data of data file into the data.gz using mv command and using gunzip data.gz command we can decompress it.

Decompressed file will store as data file name with no extension. And again, using file command we will check the type of data file.

Step5 : Now we found that the file is bzip2 compressed file.

Bzip2 binds the files into a single file which takes less storage space as the original file use to take. It has a slower decompression time and higher memory use. It uses Burrows-Wheeler block sorting text compression algorithm, and Huffman Coding. Each file is replaced by a compressed version of itself, with the name original name of the file followed by extension bz2.

Step6 : So, now we will move the data of data file into the data.bz using mv command and using bzip2 -d data.bz command we can decompress it.

Decompressed file will store as data file name with no extension. And again, using file command we will check the type of data file.

Step7 : This time the file type is POSIX tar archive (GNU). We can use the command tar xvf data to untar the file.

Step8 : Again using the file command we will check the type of file we are working on.

Step9 : Repeat the above steps utill we get the ASCII text file.

After repeatedly decompressing and checking the file type we finally got the ASCII text file whose content can be easily displayed using cat command.

Use command cat data9 and get the password.

Use the command ssh bandit13@localhost to connect to the level 13.

Enter the password and hit enter.

Successfully passed level 13.…

Level 13 -> Level 14

In this level we will not get the password to enter into the next level. Instead we need to use the private SSH key to log into next level.

Use the command cat sshkey.private to view the key.

This is how the key looks like :-

Simply type the command as ssh bandit14@localhost -i sshkey.private to login into the next level.

ssh bandit14@localhost is used for connecting to bandit14.

-i sshkey.private is used to insert the key where option -i is for inserting.

Now, we can enter into the directory /etc/bandit_pass and read the file bandit14 and get the password as we are user bandit14.

Successfully passed level 14.…

Level 14 -> Level 15

The goal of this level is to submit the password of the current level to port 30000 on localhost and get the password to the next level.

Firstly we will get the password of the current level by using the command cat /etc/bandit_pass/bandit14

We can use the command as echo password_of_current_level | nc localhost 30000 to get the password of next level.

echo command in linux is used to display line of text/string that are passed as an argument.

nc is networking utility with functionality similar to cat command but for network. It is a general purpose CLI tool for reading, writing, redirecting data across a network.

nc localhost port_no is used to connect to that particular port no.

So, on clubbing these commands, echo will display the password of current level then nc will read that password and then it will make connection with the port number 30000.

This is how we will get password to the next level.

Use the command ssh bandit15@localhost to connect to the level 15.

Enter the password and hit enter.

Successfully passed level 15.…

Keep learning!!!

Thank you :-)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sakshi Aggarwal

Sakshi Aggarwal

Digital forensics enthusiast | Cyber security | Bug hunter | Java | Python | Analyzer