Bandit level 4
Level Goal
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.
Here we have yet a simple task, but the challenge here is that we do not know which file contains the password. We know which folder it is in, but there are multiple files. Luckily there is only one human readable file, and that contains our password
useful commands
- cd
- ls
- cat
- strings
Solution - Spoiler Alert!
Knowing that only one of the files is human readable, we can make use of piping and the strings command. If we cat out all the files in the subdirectory with cat inhere/*
we get the content for all the files in the subdirectory. Here is a lot of scrambled text and weird icons and not much sense to be made. But we want to find a password, which is a string, so we use the unix pipe and pipe it through to strings. cat inhere/* | strings
we now get three lines with different strings, two very short ones, and one exactly the same length as the password for the other levels.
Comments ()