Get dorky and search GitHub for sensitive information with this simple shell script. Made by a Blue Teamer for Blue Teamers.
As a Blue Teamer you can't protect what you don't know about. This script can help you gain awareness as to what sensitive information may be hiding in your GitHub repositories.
I don't smash a bunch of keywords against GitHub or do any fancy password or api key detection with this script. I use this script to hunt around for sensitive information that I may not know exists so I can better protect that information. That's the reason there are so few keywords in dorks.txt. I prefer to check for a smaller subset of keywords, then investigate manually through the browser.
There are some really great projects and scripts for finding sensitive information. However, for my script, these were the scripts/projtects I drew inspiration from:
-
Jason Haddix's bash script that generates Github dork payloads
-
Techquan's github-dorks python tool for automating github dorks
-
Majd Aldeen Atiyat's talk on Github Recon and Sensitive Data Exposure
- Run
git clone https://github.com/techspence/gitdork.sh.git
- Review
dorks.txt
& modify as needed - run:
gitdork.sh -u dorks.txt -u <github user>
orgitdork.sh -u dorks.txt -o <github org>
- Add Slack alert
- Convert hard coded username/token to use environment variables
- Add -i (ignore) flag to allow ignoring a repository/list of repositories (txt file)