← Back to Home

OverTheWire Bandit: Level 27 → Level 28

Technical Note

Context

We have the password for bandit27 (obtained from the previous level). The goal now involves a Git repository. The instructions tell us that there is a git repository at: ssh://bandit27-git@localhost/home/bandit27-git/repo

We need to clone this repository to find the password for bandit28.

Solution

Note on Localhost: Attempting to clone from localhost inside the server (even from /tmp) will fail because OverTheWire blocks loopback SSH connections. You must do this from your own computer.

The “Outside” Job

  1. Open your local terminal (on your own machine, not inside Bandit).
  2. Clone directly from the OverTheWire server:
    git clone ssh://bandit27-git@bandit.labs.overthewire.org:2220/home/bandit27-git/repo
  3. Enter the password for bandit27 (the one you acted as in the previous level).
  4. Open the repo/README file on your computer to see the password.

Key Takeaways

  1. Git Clone: The command git clone <url> copies an entire repository from a remote server to your local machine.
  2. Working Directories: On restricted systems, you often can’t write to your home folder (~). The /tmp directory is usually writable for everyone, making it the perfect place for temporary operations like cloning.