Home

Awesome

semgrep_bn

semgrep_bn is a Binary Ninja plugin designed to automate the process of generating pseudo-C code from binary files, running Semgrep over this pseudo-C, and presenting the results - all without having to leave the Binary Ninja environment.

Semgrep Demo GIF

Installation

  1. Clone the semgrep_bn repo (with its submodules) into the Binary Ninja plugins directory (see here for the location of your plugin folder).
git clone --recurse-submodules https://github.com/interruptlabs/semgrep_bn
  1. Install the Python dependencies.
pip install -r semgrep_bn/requirements.txt
  1. Follow the installation instructions here to install Semgrep.

Usage

  1. Open a binary file with Binary Ninja.
  2. Navigate to the Plugins menu and select Semgrep analysis.
  3. Select your Semgrep ruleset. To write your own semgrep rules, follow the instructions found here! Some examples of rules are available here and here.
  4. The plugin will analyse the binary, run Semgrep, and display the findings in an HTML report.

Contributing

Contributions to semgrep_bn are welcome. Please feel free to submit issues, fork the repository, and send pull requests!