Bandit Level 5 Solution

Bandit level 5 in an extension to level 4 where you how to use find command in order to search for files with specific preferences.

Let’s start by logging into the machine

ssh -p 2220

with the password that we got from our previous level.


let’s list all the files that in our home directory

bandit level 5 ls

let’s access the “inhere” directory with

cd inhere

now let’s list all the files inside the directory

bandit level 5 inhere directory

There are a lot of directories, so the simple thing we did in the previous level won’t work here.

now let’s structure the find command ( i will structure part of it, as the size is too specific :D)

find . -type f -size 1033c

Now, let’s explain what is the above

  • “.” is for current directory
  • -type f is for the type which is “file”
  • -size is to specify the size of the file we’re searching for
  • c is for bytes
bandit level 5 find file size

now let’s read that file

cat ./maybehere07/.file2
bandit level 5 file 2 output

and here we got the password for our next level.


you can access the next level from here