Level4

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.

Solution

root@0xCAB: /writeups/overthewire/bandit/level4/

$ ls inhere
-file00 -file01 -file02 -file03 -file04 -file05 -file06 -file07 -file08 -file09

$ file inhere/*
inhere/-file00: OpenPGP Public Key
inhere/-file01: data
inhere/-file02: data
inhere/-file03: data
inhere/-file04: data
inhere/-file05: data
inhere/-file06: data
inhere/-file07: ASCII text
inhere/-file08: data
inhere/-file09: data

$ cat inhere/-file07
lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR

$

The file utility is used to determine a file’s type. See the file man page to read more about the utility including the tests it uses to determine a file’s type.