HackBlue

Tools · CTF categories for beginners · 09 / 18

Learning Linux through wargames: how to approach OverTheWire Bandit

Use the Bandit wargame to build command-line skills: connect over SSH, read manuals, search the filesystem, and keep notes, without relying on published answers.

9 min read · practice only with authorization

What Bandit teaches

Bandit is a free wargame from OverTheWire where each level is a Linux account and the password for the next level is hidden somewhere you must find. Levels cover file names with special characters, hidden files, find with size and owner filters, grep, sort and uniq, encodings, SSH keys, network tools, cron jobs, and Git. It is designed for beginners and runs entirely on OverTheWire’s servers.

How to approach a level

Read the level goal and the suggested commands on the level page, then read the manual page for each command with man. Try the simplest approach first. When stuck, search for the concept (for example, “find files by size linux”) rather than the level solution, so you learn the skill instead of the answer.

Snippet
ssh bandit0@bandit.labs.overthewire.org -p 2220
man find
# general patterns to practise on your own VM first
find ~/practice -type f -size +100k -user "$USER" 2>/dev/null
ls -la ~/practice
cat -- '-odd name.txt'
grep -rn 'TODO' ~/practice 2>/dev/null
sort words.txt | uniq -c | sort -rn | head

Lab: keep a skill journal

For every level you complete, write three lines in a notes file: the concept (for example, “files whose names start with a dash”), the command that worked, and one related command you learned from the man page. After ten levels, review the journal and write a short cheat sheet of the commands you used most. This turns a game into durable skill.

Etiquette

Do not publish passwords or full solutions; OverTheWire asks players not to. Clean up files you create in shared temporary directories. Respect rate limits on the servers. Other OverTheWire games, such as Natas for web and Leviathan, follow once Bandit feels comfortable.

Diagram

Solving a wargame level

  1. Read the goal

    Level page and suggested commands.

  2. Read the manual

    man pages for the suggested commands.

  3. Try simply

    Smallest command that could work.

  4. Journal

    Concept, command, related command.

Check yourself

1. Which approach builds the most skill when stuck on a level?

2. Why can a file whose name begins with a dash be awkward to open?

3. What does OverTheWire ask players not to do?