git clone file:///git-server/
- Set up Git credentials
git config --global user.name "dademola"
git config --global user.email "dademola@hunit.(none)"
In git-shell
, we should be able to interact with the repository. Let's clone this repo on our attack machine.
GIT_SSH_COMMAND='ssh -i id_rsa -p 43022' git clone [email protected]:/git-server
In git-shell
, push
to git server from attacker machine:
GIT_SSH_COMMAND='ssh -i ~/id_rsa -p 43022' git push origin master
git-dumper <URL> .
Getting commits
git log > commits.txt; cat commits.txt | grep commit
File changes:
git log -p <last-commit>