Bandit Level 4 -> Level 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.

Write-up:

First, navigate to the inhere directory.

cd inhere

Second, loop through all the files in the directory and check which file is human-readable/ascii using the ‘'’file’’’ command.

for i in $(ls); do file -i "./$i"; done;

The output will display that all the files are binary except for ./-file07: text/plain; charset=us-ascii. Display the contents of the file.

cat ./-file07

The output will display the password to log into bandit6.

koReBOKuIDDepwhWk7jZC0RTdopnAYKh

SSH into bandit5 using the discovered password to complete the next level.

ssh bandit5@bandit.labs.overthewire.org -p 2220