All Projects → Talkaboutcybersecurity → Gitmonitor

Talkaboutcybersecurity / Gitmonitor

Licence: lgpl-3.0
One way to continuously monitor sensitive information that could be exposed on Github

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Gitmonitor

Bigbountyrecon
BigBountyRecon tool utilises 58 different techniques using various Google dorks and open source tools to expedite the process of initial reconnaissance on the target organisation.
Stars: ✭ 541 (+370.43%)
Mutual labels:  cybersecurity, reconnaissance, recon
Ntlmrecon
Enumerate information from NTLM authentication enabled web endpoints 🔎
Stars: ✭ 252 (+119.13%)
Mutual labels:  cybersecurity, reconnaissance, recon
targets
A collection of over 5.1 million sub-domains and assets belonging to public bug bounty programs, compiled into a repo, for performing bulk operations.
Stars: ✭ 85 (-26.09%)
Mutual labels:  cybersecurity, recon, reconnaissance
Odin
Automated network asset, email, and social media profile discovery and cataloguing.
Stars: ✭ 476 (+313.91%)
Mutual labels:  reconnaissance, recon
Hosthunter
HostHunter a recon tool for discovering hostnames using OSINT techniques.
Stars: ✭ 427 (+271.3%)
Mutual labels:  reconnaissance, recon
Shotlooter
a recon tool that finds sensitive data inside the screenshots uploaded to prnt.sc
Stars: ✭ 451 (+292.17%)
Mutual labels:  reconnaissance, recon
Lazyrecon
An automated approach to performing recon for bug bounty hunting and penetration testing.
Stars: ✭ 282 (+145.22%)
Mutual labels:  reconnaissance, recon
Git Hound
Reconnaissance tool for GitHub code search. Finds exposed API keys using pattern matching, commit history searching, and a unique result scoring system.
Stars: ✭ 602 (+423.48%)
Mutual labels:  reconnaissance, recon
Theharvester
E-mails, subdomains and names Harvester - OSINT
Stars: ✭ 6,175 (+5269.57%)
Mutual labels:  reconnaissance, recon
Uddup
Urls de-duplication tool for better recon.
Stars: ✭ 103 (-10.43%)
Mutual labels:  reconnaissance, recon
Gitgot
Semi-automated, feedback-driven tool to rapidly search through troves of public data on GitHub for sensitive secrets.
Stars: ✭ 964 (+738.26%)
Mutual labels:  reconnaissance, recon
Buster
An advanced tool for email reconnaissance
Stars: ✭ 387 (+236.52%)
Mutual labels:  cybersecurity, recon
Maryam
Maryam: Open-source Intelligence(OSINT) Framework
Stars: ✭ 371 (+222.61%)
Mutual labels:  reconnaissance, recon
Natlas
Scaling Network Scanning. Changes prior to 1.0 may cause difficult to avoid backwards incompatibilities. You've been warned.
Stars: ✭ 333 (+189.57%)
Mutual labels:  reconnaissance, recon
Sn0int
Semi-automatic OSINT framework and package manager
Stars: ✭ 814 (+607.83%)
Mutual labels:  reconnaissance, recon
Awesome Asset Discovery
List of Awesome Asset Discovery Resources
Stars: ✭ 1,017 (+784.35%)
Mutual labels:  reconnaissance, recon
Favfreak
Making Favicon.ico based Recon Great again !
Stars: ✭ 564 (+390.43%)
Mutual labels:  reconnaissance, recon
Reconcat
A small Php application to fetch archive url snapshots from archive.org. using it you can fetch complete list of snapshot urls of any year or complete list of all years possible. Made Specially for penetration testing purpose.
Stars: ✭ 66 (-42.61%)
Mutual labels:  reconnaissance, recon
Recon My Way
This repository created for personal use and added tools from my latest blog post.
Stars: ✭ 271 (+135.65%)
Mutual labels:  reconnaissance, recon
Recon Pipeline
An automated target reconnaissance pipeline.
Stars: ✭ 278 (+141.74%)
Mutual labels:  reconnaissance, recon

GitMonitor

License: GPL v3

GitMonitor

One way to continuously monitor sensitive information that could be exposed on Github

Summary

I know that there are many other tools available for finding sensitive information currently leaked on Github, I myself still use some of them. However, I think they still lack some features like:

  • Other tools are more focused on finding sensitive information that exists in a repository that has passed Git address into the tool. There are only a handful of similar tools at the time when I developed GitMonitor focused on finding repositories you need to care about first, find all relevant repositories, then checking to see if sensitive information exists among they are not.

  • In addition to rules for checking sensitive information, the tool also needs rules to search for repositories of interest. The repositories to be considered may be those that contain keywords related to the company or the project.

  • If you are a bug bounty hunter you will only be interested in several targets at a time. However, if you are a security engineer for a company, you will need to know when a repository related to your company or project appears and it may contain sensitive information. Such repositories can appear anywhere on Github, with any name and posted by any account. You should also receive an alert as soon as such a repository appears (continuously monitoring).

  • The tool has a flexible reporting mechanism.

That is why I created this tool - GitMonitor. GitMonitor uses two different sets of rules to find what you need. The Searching ruleset will search for repositories that may be related to your organization or internal projects, or anything else, clone repositories that matched to local. Then, Sensitive filtering ruleset to check if those repositories exist sensitive information. Finally the tool will report via Slack. You can use this tool with Cronjob to create a continuously monitoring system to track sensitive information related to your organization that leaked on Github and receive results via Slack.

Update June 15, 2020: We have updated to version 1.0. This version fixes some bugs so that Gitmonitor can work stably. We recommend that you perform a git pull if you are using previous versions.

Features

  • Use two different sets of rules, a searching rule set (yaml) to search for the repository of interest, and a set of filter rules (regex) to check if those containers of interest contain sensitive information. Searching Rules (yaml) and Filtering Rules (regex) are defined separately. Users can define yaml rules and regex easily and intuitively.

  • Searching rule set: You can create many different rules by using different yaml files. Rules allow you to flexibly define how you want to search for repositories, you can use keywords, or keywords associated with the language, filename and extension or You can also define to exclude repositories from searching based on language, filename or extension. Keywords will be searched through the names of the repositories, the codes of the repositories and also the commits.

  • Filtering rule set: You can add or modify regexs easily to find sensitive information that may exist in repositories.

  • The first repository that have matched the searching ruleset will be clone to local. And then, filtering ruleset will check if this repository exist sensitive information. After finishing checking sensitive information, Gitmonitor will record the results and automatically delete this repository on local to save space before continuing to repeat this process until all relevant repositories have been found and checked.

  • Report via Slack.

  • This tool can be scheduled by Cronjob for continuous monitoring.

Working Diagram

Requirements

  • Python3
  • Python3-pip.
  • Tested on Ubuntu 18.04 and MacOS. We believe that Gitmonitor can work well on other systems as well

Setup

1. Install requirements

> python3 -m pip install -r requirements.txt

Please make sure you have Pyyaml version 5x or higher installed (pip3 install --ignore-installed PyYAML)

2. Make sure you have configured all the necessary information in the configuration file (config.ini)

The following table explains the meaning of each key in the configuration file:

Key Description
user Github username - Leave blank if you have set up Github credentials via environment variables
pass Github password - Leave blank if you have set up Github credentials via environment variables
webhooks Incoming Webhook token to post messages from GitMonitor to Slack
rule The directory contains the Searching rule set
source The directory to download the repository
log The directory will contain the JSON file that records the status after each scan, this JSON file is used to compare results between scans (To identify new repositories)
start Define banner for start scanning and banner for result of Sensitive Filtering Ruleset scanning - Will show in the results that sent to Slack
end Define banner for finish scanning and banner for result of Searching Ruleset scanning - Will show in the results that sent to Slack
all Define banner for showing all repositories - Will show in the results that sent to Slack

3. Define Github account credentials. You have 2 ways to do this

  • Define credentials information in environment variables:
> export GIT_USERNAME=your Github username
> export GIT_PASSWORD=your Github personal key or password
  • Or define credentials information in configuration file (Not recommended):

    • Open config.ini file.
    • Fill in the credentials information to value of user and password keys.

Example configuration file when you define credentials information in environment variables

Example config file

4. Write the rules (Searching rules). Put your rules in the rules directory

You can create many different yaml files like the rule template to define multiple keyword. A rule file will look like the image below:

Example rule file

5. Add more regular expressions to libs/regex.py file - Sensitive filtering rules (Optional)

6. Run Gitmonitor

> python3 gitmonitor.py

7. You can schedule automatic running for the tool by using Cronjob.

For example:

Example cronjob

To Do

  • [ ] Feature: Report via email.
  • [ ] Feature: Sent result to Elasticsearch.
  • [ ] Dev: Write setup.py
  • [ ] Dev: Write Dockerfile

My Team

Special Thanks

  • GitMAD for regex-based sensitive information search mechanism

Contributing

Many areas of this project could be improved and change significantly while refactoring current code and implementing new features. Feedback with improvements and pull requests from the community will be highly appreciated and accepted.

In general, we follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

Donate

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].