overthewire-writeups

Bandit06 -> 07: System-Wide Search

Challenge

Level Description

The password for the next level is stored somewhere on the server and has all of the following properties:

The Process

This time, the file wasn’t just in a local folder—it was somewhere in the entire system. Searching the whole server means encountering thousands of files I don’t have permission to read, which usually clutters the screen with “Permission denied” errors.

To find the password, I used the find command starting from the root directory /. I also used a clever trick to hide all the error messages by redirecting them to /dev/null.

Here is the command I used:

$ find / -user bandit7 -group bandit6 -size 33c 2>/dev/null

Here’s why it worked:

The command gave me one single path. I used cat on it, and the password was mine!

Password For the Next Level

[SPOILER]

What I Learned

Helpful Reading Material