Home Bandit [Level 5] - Overthewire
Post
Cancel

Bandit [Level 5] - Overthewire

ssh bandit5@bandit.labs.overthewire.org -p 2220
bandit password: lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR

Task

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

Solution

To start “cd” into the inhere folder and ran “ls” to see the files and folders and noticed that there were a bunch of folder and inside those folders a couple of files.

1
2
maybehere00  maybehere02  maybehere04  maybehere06  maybehere08  maybehere10  maybehere12  maybehere14  maybehere16  maybehere18
maybehere01  maybehere03  maybehere05  maybehere07  maybehere09  maybehere11  maybehere13  maybehere15  maybehere17  maybehere19

To make my life easier and not have to read every file I tried to “find” a way to look for the specific file with the properties given. I looked through the manual page of the find command and looked for ways of pointing out the properties of the file. I found the -size, -type, and -executable options.

1
2
3
find -type f -size 1033c ! -executable
or 
ls -laR | grep rw-r | grep 1033

Now i see ./maybehere07/.file2 and cat them

1
cat ./maybehere07/.file2

==> CTF: { P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU }

This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.

Bandit [Level 4] - Overthewire

Bandit [Level 6] - Overthewire