All Projects → mhaskar → Bughound

mhaskar / Bughound

Licence: GPL-3.0 license
Static code analysis tool based on Elasticsearch

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bughound

Lynis
Lynis - Security auditing tool for Linux, macOS, and UNIX-based systems. Assists with compliance testing (HIPAA/ISO27001/PCI DSS) and system hardening. Agentless, and installation optional.
Stars: ✭ 9,137 (+7268.55%)
Mutual labels:  security-vulnerability
Study Struts2 S2 054 055 Jackson Cve 2017 7525 cve 2017 15095
Struts2の脆弱性S2-045, S2-055 および Jackson の脆弱性 CVE-2017-7525, CVE-2017-15095 の調査報告
Stars: ✭ 107 (-13.71%)
Mutual labels:  security-vulnerability
Securityadvisories
🔐 Security advisories as a simple composer exclusion list, updated daily
Stars: ✭ 2,279 (+1737.9%)
Mutual labels:  security-vulnerability
Meltdown
Local Exploit for Meltdown
Stars: ✭ 74 (-40.32%)
Mutual labels:  security-vulnerability
Crlf Injection Scanner
Command line tool for testing CRLF injection on a list of domains.
Stars: ✭ 91 (-26.61%)
Mutual labels:  security-vulnerability
Zen Rails Security Checklist
Checklist of security precautions for Ruby on Rails applications.
Stars: ✭ 1,765 (+1323.39%)
Mutual labels:  security-vulnerability
Chimay Red
Mikrotik RouterOS (6.x < 6.38.5) exploit kit. Reverse engineered from the "Vault 7" WikiLeaks publication.
Stars: ✭ 63 (-49.19%)
Mutual labels:  security-vulnerability
H1domains
HackerOne "in scope" domains
Stars: ✭ 223 (+79.84%)
Mutual labels:  security-vulnerability
Ssl Checker
Python script that collects SSL/TLS information from hosts
Stars: ✭ 94 (-24.19%)
Mutual labels:  security-vulnerability
Recsech
Recsech is a tool for doing Footprinting and Reconnaissance on the target web. Recsech collects information such as DNS Information, Sub Domains, HoneySpot Detected, Subdomain takeovers, Reconnaissance On Github and much more you can see in Features in tools .
Stars: ✭ 173 (+39.52%)
Mutual labels:  security-vulnerability
Network Threats Taxonomy
Machine Learning based Intrusion Detection Systems are difficult to evaluate due to a shortage of datasets representing accurately network traffic and their associated threats. In this project we attempt at solving this problem by presenting two taxonomies
Stars: ✭ 79 (-36.29%)
Mutual labels:  security-vulnerability
Btle Sniffer
Passively scan for Bluetooth Low Energy devices and attempt to fingerprint them
Stars: ✭ 87 (-29.84%)
Mutual labels:  security-vulnerability
Employee Mgmt Laravel5.4 Adminlte
The project is using laravel 5.4 and adminlte
Stars: ✭ 141 (+13.71%)
Mutual labels:  security-vulnerability
Vuls
Agent-less vulnerability scanner for Linux, FreeBSD, Container, WordPress, Programming language libraries, Network devices
Stars: ✭ 8,844 (+7032.26%)
Mutual labels:  security-vulnerability
Cod Exploits
☠️ Call of Duty - Vulnerabilities and proof-of-concepts
Stars: ✭ 178 (+43.55%)
Mutual labels:  security-vulnerability
Uber Cli
🚗Uber, at your fingertips
Stars: ✭ 1,142 (+820.97%)
Mutual labels:  security-vulnerability
Compsecattacklabs
Contains Attack labs
Stars: ✭ 130 (+4.84%)
Mutual labels:  security-vulnerability
Insecureprogramming
mirror of gera's insecure programming examples | http://community.coresecurity.com/~gera/InsecureProgramming/
Stars: ✭ 229 (+84.68%)
Mutual labels:  security-vulnerability
Crithit
Takes a single wordlist item and tests it one by one over a large collection of websites before moving onto the next. Create signatures to cross-check vulnerabilities over multiple hosts.
Stars: ✭ 182 (+46.77%)
Mutual labels:  security-vulnerability
Webpocket
Exploit management framework
Stars: ✭ 142 (+14.52%)
Mutual labels:  security-vulnerability

Stability Version Python Docker Pulls

What is Bughound?

Bughound Logo

Bughound is an open-source static code analysis tool that analyzes your code and sends the results to Elasticsearch and Kibana to get useful insights about the potential vulnerabilities in your code.

Bughound has its own Elasticsearch and Kibana Docker image that is preconfigured with dashboards to give you a strong visualization for the findings.

You can detect various types of vulnerabilities such as:

  • Command Injection.
  • XXE.
  • Unsafe Deserialization.
  • And more!

Bughound can analyze PHP and JAVA code for now, and it contains a group of unsafe functions for these languages.

I will make sure to add more and more functions/languages coverage with time, but for now the main focus is for the project stability itself.

Please note that Bughound results are not 100% accurate, it built to help you identify potential weaknesses during your analysis to investigate.

How it works?

First of all, Bughound will build a list of all the files inside your project based on the extension of the files you want to audit, then it will read each file and try to find any pre-defined unsafe functions for your project's language.

The analysis phase depends on pre-configured regex and some custom text matching to detect the potential vulnerabilities, so again, you need to do the manual analysis so you can check if these findings are exploitable.

Finally, it will send the results to the Bughound docker image which has a pre-configured Elasticsearch and Kibana that contain the customized dashboards for your findings.

The dashboards will give you details about the findings such:

  • Function name.
  • Category of the vulnerability.
  • Line number.
  • And much more!

Also using Kibana, you will be able to view the potentially vulnerable code snippet to start doing your analysis and tracing phase to check if it's exploitable or not.

Of course, you can use your own ELK stack if you want, and Bughound will do the initial configuration for you, but you will not have the pre-configured dashboards in this case.

Requirements

You can install all the requirements to run Bughound code using the following command:

pip3 install -r requirements.txt

That will make sure all the requirements are installed for the code.

Also, you need to install Docker in order to run the Bughound image, more regarding this in the next section!

If you want to use your own Elasticsearch and Kibana instances, skip the docker installation step

Installation

Make sure to get the latest version of Bughound using the following command:

git clone https://github.com/mhaskar/Bughound

And after installing the requirements in the previous step you can run Bughound using the following command:

./bughound.py

You will get the main screen of Bughound.

┌─[askar@hackbook]─[/opt/bughound]
└──╼ $./bughound.py

.______    __    __    _______  __    __    ______    __    __  .__   __.  _______
|   _  \  |  |  |  |  /  _____||  |  |  |  /  __  \  |  |  |  | |  \ |  | |       \
|  |_)  | |  |  |  | |  |  __  |  |__|  | |  |  |  | |  |  |  | |   \|  | |  .--.  |
|   _  <  |  |  |  | |  | |_ | |   __   | |  |  |  | |  |  |  | |  . `  | |  |  |  |
|  |_)  | |  `--'  | |  |__| | |  |  |  | |  `--'  | |  `--'  | |  |\   | |  '--'  |
|______/   \______/   \______| |__|  |__|  \______/   \______/  |__| \__| |_______/



          \ /
          oVo
      \___XXX___/
       __XXXXX__
      /__XXXXX__\
      /   XXX   \
           V                  V1.0 Beta

[+] Example: ./bughound3.py --path vulnerable_code/ --language php --extension .php --name testproject

usage: bughound.py [-h] [--path PATH] [--git GIT] --language LANGUAGE
                   --extension EXTENSION --name NAME [--verbose [VERBOSE]]
bughound.py: error: argument --language is required
┌─[✗]─[askar@hackbook]─[/opt/bughound]
└──╼ $

Docker image installation

To install the Bughound docker image, you can simply do the following:

docker pull bughound/bughound

And that will pull the latest version of the image and save it to your machine.

Once we pulled the image, we can run it using the following command:

docker run --name bughound -p5601:5601 -p 9200:9200 bughound/bughound

That will run the image under a new container called bughound and expose the ports that are needed by Bughound to communicate Elasticsearch and Kibana to your host.

You may need to increase the max virtual memory in order to use the image, so please make sure to run this command:

sysctl -w vm.max_map_count=262144

After getting two things done, you are ready now to use Bughound!

Usage

To start the analysis process for your code, you should use Bughound.py file which has some options, to see these options via the help banner, you can use the following command:

┌─[✗]─[askar@hackbook]─[/opt/bughound]
└──╼ $./bughound.py -h

.______    __    __    _______  __    __    ______    __    __  .__   __.  _______
|   _  \  |  |  |  |  /  _____||  |  |  |  /  __  \  |  |  |  | |  \ |  | |       \
|  |_)  | |  |  |  | |  |  __  |  |__|  | |  |  |  | |  |  |  | |   \|  | |  .--.  |
|   _  <  |  |  |  | |  | |_ | |   __   | |  |  |  | |  |  |  | |  . `  | |  |  |  |
|  |_)  | |  `--'  | |  |__| | |  |  |  | |  `--'  | |  `--'  | |  |\   | |  '--'  |
|______/   \______/   \______| |__|  |__|  \______/   \______/  |__| \__| |_______/



          \ /
          oVo
      \___XXX___/
       __XXXXX__
      /__XXXXX__\
      /   XXX   \
           V                  V1.0 Beta

[+] Example: ./bughound3.py --path vulnerable_code/ --language php --extension .php --name testproject

usage: bughound.py [-h] [--path PATH] [--git GIT] --language LANGUAGE
                   --extension EXTENSION --name NAME [--verbose [VERBOSE]]

optional arguments:
  -h, --help            show this help message and exit
  --path PATH           local path of the source code
  --git GIT             git repository URL
  --language LANGUAGE   the used programming language
  --extension EXTENSION
                        extension to search for
  --name NAME           project name to use
  --verbose [VERBOSE]   show debugging messages
┌─[askar@hackbook]─[/opt/bughound]
└──╼ $

Scan Local project

For example, to scan a local php project, you can use the following command:

./bughound.py --path /opt/dummyproject --language php --extension .php --name dummyproject

This command will create a new project called "dummyproject" in the Elasticsearch index, and crawl all the local files with the extension ".php" in the local path "/opt/dummyproject" and ship the results to Elasticsearch.

Scan remote git repository

Also, you can pull a remote project from git repository using --git switch like the following:

./bughound.py --git https://github.com/DummyCode/DummyProject --language php --extension .php --name dummyproject

Bughound will clone the code for you and save it in projects directory, then will scan it.

Preconfigured Dashboards

If you decided to use the official Bughound docker image, you will get a couple of ready to use dashboards that will help you to do your analysis.

The following dashboards are available so far:

  • Bughound main dashboard
  • Command injection dashboard
  • Deserialization dashboard
  • XXE dashboard

These dashboards will give you statistics about the functions and code snippets that was found in the code so you can start your analysis process.

More resources

For more information about Bughound check the following articles:

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details

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].