git-dumper

If /.git/HEAD responds, the server is serving the repository. git-dumper rebuilds it even when directory listing is off; then check every commit, because deleted credentials are still in the history.

Platform
Linux · Windows · macOS (Python)
Official site
github.com/arthaud/git-dumper
On HTB
7 machines
Install
pipx install git-dumper

git-dumper cheat sheet

Your values Saved in this browser and applied to every cheatsheet.
5 commands

From .git to the secret

Is it exposed?
curl -s http://box.htb/.git/HEAD
Restore deleted files in the working tree
cd repo && git checkout -- .
Search secrets across the whole history
git log -p --all | grep -iE 'pass|secret|token|key'
See what changed in the last commit
git show --stat HEAD && git diff HEAD~1

In our cheatsheets

Web enumeration › Common findings

Dump an exposed .git
git-dumper http://box.htb/.git/ repo

HTB machines where git-dumper is used

Taken from the chapters of IppSec videos where git-dumper shows up. The ▶ link jumps to the minute of that part.

Guides that use git-dumper