OverTheWire Bandit Guide

here's how to solve the bandit level 1 → 2

Back to the Bandit Guides

Previous Level Guide: Bandit Level 0 → 1


Access

SSH: ssh bandit1@bandit.labs.overthewire.org -p 2220

Password: fzRysGa0Ueo64hZsZRWD5cEyb301wABm

Info

Description: The password for the next level is stored in a file called - located in the home directory
Commands: ls, cd, cat, file, du, find

Theory

To get the password, the instructions say that there's a file called "-" that has the password. I'd guess from the manual, that the it will pick this up as an option (or flag) instead of as a file name. So what we would need to do to get the password is put "./" before the file name to specify that it's a file located in "./".

Solution

So, using the info from our theory, first we look at the folder:

~$ ls
-

And of course the name of the file is a single dash. I checked cat - just to be sure, and my terminal just crashed, so yeah, don't try it. Now we try using ./ before the filename:

~$ cat ./-
gTSrLU45901yl2RcmpaySeLGyyrf2Gfs

And it works, now that we've got the password, use exit to logout and go to the next level.

https://overthewire.org/wargames/bandit/bandit2.html
Next Level Guide: Bandit Level 2 → Level 3