ssh bandit6@bandit.labs.overthewire.org -p 2220
bandit password: P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU
Task
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
Using the find command below to find a file owned by user bandit7, owned by group bandit6 and 33 bytes of size
1
2
3
4
5
6
7
8
find / -user bandit7 -group bandit6 -size 33c 2>/dev/null
# details
/ from root folder
-user the owner of the file.
-group the group owner of the file.
-size the size of the file.
2>/dev/null redirects error messages to null so that they do not show on stdout.
Look result: /var/lib/dpkg/info/bandit7.password
1
cat /var/lib/dpkg/info/bandit7.password
==> CTF: { z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S
}
Comments powered by Disqus.