Home - Writeups - Bandit Overthewire wargames walkthrough level 0 – 5

Bandit Overthewire wargames walkthrough level 0 – 5

The bandit overthewire wargames are for absolute beginners. Therefore a fun way to learn Linux and shell command line. However, as the levels of games increases so will the difficulty but don’t give up. So we will proceed with the game here is the link for level 0.

Bandit overthewire wargames level 6 – 10

Some helpful links

  • how to setup Kali Linux on VMware.
  • how to setup Kali Linux on a virtual box.
  • introduction to ssh.

Level 0→5

  • Host: bandit.labs.overthewire.org
  • port: 2220

bandit level 0

In Linux shell I will use credentials given to login using ssh as the password is given. Therefore I will use it as they ask for it.

bandit, ssh, linux, shell

bandit level 0 → 1

In Linux shell I am in level 0 now the goal is to read the content of a file called readme. Therefore we will use ls command to list the directory and files. As well as cat command to read the content of the file. After that, we get the password so we will use it to log in to the next level.

bandit level 0, ssh, overthewire, wargames, kali, linux
  • ls
  • cat

bandit level 1 → 2

In this level as we are told that password is stored in “-” (hyphen). As we use “cat -” it will not give us a password because Linux considers “-” (hyphen) as stdin/stdout. So to get the password we will prefix “./”. As it tells Linux shell to read the content of “-” hyphen in current directory.

bandit level 2, ssh, overthewire, wargames, kali. linux
  • ls
  • cat ./-

bandit level 2 → 3

In this level password is stored in file “spaces in this filename”. But we cannot directly use cat command because spaces are considered null character “/0”. Therefore input will be considered as 4 different inputs and we will get an error. So we will either use escape character after every word “spaces\ in\ this\ filename” or put the filename in quotes.

bandit level 3, ssh, overthewire, wargames, kali. linux
  • ls
  • cat spaces\ in \this\ filename

bandit level 3 → 4

In this level file is hidden in directory called “inhere”. We use cd command to change the directory and “ls -a” to show all files and folders of directory. As this also includes hidden files and folders. After that we can use cat command on hidden file and read its content.

bandit level 4, ssh, overthewire, wargames, kali. linux
  • ls
  • cd inhere
  • ls -a
  • cat .hidden

bandit level 4 → 5

In this level, only one file is human readable and others are of some other data type. After that we get the password of the next level, But how will we know which file is human readable. As we know the readable text is ASCII text and for finding filetype we will use a “find” command. Find command is used for getting filetype. Therefore we can traverse all files with find command and cat ASCII file.

bandit level 5, ssh, overthewire, wargames, kali. linux
  • ls
  • cd inhere
  • file ./*
  • cat ./-file07

Bandit overthewire wargames level 6 – 10

Share
0 0 votes
Article Rating
Subscribe
Notify of
guest
5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Shubham Sharma
1 year ago

I would love to being an attention to you that it’s good practice to tell steps to solve any lab and give write-ups for it but don’t post url and password because they are relatively. Changes with every user. Also, if you post password person will never attempt, but if you write steps then he/she will have reproduce those steps to reach towards solution atleast.
Hope this would add more value to your content

trackback
1 year ago

[…] Bandit overthewire wargames level 0 – 5 […]

Kimanzi
Kimanzi
1 year ago

Nice one Manish, following

5
0
Would love your thoughts, please comment.x
()
x