OverTheWire: Bandit - Guide
In this guide I want to give you hints on what to do in each level.
I will provide the solution as well, but you have to manually unhide them.
Try to figure it out on your own!
Level 0 -> 1
Hints:
read the level
commands to use: ssh, ls, cat
I recommend using sshguard or fail2ban to ban malicious IPs that try to connect to you or else.
Show Solution
ssh bandit0@bandit.labs.overthewire.org -p 2220
ls
cat readme
Level 1 → Level 2
Hints:
use ls -la
to see details of the current working dir
now you know that there is a readable file "-"
try reading it with cat
tab autocompletion?
try using a relative path or absolute path readme
Show Solution
relativecat ./-
or cat ~/-
absolute:cat /home/bandit1/-
Level 2 → Level 3
Hints:
there are several possibilities
try out tab autocompletion
or read about linux wildcards and special character encoding
Show Solution
autocompletion: cat spaces\ in\ this\ filename
this uses \ to get the real meaning of the next character.
wildcard: cat *
* means any string of any length. This would read other readable files as well
String escaping: cat "spaces in this filename"
this uses "" to get the real meaning of everything inside them.
Level 3 → Level 4
Hints:
read about hidden files in linux
I think I already wrote the command to view hidden files in some level hint
you are familiar with cd
?
Show Solution
ls -la
cd inhere/
ls -la
cat ...Hiding-From-You
Level 4 → Level 5
Hints:
combine autocompletion with the wildcard and use a path relative or absolute doesn't matter
Show Solution
cat ./-file0*
now there is somewhere the password
Level 5 → Level 6
Hints:
you could use find
and search for the file with the given properties
or
what I did is to use ls and piping the output in a way that just a few or one file is listed
Show Solution
ls -la * | nl | grep "1033"
so this lists all entries with additional info, writes a line number and then presents the line which has 1033 in it somewhere
lucky me this was just one line. The line number was important (nl)
to rerun the command without grep to see which folder the file is in, since grep delivered just the file and not the dir name
now you cat
right file.
Level 6 → Level 7
Hints:
Hint 1 for Level 6 to 7...
Show Solution
The password for Level 7 is: [...]
Explanation...
Level 7 → Level 8
Hints:
Hint 1 for Level 7 to 8...
Show Solution
The password for Level 8 is: [...]
Explanation...
Level 8 → Level 9
Hints:
Hint 1 for Level 8 to 9...
Show Solution
The password for Level 9 is: [...]
Explanation...
Level 9 → Level 10
Hints:
Hint 1 for Level 9 to 10...
Show Solution
The password for Level 10 is: [...]
Explanation...
Level 10 → Level 11
Hints:
Hint 1 for Level 10 to 11...
Show Solution
The password for Level 11 is: [...]
Explanation...
Level 11 → Level 12
Hints:
Hint 1 for Level 11 to 12...
Show Solution
The password for Level 12 is: [...]
Explanation...
Level 12 → Level 13
Hints:
Hint 1 for Level 12 to 13...
Show Solution
The password for Level 13 is: [...]
Explanation...
Level 13 → Level 14
Hints:
Hint 1 for Level 13 to 14...
Show Solution
The password for Level 14 is: [...]
Explanation...
Level 14 → Level 15
Hints:
Hint 1 for Level 14 to 15...
Show Solution
The password for Level 15 is: [...]
Explanation...
Level 15 → Level 16
Hints:
Hint 1 for Level 15 to 16...
Show Solution
The password for Level 16 is: [...]
Explanation...
Level 16 → Level 17
Hints:
Hint 1 for Level 16 to 17...
Show Solution
The password for Level 17 is: [...]
Explanation...
Level 17 → Level 18
Hints:
Hint 1 for Level 17 to 18...
Show Solution
The password for Level 18 is: [...]
Explanation...
Level 18 → Level 19
Hints:
Hint 1 for Level 18 to 19...
Show Solution
The password for Level 19 is: [...]
Explanation...
Level 19 → Level 20
Hints:
Hint 1 for Level 19 to 20...
Show Solution
The password for Level 20 is: [...]
Explanation...
Level 20 → Level 21
Hints:
Hint 1 for Level 20 to 21...
Show Solution
The password for Level 21 is: [...]
Explanation...
Level 21 → Level 22
Hints:
Hint 1 for Level 21 to 22...
Show Solution
The password for Level 22 is: [...]
Explanation...
Level 22 → Level 23
Hints:
Hint 1 for Level 22 to 23...
Show Solution
The password for Level 23 is: [...]
Explanation...
Level 23 → Level 24
Hints:
Hint 1 for Level 23 to 24...
Show Solution
The password for Level 24 is: [...]
Explanation...
Level 24 → Level 25
Hints:
Hint 1 for Level 24 to 25...
Show Solution
The password for Level 25 is: [...]
Explanation...
Level 25 → Level 26
Hints:
Hint 1 for Level 25 to 26...
Show Solution
The password for Level 26 is: [...]
Explanation...
Level 26 → Level 27
Hints:
Hint 1 for Level 26 to 27...
Show Solution
The password for Level 27 is: [...]
Explanation...
Level 27 → Level 28
Hints:
Hint 1 for Level 27 to 28...
Show Solution
The password for Level 28 is: [...]
Explanation...
Level 28 → Level 29
Hints:
Hint 1 for Level 28 to 29...
Show Solution
The password for Level 29 is: [...]
Explanation...
Level 29 → Level 30
Hints:
Hint 1 for Level 29 to 30...
Show Solution
The password for Level 30 is: [...]
Explanation...
Level 30 → Level 31
Hints:
Hint 1 for Level 30 to 31...
Show Solution
The password for Level 31 is: [...]
Explanation...
Level 31 → Level 32
Hints:
Hint 1 for Level 31 to 32...
Show Solution
The password for Level 32 is: [...]
Explanation...
Level 32 → Level 33
Hints:
Hint 1 for Level 32 to 33...
Show Solution
The password for Level 33 is: [...]
Explanation...