Over The Wire


Bandit

Host: bandit.labs.overthewire.org

Port: 2220



Level 5

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

Objective:

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

$ find -readable -size 1033c ! -executable

The find command with some flags

  • -readable is human-readable
  • -size 1033c means in bytes
  • ! -executable means not executable

CLI:

bandit5@bandit:~$ ls
inhere
bandit5@bandit:~$ cd inhere
bandit5@bandit:~/inhere$ ls
maybehere00 maybehere04 maybehere08 maybehere12 maybehere16
maybehere01 maybehere05 maybehere09 maybehere13 maybehere17
maybehere02 maybehere06 maybehere10 maybehere14 maybehere18
maybehere03 maybehere07 maybehere11 maybehere15 maybehere19
bandit5@bandit:~/inhere$ find -readable -size 1033c ! -executable
./maybehere07/.file2
bandit5@bandit:~/inhere$ cat ./maybehere07/.file2
P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU
bandit5@bandit:~/inhere$

Bandit