Bandit 30 → 31
Goal: find the password attached to a tag in the repository, not to any commit on a branch.
Approach
Section titled “Approach”bandit30@bandit:~$ cd "$(mktemp -d)" && git clone ssh://bandit30-git@localhost:2220/home/bandit30-git/repobandit30@bandit:...$ cd repobandit30@bandit:...$ cat README.mdjust an epmty file... muahahabandit30@bandit:...$ git tagsecretbandit30@bandit:...$ git show secretThe password you are looking for is: <password>Password
fb5S2xb7bRyFmAvQYQGEqsbhVyJqhnDyWhy it works
Section titled “Why it works”A Git tag serves as a static, named reference to a specific object, separated from the commit and branch graph, so its contents never show up in a normal log or checkout. git tag lists it and git show secret prints what it points at, here the password.