OverTheWire Bandit Level 4 → 5 Walkthrough
Using the file command to find the only human-readable file
OverTheWire Bandit Level 4 → 5 Walkthrough
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: ls, cd, cat, file, du, find
Helpful reading: None
Write-up
The description says that we need to find the only human readable file in the inhere directory. To see the file format I used the file command on all the files in the inhere directory.
1
2
3
4
for x in `find inhere -type f -print`;
do
file $x;
done
I got
1
2
3
4
5
6
7
8
9
10
11
inhere/-file08: data
inhere/-file05: data
inhere/-file07: ASCII text
inhere/-file04: data
inhere/-file00: data
inhere/-file01: data
inhere/-file06: data
inhere/-file03: data
inhere/-file09: data
inhere/-file02: data
Thus inhere/-file07 is the file we are looking for. cat inhere/-file07 gives the password for the next level.
Level 5 password:
koReBOKuIDDepwhWk7jZC0RTdopnAYKh
