Overthewire.org Bandit Level 3-> 4

Michael McDonagh
1 min readMay 30, 2021

Level Goal

The password for the next level is stored in a hidden file in the inhere directory.

=======================================

Walkthrough

Login to the server using the password obtained from the previous level Bandit 2 -> 3.

Username: bandit3

ssh bandit3@bandit.labs.overthewire.org -p 2220

Change directory into inhere, running ls command will show no files.

bandit3@bandit:~$ ls
inhere
bandit3@bandit:~$ cd inhere/
bandit3@bandit:~/inhere$ ls

Running ls -al will let us see all files including hidden files.
-a option will tell ls to show all files (do not ignore file starting with a period .)

bandit3@bandit:~/inhere$ ls -a 
. .. .hidden

ls -a will show 3 files ., .. and .hidden
. is the current directory
.. is the parent directory
.hidden is a hidden file that is normally invisible to the user.

We know from the level goal that the password is in a hidden file, all we need to is print the contents of .hidden to see the password.

bandit3@bandit:~/inhere$ cat ./.hidden 
pIwrPr##########################

--

--