GitGot – Semi-Automated, Feedback-Driven Tool To Rapidly Search Through Troves Of Public Data On GitHub For Sensitive Secrets

GitGot is a semi-automated, feedback-driven tool to empower users to rapidly search through troves of public data on GitHub for sensitive secrets.

How it Works

During search sessions, users will provide feedback to GitGot about search results to ignore, and GitGot prunes the set of results. Users can blacklist files by filename, repository name, username, or a fuzzy match of the file contents.

Blacklists generated from previous sessions can be saved and reused against similar queries (e.g., example.com v.s. subdomain.example.com v.s. Example Org). Sessions can also be paused and resumed at any time.

Read more about the semi-automated, human-in-the-loop design here: https://know.bishopfox.com/blog/going-semi-automated-in-an-automated-world-using-human-in-the-loop-workflows-to-improve-our-security-tools

Also Read – Machinae : Machinae Security Intelligence Collector

Install Instructions

  • Install the ssdeep dependency for fuzzy hashing.

Ubuntu/Debian (or equivalent for your distro):

apt-get install libfuzzy-dev ssdeep

or, for Mac OSX:

brew install ssdeep

For Windows or *nix distributions without the ssdeep package, please see the ssdeep installation instructions.

  • After installing ssdeep, install the Python dependencies using pip:

pip3 install -r requirements.txt

Usage

GitHub requires a token for rate-limiting purposes. Create a GitHub API token with no permissions/no scope. This will be equivalent to public GitHub access, but it will allow access to use the GitHub Search API. Set this token at the top of gitgot.py as shown below:

ACCESS_TOKEN = “<NO-PERMISSION-GITHUB-TOKEN-HERE>”

After adding the token, you are ready to go:

–> Query for the string “example.com” using the default RegEx list and logfile location (/logs/.log)
./gitgot.py -q example.com

–> Using GitHub advanced search syntax
./gitgot.py -q “org:github cats”

–> Custom RegEx List and custom log files location
./gitgot.py -q example.com -f checks/default.list -o example1.log

–> Recovery from existing session
./gitgot.py -q example.com -r example.com.state

–> Using an existing session (w/blacklists) for a new query
./gitgot.py -q “Example Org” -r example.com.state

Query Syntax

GitGot queries are fed directly into the GitHub code search API, so check out GitHub’s documentation for more advanced query syntax.

UI Commands

  • Ignore similar [c]ontent: Blacklists a fuzzy hash of the file contents to ignore future results that are similar to the selected file
  • Ignore [r]epo/[u]ser/[f]ilename: Ignores future results by blacklisting selected strings
  • Search [/(mykeyword)]: Provides a custom regex expression with a capture group to searches on-the-fly (e.g., /(secretToken))
  • [a]dd to Log: Add RegEx matches to log file, including all on-the-fly search results from search command
  • Next[<Enter>], [b]ack: Advances through search results, or returns to previous results
  • [s]ave state: Saves the blacklists and progress in the search results from the session
  • [q]uit: Quit
R K

Recent Posts

Burrow – Breaking Through Firewalls With Open Source Ingenuity

Burrow is an open source tool for burrowing through firewalls, built by teenagers at Hack Club.…

6 hours ago

Its-A-Trap : Building Secure Web Applications With A Golang Web Server For Authentication

Simple golang webserver that listens for basic auth or post requests and sends a notification…

6 hours ago

Nutek-Apple : Unleashing Power On macOS And Linux

Nutek Security Platform for macOS and Linux operating systems. Tools for hackers, bug hunters and…

7 hours ago

SecureSphere Labs – A Haven For Cybersecurity Innovators And Ethical Hackers

Welcome to SecureSphere Labs, your go-to destination for a curated collection of powerful hacking tools…

7 hours ago

Vulpes/VulpOS : The Docker-Powered All-in-One Workstation For Penetration Testing And Offsec Labs

All in one Docker-based workstation with hacking tools for Pentesting and offsec Labs by maintained…

7 hours ago

LiCo-Extrator : Revolutionizing Icon Extraction Across Platforms

Got it! Below is the updated README.md file with instructions for downloading the project on…

24 hours ago