OverTheWire Bandit Level 1 Walkthrough

Today we're doing level 1 of the Bandit CTF wargame from OverTheWire.org.  First, let's take a look at the level's objectives:

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


Looks like the Flag will be located in a file called - in the home directory.  There's a few ways to read filenames with special characters form the command line, but we'll go over that later.  For now, let's log into the game server using SSH:

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


Remember to use the Flag from the previous level as the login password for SSH.  Once logged in, let's see what directory we're in and look for file that contains the Flag:

pwd
ls


Okay, let's talk about how we're going to access the file called - .  We'll access this file with special characters by using the ./ method.  Starting a filepath with ./ indicates to the system that we're interacting with a file in the current directory.  So to cat out the file we'll use the following command:

cat ./-


Summary

Bandit1 requires us to access a file which begins with a special character, so we prepend the filename with ./ to ensure the system knows which file to access.

Finish

Comments

Popular posts from this blog

TryHackMe - Windows PrivEsc - Walkthrough

TryHackMe - Reversing Elf - Walkthrough

TryHackMe - Web Enumeration - Walkthrough