OverTheWire: Bandit

Goals

OverTheWire

OverTheWire is one of many sites that give you exercises to practice computer security skills. The exercises have various names—Hack The Box calls them "boxes" (where "box" here is being used as an informal term for a single computer), TryHackMe calls them "rooms", some sites call them "CTFs" (for "capture the flag"), and for some reason, OverTheWire calls them "wargames". Offensive Security focuses a lot of attention on small networks of computers, so they just call the exercises "VMs" ("virtual machines") or "VM Groups". Regardless of the name, all these exercises present puzzles to help you acquire and practice pen-testing skills.

Practicing on various sites, I have noticed two broad categories of exercises. First, there are puzzles whose purpose is to show you a computer or network with realistic vulnerabilities—the kind of vulnerabilities that a too-busy or inadequately informed system administrator or software developer might leave open on a real computer. Very soon, you will start creating this kind of exercise yourself.

The second kind of puzzle only cares about teaching you a particular tool or technique, without concern for giving you a realistic context. For this assignment, you'll be doing this second kind of puzzle.

Bandit

The Bandit wargame at OverTheWire is designed to introduce you to a variety of Linux commands, file system concepts, and services that will come in handy in your security work. Some of the concepts are likely to be at least vaguely familiar to you (e.g. the "rwx" permissions you see when you do "ls -l"), whereas many are likely to be new.

For each level of bandit, your goal is to obtain the 32-character SSH password that will let you login to the next level. The instructions for each level are typically brief and mostly clear.

Here are a few of the key ideas explored in the 34 bandit exercises.

Your assignment

Important: clean up after yourself

TL;DR: if you create a subdirectory of /tmp when logged in as banditX, you need to delete that subdirectory before logging out. For example, in Level 12→Level 13:

bandit12@bandit:~$ mkdir /tmp/your_random_name bandit12@bandit:~$ cd /tmp/your_random_name bandit12@bandit:/tmp/your_random_name$ ...DO YOUR WORK... bandit12@bandit:/tmp/your_random_name$ cd bandit12@bandit:~$ rm -rf /tmp/your_random_name bandit12@bandit:~$ exit

OK, a little more explanation.

The bandit server is just one virtual machine hosted by OverTheWire, so you'll all be sharing it with each other and anybody else out in the world who's working on it at the same time.

Occasionally, you may need to create a subdirectory of /tmp so you can create files on the server. Note that for every level, you won't have write access to anything other than subdirectories of /tmp that you create. Furthermore, suppose you create /tmp/whatever when you're logged in as bandit12. You won't have access to /tmp/whatever anymore when you login as bandit13 or any other banditX. You have to delete that folder while logged in as the same banditX that created the folder in the first place.

Advice

Have fun!