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
This level is very similar to the previous level, which you have already completed by now using the find command. However, in this level, we need to include more parameters to be more specific in what we want to search for, as the scope of search is the entire machine rather than just 80 files in a folder.
bandit6@melinda:~$ find / -user bandit7 -group bandit6 -size 33c /var/lib/dpkg/info/bandit7.password
The above command basically perform a search on the root directory, as depicted by the slash (/) symbol right after the find command. Other parameters includes,
- user, which defines the file owner, bandit7
- group, which defines the file group, bandit6 in this case
- size, which defines the size of the file. 33c means 33 bytes of characters
The output is the following,
bandit6@melinda:~$ cat /var/lib/dpkg/info/bandit7.password HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs
The password to gain access to the next level is HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs
Pingback: OverTheWire: Bandit Write-up | My Learning Journey
Sid Patel
November 19, 2017I executed the find command and all i got was a bunch of files and then at the end it said “permission denied”
Wen Bin
December 1, 2017Hi Sid, you must be missing something, try harder 🙂
or… maybe someone changed something accidentally, since it is a shared environment.
Emilynn Goodwin-McKay
March 31, 2018I got the same problem. I tried typing the command in, and also copying and pasting from this blog post. Have you discovered what your problem was?