Skip to content

Bandit 27 → 28

OverTheWire Linux Progressive

Goal: clone the level’s git repository and read the password it stores.

bandit27@bandit
bandit27@bandit:~$ cd "$(mktemp -d)"
bandit27@bandit:/tmp/tmp.NxwmnLaKZF$ git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo.git
Cloning into 'repo'...
bandit27@bandit:/tmp/tmp.NxwmnLaKZF$ cat repo/README
The password to the next level is: <password>
PasswordYz9IpL0sBcCeuG7m9uQFt8ZNpS4HZRcN

A Git remote you can authenticate to is just a readable data source. Using git clone copies the working tree (and the full history) to a directory you own, so a secret committed into the README comes along with it. This is the setup for the next three levels, which all mine a Git repository.