|
| 1 | +# Gitrob: Putting the Open Source in OSINT |
| 2 | + |
| 3 | +Gitrob is a tool to help find potentially sensitive files pushed to public repositories on Github. Gitrob 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. The findings will be presented through a web interface for easy browsing and analysis. |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | + gitrob [options] target [target2] ... [targetN] |
| 8 | + |
| 9 | +### Options |
| 10 | + |
| 11 | +``` |
| 12 | +-bind-address string |
| 13 | + Address to bind web server to (default "127.0.0.1") |
| 14 | +-commit-depth int |
| 15 | + Number of repository commits to process (default 500) |
| 16 | +-debug |
| 17 | + Print debugging information |
| 18 | +-github-access-token string |
| 19 | + GitHub access token to use for API requests |
| 20 | +-load string |
| 21 | + Load session file |
| 22 | +-no-expand-orgs |
| 23 | + Don't add members to targets when processing organizations |
| 24 | +-port int |
| 25 | + Port to run web server on (default 9393) |
| 26 | +-save string |
| 27 | + Save session to file |
| 28 | +-silent |
| 29 | + Suppress all output except for errors |
| 30 | +-threads int |
| 31 | + Number of concurrent threads (default number of logical CPUs) |
| 32 | +``` |
| 33 | + |
| 34 | +### Saving session to a file |
| 35 | + |
| 36 | +By default, gitrob will store its state for an assessment in memory. This means that the results of an assessment is lost when Gitrob is closed. You can save the session to a file by using the `-save` option: |
| 37 | + |
| 38 | + gitrob -save ~/gitrob-session.json acmecorp |
| 39 | + |
| 40 | +Gitrob will save all the gathered information to the specified file path as a special JSON document. The file can be loaded again for browsing at another point in time, shared with other analysts or parsed for custom integrations with other tools and systems. |
| 41 | + |
| 42 | +### Loading session from a file |
| 43 | + |
| 44 | +A session stored in a file can be loaded with the `-load` option: |
| 45 | + |
| 46 | + gitrob -load ~/gitrob-session.json |
| 47 | + |
| 48 | +Gitrob will start its web interface and serve the results for analysis. |
| 49 | + |
| 50 | +## Installation |
| 51 | + |
| 52 | +A [precompiled version is available](https://github.com/michenriksen/gitrob/releases) for each release, alternatively you can use the latest version of the source code from this repository in order to build your own binary. |
| 53 | + |
| 54 | +Make sure you have a correctly configured **Go >= 1.8** environment and that `$GOPATH/bin` is in your `$PATH` |
| 55 | + |
| 56 | + $ go get github.com/michenriksen/gitrob |
| 57 | + |
| 58 | +This command will download gitrob, install its dependencies, compile it and move the `gitrob` executable to `$GOPATH/bin`. |
| 59 | + |
| 60 | +### Github access token |
| 61 | + |
| 62 | +Gitrob will need a Github access token in order to interact with the Github API. [Create a personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) and save it in an environment variable in your `.bashrc` or similar shell configuration file: |
| 63 | + |
| 64 | + export GITROB_ACCESS_TOKEN=deadbeefdeadbeefdeadbeefdeadbeefdeadbeef |
| 65 | + |
| 66 | +Alternatively you can specify the access token with the `-github-access-token` option, but watch out for your command history! |
0 commit comments