Level Goal
The password for the next level is stored somewhere on the server and has all of the following properties:
- owned by user bandit7
- owned by group bandit6
- 33 bytes in size
Solution
Password: DXjZPULLxYr17uwoI01bNLQbtFemEgo7
1 |
$ ssh [email protected] -p 2220 |
Now our file is anywhere. Luckily, find is great at looking everywhere. I’m just gonna start search from the root folder /.
1 2 |
[email protected]:~$ find / -user bandit7 -group bandit6 -size 33c 2>/dev/null /var/lib/dpkg/info/bandit7.password |
I’m using -user and -group to specify who the owner and group owner of the file are.
I’m redirecting all the errors I’m gonna get with 2>/dev/null (find loses its shit when it doesn’t have permission to search a folder). This redirects standard error (output stream 2) to /dev/null, also known as ‘The Abyss’.
Let’s see what’s inside.
1 2 |
[email protected]:~$ cat /var/lib/dpkg/info/bandit7.password HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs |
Shazam.