OverTheWire: Bandit Level 5 to Level 6

Like how we usually get started with any levels, the very first thing to do is always to run an ls command to find out what are the files that we have access to. In this case, wow, we are looking at 80 files.

bandit5_1

Level goal: The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties: – human-readable – 1033 bytes in size – not executable

Well, 80 files are way too many for manual checking, just imagine yourself running cat on every single file, that is not only crazy, but also not practical – what if there are 8000 files instead of 80 files?

We need to narrow down the scope using the hints given to us, for instance, a file that is human-readable and 1033 bytes in size.

bandit5_2

The find command is extremely handy in such situation, you can make use of the size and readable parameters as below,

bandit5@melinda:~/inhere$ find . -readable -size 1033c
./maybehere07/.file2
bandit5@melinda:~/inhere$ cat ./maybehere07/.file2
DXjZPULLxYr17uwoI01bNLQbtFemEgo7

The password to gain access to the next level is DXjZPULLxYr17uwoI01bNLQbtFemEgo7

Advertisements

One thought on “OverTheWire: Bandit Level 5 to Level 6

Leave a Message

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s