Skip to content

Commit 248afed

Browse files
authored
Merge pull request #1 from RevEngAI/dev_match_functions
Dev match functions
2 parents 5376d95 + 83f48bb commit 248afed

52 files changed

Lines changed: 2614 additions & 391 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 144 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,154 @@
1-
# <img src="./images/logo.png" width=20> RevEng.AI Binary Ninja Plugin
1+
<p align="center"><img src="./images/banner.png" ></p>
2+
Official Binary Ninja Plugin for RevEng.AI
23

3-
A Binary Ninja plugin for integrating with the RevEng.AI platform.
4+
### Features Supported
45

5-
## Installation
6+
This plugin brings the power of RevEng.AI directly into Binary Ninja. Here are the main features currently supported:
67

7-
1. Ensure you have Python 3.9 or later installed
8-
2. Install the required dependencies:
9-
```bash
10-
pip install -r requirements.txt
11-
```
12-
3. Copy the `revengai_bn` directory to your Binary Ninja plugins directory:
13-
- Linux: `~/.binaryninja/plugins/`
14-
- Windows: `%APPDATA%\Binary Ninja\plugins\`
15-
- macOS: `~/Library/Application Support/Binary Ninja/plugins/`
8+
- **Configuration Panel**: Easily configure your API credentials and platform settings.
9+
- **Choose a Source**: Select the uploaded binary whose analysis will be used for other features such as matching and renaming.
10+
- **Process Binary**: Upload the currently loaded binary in Binary Ninja to RevEng.AI for analysis.
11+
- **Auto-Unstrip**: Automatically restore stripped symbols in your binary using our AI engine.
12+
- **Function Matching**: Compare and match functions from your current binary with those in your existing collections.
1613

14+
---
1715

18-
## Requirements
16+
## Installation & Running 🚀
1917

20-
- Binary Ninja 5.0 or later
21-
- Python 3.9 or later
22-
- Internet connection for API access
23-
- RevEng.AI API key
18+
### Step 1: Locate Binary Ninja Plugins Folder
19+
20+
Locate your Binary Ninja user plugin directory:
21+
22+
- **Tools > Plugins > Open Plugin Folder** from the Binary Ninja menu
23+
24+
> 💡 **Tip**: This opens the correct path regardless of OS or install type.
25+
26+
Expected output locations:
27+
- Linux: `~/.binaryninja/plugins/`
28+
- Windows: `%APPDATA%\Binary Ninja\plugins\`
29+
- macOS: `~/Library/Application Support/Binary Ninja/plugins/`
30+
31+
32+
### Step 2: Download & Install the Plugin
33+
34+
1. Visit the releases page: https://github.com/RevEngAI/reai-ida/releases
35+
2. Download the latest release (look for the most recent version).
36+
3. Extract the contents into the opened plugin folder.
37+
4. Ensure the folder structure looks like this:
38+
39+
```
40+
Example in Linux...
41+
~/.binaryninja/plugins/
42+
└── revengai/
43+
└── [plugin files...]
44+
```
45+
46+
> 🖼️ *Insert screenshot of the correct plugin folder structure*
47+
48+
### Step 3: Install Dependencies
49+
50+
In your system terminal (not inside Binary Ninja), move to the directory with the 'requirements.txt' file and install required dependencies using:
51+
52+
```bash
53+
pip install -r requirements.txt
54+
```
55+
56+
Or directly from within Binary Ninja’s built-in Python terminal:
57+
58+
```python
59+
import subprocess
60+
subprocess.check_call(['pip', 'install', '-r', '/path/to/requirements.txt']) # Change to your path to requirements.txt
61+
```
62+
63+
---
64+
65+
## Using the Plugin ⚙️
66+
67+
Once installed, you’ll find `RevEng.AI` listed in the Binary Ninja plugins toolbar menu.
68+
69+
<img src="images/plugintoolbar.png" >
70+
71+
Make sure to restart Binary Ninja completely after installation.
72+
Then, check the Plugins menu — the RevEng.AI plugin should be visible.
73+
Finally, load a binary and explore the features described below.
74+
75+
### 1. Configure the Plugin
76+
77+
Select `Configuration` from the menu to set up your API key and host.
78+
79+
<img src="./images/config.png" >
80+
81+
Clicking "Continue" will validate your API key.
82+
83+
---
84+
85+
### 2. Process a Binary
86+
87+
Upload the currently loaded binary to RevEng.AI:
88+
89+
- Select `RevEng.AI > Process Binary`
90+
91+
<img src="./images/processbinary.png" >
92+
93+
Before starting the process, you can add a PDB file and debug information, assign custom tags for better tracking, choose which AI model you want to use, and decide whether to keep the analysis private (default) or make it publicly available.
94+
The plugin will handle the upload and initiate the analysis. Once completed, an internal analysis ID is assigned.
95+
96+
---
97+
98+
### 3. Choose Source Analysis
99+
100+
If you have already processed your binary on the platform or if there are publicly available analyses, you can select one as your working source.
101+
102+
- Select `RevEng.AI > Choose Source`
103+
104+
<img src="./images/choosesource.png" >
105+
106+
This is required before using some features like function matching or auto unstrip.
107+
108+
---
109+
110+
### 4. Auto Unstrip
111+
112+
Bring back symbol names automatically:
113+
114+
- Select `RevEng.AI > Auto Unstrip`
115+
116+
<img src="./images/autounstrip.png" >
117+
118+
Functions will be renamed with the most likely matching names from your configured collections.
119+
120+
---
121+
122+
### 5. Match Functions
123+
124+
Use function matching to identify similar functions in other binaries or collections:
125+
126+
- Click `RevEng.AI > Match Functions`
127+
128+
<img src="./images/matchedfunctions.png" >
129+
130+
Matched functions are displayed based on the given confidence value. You can navigate or rename based on the results.
131+
132+
---
133+
134+
## Troubleshooting
135+
136+
- Only Binary Ninja 3.0+ is supported
137+
- Python 3.9 or later is required
138+
- Ensure your API key is valid and your analysis contains function-level information
139+
140+
## Software Requirements
141+
142+
This plugin relies on:
143+
144+
- [reait](https://github.com/RevEngAI/reait)
145+
- requests
146+
- PySide6
24147

25148
## License
26149

27150
This plugin is released under the GPL-2.0 license.
151+
152+
## Disclaimer
153+
154+
Binary Ninja is a trademark of Vector 35. This project is not affiliated with or endorsed by Vector 35.

features/auto_unstrip/auto_unstrip_thread.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

features/choose_source/analysis_load_thread.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

features/choose_source/choose_source_thread.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

features/upload/model_load_thread.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

features/upload/upload_thread.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

images/autounstrip.png

51.5 KB
Loading

images/banner.png

130 KB
Loading

images/choosesource.png

48.2 KB
Loading

images/config.png

48.5 KB
Loading

0 commit comments

Comments
 (0)