Giter Club home page Giter Club logo

binaryninja-api's Introduction

slack

Binary Ninja API

This repository contains documentation and source code for the Binary Ninja reverse engineering platform API.

Branches

Please note that the dev branch tracks changes on the dev build of binary ninja and is generally the place where all pull requests should be submitted to. However, the master branch tracks the stable build of Binary Ninja which is the default version run after installation. Online documentation tracks the stable branch.

Contributing

Public contributions are welcome to this repository. All 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.

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.

Issues

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

Building

Starting July 10th, C++ portion of this API can be built into a static library (.a, .lib) that binary plugins can link against using cmake.

The compiled API contains names and functions you can use from your plugins, but most of the implementation is missing until you link up against libbinaryninjacore.dylib or libbinaryninjacore.dll (via import file libbinaryninjacore.lib). See the ./examples.

Since BinaryNinja 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.

Build Instructions

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

# Do an out-of-source build
cd ../
mkdir build
cd build

# Build it
cmake ../binaryninja-api
make -j8

The output is in build/out.

There are several options that you can pass to cmake:

  • If BinaryNinja is installed at a different location than the defautls in CMakeLists.txt, it will complain "Binary Ninja Core Not Found". Specify the path by -DBN_INSTALL_DIR=/path/to/binaryninja/installation
  • If you also wish to build the API examples, pass -DBN_API_BUILD_EXAMPLES=ON. After the make succeeds, you can install the built plugins by make install
  • If you are using a headless BinaryNinja distribution or you do not wish to build UI plugins, pass -DHEADLESS=ON.
  • You will need Qt 6.1.1 (as of writing) installed to build UI plugins.

Examples

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

  • bin-info is a standalone executable that prints some information about a given binary to stdout (only usable with licenses that support headless API access)
  • 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 (only usable with licenses that support headless API access)
  • llil-parser parses Low-Level IL, demonstrating how to match types and use a visitor class (only usable with licenses that support headless API access)
  • mlil-parser parses Medium-Level IL, demonstrating how to match types and use a visitor class (only usable with licenses that support headless API access)
  • print_syscalls is a standalone executable that prints the syscalls used in a given binary (only usable with licenses that support headless API access)
  • 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
  • x86 extension creates an architecture extension which shows how to modify the behavior of the build-in architectures without creating a complete replacement

Licensing

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

binaryninja-api's People

Contributors

0x1f9f1 avatar 3pidemix avatar amatus avatar bambu avatar bpotchik avatar chinmaydd avatar couleeapps avatar d0ntpanic avatar endeav0r avatar galenbwill avatar jeffli678 avatar jhurliman avatar jltisland avatar jonpalmisc avatar joshwatson avatar kylemiles avatar lucasduffey avatar lwerdna avatar marpie avatar negasora avatar njfox avatar nshp avatar plafosse avatar psifertex avatar rollsafe avatar rssor avatar verylazyguy avatar withzombies avatar xusheng6 avatar yrp604 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.