
Un outil pour chasser les identifiants dans le wild de GitHub, alias git*hunt
Un outil pour chasser les identifiants dans la nature de GitHub, alias git*hunt

cat results.json | jq📺 Démo

virtualenv, python3git clone https://github.com/d1vious/git-wild-hunt && cd git-wild-hunt clonez le projet et placez-vous dans le répertoire du projetpip install virtualenv && virtualenv -p python3 venv && source venv/bin/activate && pip install -r requirements.txt créez un environnement virtuel et installez les dépendancesPassez à la configuration d'une clé API GitHub
git-wild-hunt.confAssurez-vous de définir un jeton GitHub. Si vous devez en créer un pour votre compte, suivez ces instructions.
[global]
github_token = ''
# GitHub token for searching
output = 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
Le drapeau -s accepte toute requête de recherche avancée GitHub, voir quelques exemples ci-dessous
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.jsonCe fichier contient toutes les regex qui seront utilisées pour vérifier le contenu brut renvoyé pour une recherche. N'hésitez pas à ajouter/modifier et inclure toutes celles qui correspondent à l'identifiant que vous cherchez à trouver. Cela a été gracieusement emprunté à truffleHog.
Identifiants actuellement vérifiés via regex :
L'inspiration pour écrire cet outil vient du projet shhgit