Bandit Level 29
Bandit Level 29 — find a secret that was removed from the current files but is still preserved in Git history.
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://bandit28-git@bandit.labs.overthewire.org/home/bandit28-git/repo via the port 2220. The password for the user bandit28-git is the same as for the user bandit28.
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 bandit28, find the password for bandit29.
What this level teaches
Deleting something from the latest version of a repository does not delete it from history.
Key ideas
- Commits are snapshots. Each commit records the full state of the project and a message describing the change.
git loglists commits;git showandgit diffdisplay what a commit changed.- Leaked secrets persist. Credentials committed once remain recoverable from earlier commits even after a “fix” commit.
How to approach it
- Clone the repository and read the current files.
- Read the commit log, paying attention to commit messages that suggest something was fixed or removed.
- Inspect those earlier commits to see exactly what they changed.
Why it matters
Committing API keys and passwords is one of the most common real-world leaks. If it happens, rotate the secret; rewriting history is not enough.