The password file inside inhere is the only one that is human-readable, exactly 1033 bytes, and not executable — find filters for all three at once.
| Platform | OverTheWire Bandit |
| Verified against | OverTheWire — official level page |
| Category | Linux Fundamentals |
| Level | 5 → 6 |
| Difficulty | Beginner |
| Technique | find with combined size/type/permission filters |
Level 5's home directory contains a directory called inhere, which itself contains many subdirectories, each full of decoy files. Manually opening every one isn't realistic — the level gives three exact properties the real file satisfies.
"Level Goal: The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties: human-readable, 1033 bytes in size, not executable"
Stuck? Try a hint before reading the solution
The level lists three properties. find can filter on all of them at once.
-size 1033c means exactly 1033 bytes; combine it with -type f and ! -executable.
Log in as bandit5 and look at what's inside inhere:
cd inhere
find . -type f | wc -l
(a large number — dozens of nested directories, each holding several decoy files)
The level gave an exact byte count — use it directly rather than opening files one by one:
find . -size 1033c
./maybehere07/.file2
(and possibly a few other candidates)
Combine all three stated properties — regular file, that exact size, and not executable — into a single find command to narrow to exactly one result:
find . -type f -size 1033c ! -executable
./maybehere07/.file2
Cat the single remaining candidate:
cat ./maybehere07/.file2
[PASSWORD FOR bandit6]
The password is deliberately hidden — follow the method, you've earned it. 💪
When a task description gives you specific, checkable properties instead of a name or location, that's a hint to filter for them directly rather than browse manually. find's flags compose — stacking -size, -type, and a permission test narrows a huge haystack down to one file in a single command.
find . -size 1033c matches files of an exact size, in bytes (the trailing c means bytes)! -executable negates a test — here, "not executable"find conditions together narrows results fast, without opening a single file by handNew to CTFs? Start here: beginner's guide to CTFs — what a CTF is, the categories, the tools and a step-by-step plan.
Discuss this writeup with the community on the CTFdojo Discord.
Join the Discord →