Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

OverTheWire-Bandit-WriteUp

Description:

Here I will display my journey through the Capture the Flags (CTF's)of all the chapters of Bandit on OverTheWire. You will find my mistakes & learnings and a brief look at my terminal screenshots. This repository can be used as a learning platform for beginners and at the meme time, it is a personnal development tool for myself. Great to improve my ability to explain,easy but still, technical concepts

Bandit Levels:

Click on the level you want to see, or scroll down for the complete walkthrough level-by-level:

Level 0

Level 0 → Level 1

Level 1 → Level 2

Level 2 → Level 3 Level 3 → Level 4 Level 4 → Level 5 Level 5 → Level 6 Level 6 → Level 7 Level 7 → Level 8 Level 8 → Level 9 Level 9 → Level 10 Level 10 → Level 11 Level 11 → Level 12 Level 12 → Level 13 Level 13 → Level 14 Level 14 → Level 15 Level 15 → Level 16 Level 16 → Level 17 Level 17 → Level 18 Level 18 → Level 19 Level 19 → Level 20 Level 20 → Level 21 Level 21 → Level 22 Level 22 → Level 23 Level 23 → Level 24 Level 24 → Level 25 Level 25 → Level 26 Level 26 → Level 27 Level 27 → Level 28 Level 28 → Level 29 Level 29 → Level 30 Level 30 → Level 31 Level 31 → Level 32 Level 32 → Level 33 Level 33 → Level 34

Level 0

Always following the tips on in the OverTheWire web site in Bandit Labs, I start with

ssh bandit0@bandit.labs.overthewire.org -p 2220
Command explanation
  • The ssh is used to initiate a secure shell connection to a remote server.

  • bandit0 is the username and @bandit.labs.overthewire.org is the hostname of the remote server I wnat to connect.

  • -p 2220 specify the port on which SSH will use to connect.

Level 0 → Level 1

I do the command ls to display the content of the current directory.

Then, I do the command cat to display the content of the readme file.

And here I find the flag: ZjLjTmM6FvvyRnrb2rfNWOZOTa6ip5If

Level 1 → Level 2

I type exit to come back to kali@kali and again ssh bandit1@bandit.labs.overthewire.org -p 2220 making sure that I log with bandit1. For the password I use: ZjLjTmM6FvvyRnrb2rfNWOZOTa6ip5If

I ls and find a file named -. Since the - is usually use to type an input afterword, it is confusing: I type cat - and the terminal get stock there. I press ctrl+c to unlock it.

I need to cat ./-. Here the . is telling "current directory" and ./ tells the shell that I want the file named "-" to be opened.

Here is the output:

image

This is the flag: 263JGJPfgU6LtdEvgfWU1XP5yac29mFx

Level 2 → Level 3

Back on kali@kali, I ssh bandit2@bandit.labs.overthewire.org -p 2220 and use the last flag as the password.

I initially press ls to display the content of the directory. What I see is a file named spaces in this filename and when I concatenate (display the content of the file, the cat commend) it does not recognize it as a single file because of the spaces. So, I insert back slash \ so that it understand that the whole file name is a single file.

Small tip I can press the "TAB" button and it actually will add the back slash for me. How simple.

And it give me the flag for the next level: MNk8KNH3Usiio41PRUEoDFPqfxLPlSmx

Level 3 → Level 4

Here I ssh the level 3 and enter the last flag.

I will explain the next screenshot: I saw nothing at first when I ls the content, but with the option -l, it showed me details like permissions and more. With the option -la it added all the file, including the hidden one (the ones with a "."). So there was a file hidden from me called "...Hiding-From-You". The dots can be confusing, but I do need to add them to the cat command to open it:

So here is the next flag:

2WmrDFRmJIq3IPxneAaMGhap0pFhF3NJ

Level 4 → Level 5

Opening the bandit 4, I quickly see that there are many file in inhere. To open the -file00 I need to place -- before the -file because the "-" of the file confuse the terminal and "--" makes it understand that it is part of the file name. But, I dont what to go one file at a time, so I use te * insted of each number (ex: file* insted of file01). I can use head file* to see the first 10 line of each file. And if I want to see only the human readable caracters, I can use strings insted of head`.

The flag for the next level is : 4oQYVPkxZOOEOO5pTW81FB8j8lxXGUQw

Level 5 → Level 6

Opening bandit 5, I use the tips that the flag is somewhere: human-readable, 1033 bytes in size and not executable. I used the command find -size 1033c and it showed me the path to it:

Flag for the next level is: HWasnPhtq9AVKe0dmk45nxy20cvUa6EG

Level 6 → Level 7 Level 7 → Level 8 Level 8 → Level 9 Level 9 → Level 10 Level 10 → Level 11 Level 11 → Level 12 Level 12 → Level 13 Level 13 → Level 14 Level 14 → Level 15 Level 15 → Level 16 Level 16 → Level 17 Level 17 → Level 18 Level 18 → Level 19 Level 19 → Level 20 Level 20 → Level 21 Level 21 → Level 22 Level 22 → Level 23 Level 23 → Level 24 Level 24 → Level 25 Level 25 → Level 26 Level 26 → Level 27 Level 27 → Level 28 Level 28 → Level 29 Level 29 → Level 30 Level 30 → Level 31 Level 31 → Level 32 Level 32 → Level 33 Level 33 → Level 34

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors