Gitrob – Reconnaissance Tool for GitHub Organizations

Gitrob is a command line device which will help organizations and security professionals discover delicate data lingering in publicly accessible recordsdata on GitHub.

The device will iterate over all public group and member repositories and match filenames in opposition to a spread of patterns for recordsdata that sometimes comprise delicate or harmful data.
Looking for delicate data in GitHub repositories shouldn’t be a brand new factor, it has been known for a while that issues comparable to non-public keys and credentials could be discovered with GitHub’s search performance, nonetheless, Gitrob makes it simpler to focus the hassle on a selected group.

1. Ruby
Gitrob is written in Ruby and requires at the least model 1.9. or above. To verify which model of Ruby you have got put in, merely run

ruby –version

in a terminal.

Should you have got an older model put in, it is extremely straightforward to improve and handle totally different variations with the Ruby Version Manager (RVM). Please see the RVM website for set up directions.
2. RubyGems
Gitrob is packaged as a Ruby gem to make it straightforward to put in and replace. To set up Ruby gems you may want the RubyGems device put in. To verify in case you have it already, kind


in a Terminal. If you bought it already, it’s endorsed to do a fast

gem replace –system

to be sure to have the most recent and biggest model. In case you do not have it put in, obtain it from here and comply with the straightforward set up directions.

. PostgreSQL
Gitrob makes use of a PostgreSQL database to retailer all of the collected information. If you might be organising Gitrob within the Kali linux distribution you have already got it put in, you simply want to ensure it is operating by executing

service postgresql begin

and set up a dependency with

apt-get set up libpq-dev

in a terminal. Here’s a wonderful guide on methods to set up PostgreSQL on a Debian primarily based Linux system. If you might be organising Gitrob on a Mac, the simplest method to set up PostgreSQL is with Homebrew. Here’s a guide on methods to set up PostgreSQL with Homebrew.

.1 PostgreSQL person and database
You must arrange a person and a database in PostgreSQL for Gitrob. Execute the next instructions in a terminal:

sudo su postgres # Not needed on Mac OS X createuser -s gitrob –pwprompt createdb -O gitrob gitrob

You now have a brand new PostgreSQL person with the title


and with the password you typed into the immediate. You additionally created a database with the title


which is owned by the



four. GitHub entry tokens
Gitrob works by querying the GitHub API for fascinating data, so that you want at the least one entry token to stand up and operating. The easiest method is to create a Personal Access Token. Press the

Generate new token

button and provides the token an outline. If you plan on utilizing Gitrob in opposition to organizations you are not a member of you need not give the token any scopes, as we are going to solely be accessing public information. If you plan to run Gitrob in opposition to your individual group, you may must verify the


scope to get full protection.
If you intend on utilizing Gitrob extensively or in opposition to a really giant group, it may be essential to have a number of entry tokens to keep away from operating into price limiting. These entry tokens should be from totally different person accounts.

5. Gitrob
With all of the earlier steps accomplished, now you can lastly set up Gitrob itself with the next command in a terminal:

gem set up gitrob

This will set up the Gitrob Ruby gem together with all its dependencies. Congratulations!

6. Configuring Gitrob
Gitrob must know methods to discuss to the PostgreSQL database in addition to what entry token to make use of to entry the GitHub API. Gitrob comes with a handy configuration wizard which could be invoked with the next command in a terminal:

gitrob configure

The configuration wizard will ask you for the data wanted to arrange Gitrob. All the data is saved to


and sure, Gitrob will likely be trying for this file too, so be careful!


Analyzing organizations and customers
Analyzing organizations and customers is the principle function of Gitrob. The


command accepts an arbitrary quantity of group and person logins, which will likely be bundled into an assessment:

gitrob analyze acme,johndoe,janedoe

Mixing organizations and customers is handy if you realize sure person is a part of a company however they don’t have their membership public.
When the assessment is completed, the


command will routinely begin up the online server to current the outcomes. This could be prevented by including the


choice to the command.

gitrob assist analyze

for extra choices.

Running Gitrob in opposition to customized GitHub Enterprise installations
Gitrob can analyze organizations and customers on customized GitHub Enterprise installations as an alternative of the official GitHub site. The


command takes a number of choices to manage this:

gitrob analyze johndoe –site= –endpoint= –access-tokens=token1,token2


gitrob assist analyze

for extra choices.

Starting the Gitrob net server
The Gitrob net server could be began with the



gitrob server

By default, the server will hear on localhost:9393. This can, in fact, all be managed:

gitrob server –bind-deal –port=8000

See for

gitrob assist server

extra choices.

Adding customized signatures
If you need to look for recordsdata which are particular to your organisation or initiatives, it’s straightforward so as to add customized signatures.
When Gitrob begins it appears to be like for a file at


which it expects to be a JSON doc with signatures that comply with the identical construction as the principle signatures.json file. Here is an instance:

[ ]

This signature instructs Gitrob to flag recordsdata the place the filename precisely matches


. The caption and outline are used within the net interface when displaying the findings.

Signature keys

  • half

    : Can be one in all:

    • path

      : The full file path

    • filename

      : Only the filename

    • extension

      : Only the file extension

  • kind

    : Can be one in all:

    • match

      : Simple match of half and sample

    • regex

      : Regular expression matching of half and sample

  • sample

    : The worth or common expression to match with

  • caption

    : A brief description of the discovering

  • description

    : More detailed description if wanted (set to


    if not).

Have a take a look at the principle signatures.json file for extra examples of signatures.

%d bloggers like this: