OvertheWire bandit level solutions part 1

ARJ
3 min readJul 25, 2017

--

Fig 1: overthewire.org

Overthewire.org is a web site that allow users to learn and practice security and Linux related concept by connecting via a ssh connection to their servers. It has levels called Bandit, Krypton,Narnia,Behemoth etc. Each level have sub levels and player should find the key to next level in order to move forward.

This article includes solutions to the first 8 sub levels of bandit.

First thing to do is make a ssh connection to the bandit level 0 and http://overthewire.org/wargames/bandit/bandit0.html includes password and port to the level.

Level 0 :

fig 2: level 0

As shown in the figure 2 after login to the level 0 it includes a file and called readme that contain the key to the level 1.

Level 1 :

Fig 3 : level 1

After login to the level 1,You can see a file called “-” in the home directory.It can be opened using “cat < -” command.It contain the key to the second level.

Level 2:

Fig 4: level 2

In the second level,you can see a file called “ spaces in this filename”.In order to open the content of the file we have to use the escape character “\” to ignore spaces in the file name.otherwise as shown in the above figure “cat” command will only search a file that named “space” which doesn't exists in the home directory.

Level 3:

Fig 5: level 3

The key to the next level is stored in a hidden file in the inhere directory according the website.so in order to check the file you have to use the command “ls -al” because using only the command “ls” wont show hidden files.

Level 4:

Fig 6: level 4

Key to the next level contain in a human readable form in a file.so you can check files as shown in the figure 6.As you can see file00 contains data in unreadable form.but the file07 contains the key in readable form.

Level 5:

Fig 7: level 5

You have to use “find” command to search the file that satisfy following conditions.

  • human-readable
  • 1033 bytes in size
  • not executable

As shown in the figure there’s only one file that satisfy all the conditions and that is the file contains key to the next level.

Level 6:

Fig 8: level 6

There are 3 conditions in level 6 as in the previous level.

  • owned by user bandit7
  • owned by group bandit6
  • 33 bytes in size

Level 7:

Fig 9: level 7

As mentioned in the site password to the next level is stored in the file called “data.txt”.But it contained a word list with key you need to sort and the word “millionth”. In order to sort the list “grep” command can be used as in the below figure.

Fig 10: level 8

that’s all for the OvertheWire bandit level solutions part 1 and solutions to next levels will be published soon.

--

--