Bait A Phish
Bait A Phish
Security Pulse
tutorial · bandit

Bandit Level 5

Find a file by size/type in a nested directory using find.
banditfindsearch
Narration (cached)
Marks this level complete in your browser.

Goal

The password is stored in a file somewhere under inhere/ that matches constraints (size, non-executable, etc.).

Key concept

find is the Swiss army knife for locating files by properties.

Steps

  1. SSH in:
ssh bandit5@bandit.labs.overthewire.org -p 2220
  1. Move into the search root:
cd inhere
  1. Use find to locate candidate files.

The official level text tells you the exact constraints; a typical pattern looks like:

find . -type f -size 1033c ! -executable
  1. Once you find the candidate, read it:
cat ./maybehere07/.file2

(Use the path returned by your find command.)

That output is the password for Level 6.

Notes

Bandit Level 4Bandit Level 6