Wargame: Bandit
Level: 31
Category: Linux Fundamentals
Description
The repository’s README instructs you to push a file named key.txt containing the text May I come in? to the master branch. Doing so triggers a server-side hook that prints the password.
Overview
git pushuploads local commits to a remote repository.- A server-side
post-receivehook can run arbitrary code when a push is accepted. .gitignoremay need editing if*.txtis ignored.
Solution
git clone ssh://bandit31-git@localhost:2220/home/bandit31-git/repo
cd repo
echo "May I come in?" > key.txt
# Edit .gitignore if *.txt is listed
git add key.txt
git commit -m "add key"
git push origin master
- The push output contains the bandit32 password.
Password
rmCBvG56y58BXzv98yZGdO7ATVL5dW8y