git-wild-hunt Herramienta Cazar Credenciales Github
git-wild-hunt Herramienta Cazar Credenciales Github

git-wild-hunt: Herramienta para Cazar Credenciales en Github

Una herramienta para cazar credenciales en el GitHub salvaje, también conocido como git*hunt.

Inicio Rápido

  1. Instalar la herramienta
  2. Configura tu token de GitHub
  3. Buscar credenciales
  4. Ver resultados con cat results.json | jq
Demostración de git-wild-hunt
Demostración de git-wild-hunt

Instalación

  • Requerimientos: virtualenv, python3
  • Clona el proyecto y cd en el proyecto
git clone https://github.com/d1vious/git-wild-hunt && cd git-wild-hunt
  • crear virtualenv e instalar los requerimientos
pip install virtualenv && virtualenv -p python3 venv && source venv/bin/activate && pip install -r requirements.txt

Configurar git-wild-hunt.conf

Asegúrate de configurar un token GitHub si necesitas crear uno para tu cuenta, sigue estas instrucciones.

[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

Ejemplos de búsqueda en GitHub

La flag -s acepta cualquier consulta de búsqueda avanzada de GitHub, ver algunos ejemplos a continuación:

  1. Encontrar archivos de token GCP JWT
python git-wild-hunt.py -s "extension:json filename:creds language:JSON"
  • Encontrar secretos de la API de AWS
python git-wild-hunt.py -s "path:.aws/ filename:credentials"
  • Encontrar token de JWT Azure
python git-wild-hunt.py -s "extension:json path:.azure filename:accessTokens language:JSON"
  • Encontrar configuraciones de GSUtils
python git-wild-hunt.py -s "path:.gsutil filename:credstore2"
  • Encontrar archivos de configuración de Kubernetes
python git-wild-hunt.py -s "path:.kube filename:config"
  • Buscar archivo de credenciales de Jenkins.xml
python git-wild-hunt.py -s "extension:xml filename:credentials.xml language:XML"
  • Encontrar secretos en .circleci
python git-wild-hunt.py -s "extension:yml path:.circleci filename:config language:YAML"
  • Búsqueda genérica de credenciales.yml
python git-wild-hunt.py -s "extension:yml filename:credentials.yml language:YAML"

Uso

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

Qué comprobaciones se ejecutan en regexes.json

Este archivo contiene todos los regexes que se utilizarán para cotejar con el contenido en bruto archivado devuelto para una búsqueda. Siéntete libre de añadir/modificar e incluir cualquier otra específica que coincida con la credencial que estás tratando de encontrar. Esto fue tomado gentilmente de truffleHog

Credenciales actualmente verificadas vía regex:

  • AWS API Key
  • Amazon AWS Access Key ID
  • Amazon MWS Auth Token
  • Facebook Access Token
  • Facebook OAuth
  • Generic API Key
  • Generic Secret
  • GitHub
  • Google (GCP) Service-account
  • Google API Key
  • Google Cloud Platform API Key
  • Google Cloud Platform OAuth
  • Google Drive API Key
  • Google Drive OAuth
  • Google Gmail API Key
  • Google Gmail OAuth
  • Google OAuth Access Token
  • Google YouTube API Key
  • Google YouTube OAuth
  • Heroku API Key
  • MailChimp API Key
  • Mailgun API Key
  • PGP private key block
  • Password in URL
  • PayPal Braintree Access Token
  • Picatic API Key
  • RSA private key
  • SSH (DSA) private key
  • SSH (EC) private key
  • Slack Token
  • Slack Webhook
  • Square Access Token
  • Square OAuth Secret
  • Stripe API Key
  • Stripe Restricted API Key
  • Twilio API Key
  • Twitter Access Token
  • Twitter OAuth

Mi Carro Close (×)

Tu carrito está vacío
Ver tienda