Beginner's Guide: Solving OverTheWire Bandit Level 0 CTF

TheeHackerTheeHacker
2 min read

🚀 Introduction

If you're just starting out in cybersecurity, OverTheWire's Bandit wargame is the perfect place to begin. It’s designed to teach basic Linux commands and how to think like a hacker through fun, progressive challenges.

In this article, I’ll walk you through Bandit Level 0, explaining each step as if you're totally new to the command line.

👉 Try the challenge yourself here: OverTheWire Bandit


🎯 Bandit Level 0 Objective

“The goal of this level is for you to log into the game using SSH. The host to which you need to connect is bandit.labs.overthewire.org, on port 2220. The username is bandit0 and the password is bandit0.”


🛠️ Steps Taken

  1. Open your terminal [in this case i will be using kali linux].

  2. Use the SSH command to log into the game

    use the command syntax : ssh -p [port number] [username]@bandit.labs.overthewire.org

    The login details for this level as provided from the overthewire website are:

    username: bandit0

    password: bandit0

3. When prompted for password as shown on the screenshot below, enter bandit0 as the password and then press enter.

4. Once you enter the password , you should be presented with a server shell environment as shown on the screenshot below. Running whoami command confirms that you are logged in as the bandit0 user

Finding the password

Once logged in, our aim is to locate the password for the next level [Level One]. Let us explore the filesystem with basic commands such as ls and cat

Using the ls command displays the files and directories in your current working directory. In this case, we can see a readme file listed as a result. The file command helps us determine the type of file based on its content.

We then use the cat command to view the contents of the file, This reveals a congratulatory message along with the password for the next level.

Key Take-Aways

  1. SSH Basics: learned how to remotely login in to a server using ssh

  2. Listing files [ls command]: listed the contents of the current directory and started exploration of the Linux system structure.

  3. Identifying file types: Got familiar with the file command to determine the type of a file

  4. Navigating Linux File System: Gained a basic understanding of how to move around and investigate files in a Linux environment, an essential skill for penetration testers and ethical hackers

  5. Viewing File Contents: Used the cat command to display the content of files — especially useful for retrieving the password for the next level

For full challenge videos: check my tiktok

1
Subscribe to my newsletter

Read articles from TheeHacker directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

TheeHacker
TheeHacker

INFORMATION SECURITY, DIGITAL FORENSICS,PENETRATION TESTING ENTHUSIAST