Wargame: Bandit
Level: 6
Category: Linux Fundamentals
Description
The password file is somewhere on the server, owned by user bandit7, group bandit6, and exactly 33 bytes. The goal is to find it anywhere in the filesystem.
Overview
- Searching from
/withfind -user,-group, and-sizelocates the file. - Most paths return “Permission denied”; piping to
grep -v "Permission denied"cleans the output.
Solution
find / -user bandit7 -group bandit6 -size 33c 2>/dev/null
- The output is a single path:
/var/lib/dpkg/info/bandit7.password.
Password
z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S