OverTheWire Bandit Level 27->Level 28 - Walkthrough
Introduction
In this post, I will be giving you a walkthrough to the Bandit wargame Level 27->Level 28. We will learn about git command in linux. We will use it to clone the git repository and get the password for next level.
Goal
There is a git repository at ssh://bandit27-git@localhost/home/bandit27-git/repo via the port 2220. The password for the user bandit27-git is the same as for the user bandit27.
Clone the repository and find the password for the next level.
Login Details
Server - bandit.labs.overthewire.org
Port - 2220
Username - bandit27
Password - YnQpBuifNMas1hcUFk70ZmqkhUU2EuaS
Theory
git is a version control system used to track changes to
source code. It allows for collaboration and working on the same code in a team
simpler.
git has multiple commands, one of which we will use is-:
- git clone - used to copy an existing git repository.
.git directory contains all the information required for proper functioning.
The README file present in github repository is used to communicate important information about the project. It gives an overview of all the files in a directory or the git project.
Solution
SSH into the user bandit27 using the command "ssh
bandit27@bandit.labs.overthewire.org -p 2220" and the above password.
Create a directory in /tmp folder. Type the commands-:
- mkdir /tmp/temporary27git
- cd /tmp/temporary27git
Now clone the git repository using the below command. Enter the password for bandit27 when asked.
- git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo
Now we have the repository cloned to our machine, so lets see the contents present inside the repository. Type the commands-:
- ls
- cd repo
- ls -la
To see the password, check the contents of README file. Type the command "cat README".
This completes Level 28 walkthrough. Please post your questions and doubts in the comment section.
Comments
Post a Comment