Skip to content

Commit 99e4426

Browse files
committed
add binexport to open source docs
update plugin documentation now that binexport is shipped add binexport documentation
1 parent 22c2873 commit 99e4426

File tree

7 files changed

+55
-2
lines changed

7 files changed

+55
-2
lines changed

docs/about/open-source.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The previous tools are used in the generation of our documentation, but are not
2626

2727
* Core
2828
- [abseil-cpp] ([abseil-cpp license] - Apache 2.0)
29+
- [BinExport] ([binexport license] - Apache 2.0) - Google project, [Vector 35 fork]
2930
- [jsoncpp] ([jsoncpp] - Public Domain / MIT)
3031
- [llvm] ([llvm license] - BSD-style)
3132
- [lzf] ([lzf license] - BSD)
@@ -307,6 +308,9 @@ Please note that we offer no support for running Binary Ninja with modified Qt l
307308
[Qt 6.8]: https://www.qt.io/licensing/open-source-lgpl-obligations
308309
[abseil-cpp]: https://github.com/abseil/abseil-cpp
309310
[abseil-cpp license]: https://github.com/abseil/abseil-cpp/blob/master/LICENSE
311+
[BinExport]: https://github.com/google/binexport
312+
[binexport license]: https://github.com/google/binexport/blob/main/LICENSE
313+
[Vector 35 fork]: https://github.com/Vector35/binexport
310314
[capstone]: https://github.com/aquynh/capstone
311315
[capstone license]: https://github.com/aquynh/capstone/blob/master/LICENSE.TXT
312316
[breathe license]: https://github.com/michaeljones/breathe/blob/master/LICENSE

docs/dev/plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ and use command-line lldb or gdb to debug their code. Shout-outs to people tryin
363363

364364
## Submitting to the plugin manager
365365

366-
While native plugins are not supported in the plugin manager at this time, it's possible to work around this limitation by pre-building a native plugin for all three platforms and using a python plugin that acts as a loader for the native plugin. There aren't any good examples of automated workflows for this, but [binexport](https://github.com/google/binexport) has supposedly got it working. But given that the people you're distributing your plugin to may have a different version of the API, you will likely want to just distribute the source code and build setup, and have them build against whatever version of Binary Ninja they have installed.
366+
While native plugins are not fully supported in the plugin manager at this time, it's possible to work around this limitation by pre-building a native plugin for all three platforms and using a python plugin that acts as a loader for the native plugin. Additionally, you can submit a plugin as "view_only" which helps with discoverability.
367367

368368
## Examples
369369

@@ -372,7 +372,7 @@ Several native plugin examples exist:
372372
- [Triage](https://github.com/Vector35/binaryninja-api/tree/dev/examples/triage)
373373
- [Debugger](https://github.com/Vector35/debugger)
374374
- [ObjectiveNinja](https://github.com/jonpalmisc/ObjectiveNinja)
375-
- [BinExport](https://github.com/google/binexport#binary-ninja) (Used with BinDiff)
375+
- [BinExport](https://github.com/vector35/binexport#binary-ninja) (Used with BinDiff)
376376
- [Binliner](https://github.com/holmesmr/binliner)
377377

378378
## Contributing to Official Plugins

docs/guide/binexport.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# BinExport / BinDiff
2+
3+
BinExport is a [plugin written by Google](https://github.com/google/binexport) (originally [Zynamics](https://www.zynamics.com/) before their acquisition) to create files used for the [BinDiff](https://github.com/google/bindiff) differential analysis tool.
4+
5+
## Usage
6+
7+
### Enable the Experimental Plugin
8+
9+
![BinExport Setting >](../img/binexport-setting.png "BinExport Setting"){ width="400" }
10+
11+
The initial release of this plugin is **EXPERIMENTAL** due to being finished too close to a stable release for better testing. As such, it is disabled by default. To enable it, search settings for "binexport", enable the plugin, and restart Binary Ninja.
12+
13+
### Activation
14+
15+
![BinExport Success >](../img/binexport-success.png "BinExport Success"){ width="300" }
16+
17+
To trigger the plugin and create a `.binexport` file for the current binary, use either the `Plugins` / `BinExport` menu, or the `BinExport` action in the [command-palette](./index.md#command-palette).
18+
19+
A file dialog will open, defaulting to the same file name and location (without the original file extension -- a new file extension will automatically be appended of .BinExport`)
20+
21+
If successful, two more dialogs will show up. One warning that the export can take some time for large files, and a second confirming success.
22+
23+
### What Next?
24+
25+
After creating the before and after `.BinExport` files you wish to analyze, you'll want to install [BinDiff](https://github.com/google/bindiff), and run it on the CLI or the GUI to create a `.bindiff` result database.
26+
27+
```sh
28+
$ bindiff writable.BinExport writable2.BinExport
29+
BinDiff 7 (@377901646, Jun 7 2021), (c)2004-2011 zynamics GmbH, (c)2011-2021 Google LLC.
30+
Setup: 0s
31+
primary: writable: 11 functions, 2 calls
32+
secondary: writable2: 11 functions, 2 calls
33+
Matching: 0s
34+
matched: 11 of 11/11 (primary/secondary, 11/11 non-library)
35+
call graph MD index: primary 0.264073
36+
secondary 0.264073
37+
Similarity: 99.2002% (Confidence: 99.2002%)
38+
Writing results: 0.0s
39+
```
40+
41+
The resulting `.BinDiff` file can either be opened in the BinDiff Java GUI, or directly in Binary Ninja directly using the [BD Viewer](https://github.com/PistonMiner/binaryninja-bindiff-viewer) plugin (available via the [Plugin Manager](./plugins.md)) and also supports porting symbols from one matched database to another.
42+
43+
![BD Viewer](../img/binexport-bdviewer.png "BD Viewer")
44+
_BD Viewer Plugin_
45+
46+
## Changes / Fork
47+
48+
All changes made to the original plugin to be able to ship it as a plugin directly with the product are maintained in the [Vector 35 fork](https://github.com/Vector35/binexport) and are [released](https://github.com/Vector35/binexport/blob/main/LICENSE) under the same Apache 2.0 license as the [original plugin](https://github.com/google/binexport/blob/main/LICENSE). Please do not file issues related to anything on that repo except for specific Binary Ninja UI functionality or changes.

docs/img/binexport-bdviewer.png

249 KB
Loading

docs/img/binexport-setting.png

30.4 KB
Loading

docs/img/binexport-success.png

78.7 KB
Loading

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ nav:
9797
- Shared Cache: 'guide/sharedcache.md'
9898
- Kernel Cache: 'guide/kernelcache.md'
9999
- EFI Resolver: 'guide/efiresolver.md'
100+
- BinExport / BinDiff: 'guide/binexport.md'
100101
- Debugger:
101102
- Overview: 'guide/debugger/index.md'
102103
- Remote Debugging: 'guide/debugger/remote-debugging.md'

0 commit comments

Comments
 (0)