57 lines (35 sloc) 2.21 KB

Binary Ninja Python API Examples

The following examples demonstrate some of the Binary Ninja API. They include both stand-alone examples that directly call into the core without a GUI, as well as examples meant to be loaded as plugins available from the UI.


These plugins only operate when run directly outside of the UI

  • - general binary information
  • - extract syscall numbers from IL on specified file. Can be run both headless and in Binary Ninja
  • - uses the update API to see raw version notes and manually downgrade or upgrade
  • - very simple plugin that iterates through functions, blocks, and instructions

To use the stand-alone Python examples, make sure your PYTHON_PATH includes the API, as shown below. Please note, this is a feature that requires the "GUI-less processing" capability not available in the personal edition. In the personal edition, all scripts must by run from the integrated python console (follow the directions below under "Loading Plugins" section)


GUI Plugins

These plugins require the UI to be running

  • - small example showing how to modify a file and register a GUI menu item
  • - heuristic based jump table detection for when the data-flow based computation fails, triggered by right-clicking on the location where the jump value is computed
  • - a plugin to demonstrate both background threads, the simplified plugin UI elements, and highlighting
  • - exports the graph view of a function to an SVG file for including in reports


These plugins are able to operate in either the GUI or as stand-alone plugins

  • - 6502 CPU architecture including LLIL lifting and .NES file format parser

Loading Plugins

Plugins are meant to be loaded into a running Binary Ninja GUI and should either be copied or symlinked into the appropriate plugin folder. You'll need to then re-start Binary Ninja.


~/Library/Application Support/Binary Ninja/plugins


%APPDATA%\Binary Ninja\plugins