Skip to main content

Settings

Color Mode

Theme Skin

Background

Appearance preferences are saved in this browser only.

Environment

Current Environment Production

Built with JEKYLL_ENV=production. Changes require deployment.

Quick Links

Theme & Build

Jekyll v3.10.0
Last BuildNov 24, 17:25

Page Location

Page Info

Layout default
Collection wargames
Path _wargames/bandit/bandit6.md
URL /wargames/bandit/bandit6/
Date 2026-04-07

Bandit Level 6

Bandit Level 6 — use find to locate a file by size and permissions in a directory tree.

Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.

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

Commands you may need to solve this level

ls , cd , cat , file , du , find

Study guide

Level map: logged in as bandit5, find the password for bandit6.

What this level teaches

Searching a directory tree by properties instead of by name, with find.

Key ideas

  • find PATH tests walks a tree and prints entries matching every test you list. Tests include -type f (regular files), -size and -executable.
  • Size units matter. In -size, a suffix selects the unit and a missing suffix means 512-byte blocks, not bytes. Check man find for the byte suffix before trusting a result.
  • Negation. A leading ! inverts a test, which is how you say “not executable”.
  • Tests are combined with an implicit AND.

How to approach it

  1. Start broad (find inhere -type f) and add one test at a time, watching the output shrink.
  2. When exactly one file remains, check it with file before reading it.

Why it matters

Locating files by size, owner or modification time is core incident-response work, for example finding recently changed files or unexpected setuid binaries.