A tool to hunt for credentials in github wild AKA git*hunt
A tool to hunt for credentials in the GitHub wild AKA git*hunt
cat results.json | jq
:tv: Demo
virtualenv, python3
git clone https://github.com/d1vious/git-wild-hunt && cd git-wild-huntclone project and cd into the project dir
pip install virtualenv && virtualenv -p python3 venv && source venv/bin/activate && pip install -r requirements.txtcreate virtualenv and install requirements
Continue to configuring a GitHub API key
git-wild-hunt.conf
Make sure you set a GitHub token if you need to create one for your account follow these instructions.
[global] github_token = '' # GitHub token for searchingoutput = results.json
stores matches in JSON here
log_path = git-wild-hunt.log
Sets the log_path for the logging file
log_level = INFO
Sets the log level for the logging
Possible values: INFO, ERROR
regexes = regexes.json
regexes to check the git wild hunt search against
the -s flag accepts any GitHub advance search query, see some examples below
python git-wild-hunt.py -s "extension:json filename:creds language:JSON"
python git-wild-hunt.py -s "path:.aws/ filename:credentials"
python git-wild-hunt.py -s "extension:json path:.azure filename:accessTokens language:JSON"
python git-wild-hunt.py -s "path:.gsutil filename:credstore2"
python git-wild-hunt.py -s "path:.kube filename:config"
python git-wild-hunt.py -s "extension:xml filename:credentials.xml language:XML"
python git-wild-hunt.py -s "extension:yml path:.circleci filename:config language:YAML"
python git-wild-hunt.py -s "extension:yml filename:credentials.yml language:YAML"
usage: git-wild-hunt.py [-h] -s SEARCH [-c CONFIG] [-v]optional arguments: -h, --help show this help message and exit -s SEARCH, --search SEARCH search to execute -c CONFIG, --config CONFIG config file path -v, --version shows current git-wild-hunt version
regexes.json
This file contains all the regexes that will be used to check against the raw content filed returned for a search. Feel free to add/modify and include any specific ones that match the credential you are trying to find. This was graciously borrowed from truffleHog
Currently verified credentials via regex:
Inspiration to write this tool came from the shhgit project