OverTheWire Bandit Level 0 Walkthrough

Introduction

Today we're starting a new series of CTF wargames from the OverTheWire.org website.  The series is called Bandit, and the theme of the series is Linux skills.  The homepage for the series is located here:

https://overthewire.org/wargames/bandit/

In order to access the levels of the game, we will have to use the SSH program from either a Windows command line or a Linux command line.  From either command line, we use the following command to access the game:

ssh LEVELNAME@bandit.labs.overthewire.org -p 2220

Fill in LEVELNAME with the current level of the Bandit game: e.g.  to access Bandit level 0, the command would be:

ssh bandit0@bandit.labs.overthewire.org -p 2220

The system will then ask for a password.  The password for any level of Bandit is the Flag string found in the previous level of the game (except for Bandit level 0, whose password is bandit0).

Starting the Level

Log in to Bandit0 by entering the following command in your command line:

ssh bandit0@bandit.labs.overthewire.org -p 2220


If your system asks you if you are sure you want to connect, type

yes

To continue, then input the password to the level, which is bandit0 (you won't be able to see the password as you type it).

Playing the Game

For each level of Bandit, there is a corresponding webpage on the OverTheWire website which tells us what the objective of the level is (i.e. where to find the Flag string).  For level 0, the webpage is:

https://overthewire.org/wargames/bandit/bandit1.html


So the goal of the level is to access the readme file on the system located in the home directory.  We can find out our Present Working Directory by using the following command:

pwd


We are currently located in the /home/bandit0 directory, so the readme file we're looking for should be in our current directory.  Let's list out the directory's contents by using the following command:

ls


So we can confirm that the readme file is in our current directory.  The last thing to do before we finish the level is access the readme file by using the cat command.

cat readme


The random alpha-numeric string in the readme file is called the Flag in CTF wargames like Bandit.  We will want to save that Flag somewhere, because it will be used as the password for the next level of the Bandit CTF game (Bandit1).

Summary

We used the SSH command to login to level 0 of the Bandit CTF game.  Once logged in, we used the pwd command to locate our current working directory, then the ls command to list the files in the directory.  Finally, we used the cat command to read the file containing the Flag for the level.

Finish






Comments

Popular posts from this blog

TryHackMe - Windows PrivEsc - Walkthrough

TryHackMe - Reversing Elf - Walkthrough

TryHackMe - Web Enumeration - Walkthrough