Some Rust bindings for Binary Ninja

Overview

Binary Ninja Rust Bindings

Work in progress Rust bindings geared towards analysis. Features added as they come up. No promises anything works at this point ;-)

Examples

  • back_slice: Example implementation of a back slicing algorithm over SSA
  • bininfo: Dump basic binary information for a given binary
  • count_ins: Counts the number of LLIL, MLIL, HLIL calls for a given binary
  • cyclomatic_complexity: Dumps a sample of most connected functions and basic blocks for a given binary
  • llil_parser: Dumps LLIL instructions
  • mlil_parser: Dumps MLIL instructions
  • hlil_parser: Dumps HLIL instructions

Building bindings

The first time the bindings are cloned, they don't exist. Need to pull in the API and build them by running the following:

cd binja-sys
git clone -b dev https://github.com/vector35/binaryninja-api
cargo build --release

Debugging

If this error is shown:

Linux

error while loading shared libraries: libbinaryninjacore.so.1: cannot open shared object file: No such file or directory

Add the binaryninjacore path to LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=$HOME/binaryninja

Windows

Ensure the path to binaryninjacore.dll is in your PATH.

Docs

Documentation can be generated by running the following

cargo docs --open

Issues

Sometimes there is an error when creating from the BinaryViewType. Not exactly sure why this happens, but running the binary again usually fixes it.

C:\Users\rando\workspace\binja-rs\examples\back_slice>target\release\back_slice.exe timeout.exe
Using plugin dir: C:\Program Files\Vector35\BinaryNinja\plugins
BNInitCorePlugins: true
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BNCreateBinaryViewOfType(self.handle, data.handle()) failed', src\main.rs:24:54
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
You might also like...
MMDeploy bindings for Rust.

rust-mmdeploy-sys MMDeploy bindings for Rust. 🚧 THIS REPO IS STILL UNDER CONSTRUCTION! Prerequisites NOTICE: Linux only. Onnxruntime only. In order t

Rust bindings for googleprojectzero/TinyInst

tinyinst-rs FFI to TinyInst. Created for LibAFL. Dependencies cxxbridge cargo-make python3 git Running the test Open a terminal and set up your build

Rust bindings for entity-gym.

EntityGym for Rust EntityGym is a Python library that defines a novel entity-based abstraction for reinforcement learning environments which enables h

A simple Verlet integration solver written using the Rust SDL2 bindings.
A simple Verlet integration solver written using the Rust SDL2 bindings.

Rust Verlet Solver A simple Verlet integration solver written using the Rust SDL2 bindings. Where's the friction?! Building cargo-vcpkg is required in

corange-rs CorangeCorange lucidscape/corange-rs — Corange bindings

CORANGE-RS This crate provides an interface to the Corange game engine, written in Pure C, SDL and OpenGL by Daniel Holden. Features include: deferred

Pure and simple Vulkan bindings generated from Vulkan-Headers!
Pure and simple Vulkan bindings generated from Vulkan-Headers!

mira Pure and simple Vulkan bindings generated from Vulkan-Headers! Mira provides a simple and straightforward way to interact with Vulkan. Everything

Python bindings for egg

Python bindings for egg Installing Install maturin, a cool Rust/Python builder thingy. Download from their site or just pip install maturin. Type make

Bindings to TinyGL, a Small, Free and Fast Subset of OpenGL

TinyGL is a very lightweight partial OpenGL implementation. Its small size makes it ideal for static linking.

Safe, fully-featured bindings to the Tracy profiler

Complete Rust bindings for the Tracy profiler. Getting Started Just add the following to your Cargo.toml: [dependencies.tracy] package = "tracy_full"

Owner
Cory Duplantis
Cory Duplantis
A Rust wrapper and bindings of Allegro 5 game programming library

RustAllegro A thin Rust wrapper of Allegro 5. Game loop example extern crate allegro; extern crate allegro_font; use allegro::*; use allegro_font::*;

null 80 Dec 31, 2022
Rust bindings for GDNative

GDNative bindings for Rust Rust bindings to the Godot game engine. Website | User Guide | API Documentation Stability The bindings cover most of the e

null 3.2k Jan 9, 2023
SDL bindings for Rust

Rust-SDL Bindings for SDL in Rust Overview Rust-SDL is a library for talking to SDL from Rust. Low-level C components are wrapped in Rust code to make

Brian Anderson 174 Nov 22, 2022
SDL2 bindings for Rust

Rust-SDL2 Bindings for SDL2 in Rust Changelog for 0.34.2 Overview Rust-SDL2 is a library for talking to the new SDL2.0 libraries from Rust. Low-level

null 2.2k Jan 5, 2023
SFML bindings for Rust

rust-sfml Rust bindings for SFML, the Simple and Fast Multimedia Library. Requirements Linux, Windows, or OS X Rust 1.42 or later SFML 2.5 CSFML 2.5 D

Jeremy Letang 567 Jan 7, 2023
Rust bindings for libtcod 1.6.3 (the Doryen library/roguelike toolkit)

Warning: Not Maintained This project is no longer actively developed or maintained. Please accept our apologies. Open pull requests may still get merg

Tomas Sedovic 226 Nov 17, 2022
Qt Quick / QML bindings for Rust

qmlrsng Qt Quick bindings for Rust, based on libqmlbind. The crate libqmlbind-sys wraps libqmlbind C library in Rust and exposes an unsafe API. The go

Nicolas Bigaouette 5 Jul 13, 2017
Idiomatic Rust bindings for Pdfium

Idiomatic Rust bindings for Pdfium pdfium-render provides an idiomatic high-level Rust interface around the low-level bindings to Pdfium exposed by th

Alastair Carey 65 Jan 8, 2023
Wein2D.js bindings for creating browser games in Rust using WebAssembly.

Wein2D.js-WASM Wein2D.js bindings for creating browser games in Rust using WebAssembly. Wein2D.js-WASM requires Wein2d.js to be loaded in the same doc

DevTaube 1 Apr 14, 2022
A simple Verlet integration solver written using the Rust SDL2 bindings.

Rust Verlet Solver A simple Verlet integration solver written using the Rust SDL2 bindings. Where's the friction?! Building cargo-vcpkg is required in

Will 8 Jun 6, 2022