Introduction
As we progress in the Bandit Challenge, Level 5 ↗️ introduces us to the concept of human-readable files. Our objective is to locate and extract the password stored within the only file in the “inhere” directory that is readable by humans.
Challenge Overview:
Level 5 challenges us to identify the sole human-readable file within the “inhere” directory. Our task is to distinguish this file from others that may not be readable by humans.
By utilizing commands like file
, ls
and cat
we’ll navigate the file system, examine file contents, and retrieve the password.
Approach and Strategy
Follow these steps to successfully solve Level 5:
Enter the password you obtained from the previous level.
Once logged in, navigate to the “inhere” directory using the cd
command:
This allows us to change our working directory.
Display the files and directories within the “inhere” directory using the ls
command:
This will provide a list of files and directories within the current directory.
Among the listed files, we need to identify the only human-readable file. Human-readable files typically contain plain text that can be easily read by humans.
One approach to identifying the human-readable file is to use the file
command. Run the following command:
This will display the file types and information for all the files in the directory. The response would look something like this
Look for the file that has a type indicating it is human-readable, such as “ASCII text” or “UTF-8 Unicode text”. These types suggest that the file contains readable text.
From above response we see the file "./-file07"
is of format “ASCII text”.
To view the contents of this file, use the cat
command:
The password for Level 5 will be displayed in the output. Take note of it for the next level.
Note: If your terminal becomes distorted during the process, use the
reset
command to restore it to the default settings.
Notes
- Human-readable files contain text that can be easily read by humans. We can use
file
↗️ command to get details about the file. - If your terminal becomes distorted, use the “reset” command to restore it.
Conclusion
Congratulations on successfully completing Level 5 of the Bandit Challenge! By exploring the file system and identifying the human-readable file within the “inhere” directory, we obtained the password necessary to progress further.
Stay tuned for the next blog post, where we’ll embark on Level 6 and face new challenges in our quest to become cybersecurity experts.