← Back to Home

OverTheWire Bandit: Level 30 → Level 31

Technical Note

Context

We have another empty-looking git repository. README.md is empty. We checked git log and git branch, but found nothing obvious.

There’s one more place to check in Git: Tags.

Solution

Step 1: Clone the Repo (Outside)

Clone from your local machine to verify the contents:

git clone ssh://bandit30-git@bandit.labs.overthewire.org:2220/home/bandit30-git/repo
cd repo

(Password from Level 29)

Step 2: List Tags

Git tags are like bookmarks for specific commits. They are often used for releases (v1.0, v2.0).

List the tags in this repo:

git tag
# Output:
# secret

We found a tag named secret!

Step 3: Show Tag Content

We can check what that tag points to using git show:

git show secret

This will display the commit details associated with that tag, and right there in the output, you will see the password for bandit31.

Key Takeaways

  1. Git Tags: Tags are references that point to specific points in Git history. Unlike branches, they don’t change or move; they mark a specific moment (like a snapshot).
  2. git tag: Lists all tags in the repository.
  3. git show <tag>: Shows the commit message and diff for that tag.