Skip to content

Commit 63ef496

Browse files
committed
Add Ghidra import documentation
1 parent 59fa6ae commit 63ef496

File tree

5 files changed

+43
-13
lines changed

5 files changed

+43
-13
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Ghidra Import
2+
3+
Currently, the following categories of analysis information can be imported from Ghidra files:
4+
5+
- Types
6+
- Memory map
7+
- Data variables
8+
- Functions
9+
- Comments
10+
- Bookmarks
11+
12+
## Importing data
13+
### Import to a new file
14+
`Plugins > Ghidra Import > Open Database...` allows you to select a Ghidra file to open as a binary view in Binary Ninja. You are able to select a single `.gbf` file or project file from a `.gpr`.
15+
16+
### Import to an existing file
17+
`Plugins > Ghidra Import > Import Database...` allows you to apply analysis information from a Ghidra file to an already open binary view in Binary Ninja. You are able to select a single `.gbf` file or project file from a `.gpr`. You can choose to import all or only some categories of analysis information to apply to the binary view.
18+
19+
### Import to an existing project
20+
!!! note
21+
Binary Ninja projects are only available in Commercial and Ultimate editions
22+
23+
`Plugins > Ghidra Import > Import Project...` allows you to import files from a Ghidra project (`.gpr`) to an open Binary Ninja project. All available analysis information will be imported for all selected files.

docs/guide/migration/migrationguideghidra.md renamed to docs/guide/migration/ghidra/index.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,26 @@
22

33
## Starting Binary Ninja
44

5-
Binary Ninja starts with the [New Tab Page](../index.md#new-tab) open. From here, you can optionally [start a project](../projects.md#creating-a-project) to work with multiple files, navigate your offline docs from the help menu, or just [open existing files](../index.md#loading-files) (including drag-and-drop!).
5+
Binary Ninja starts with the [New Tab Page](../../index.md#new-tab) open. From here, you can optionally [start a project](../../projects.md#creating-a-project) to work with multiple files, navigate your offline docs from the help menu, or just [open existing files](../../index.md#loading-files) (including drag-and-drop!).
66

77
## Decompiler Settings
88

99
Binary Ninja likes to stay out of your way as much as possible, but sometimes you need to dig into the settings and change how a file is analyzed. If you have a file that can be opened with default settings, you won't get prompted for any additional input. Binary Ninja will automatically analyze the entire file — including running [linear sweep](https://binary.ninja/2017/11/06/architecture-agnostic-function-detection-in-binaries.html) — and provide you with linear decompilation for the whole file (like Ghidra's linear disassembly, but as decompilation by default).
1010

11-
If you're opening a [Universal Mach-O](https://en.wikipedia.org/wiki/Universal_binary), the Open with Options dialogue will appear so that you can choose which architecture to open (in the top right). If you have a default architecture you want to open whenever you open a universal binary, you can set your preference in a setting called [Universal Mach-O Architecture Preference](../settings.md#settings-reference). You'll also see the Open with Options dialogue when Binary Ninja is unable to recognize the file type or otherwise needs user input to analyze the file (can't find the entry point, needs you to provide some memory mappings, etc.).
11+
If you're opening a [Universal Mach-O](https://en.wikipedia.org/wiki/Universal_binary), the Open with Options dialogue will appear so that you can choose which architecture to open (in the top right). If you have a default architecture you want to open whenever you open a universal binary, you can set your preference in a setting called [Universal Mach-O Architecture Preference](../../settings.md#settings-reference). You'll also see the Open with Options dialogue when Binary Ninja is unable to recognize the file type or otherwise needs user input to analyze the file (can't find the entry point, needs you to provide some memory mappings, etc.).
1212

13-
It's worth digging into Binary Ninja's [settings](../settings.md) and seeing what's available to tune, but if you ever want to change a setting for a single binary, you can Open (it) with Options. Go to File -> Open with Options, and any settings you change will apply to only that file.
13+
It's worth digging into Binary Ninja's [settings](../../settings.md) and seeing what's available to tune, but if you ever want to change a setting for a single binary, you can Open (it) with Options. Go to File -> Open with Options, and any settings you change will apply to only that file.
1414

1515
<!-- TODO : Can you analyze a file while Ghidra is running its analysis?
1616
## Analyzing While Analyzing -->
1717

18+
## Importing Data
19+
20+
See [the Ghidra import documentation](./ghidraimport.md)
21+
1822
## Keybindings
1923

20-
Binary Ninja's keybindings are very different from Ghidra. Thankfully, [Binary Ninja's action system](https://binary.ninja/2024/02/15/command-palette.html) allows you to easily find actions and view the keybindings extremely easily. It'll also save you from digging through unfamiliar right-click menus while helping you learn any new keybindings. All actions can have their keybinding set, changed, or removed in the [keybindings menu](../index.md#default-hotkeys).
24+
Binary Ninja's keybindings are very different from Ghidra. Thankfully, [Binary Ninja's action system](https://binary.ninja/2024/02/15/command-palette.html) allows you to easily find actions and view the keybindings extremely easily. It'll also save you from digging through unfamiliar right-click menus while helping you learn any new keybindings. All actions can have their keybinding set, changed, or removed in the [keybindings menu](../../index.md#default-hotkeys).
2125

2226
Some of the most useful default keybindings are as follows:
2327

@@ -69,21 +73,21 @@ Binary Ninja's layout is also a bit different from what you're used to in Ghidra
6973

7074
## Cross-References
7175

72-
![xref icon >](../../img/xref-icon.png "Xref Icon")
76+
![xref icon >](../../../img/xref-icon.png "Xref Icon")
7377

7478
If you prefer the pop-up style cross-references from IDA or Ghidra, you can enable that behavior by right-clicking on the xref-icon and selecting "Window". Whenever you navigate from the window by double-clicking or pressing enter the main window will be focused. ESC can also be used to close the xref window.
7579

7680
### Theme
7781

78-
This doesn't exactly have to do with your layout, but it go a long way towards making the interface feel a bit more familiar. We have an expansive list of [community themes](https://github.com/Vector35/community-themes), and [a guide](../../dev/themes.md) and a [blog post](https://binary.ninja/2021/07/08/creating-great-themes.html) on how to make your own. The built-in "Classic" theme should feel nostalgic, but if you're looking for a light theme that's slightly easier on the eyes, try out Summer or Solarized Light.
82+
This doesn't exactly have to do with your layout, but it go a long way towards making the interface feel a bit more familiar. We have an expansive list of [community themes](https://github.com/Vector35/community-themes), and [a guide](../../../dev/themes.md) and a [blog post](https://binary.ninja/2021/07/08/creating-great-themes.html) on how to make your own. The built-in "Classic" theme should feel nostalgic, but if you're looking for a light theme that's slightly easier on the eyes, try out Summer or Solarized Light.
7983

8084
### Feature Map
8185

82-
Binary Ninja's [feature map](../index.md#feature-map) lives on the right side of your main view area. If you'd rather not see it, you can right-click it and select "Hide Feature Map."
86+
Binary Ninja's [feature map](../../index.md#feature-map) lives on the right side of your main view area. If you'd rather not see it, you can right-click it and select "Hide Feature Map."
8387

8488
### Sidebars
8589

86-
Our sidebars have a whole host of customization options, so make sure to check out [their dedicated docs](../index.md#the-sidebar) to maximize your workflow.
90+
Our sidebars have a whole host of customization options, so make sure to check out [their dedicated docs](../../index.md#the-sidebar) to maximize your workflow.
8791

8892
That said, I'll walk you through how to set up your sidebars to get it looking very similar to what you're used to in Ghidra.
8993

@@ -115,8 +119,8 @@ Now that you've done all this hard work to make the perfect layout, it would be
115119

116120
...about switching to Binary Ninja! We know leaving your old tool behind can be hard, and there will be things you miss, but we think there are a lot of features packed into Binary Ninja that you'll love. Here are a couple we think you'll appreciate:
117121

118-
- [Updates every day](../index.md#updates) on the dev branch (nearly) - accepted PRs can be in everyone's hands within hours.
119-
- [Our awesome native Python API](../../dev/cookbook.md) (and [C++](https://api.binary.ninja/cpp/), and [Rust](https://dev-rust.binary.ninja/))
122+
- [Updates every day](../../index.md#updates) on the dev branch (nearly) - accepted PRs can be in everyone's hands within hours.
123+
- [Our awesome native Python API](../../../dev/cookbook.md) (and [C++](https://api.binary.ninja/cpp/), and [Rust](https://dev-rust.binary.ninja/))
120124
- [The speed](https://binary.ninja/2022/05/31/3.1-the-performance-release.html)
121125
- ...not needing to manage Java installations
122126

docs/guide/migration/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We have quick start guides for the following:
1010

1111
- [New Users](../../getting-started.md)
1212
- [IDA Pro Users](migrationguideida.md)
13-
- [Ghidra Users](migrationguideghidra.md)
13+
- [Ghidra Users](./ghidra/index.md)
1414

1515
## Additional Resources
1616

docs/guide/settings.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ The setting will appear under the Quick Settings section in the Function Setting
244244
|corePlugins|DWARF Import Plugin|Enable the DWARF import plugin.|`boolean`|`True`|[`SettingsUserScope`]|<a id='corePlugins.dwarfImport'>corePlugins.dwarfImport</a>|
245245
|corePlugins|EFI Resolver|Enable the built-in EFI Resolver plugin.|`boolean`|`True`|[`SettingsUserScope`]|<a id='corePlugins.efiResolver'>corePlugins.efiResolver</a>|
246246
|corePlugins|Firmware Ninja|Enable the Firmware Ninja plugin.|`boolean`|`True`|[`SettingsUserScope`]|<a id='corePlugins.firmwareNinja'>corePlugins.firmwareNinja</a>|
247+
|corePlugins|Ghidra Import Plugin|Enable the built-in Ghidra import plugin.|`boolean`|`True`|[`SettingsUserScope`]|<a id='corePlugins.ghidraImport'>corePlugins.ghidraImport</a>|
247248
|corePlugins|IDB Import Plugin|Enable the IDB import plugin.|`boolean`|`True`|[`SettingsUserScope`]|<a id='corePlugins.idbImport'>corePlugins.idbImport</a>|
248249
|corePlugins|PDB Import Plugin|Enable the built-in PDB import plugin.|`boolean`|`True`|[`SettingsUserScope`]|<a id='corePlugins.pdbImport'>corePlugins.pdbImport</a>|
249250
|corePlugins|Stack Render Layer Plugin|Enable the built-in Stack Render Layer plugin.|`boolean`|`True`|[`SettingsUserScope`]|<a id='corePlugins.stackRenderLayer'>corePlugins.stackRenderLayer</a>|
@@ -582,4 +583,4 @@ The setting will appear under the Quick Settings section in the Function Setting
582583
|warp.matcher|Minimum Function Length|Functions below this length will not be matched.|`number`|`0`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='warp.matcher.minimumFunctionLength'>warp.matcher.minimumFunctionLength</a>|
583584
|warp.matcher|Minimum Matched Constraints|When function constraints are checked the amount of constraints matched must be at-least this.|`number`|`1`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='warp.matcher.minimumMatchedConstraints'>warp.matcher.minimumMatchedConstraints</a>|
584585
|warp.matcher|Trivial Function Adjacent Constraints Allowed|When function constraints are checked if this is enabled functions can match based off trivial adjacent functions.|`boolean`|`False`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='warp.matcher.trivialFunctionAdjacentAllowed'>warp.matcher.trivialFunctionAdjacentAllowed</a>|
585-
|warp.matcher|Trivial Function Length|Functions below this length in bytes will be required to match on constraints.|`number`|`20`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='warp.matcher.trivialFunctionLength'>warp.matcher.trivialFunctionLength</a>|
586+
|warp.matcher|Trivial Function Length|Functions below this length in bytes will be required to match on constraints.|`number`|`20`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='warp.matcher.trivialFunctionLength'>warp.matcher.trivialFunctionLength</a>|

mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ nav:
111111
- Migration Guide:
112112
- 'guide/migration/index.md'
113113
- Migrating from IDA: 'guide/migration/migrationguideida.md'
114-
- Migrating from Ghidra: 'guide/migration/migrationguideghidra.md'
114+
- Migrating from Ghidra:
115+
- 'guide/migration/ghidra/index.md'
116+
- Ghidra Import: 'guide/migration/ghidra/ghidraimport.md'
115117
- Types:
116118
- 'guide/types/index.md'
117119
- Basic Types: 'guide/types/basictypes.md'

0 commit comments

Comments
 (0)