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.
- 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
- Install the Python dependencies.
pip install -r semgrep_bn/requirements.txt
- Follow the installation instructions here to install Semgrep.
- Open a binary file with Binary Ninja.
- Navigate to the
Plugins
menu and selectSemgrep analysis
. - Select your Semgrep ruleset. To write your own semgrep rules, follow the instructions found here! Some examples of rules are available here and here.
- The plugin will analyse the binary, run Semgrep, and display the findings in an HTML report.
Contributions to semgrep_bn
are welcome.
Please feel free to submit issues, fork the repository, and send pull requests!