Recap of Last Lesson: We learned about escape characters and tab completion to read a file name that had spaces.

Bandit Level 4


Find the password to the next level

Intel Given

  • Password is in a hidden file
  • file is located in the inhere directory

How to

To list the contents of a directory we use the command ‘ls’ take the time to read the manual on ls by typing ‘man ls’ to quit from the manual press ‘q’. It’s important to read the manuals for commands, often times I know what I want to do, but I won’t know exactly how to do it and so I start looking into the manuals of various commands. If you haven’t found it yet, you have the ability to look for hidden files by including something with your command. This is often referred to as a “switch” and in this case to see hidden files we can type ‘ls -a’. By adding -a to our command we’ve effectively said “List ALL the contents of the directory, and if you looked in the manual you would see that it specifies “do not ignore entries that begin with a .” Why is this important?

Hidden Files

Well adding a period to filenames is how *nix denotes hidden files in its structure, so if we want to see hidden files we need to include the -a. To view the hidden files within the “inhere” directory we simply append the directory to our command. “ls -a inhere”. We can see three things listed. A period, two periods and .hidden. The period denotes the current directory, two periods references the parent directory and .hidden is your hidden file!

Try typing “cat inhere/.hidden” and see what comes up.


Once again I reference the manual and its importance. Thats twice now, if you haven’t been checking the man pages I suggest you take the time to do it now. It only gets worse from here.