GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Vector35/binaryninja-api: Public API, examples, documentation and issues for Binary Ninja

BranchesTags
Open more actions menu

Latest commit

 

History

7,183 Commits
7,183 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
api-docs
api-docs
 
 
arch
arch
 
 
base
base
 
 
cmake
cmake
 
 
defaultarch
defaultarch
 
 
demangler
demangler
 
 
docs
docs
 
 
examples
examples
 
 
formatter/generic
formatter/generic
 
 
images
images
 
 
json
json
 
 
lang
lang
 
 
objectivec
objectivec
 
 
platform
platform
 
 
plugins
plugins
 
 
python
python
 
 
rapidjson
rapidjson
 
 
rust
rust
 
 
scripts
scripts
 
 
sphinx_rtd
sphinx_rtd
 
 
stubs
stubs
 
 
themes
themes
 
 
ui
ui
 
 
vendor
vendor
 
 
view
view
 
 
.clang-format
.clang-format
 
 
.doxygen.h
.doxygen.h
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.style.yapf
.style.yapf
 
 
CMakeLists.txt
CMakeLists.txt
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE.txt
LICENSE.txt
 
 
PythonAPIDocumentation.md
PythonAPIDocumentation.md
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
about.hbs
about.hbs
 
 
about.toml
about.toml
 
 
activity.cpp
activity.cpp
 
 
architecture.cpp
architecture.cpp
 
 
backgroundtask.cpp
backgroundtask.cpp
 
 
basedetection.cpp
basedetection.cpp
 
 
basicblock.cpp
basicblock.cpp
 
 
binaryninjaapi.cpp
binaryninjaapi.cpp
 
 
binaryninjaapi.h
binaryninjaapi.h
 
 
binaryninjacore.h
binaryninjacore.h
 
 
binaryreader.cpp
binaryreader.cpp
 
 
binaryview.cpp
binaryview.cpp
 
 
binaryviewtype.cpp
binaryviewtype.cpp
 
 
binarywriter.cpp
binarywriter.cpp
 
 
callingconvention.cpp
callingconvention.cpp
 
 
collaboration.cpp
collaboration.cpp
 
 
component.cpp
component.cpp
 
 
constantrenderer.cpp
constantrenderer.cpp
 
 
database.cpp
database.cpp
 
 
databuffer.cpp
databuffer.cpp
 
 
datarenderer.cpp
datarenderer.cpp
 
 
debuginfo.cpp
debuginfo.cpp
 
 
defaultarch.cpp
defaultarch.cpp
 
 
demangle.cpp
demangle.cpp
 
 
downloadprovider.cpp
downloadprovider.cpp
 
 
enterprise.cpp
enterprise.cpp
 
 
enterprise.h
enterprise.h
 
 
exceptions.cpp
exceptions.cpp
 
 
exceptions.h
exceptions.h
 
 
externallibrary.cpp
externallibrary.cpp
 
 
ffi.cpp
ffi.cpp
 
 
ffi.h
ffi.h
 
 
fileaccessor.cpp
fileaccessor.cpp
 
 
filemetadata.cpp
filemetadata.cpp
 
 
firmwareninja.cpp
firmwareninja.cpp
 
 
flowgraph.cpp
flowgraph.cpp
 
 
flowgraphlayout.cpp
flowgraphlayout.cpp
 
 
flowgraphnode.cpp
flowgraphnode.cpp
 
 
function.cpp
function.cpp
 
 
functionrecognizer.cpp
functionrecognizer.cpp
 
 
genericrange.h
genericrange.h
 
 
highlevelil.cpp
highlevelil.cpp
 
 
highlevelilinstruction.cpp
highlevelilinstruction.cpp
 
 
highlevelilinstruction.h
highlevelilinstruction.h
 
 
http.cpp
http.cpp
 
 
http.h
http.h
 
 
interaction.cpp
interaction.cpp
 
 
languagerepresentation.cpp
languagerepresentation.cpp
 
 
linearviewcursor.cpp
linearviewcursor.cpp
 
 
linearviewobject.cpp
linearviewobject.cpp
 
 
lineformatter.cpp
lineformatter.cpp
 
 
log.cpp
log.cpp
 
 
lowlevelil.cpp
lowlevelil.cpp
 
 
lowlevelilinstruction.cpp
lowlevelilinstruction.cpp
 
 
lowlevelilinstruction.h
lowlevelilinstruction.h
 
 
mainthread.cpp
mainthread.cpp
 
 
mcp.cpp
mcp.cpp
 
 
mcp.h
mcp.h
 
 
mcpserver.h
mcpserver.h
 
 
mediumlevelil.cpp
mediumlevelil.cpp
 
 
mediumlevelilinstruction.cpp
mediumlevelilinstruction.cpp
 
 

Repository files navigation

slack

Binary Ninja API

This repository contains documentation and source code of the C++, Python, and Rust APIs for the Binary Ninja reverse engineering platform.

Documentation

Online documentation is available for the following APIs:

  • C++ API, Stable Branch
  • Python API, Stable Branch
  • Python API, Dev Branch
  • Rust API, Stable Branch
  • Rust API, Dev Branch

Usage and Build Instructions

In order to build the Binary Ninja API, you will need to use the specific revision that matches the hash from the file api_REVISION.txt. This file should be located in the root install folder for Linux and Windows or the Contents/Resources sub-folder of the app on macOS. The easiest way to do this is by cloning this repository (or adding it as a submodule) and doing something like git checkout $(cat api_REVISION.txt | awk -F/ '{print $NF}'). Documentation for how to set this up with something like cmake can be found here.

To write Binary Ninja plugins using C++, you'll need to build the C++ API. Building the API library is done similarly to most CMake-based projects; the basic steps are outlined as follows:

# Get the source
git clone https://github.com/Vector35/binaryninja-api.git
cd binaryninja-api
git submodule update --init --recursive

# Configure an out-of-source build setup
cmake -S . -B build # (additional arguments go here if needed)

# Compile
cmake --build build -j8

In addition to the default build setup, you may want to:

  • Build examples. To build the API examples, pass -DBN_API_BUILD_EXAMPLES=ON to CMake when configuring the build. After the build succeeds, you can install the built plugins by running the install target. When using the "Unix Makefiles" build generator, this looks like: make install.
  • Build UI plugins. You will need Qt 6.11.1 installed to build UI plugins. We use a slightly modified build configuration internally that has some ABI-compatible fixes and changes to defaults, but a stock build can also work. Note that it is not recommended to use pre-built configurations from Homebrew. Either using the official installer or building from our repo is recommended.
  • Build headlessly. If you are using a headless Binary Ninja distribution or you do not wish to build UI plugins, pass -DHEADLESS=ON to CMake when configuring the build.

Troubleshooting

  • If Binary Ninja is installed at a different location than the platform default (defined in CMakeLists.txt), you will likely get an error stating "Binary Ninja Core Not Found." Specify the path to your Binary Ninja installation by passing -DBN_INSTALL_DIR=/path/to/binaryninja to CMake when configuring the build setup.
  • Since Binary Ninja is a 64-bit only product, ensure that you are using a 64-bit compiling and linking environment. Errors on Windows like LNK1107 might indicate that your bits don't match.

Examples

There are many examples available. The Python examples folder demonstrates many different applications of the Python API, while C++ examples include:

  • background_task is a plugin that demonstrates managing a background task.*
  • bin-info is a standalone executable that prints some information about a given binary to the terminal.*
  • breakpoint is a plugin that allows you to select a region within an x86 binary and use the context menu to fill it with breakpoint bytes.
  • command-line disassm demonstrates how to dump disassembly to the command line.*
  • llil-parser parses Low-Level IL, demonstrating how to match types and use a visitor class.*
  • mlil-parser parses Medium-Level IL, demonstrating how to match types and use a visitor class.*
  • print_syscalls is a standalone executable that prints the syscalls used in a given binary.*
  • triage is a fully featured plugin that is shipped and enabled by default, demonstrating how to do a wide variety of tasks including extending the UI through QT.
  • workflows is a collection of plugins that demonstrate using Workflows to extend the analysis pipeline.
  • x86 extension creates an architecture extension which shows how to modify the behavior of the built-in architectures without creating a complete replacement.

* Requires license supporting headless API access.

Issues

The issue tracker for this repository tracks not only issues with the source code contained here but also the broader Binary Ninja product.

Branches

This repository has two primary branches dev and master.

The dev branch has the latest updates and tracks the latest development build of Binary Ninja; pull requests should be made against this branch. The master branch tracks the stable build of Binary Ninja. If you have just installed Binary Ninja for the first time, you are likely on the stable release channel.

Contributing

Public contributions are welcome to this repository. Most of the API and documentation in this repository is licensed under an MIT license, however, the API interfaces with a closed-source commercial application, Binary Ninja. Additionally, the Rust API is licensed under an Apache 2.0 license.

If you're interested in contributing when you submit your first PR, you'll receive a notice from CLA Assistant that allows you to sign our Contribution License Agreement online.

Platforms

This repository contains all of our Platform plugins available here:

  • Windows
  • Windows Kernel
  • Linux
  • macOS
  • macOS Kernel
  • FreeBSD
  • Decree
  • EFI

Architectures

This repository contains all the Architecture plugins available in Personal and Commercial editions of Binary Ninja. You can find each architecture here:

  • x86/x86_64
  • ARM64
  • ARMv7
  • PPC
  • MIPS
  • RISC-V
  • MSP430

BinaryViewTypes

This repository contains all of our Binary View Type plugins available here:

  • Mach-O
  • ELF
  • PE/COFF/TE
  • MD1Rom
  • Shared Cache
  • Kernel Cache

DebugInfo

  • DWARF Import
  • PDB Import
  • IDB Import

Other Plugins

  • Objective-C
  • RTTI Analysis
  • Stack Render Layer
  • SVD Loader
  • Triage View
  • WARP Integration

Related Repositories

In addition to this main API repository being open source Vector35 also has open sourced the Debugger plugin as well:

  • Debugger

Licensing

Some components may be released under compatible but slightly different open source licenses and will have their own LICENSE file as appropriate.

Remaining components are released under an MIT license.

Note that .lib files are included in the native binary builds of Binary Ninja for Windows. Those lib files are also released under the same license as this repository and may be distributed accordingly.

About

Public API, examples, documentation and issues for Binary Ninja

binary.ninja/

Topics

binary-analysisbinaryninjadecompilationintermediate-representationreverse-engineeringreverseengineeringsoftware-analysis

Resources

Readme
MIT license

Security policy

Security policy
Activity
Custom properties

Stars

1.3k stars

Watchers

42 watching

Forks

302 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.