Bandit Level 31
Bandit Level 31 — find a secret stored in a Git tag rather than in any file or branch.
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
Level Goal
There is a git repository at ssh://bandit30-git@bandit.labs.overthewire.org/home/bandit30-git/repo via the port 2220. The password for the user bandit30-git is the same as for the user bandit30.
From your local machine (not the OverTheWire machine!), clone the repository and find the password for the next level. This needs git installed locally on your machine.
Commands you may need to solve this level
git
Helpful Reading Material
Study guide
Level map: using the password for bandit30, find the password for bandit31.
What this level teaches
That Git stores more than files and branches, including tags and other references.
Key ideas
- Tags are permanent labels on a specific commit, usually marking releases such as
v1.0. - Annotated tags can carry a message of their own.
git taglists them andgit show TAGdisplays what each points to.- Searching a repo. When files and logs reveal nothing, enumerate every kind of reference Git keeps.
How to approach it
- Clone the repository and check the visible files and log.
- List the tags in the repository and inspect them.
Why it matters
Secrets can hide in the less obvious corners of a repository, which is why secret-scanning tools search all references, not just the latest files.