Bandit 5 ( level 4->5 )
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.
Commands you may need to solve this level
ls , cd , cat , file , du , find
Solving
ssh into bandit4:
ssh -p 2220 bandit4@bandit.labs.overthewire.org

As you can see in the img1, we have 10 files in the directory.
There's only one file that's our flag, you can brute-forcing and cat
all the files out one by one.
But learning to get the job done smarter is not a bad attempt right ?
We'll be using the file
command.
This command is mostly used to identify the types of any specific files.
In this case, we have our files named '-file..'
There's a trick of using wildcard '*' in our command to let them match the files with our condition.
Like in this case, we can use:
file ./-file*
The './' before a file name is used to directly refers to the files. And the '*' after the '-file' tells the command to identify all of the files those names started with "-file".

As you can see in the img2, there's only one file which contains ASCII text. That's probably our flag.

There we go, we captured our flag.
4oQYVPkxZOOEOO5pTW81FB8j8lxXGUQw
Last updated