~ Level 5→6 ~
Level Description
The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties: human-readable, 1033 bytes in size, and not executable.
Commands that may be required to solve the level are: ls, cd, cat, file, du, find
Research Before Solving
We learned during the last level how to locate a file's type. With this in mind, let's take a look at the other two commands.
First is the du commmand. When we type du --help into the console, we learn that this switch gives a user the disk usage of a file or set of files. Disk usage does not equate to file size. If you would like more information behind this, feel free to search online for an answer. It is beyond the scope of this walkthrough.
The second command, find, is not given a definition within the documentation.
For this command, navigate to your browser and type in find command linux
. Personally,
I found linuxize.com (the fourth link for me) to be the best resource. While parsing the webpage,
two specific options that may be useful stick out: -type and -size.
Solution Walkthrough
As usual, we will start by logging into the OverTheWire server, bandit5 will be the user in this instance. Paste in the password from the previous level and confirm you are now logged in as user bandit5.
Running an ls command once logged in shows the same directory from the last two levels. Move into the inhere directory and issue another ls command to see what the contents are.

Presented to us is a list of directories. We can tell they're directories due to the color the text is displayed in. For a list of colors associcated with files, refer to your preferred search engine. If we then use the ls command on any of the listed directories, we see that multiple files are listed inside. This is where the functionality of find comes in handy!
Refer back to linuxize.com for the find command switches. We see that with
-type we have multiple available paramaters that can be passed. We will try
to use f as a regular file
may resemble a human-readable file. The second
switch of -size looks to have an option of c specifically used
to show the byte size of a file. Remember, the size we are after is 1033 bytes.
Using this newfound knowledge, the syntax of the command becomes: find -type f -size 1033c

The output you receive should appear just as it does above, with one file that meets our criteria being shown. Perform a cat command using the output as the target file. You must make to type the file in exactly as shown. This must be done since we are not in the maybehere07 directory. In essence, we are telling the computer where to find the file within the hierarchical structure of storage folders.

Congratulations! You've obtained the password to level 6; DXjZPULLxYr17uwoI01bNLQbtFemEgo7. Exit from the session, save the password, and continue to the next level.