tutorial · bandit

Bandit Level 4

Pick the only human-readable file from a directory of weird files.
banditfilebinary
Optional narration
Marks this level complete in your browser.

Goal

The password is in inhere/ inside a file that is human-readable.

Key concept

Use the file command to detect which files are:

  • ASCII text
  • UTF-8 text
  • etc.

Steps

  1. SSH in:
ssh bandit4@bandit.labs.overthewire.org -p 2220
  1. Go into the directory:
cd inhere
  1. Look at what’s there:
ls -la

You’ll see multiple files (often named like -file00, -file01, etc.).

  1. Identify the human-readable one:
file ./*
  1. Read the one that is reported as “ASCII text” (or similar):
cat ./-file00

(Use the correct filename from your file output.)

That output is the password for Level 5.

Notes

  • We use ./-file00 style paths for the same reason as Level 1: leading dashes can confuse commands.