|
2 | 2 |
|
3 | 3 | Provides integration with [WARP](https://github.com/Vector35/warp), more specifically the function identification and associated type information. |
4 | 4 |
|
5 | | -## Batch Processing |
| 5 | +## Documentation |
6 | 6 |
|
7 | | -`sigem` (see code at `src/bin/sigem.rs`) allows for batch processing binaries for signature generation. |
8 | | - |
9 | | -The only real "magic" here is the cross-linking of symbols in archives, this means that static libraries will have much finer constraint matching. |
10 | | - |
11 | | -Duplicate functions will be removed to save space, any input will always produce a single output signature file, if you want separate signature files, invoke individually. |
12 | | - |
13 | | -### Building |
14 | | - |
15 | | -> Assuming you have the following: |
16 | | -> - A compatible Binary Ninja with headless usage (see [this documentation](https://docs.binary.ninja/dev/batch.html#batch-processing-and-other-automation-tips) for more information) |
17 | | -> - Clang |
18 | | -> - Rust (currently tested for 1.83.0) |
19 | | -> - Set `BINARYNINJADIR` env variable to your install directory (see [here](https://docs.binary.ninja/guide/#binary-path) for more details) |
20 | | -
|
21 | | -1. Clone this repository (`git clone https://github.com/Vector35/binaryninja-api/tree/dev`) |
22 | | -2. Navigate to this plugin (`cd plugins/warp`) |
23 | | -3. Build in release (`cargo build --release`) |
24 | | - |
25 | | -If compilation fails because it could not link against binaryninjacore than you should double-check you set `BINARYNINJADIR` correctly. |
26 | | - |
27 | | -Once it finishes you now will have a `sigem` binary in `target/release` for use. |
28 | | - |
29 | | -### Usage |
30 | | - |
31 | | -> Assuming you already have the `sigem` binary and a valid headless compatible Binary Ninja license. |
32 | | -
|
33 | | -To create a signature file simply pass the input as the first positional argument to `sigem`: |
34 | | - |
35 | | -- A regular binary |
36 | | -- An archive of binaries (`.a`, `.lib`, `.rlib`) |
37 | | -- A directory of binaries |
38 | | -- A BNDB |
39 | | - |
40 | | -Example: `./sigem mylibrary.a` or `./sigem ./all-libs/` |
41 | | - |
42 | | -Once its finished you should see a `.sbin` file next to the input file, this can be moved into the corresponding signature folder (see the [user docs](https://docs.binary.ninja/dev/annotation.html?h=install+path#signature-library) for more info) |
43 | | - |
44 | | -If you encounter malloc errors or instability try and adjust the number of parallel threads using `RAYON_NUM_THREADS` environment variable (ex. `RAYON_NUM_THREADS=1 ./sigem mylib.a`) |
| 7 | +Documentation is available in the [User Guide](../../docs/guide/warp.md). |
0 commit comments