Previous Level: Level 27
Login
SSH: ssh bandit27@bandit.labs.overthewire.org -p 2220
Password: 3ba3118a22e93127a4ed485be72ef5ea
Task
There is a git repository at ssh://bandit27-git@localhost/home/bandit27-git/repo
. 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.
A little bit of Theory
“Git is a free and open source distributed version control system” - https://git-scm.com/. It allows you to save your code, as well as the history and changes you have done to your code. It also makes collaboration and working in teams on the same code simpler.
The Git system contains a lot of commands. Some of the most essential commands are:
git init
, to create a new Git repository/projectgit clone
, to copy an existing git repositorygit push
, updates remote repositorygit pull
, get updates from remote repository It is also possible to use a Git client that has a GUI for easier interaction (https://git-scm.com/downloads/guis).
Different services are providing you with a way to host your repository remote (public or private). If you are interested in open-source, these are often also the places to get the software or contribute. Very famous ones would be Github and GitLab.
The ‘.git’ directory contains all information that is required for version control. It contains information about commits, the remote repository address, a log and more.
The README file is often found in a git repository. It is used as an overview of all the files in a directory or the git project. When creating a git project, a README file is helpful to remember what the project is about, as well as other information that users and developers might need. For example, a short explanation of the project, configuration and installation instructions, licensing information and more.
Solution
First, we create a directory for the project then we clone it.
|
|
There will be a password prompt. Just type in the password of bandit 27 and the repo will be cloned. Now let’s take a look at it.
|
|
We see the ‘.git’ directory and the common ‘README’ file. Since this is the only file, we check the content and find the password for the next level.
|
|
https://overthewire.org/wargames/bandit/bandit28.html
Next Level: Level 29