bnida allows you to transfer analysis data between IDA Pro and Binary Ninja!
How does it work?
bnida consists of IDA Pro and Binary Ninja plugins that export and import analysis data from a JSON file. This is done by leveraging each platform’s Python API. Plugin files include:
binja_export.py- BNDB to JSON file
binja_import.py- JSON file to BNDB
ida_export.py- IDB to JSON file
ida_import.py- JSON file to IDB
Setup and Configuration
To use bnida, clone the repository into your Binary Ninja plugins folder. Then,
I recommend moving the IDA plugins (
C:\Program Files\IDA 7.1\plugins (Windows)
and configure a hotkey to execute each IDAPython script. To do so, follow
this blog post.
If you don’t want to bother with that, no problem. You can run
ida_import.py by simply typing
Alt+F7 to execute a script file.
IDA to Binary Ninja
Open your IDA database (or load a binary and allow analysis to complete)
Alt+F7and select the
##### Run IDA Export Script
Input the file path for the JSON file that will be created
Click Ok. Analysis data will be written to the JSON file
##### IDA Analysis Data JSON
- Open your BN database for the same binary (or load a binary and allow analysis to complete)
tools->Import data to BN
##### Run Binja Import Plugin
Enter the file path to the JSON file
##### Supply File Path to IDA JSON
- Click ok. Your database will then be updated with the analysis data from IDA.
Binary Ninja to IDA
BN to IDA transfers require a similar process. The steps are as follows:
- Open your Binary Ninja database (or load a binary and allow analysis to complete)
tools->Export data from BN
- Input the file path for the JSON file that will be created
- Click Ok. Analysis data will be written to the JSON file
- Open your IDA database for the same binary (or load the binary and allow analysis to complete)
File->Script Fileand select the
- Select the JSON file
- Click ok. Your database will then be updated with the analysis data from BN.
Handling Flat Files
bnida calculates offsets between IDA and BN relative to the base address of the symbol’s section. This is done to
account for potential base address differences between the platforms. This design works excellent with PE and ELF
executable file formats where the section names are defined in headers (which ensures section names are uniform).
However, with flat files (such as kernel images) where defining sections are left to the user, it is important to ensure
that section names are identical between the BNDB and IDB. Currently,
binja_import.py contains a feature that allows
you to define the offsets for sections contained in the exported IDA JSON data. After selecting the JSON file, it checks
if the default processor has been set. If it has not been set, a input box will appear. The input box prompts the user
to define the default processor and set the base address for each section found in the JSON file.
Binja Import Prompt for Defining Sections
Sections can be defined manually using the Binary Ninja API and the script console, if needed. To create a section, use
BinaryView.add_user_section(name, start, length). To validate that the section was created, navigate to linear view
and scroll to the top of the binary.
Add a Section Manually
BN Sections View