OverTheWire Bandit Level 5 Walkthrough

Today we're doing a walkthrough for level 5 of the Bandit CTF wargame hosted on OverTheWire.org.  First, let's take a look at the objectives for the level:

https://overthewire.org/wargames/bandit/bandit6.html


So the Flag will be located in a file within the inhere directory and has the following qualities:

human readable
1033 bytes in size
not executable

Let's SSH into the server to start the level:

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


Now let's look for the inhere directory.  In the previous level, it was a hidden directory, so we'll use ls -a to locate it.

pwd
ls -a


Now we take a look in the inhere directory:

cd inhere
ls -a


Quite a few files.  let's use the find command to locate the file we're looking for.  We'll use the -size switch to locate files that fit the size requirement of 1033 bytes.  When using the -size switch, bytes are indicated by the c suffix.

find ./ -size 1033c


Only one file matches our size criteria, so we'll cat out that file and we should get our Flag.

cat ./maybehere07/.file2


Summary

Bandit5 requires us to look for a file that matches criteria, so we use the find command to look for the file that matches the criteria, then access it to receive the level's flag.

Finish

Comments

Popular posts from this blog

TryHackMe - Windows PrivEsc - Walkthrough

TryHackMe - Reversing Elf - Walkthrough

TryHackMe - XSS - Walkthrough