I figured it may be fun to go through all of the OverTheWire Bandit Wargames, which are aimed at absolute beginners who want to start learning about security principles.
My aim will be to provide a very simple explanation of how each game is played, which will hopefully expand my own knowledge and help a few of you at the same time.
All posts in this serial have been tagged #OverTheWire.
The password for the next level is stored in the only human-readable file in the inhere directory. Tip: if your terminal is messed up, try the “reset” command.
Commands you may need to solve this level
ls, cd, cat, file, du, find
The goal here isn’t as clear as most of the other levels, but effectively what they’re actually looking for is for you to find the only file that has an ASCII text data type. Which can be done using the file command.
- Type ‘ls’ to list all files and directories. You should find a directory called “inhere”.
- Navigate into the “inhere” directory by typing “cd inhere”.
- Type ‘ls’ to list all files again.
- We can see there are 10 files, but to figure out which file is correct let’s return the type of file.
- Type “file ./-file*” which will return the data type of all files in the directory.
- A single file “-file07” has ASCII text, which seems to be the file we’re looking for.
- Type “cat ./-file07” to output the contents of the file.
- You should find the password for the next level is “koReBOKuIDDepwhWk7jZC0RTdopnAYKh”.