Security Cipher
Home Blog About Us
Resources β–Ό
πŸ—ΊοΈ Penetration Testing Roadmap 🌐 Web Application Security Checklist πŸ€– OWASP Top 10 for LLM Applications 🧠 LLM AI Security Checklist πŸ› οΈ Security Tools 🎯 Penetration Testing Tricks πŸ“„ Secure Code Explain πŸ“– Vulnerability Explain ☁️ AWS Cloud Security Checklist
My Resume
Contact Us
← Security Tools View on GitHub

GitHunter

A tool for searching a Git repository for interesting content

GitHunter

Every now and then, on an internal test, you'll land on a box with a Git repository already checked out into directory. GitHunter will help you search that repository for anything juicy which could help you with other areas of your test.

GitHunter looks for:

  • Keywords in commit messages
  • Keywords in files
  • Interesting file names

Thanks to @michenriksen for allowing me to include his existing Gitrob signatures for doing the file name checks.

For the two keyword checks, the script uses a customisable JSON file to allow you to do either simple or regular expressesion searches, meaning you can target the discovery to your client's environment.

Installation

These instructions aren't best practice, ideally you would install this with go install... but as far as I can tell this will only install the binary. I also need to install the patterns.json file somewhere so it can be used by the app and edited by users, so this is the best I can come up with for now. Any suggestions, let me know.

  1. Set up your Go environment.
  2. Change into the Go source directory:
    cd ~go/src/github.com
    
  3. Make a directory for me and go into it:
    mkdir digininja ; cd digininja
    
  4. Clone the project:
    git clone https://github.com/digininja/GitHunter.git
    
  5. Change into the project directory:
    cd GitHunter/
    
  6. Build it:
    go build
    

You should now have a binary in the current directory.

Usage

Usage is fairly simple, by default, GitHunter will look in the current directory for a .git directory and, if it finds one, will parse through it and show anything interesting it finds in either filenames or in commit comments. You can specify a different directory for the repository with the -gitdir parameter.

If you want to expand what is searched to include file contents at each commit, you can add the -grep parameter, but be warned, git, on my box at least, runs single threaded, and can take a long time to do the grepping on a large repository. It actually failed trying to grep through Metasploit, due to the sheer number of commits and content. Still worth trying it though, especially on smaller repos, as you may find something.

If you want a dump of the commit logs, without any commentary, then you can use the -dump parameter.

To specify a custom patterns file, use -patterns and to have the output without any fancy colours (easier for parsing) use -nocolours.

Testing things out

If you want a repository to test things on, have a look at my Leaky Repo which contains quite a few interesting things to find.

Press Escape to close the search panel.

Donate

Buy me a Coffee

Penetration Testing Services - Fiverr

Buy me a Coffee

Penetration Testing Services

penetration Testing Services

Web Application Security Quiz

Web Application Security Quiz

Daily Bug Bounty Writeups - Twitter

Daily Bug Bounty Writeups

Download our Latest Android Application

Guide for Penetration Testing

Daily Bug Bounty Writeups - Telegram

Daily Bug Bounty Writeups

Author

Piyush
Senior Product Security Engineer

Ethical Hacker || Penetration Tester || Gamer || Blogger || Application Security Engineer

READ ARTICLE

Donate

Buy me a Coffee

Recent Posts

  • Web Cache Poisoning in 2026: A Practical Playbook (One Request, Every Victim)
    Web Cache Poisoning in 2026: A Practical Playbook (One Request, Every Victim)
    July 19, 2026/
    0 Comments
  • Is AI Killing Bug Bounty? What the 2026 CVE Flood Really Means for Hunters
    Is AI Killing Bug Bounty? What the 2026 CVE Flood Really Means for Hunters
    July 17, 2026/
    0 Comments
  • AI Pentest Tools in 2026: What Actually Works (T3MP3ST, PentestGPT, Caido and More)
    AI Pentest Tools in 2026: What Actually Works (T3MP3ST, PentestGPT, Caido and More)
    July 16, 2026/
    0 Comments

Follow Us

SecurityCipher

Practical security guides, vulnerability deep-dives, and hands-on resources for bug bounty hunters and penetration testers.

Useful Links

  • Blogs
  • About
  • Contact

Recent Post

  • Web Cache Poisoning in 2026: A Practical Playbook (One Request, Every Victim)
  • Is AI Killing Bug Bounty? What the 2026 CVE Flood Really Means for Hunters
  • AI Pentest Tools in 2026: What Actually Works (T3MP3ST, PentestGPT, Caido and More)
Β© 2026 SecurityCipher. All rights reserved. Privacy Policies Β· Terms & Conditions