The Command Line Chronicles

Blog Posts

OverTheWire Bandit Solutions: Levels 0 to 5

August 13, 2024

OverTheWire Bandit Solutions: levels 0 to 5

Well, good afternoon, good evening, and good night everyone, wherever you are in the world. Welcome to the first installation of my OverTheWire Bandit Solutions guide: A Linux Admin’s Guide to Solving OverTheWire’s Bandit. You can call me Anya, and I will be beginning with level 0 up to level 5 of Bandit in this installment. There’s a lot of good stuff coming up—we’re going to learn about ls, cat, and find. Let’s forge ahead and finish up Bandit!

Bandit Level 0 to 1

Level Goal

The goal of this level is to connect to the Bandit game server using SSH. The password for the next level is stored in a file named readme located in the home directory.

Steps

  1. Connect to the Bandit server using SSH:

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

    Use the password bandit0 when prompted.

  2. List the contents of the home directory:

     ls
    
  3. Read the readme file to find the password for the next level:

     cat readme
    
  4. SSH into Bandit 1 using the password you found:

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

Bandit Level 1 to 2

Level Goal

The password for the next level is stored in a file called - located in the home directory.

Steps

  1. List the contents of the home directory:

     ls
    
  2. Read the file named - by specifying the file path:

     cat ./-
    
  3. SSH into Bandit 2 using the password you found:

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

Bandit Level 2 to 3

Level Goal

The password for the next level is stored in a file called spaces in this filename located in the home directory.

Steps

  1. List the contents of the home directory:

     ls
    
  2. Read the file with spaces in its name by enclosing it in quotes:

     cat "spaces in this filename"
    
  3. SSH into Bandit 3 using the password you found:

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

Bandit Level 3 to 4

Level Goal

The password for the next level is stored in a hidden file in the inhere directory.

Steps

  1. Navigate to the inhere directory:

     cd inhere
    
  2. List all files, including hidden ones:

     ls -a
    
  3. Read the hidden file to find the password:

     cat .hidden
    
  4. SSH into Bandit 4 using the password you found:

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

Bandit Level 4 to 5

Level Goal

The password for the next level is stored in a file with human-readable content among many other files in the inhere directory.

Steps

  1. Navigate to the inhere directory:

     cd inhere
    
  2. Identify the file with human-readable content:

     file ./*
    

    Look for the file that is identified as ASCII text.

  3. Read the contents of the identified file to find the password:

     cat ./-file07
    
  4. SSH into Bandit 5 using the password you found:

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

Congratulations on making it through levels 0 to 5! These introductory levels of Bandit are excellent for familiarizing yourself with basic Linux commands and concepts.

Stay tuned for the next part, where we’ll tackle even more challenging levels.


Thanks for following along! If you found this guide helpful, feel free to share it with others or leave a comment below.

Until next time, happy hacking!


Test Technical Blog

August 02, 2024

This is a test to see the posts are working…

Tux at Work

And above this text should be an image.


Welcome to Jekyll

March 01, 2017

You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.


Markdown examples

February 01, 2017

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit.


Advanced examples

January 01, 2017

Swiss Alps