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.



No comments:

Post a Comment

Thanks for reading the post! Please leave your feedback here :)