rtmoran.org — Cybersecurity and Linux Resource

Over the Wire’s Bandit Challenge – Level 4

overthewire

Level 04 – bandit – overthewire

Level Instructions:

“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.”


bandit4@bandit:~$ ls -la
total 24
drwxr-xr-x  3 root root 4096 Dec 28  2017 .
drwxr-xr-x 42 root root 4096 Jul 22 18:42 ..
-rw-r--r--  1 root root  220 Sep  1  2015 .bash_logout
-rw-r--r--  1 root root 3771 Sep  1  2015 .bashrc
-rw-r--r--  1 root root  655 Jun 24  2016 .profile
drwxr-xr-x  2 root root 4096 Dec 28  2017 inhere
bandit4@bandit:~$ cd inhere
bandit4@bandit:~/inhere$ ls -la
total 48
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file00
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file01
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file02
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file03
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file04
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file05
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file06
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file07
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file08
-rw-r----- 1 bandit5 bandit4   33 Dec 28  2017 -file09
drwxr-xr-x 2 root    root    4096 Dec 28  2017 .
drwxr-xr-x 3 root    root    4096 Dec 28  2017 ..
bandit4@bandit:~/inhere$ file ./*
./-file00: data
./-file01: data
./-file02: data
./-file03: data
./-file04: data
./-file05: data
./-file06: data
./-file07: ASCII text
./-file08: data
./-file09: data
bandit4@bandit:~/inhere$ cat ./-file07
koReBOKuIDDepwhWk7jZC0RTdopnAYKh

We are presented with 10 different files that the password could be residing within.  The instructions hinted that the password resided within the only human readable file.

Using the command ‘file’ prints additional file information to the terminal. Appending ./* to the end of the file command instructs the file command to print additional information for all files residing withing that current directory.

Leave a Reply

Your email address will not be published. Required fields are marked *