Previous Level: Level 0
Login
SSH: ssh bandit0@bandit.labs.overthewire.org -p 2220
Password: bandit0
Task
The password for the next level is stored in a file called readme located in the home directory.
A little bit of Theory
If you log into a machine with SSH as a specific user, you will land in the home directory of that user.
In the walkthrough for the previous level, I shortly mentioned the man command. This command gives you more information about a command like what additional information is needed (exp. ssh login info) and also possible flags (exp. -p to specify the port for ssh)
In this level, you will start learning basic Linux commands to interact with the filesystem.
pwdthis command is one method to see, which is the current working directory. An alternative can be on the left next to the username. Exp.bandit0@bandit:~$, here the~indicates the current working directory as the home directory of the user.lsList the files in the current folder (if the folder is not specified). Two optional flags that should be known for this command are-l, which prints files in a long list format (additional information about a file) and-a, which also shows hidden files.catReads files sequentially and writes them to standard output or in other words, prints the files content to the console.
Solution
We log in through SSH with the information above. And as explained in the theory section, we land in the home directory from user ‘bandit0’. (You can check this with the
pwdcommand.)Next, we can make sure that the readme file is actually in the folder.
1 2bandit0@bandit:~$ ls readmeSince this is the case, we can print the content of a file with the following command syntax:
cat <file>.1 2bandit0@bandit:~$ cat readme boJ9jbbUNNfktd78OOpsqOltutMc3MY1The resulting string is the password for the ‘bandit1’ user.
https://overthewire.org/wargames/bandit/bandit1.html
Next Level: Level 2