Monday, July 31, 2017

OverTheWire-Bandit (Level 3 -> Level 4) - Walkthrough


Objective : 

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

Procedures : 


(a) Once logged into the next level, lets list all the files and directories present inside the current directory.

Displaying List Of Directory Contents Present In Current Directory
ls - Used to list the files present in the current directory.

(b) Now we will navigate inside the inhere directory

Changing Directory to inhere Directory
cd - Is used to change the directories.


(c) Now the password is stored in hidden file as mentioned in the objective. In-order to list all hidden files and folders we need to use ls command with -a and -l switches.

Displaying List Of Contents Inside Directory Including Hidden Contents
ls - Is used to display list of files in current directory.

Note : You can also use the manual page for the commands in order to understand their respective switches. 
Syntax : man <command>

(d) Now lets read the content of the hidden file.

Reading Contents Of The Hidden File
cat - Is used to read the contents of the file.


The content displayed is the password for the next level.

Solution : pIwrPrtPN36QITSp3EQaw936yaFoFgAB

(d) Now we will use this password to login to next level using the below command 

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

bandit4 - Is the username

pIwrPrtPN36QITSp3EQaw936yaFoFgAB - Is the password.

OverTheWire-Bandit (Level 2 -> Level 3) - Walkthrough


Objective : 

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

Procedures : 

(a) Once logged into the new level, let us check whether we are inside the home directory or not.If not we will try to figure out the home directory and navigate using the path.

Checking For Home Directory


 pwd - Is used to know the current directory where we are in
/home/bandit2 - Home directory for the user bandit2

(b) Now we will look out for a file called spaces in this filename as mentioned in the objective by listing the files present in the home directory.

Displaying List Of Files Present In Current Directory
ls - Is used to display list of files in current directory.

Note : In-order to avoid the confusion in number of files present inside the directory, I would recommend to use switch -l along with ls command. Here switch -l is used to list all the files along with file properties.

(c) After finding the file, we want to read the contents of the file.

Reading Of File Contents

cat - Is used to read the contents of the file.
Since the name of the file contains white spaces. We would require something different technique to read the contents of the file. Hence used forward slash (\) and then white space.

The content displayed is the password for the next level.

Solution : UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

(d) Now we will use this password to login to next level using the below command 

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

bandit3 - Is the username
UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK - Is the password.

Friday, July 28, 2017

OverTheWire-Bandit (Level 1 -> Level 2) - Walkthrough


Objective : 

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

Procedures : 

(a) Once logged into the new level, let us check whether we are inside the home directory or not.If not we will try to figure out the home directory and navigate using the path.


Checking For Home Directory
 pwd - Is used to know the current directory where we are in
/home/bandit1 - Home directory for the user bandit1

(b) Now we will look out for a file called - as mentioned in the objective by listing the files present in the home directory.

Displaying List Of Files Present In Current Directory
ls - Is used to display list of files in current directory.

(c) After finding the - file, we want to read the contents of the file.

Reading Of File Contents
cat - Is used to read the contents of the file.
Since the name of the file is a special character. We would require something different technique to read the contents of the file. Hence used './-'

The content displayed is the password for the next level.

Solution : CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

(d) Now we will use this password to login to next level using the below command 

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

bandit2 - Is the username
CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9 - Is the password.



Thursday, July 27, 2017

OverTheWire-Bandit (Level 0 -> Level 1) - Walkthrough


Objective : 

The password for the next level is stored in a file called readme located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.

Procedure : 

(a) After completing level 0 we will first check which directory we are in ? The reason behind checking is to know whether we are in home directory or not.

Checking For Home Directory
 pwd - Is used to know the current directory where we are in
/home/bandit0 - Home directory for the user bandit0

(b) Now we will look out for a file readme as mentioned in the objective by listing the files present in the home directory.

Displaying List Of Files Present In Current Directory
ls - Is used to display list of files in current directory.

(c) After finding the readme file, we want to read the contents of the file.

Reading Of File Contents
cat - Is used to read the contents of the file.

Solution : boJ9jbbUNNfktd78OOpsqOltutMc3MY1

(d) Now we will use this password to login to next level.

Login To Next Level With Help Of Solution As Password
ssh bandit1@bandit.labs.overthewire.org -p 2220

bandit1 - Is the username
boJ9jbbUNNfktd78OOpsqOltutMc3MY1 - Is the password

Now we are logged in to the next level with user bandit1.