Thursday, August 3, 2017

OverTheWire-Bandit (Level 5 -> Level 6) - Walkthrough


Objective :

The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:
- human-readable
- 1033 bytes in size
- not executable

Procedure :

(a) Lets first check and understand with the directory structure and the files present inside the directory.

Understanding Overall Of The Directory Structure

cd - Used to change directory
ls - Used to list the directory contents
.. - Along with cd command, it is used to go back to the previous directory.

(b) After having an idea of the directory structure, lets find the file with the criteria mentioned in the objective.

Finding Of The File As Per Criteria Mentioned In The Objective

find - Command used to search for a file
size - Is switch present in find command used to fetch files with file size . Suffix 'c' is used to denote bytes.
type - Is swich present in find command use to fetch files with file type. Suffix 'f' is used to denote regular file(i.e. not executable file).

(c) Now after retrieving the desired output, lets check whether the respective file is human readble file or not.

Checking Whether File Is Human Readable Or Not

file - This command is used to determine the file type.

(d) After checking file with all criteria as mentioned in the objective lets read the content of the file.

Reading Contents Of Human Readable File

cat
- Is used to read the contents of the file.

The content displayed is the password for the next level.

Solution : DXjZPULLxYr17uwoI01bNLQbtFemEgo7

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

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

bandit6 - Is the username
DXjZPULLxYr17uwoI01bNLQbtFemEgo7 - Is the password.

No comments:

Post a Comment

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