back

Bandit 05 - writeups

Sharing this writeups by following overthewire rules. This writing is for Level 5.

Bandit Level 5 → Level 6

ssh bandit5@bandit.labs.overthewire.org -p 2220
found password: 4eQYVPkxZOOEOO5phW81FB8j8lxYHGT5

bandit5@bandit:~$ ls
inhere

bandit5@bandit:~$ cd inhere

bandit5@bandit:~/inhere$ ls

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

bandit5@bandit:~/inhere$ ls -la
total 88
drwxr-x--- 22 root bandit5 4096 Oct 14 09:26 .
drwxr-xr-x  3 root root    4096 Oct 14 09:26 ..
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere00
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere01
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere02
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere03
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere04
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere05
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere06
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere07
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere08
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere09
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere10
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere11
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere12
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere13
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere14
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere15
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere16
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere17
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere18
drwxr-x---  2 root bandit5 4096 Oct 14 09:26 maybehere19

bandit5@bandit:~/inhere$ find . -type f -size 1033c ! -executable -readable
./maybehere07/.file2

bandit5@bandit:~/inhere$ cat ./maybehere07/.file2
33asnPhtq9AVKe0dmk45nab20cvUa725

Explanation:

  • find  starts searching from the current directory (~/inhere).
  • -type f limits results to regular files (not directories or links).​
  • -size 1033c matches files exactly 1033 bytes (c = bytes).​
  • ! -executable excludes executable files (logical NOT).​
  • -readable ensures files are readable by your user (bandit5); the command as typed has a logical error (should be ! -readable to exclude unreadable files, but it worked here since .file2 is readable).
Copyright © 2026 Mahidul Haque. This post is licensed under a CC BY-NC-ND 4.0 license. You may read, learn, and share links to this post for non‑commercial, educational purposes, as long as you give appropriate attribution. You may not copy, reproduce, adapt, distribute, or use this work commercially without explicit permission.