GitHub Recon
MITRE ATT&CK™ Data from Information Repositories - Technique T1213
Last updated
Was this helpful?
MITRE ATT&CK™ Data from Information Repositories - Technique T1213
Last updated
Was this helpful?
Theory
Online repositories of code hold a window into an organization's technology stack, revealing the programming languages and frameworks they employ. In some rare instances, developers have unintentionally exposed sensitive information, including critical data and credentials, within public repositories. These inadvertent revelations may present a unique opportunity us.
To automate the process of searching sensitives files and hardcoded credentials in Git repositories, we may use following tools
is a python tools used to search leaked secrets via github search. Its collection of Github dorks can reveal sensitive personal and/or organizational information such as private keys, credentials, authentication tokens, etc.
Alternatively, we can manualy search for specific dorks, without using :
Examples of Github Dorks are :
filename:.npmrc _auth
npm registry authentication data
filename:.dockercfg auth
docker registry authentication data
extension:pem private
private keys
extension:ppk private
puttygen private keys
filename:id_rsa or filename:id_dsa
private ssh keys
filename:wp-config.php
wordpress config files
filename:.env MAIL_HOST=smtp.gmail.com gmail
smtp configuration (try different smtp services too)
shodan_api_key language:python
Shodan API keys (try other languages too)
/"sk-[a-zA-Z0-9]{20,50}"/ language:Shell
Open AI API Keys
"api_hash" "api_id"
Telegram API token
hunts down exposed API keys and other sensitive information on GitHub using GitHub code search, pattern matching, and commit history searching.
is a command-line program that finds secrets and sensitive information in textual data and Git history.
is a (Python) tool for detecting sensitive data exposure in GitHub repositories, leveraging GitHub's search functionality.
(Go) is a SAST tool for detecting and preventing hardcoded secrets like passwords, api keys, and tokens in git repos.
(Go) is a tool to help find potentially sensitive files pushed to public repositories on Github. It will clone repositories belonging to a user or organization down to a configurable depth and iterate through the commit history and flag files that match signatures for potentially sensitive files.
Gitrob will need a Github access token in order to interact with the Github API. See .