Bandit 29 → 30
Goal: find the password that is missing from master but present on another branch.
Approach
Section titled “Approach”bandit29@bandit:~$ cd "$(mktemp -d)" && git clone ssh://bandit29-git@localhost:2220/home/bandit29-git/repobandit29@bandit:...$ cd repobandit29@bandit:...$ cat README.md- password: <no passwords in production!>bandit29@bandit:...$ git branch -a* master remotes/origin/dev remotes/origin/master remotes/origin/sploits-devbandit29@bandit:...$ git checkout devbandit29@bandit:...$ cat README.md- password: <password>Password
qp30ex3VLz5MDG1n91YowTv4Q8l7CDZLWhy it works
Section titled “Why it works”Branches hold divergent copies of the tree. The production branch deliberately omits the secret (no passwords in production), while a development branch still carries it. git branch -a lists every ref including remotes, so checking out the dev branch surfaces the password master never had.