LEVEL 5
Task
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.
Username: bandit4
Password: string provided in the .hidden file in the previous level
Theory
First, it’s important to define what “human-readable” means in this context. “Humand-readable” means that the data is presented in a format that is readable. The most common data encoding will be ASCII text and Unicode.
This is in contrast to machine-readable data e.g. UPC barcodes or binary codes.
Based on the task, I have to find a file with data that I can read, in the inhere directory.
Solution
Step 1: Log in using the username and password in the task.
Step 2: Type pwd
to confirm my location in the directory.
Step 3: Type cd inhere
to change to the inhere directory.
Step 4: Type ls -a
to list out all hidden and non-hidden files in the current working directory.
Step 5: I realised I need a more detailed list. So I typed ls -la
to list all files in a long list format.
Step 6: There are 10 files listed. I realised it will take a long time for me to cat
all the files one by one.
Step 7: To solve this, I can type in file
to determine the file type. At the same time, I can use *
wildcard. This wildcard will match any number of characters or a set of characters.
Step 8: Combining both commands, I use file ./-file*
to determine the file types. I have to use ./
in the command as the files’ names start with a dash (-).
Step 9: File 7 is identifited as a human-readable file. So I use the command cat ./-file07
to read the contents.
Level 5 completed.