• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 10 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A regex based source code scanner.

GrepBugs

A regex based source code scanner.

Usage

python grepbugs.py -d <source directory>
python grepbugs.py -r github -a <account>
python grepbugs.py -r github -a <account> -f

The latest regular expressions will be pulled from https://www.grepbugs.com You can now sign-in at https://grepbugs.com/login to contribute regex rules.

A basic HTML report will be generated in the out/ directory. A tab-delimited file with a subset of the information is also created.

Example reports: https://www.grepbugs.com/reports

Offline Usage

If you need to run grepbugs when there is not Internet connection then you should, before going offline, download the rules file from https://grepbugs.com/rules and save it to GrepBugs/data/grepbugs.json.

Configuration

The etc/grepbugs.cfg file can be used to configure:

  • MySQL database (for storing scan results)
  • Path to grep binary

Dependencies

Using MySQL Database

Create a database and run the following create statements.

CREATE TABLE `projects` (
  `project_id` varchar(36) NOT NULL,
  `repo` varchar(50) NOT NULL,
  `account` varchar(50) NOT NULL,
  `project` varchar(100) DEFAULT NULL,
  `default_branch` varchar(50) DEFAULT NULL,
  `last_scan` datetime DEFAULT NULL,
  PRIMARY KEY (`project_id`),
  KEY `idx_account` (`account`)
);

CREATE TABLE `results` (
  `result_id` varchar(36) NOT NULL,
  `scan_id` varchar(36) NOT NULL,
  `language` varchar(50) DEFAULT NULL,
  `regex_id` int(11) DEFAULT NULL,
  `regex_text` text,
  `description` text,
  PRIMARY KEY (`result_id`),
  KEY `idx_scan_id` (`scan_id`)
);

CREATE TABLE `results_detail` (
  `result_detail_id` varchar(36) NOT NULL,
  `result_id` varchar(36) NOT NULL,
  `file` text,
  `line` int(11) DEFAULT NULL,
  `code` text,
  PRIMARY KEY (`result_detail_id`),
  KEY `idx_result_id` (`result_id`)
);

CREATE TABLE `scans` (
  `scan_id` varchar(36) NOT NULL,
  `project_id` varchar(36) DEFAULT NULL,
  `date_time` datetime DEFAULT NULL,
  `cloc_out` text,
  PRIMARY KEY (`scan_id`),
  KEY `idx_project_id` (`project_id`)
);

Using on Windows

The Windows instructions are beta (we've done it once!) and we welcome suggestions from users. Install python on Windows and make sure requests is installed too. Install grep and cloc as needed, then modify the configuration file with the full path to the binaries if they are not on the path. We are unsure if you use a single \ or a double one in the PATH or if you can specify drives. Modify the tmpdir setting to a location which exists.

Then, run grepbugs as normal. It should work correctly.

More Repositories

1

payloads

Git All the Payloads! A collection of web attack payloads.
Shell
3,369
star
2

HoneyPy

A low to medium interaction honeypot.
Python
436
star
3

DbDat

Db Database Assessment Tool
Python
209
star
4

web-cve-tests

A simple framework for sending test payloads for known web CVEs.
Python
129
star
5

ipt-kit

Bash scripts to help setup port redirects with iptables
Shell
16
star
6

HoneyMiner

Deploy a honeypot and a crypto currency miner together, so sweet.
Shell
13
star
7

GitGrepBugs

Grep Bugs with Git
Shell
11
star
8

logstash-input-signalsciences

Logstash input plugin for Signal Sciences requests feed API.
Ruby
10
star
9

sigsci-sounds

Listen to the soothing sounds of attacks and anomalies detected by the Signal Sciences web protection platform.
Go
10
star
10

CACConsole

A Python based console for managing Cloud at Cost servers via the CaC API
Python
9
star
11

HoneyPy-Docker

Build a HoneyPy Docker Image
Shell
9
star
12

GrepBugsRules

GrepBugs Rules
7
star
13

fuzzcat

Rudimentary network protocol fuzzer using bash, netcat, and other tools.
Shell
7
star
14

honeydb-malware-downloads

Malware samples downloaded from URLs referenced in HoneyDB data.
Shell
5
star
15

GrepBugsPluginNotepadPlusPlus

GrepBugs Plugin for Notepad++
C#
5
star
16

sigsci-power-rules

Rule packs for Signal Sciences power rules platform.
Shell
5
star
17

XSSwat

Chrome extension to prevent visiting web pages that are known to be vulnerable to XSS.
JavaScript
4
star
18

web-threat-hunting

Utility scripts to assist with threat hunting in web applications.
Python
4
star
19

cryptoflow

Crypto Flow - Airflow tasks for buying the dip and dollar cost averaging
Python
4
star
20

sigsci-admin

Signal Sciences Admin Tool
JavaScript
4
star
21

XSSwat-SG

XSSwat Signature Generator
Python
3
star
22

HoneyPyPi

Setup script to make your Raspberry Pi a HoneyPy honeypot.
Shell
3
star
23

pysigsci

Python module for Signal Sciences
Python
3
star
24

sigsci-ad-sync

A helper script for synchronizing AD group users to SigSci site members.
Python
2
star
25

sigsci-docker-brew

Install and setup of a docker image for running Signal Sciences in reverse proxy mode on OSX
Shell
2
star
26

GrepBugsPluginEclipse

GrepBugs Plugin for Eclipse
Java
2
star
27

clilib

A library of emulated command line commands.
Python
2
star
28

sigsci-country-block

Signal Sciences Block Attacking IP Addresses by Country
Python
2
star
29

DockerDev-Python

Docker build for Python dev.
Makefile
1
star
30

DockerDev-Php

Docker build for PHP dev.
Shell
1
star
31

DockerDev-PWS

Docker build for Pivotal PWS dev.
Makefile
1
star
32

dtxt

Grab data in dynamic-text.dat from iTunes backup
Python
1
star
33

DockerDev-Ansible

Docker build for Ansible dev.
Makefile
1
star
34

sigsci-helper-scripts

A collection of helper scripts for Signal Sciences
1
star
35

sigsci-syslog-webhook

A cloud function to forward Signal Sciences webhook messages to syslog
Python
1
star
36

DockerDev-Bluemix

Docker build for IBM Bluemix dev.
Makefile
1
star
37

DockerTunnel-Mysql

Docker build for SSH tunneling to a Mysql server.
Shell
1
star