Writeups OverTheWireBanditLinuxgitgit push

Bandit 31 Writeup - OverTheWire

Writeup for Bandit level 31 from OverTheWire: pushing a file to a remote git repository.

Contents

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

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

Password

rmCBvG56y58BXzv98yZGdO7ATVL5dW8y

← Back to Blog