The instructions for this level ask us to find a file with the following attributes:

  • owned by user bandit7
  • owned by group bandit6
  • 33 bytes in size

Unlike the prior challenge, this file can be anywhere on the file system. After another trip to the man pages, this appears to be solveable by throwing in a couple of switches for the group and users. We redirect stderror to /dev/null in order to cut out the noise of find complaining about files it doesn’t have permission to.

bandit6@bandit:~$ find / -size 33c -group bandit6 -user bandit7 2>/dev/null
/var/lib/dpkg/info/bandit7.password
bandit6@bandit:~$ cat /var/lib/dpkg/info/bandit7.password
XXXXXXXXXXXXXXXXXX (actual password not shown)
bandit6@bandit:~$