From 63ef49621522efa11e1fcfc709812adb0300d3f6 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Tue, 4 Nov 2025 17:52:40 -0500 Subject: Add Ghidra import documentation --- docs/guide/migration/ghidra/ghidraimport.md | 23 +++++ docs/guide/migration/ghidra/index.md | 129 +++++++++++++++++++++++++++ docs/guide/migration/index.md | 2 +- docs/guide/migration/migrationguideghidra.md | 125 -------------------------- docs/guide/settings.md | 3 +- 5 files changed, 155 insertions(+), 127 deletions(-) create mode 100644 docs/guide/migration/ghidra/ghidraimport.md create mode 100644 docs/guide/migration/ghidra/index.md delete mode 100644 docs/guide/migration/migrationguideghidra.md (limited to 'docs') diff --git a/docs/guide/migration/ghidra/ghidraimport.md b/docs/guide/migration/ghidra/ghidraimport.md new file mode 100644 index 00000000..dcc700ed --- /dev/null +++ b/docs/guide/migration/ghidra/ghidraimport.md @@ -0,0 +1,23 @@ +# Ghidra Import + +Currently, the following categories of analysis information can be imported from Ghidra files: + +- Types +- Memory map +- Data variables +- Functions +- Comments +- Bookmarks + +## Importing data +### Import to a new file +`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`. + +### Import to an existing file +`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. + +### Import to an existing project +!!! note + Binary Ninja projects are only available in Commercial and Ultimate editions + +`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. diff --git a/docs/guide/migration/ghidra/index.md b/docs/guide/migration/ghidra/index.md new file mode 100644 index 00000000..7d3d57e5 --- /dev/null +++ b/docs/guide/migration/ghidra/index.md @@ -0,0 +1,129 @@ +# Migrating from Ghidra + +## Starting Binary Ninja + +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!). + +## Decompiler Settings + +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). + +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.). + +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. + + + +## Importing Data + +See [the Ghidra import documentation](./ghidraimport.md) + +## Keybindings + +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). + +Some of the most useful default keybindings are as follows: + +Analysis Keybindings: + +| Action | Keybinding | +|----------------------|--------------------| +| Rename | `N` | +| Set Type | `Y` | +| Go to | `G` | +| Toggle Disasm/Decomp | `[TAB]` | +| Toggle Graph/Linear | `[SPACE]` | +| Toggle Hex View | `H` | +| Insert Comment | `;` | +| Manage Plugins | `[CTRL/⌘-SHIFT-B]` | +| Open Command Palette | `[CTRL/⌘-P]` | +| Open Python Console | `\`` | + +Types Keybindings: + +| Action | Keybinding | +|----------------------|------------| +| Set Type | Y | +| Make C String | A | +| Make Magic Struct | S | +| Open Types Menu | T | +| Make 1-byte elements | 1 | +| Make 2-byte elements | 2 | +| Make 4-byte elements | 4 | +| Make 8-byte elements | 8 | +| Make array | * | + +Common System Keybindings: + +| Action | Keybinding | +|-------------------|--------------------| +| Open File | `[CTRL/⌘-O]` | +| Open with Options | `[CTRL/⌘-SHIFT-O]` | +| Save | `[CTRL/⌘-S]` | +| Undo | `[CTRL/⌘-Z]` | +| Redo | `[CTRL/⌘-SHIFT-Z]` | +| Find | `[CTRL/⌘-F]` | +| Open Settings | `[CTRL/⌘-,]` | +| Open Keybindings | `[CTRL/⌘-SHIFT-B]` | + +## Layout + +Binary Ninja's layout is also a bit different from what you're used to in Ghidra, but thankfully Binary Ninja's UI is flexible enough to allow us to build something that will feel familiar. + +## Cross-References + +![xref icon >](../../../img/xref-icon.png "Xref Icon") + +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. + +### Theme + +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. + +### Feature Map + +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." + +### Sidebars + +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. + +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. + +#### Program Tree + +But first, there are a couple caveats. Binary Ninja does not have an exact 1-to-1 widget for everything in Ghidra. The Program Tree is one of those elements; it's a bit like our memory map, but it's also kinda not. Our new Binary Ninja layout assumes you've closed the program tree in Ghidra. Now Binary Ninja and Ghidra's sidebars are starting to match by having the symbols view on the top (which we start as a flat listing for you to organize into file yourself), and a different sidebar panel below it. Be sure to check out the options in the Symbols list's hamburger menu (the three lines in the top right). + +#### Cross References and Types Manager + +We show cross references by default, but you can toggle that just by clicking it off on the left side under the divider line. If you want to match how Ghidra has its types showing on the bottom, you can simply drag the types widget to beneath the divider line on the left side. Whenever you open your sidebar, both areas will open together. The Types sidebar also shows you the full type definition when you select a type. + +#### Main Area + +Time for the main event! + +Ghidra shows you a linear view on the left, and single-function-at-a-time decompilation on the right. We already gave you linear decompilation of the whole Binary here by default, so there are three last things to do: + +1. Create a new pane by pressing the icon in the top right that looks like a rectangle with a line through it. The two panes are now synced by address, as you’d expect. +2. In the left pane, find the dropdown that says "High Level IL", and switch down to disassembly. You should now have linear disassembly on the left, and linear decompilation on the right. +3. The final touch is to go back to the decompilation pane on the right and find the hamburger menu for that pane in the top right, and then select “Single Function View.” + +Now the UI should be looking extremely familiar. Read our last couple of tips below, don't forget to use the command palette to find what you want to do, and you'll be off analyzing binaries in no time! + +#### Saving Layouts + +Now that you've done all this hard work to make the perfect layout, it would be a shame to lose it! Thankfully, we make it easy. Go to the `Window` → `Layout` → `Save Current Layout...` and give it a name, or select `Save Current Layout as Default`. Named layouts let you quickly swap between different kinds of work. + +## What You'll Love + +...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: + + - [Updates every day](../../index.md#updates) on the dev branch (nearly) - accepted PRs can be in everyone's hands within hours. + - [Our awesome native Python API](../../../dev/cookbook.md) (and [C++](https://api.binary.ninja/cpp/), and [Rust](https://dev-rust.binary.ninja/)) + - [The speed](https://binary.ninja/2022/05/31/3.1-the-performance-release.html) + - ...not needing to manage Java installations + +--- + +Don't forget to check out our [additional resources](index.md#additional-resources)! diff --git a/docs/guide/migration/index.md b/docs/guide/migration/index.md index 83309c50..03219388 100644 --- a/docs/guide/migration/index.md +++ b/docs/guide/migration/index.md @@ -10,7 +10,7 @@ We have quick start guides for the following: - [New Users](../../getting-started.md) - [IDA Pro Users](migrationguideida.md) -- [Ghidra Users](migrationguideghidra.md) +- [Ghidra Users](./ghidra/index.md) ## Additional Resources diff --git a/docs/guide/migration/migrationguideghidra.md b/docs/guide/migration/migrationguideghidra.md deleted file mode 100644 index 55ccbd3e..00000000 --- a/docs/guide/migration/migrationguideghidra.md +++ /dev/null @@ -1,125 +0,0 @@ -# Migrating from Ghidra - -## Starting Binary Ninja - -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!). - -## Decompiler Settings - -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). - -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.). - -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. - - - -## Keybindings - -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). - -Some of the most useful default keybindings are as follows: - -Analysis Keybindings: - -| Action | Keybinding | -|----------------------|--------------------| -| Rename | `N` | -| Set Type | `Y` | -| Go to | `G` | -| Toggle Disasm/Decomp | `[TAB]` | -| Toggle Graph/Linear | `[SPACE]` | -| Toggle Hex View | `H` | -| Insert Comment | `;` | -| Manage Plugins | `[CTRL/⌘-SHIFT-B]` | -| Open Command Palette | `[CTRL/⌘-P]` | -| Open Python Console | `\`` | - -Types Keybindings: - -| Action | Keybinding | -|----------------------|------------| -| Set Type | Y | -| Make C String | A | -| Make Magic Struct | S | -| Open Types Menu | T | -| Make 1-byte elements | 1 | -| Make 2-byte elements | 2 | -| Make 4-byte elements | 4 | -| Make 8-byte elements | 8 | -| Make array | * | - -Common System Keybindings: - -| Action | Keybinding | -|-------------------|--------------------| -| Open File | `[CTRL/⌘-O]` | -| Open with Options | `[CTRL/⌘-SHIFT-O]` | -| Save | `[CTRL/⌘-S]` | -| Undo | `[CTRL/⌘-Z]` | -| Redo | `[CTRL/⌘-SHIFT-Z]` | -| Find | `[CTRL/⌘-F]` | -| Open Settings | `[CTRL/⌘-,]` | -| Open Keybindings | `[CTRL/⌘-SHIFT-B]` | - -## Layout - -Binary Ninja's layout is also a bit different from what you're used to in Ghidra, but thankfully Binary Ninja's UI is flexible enough to allow us to build something that will feel familiar. - -## Cross-References - -![xref icon >](../../img/xref-icon.png "Xref Icon") - -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. - -### Theme - -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. - -### Feature Map - -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." - -### Sidebars - -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. - -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. - -#### Program Tree - -But first, there are a couple caveats. Binary Ninja does not have an exact 1-to-1 widget for everything in Ghidra. The Program Tree is one of those elements; it's a bit like our memory map, but it's also kinda not. Our new Binary Ninja layout assumes you've closed the program tree in Ghidra. Now Binary Ninja and Ghidra's sidebars are starting to match by having the symbols view on the top (which we start as a flat listing for you to organize into file yourself), and a different sidebar panel below it. Be sure to check out the options in the Symbols list's hamburger menu (the three lines in the top right). - -#### Cross References and Types Manager - -We show cross references by default, but you can toggle that just by clicking it off on the left side under the divider line. If you want to match how Ghidra has its types showing on the bottom, you can simply drag the types widget to beneath the divider line on the left side. Whenever you open your sidebar, both areas will open together. The Types sidebar also shows you the full type definition when you select a type. - -#### Main Area - -Time for the main event! - -Ghidra shows you a linear view on the left, and single-function-at-a-time decompilation on the right. We already gave you linear decompilation of the whole Binary here by default, so there are three last things to do: - -1. Create a new pane by pressing the icon in the top right that looks like a rectangle with a line through it. The two panes are now synced by address, as you’d expect. -2. In the left pane, find the dropdown that says "High Level IL", and switch down to disassembly. You should now have linear disassembly on the left, and linear decompilation on the right. -3. The final touch is to go back to the decompilation pane on the right and find the hamburger menu for that pane in the top right, and then select “Single Function View.” - -Now the UI should be looking extremely familiar. Read our last couple of tips below, don't forget to use the command palette to find what you want to do, and you'll be off analyzing binaries in no time! - -#### Saving Layouts - -Now that you've done all this hard work to make the perfect layout, it would be a shame to lose it! Thankfully, we make it easy. Go to the `Window` → `Layout` → `Save Current Layout...` and give it a name, or select `Save Current Layout as Default`. Named layouts let you quickly swap between different kinds of work. - -## What You'll Love - -...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: - - - [Updates every day](../index.md#updates) on the dev branch (nearly) - accepted PRs can be in everyone's hands within hours. - - [Our awesome native Python API](../../dev/cookbook.md) (and [C++](https://api.binary.ninja/cpp/), and [Rust](https://dev-rust.binary.ninja/)) - - [The speed](https://binary.ninja/2022/05/31/3.1-the-performance-release.html) - - ...not needing to manage Java installations - ---- - -Don't forget to check out our [additional resources](index.md#additional-resources)! diff --git a/docs/guide/settings.md b/docs/guide/settings.md index 83dd742b..c78b2cbd 100644 --- a/docs/guide/settings.md +++ b/docs/guide/settings.md @@ -244,6 +244,7 @@ The setting will appear under the Quick Settings section in the Function Setting |corePlugins|DWARF Import Plugin|Enable the DWARF import plugin.|`boolean`|`True`|[`SettingsUserScope`]|corePlugins.dwarfImport| |corePlugins|EFI Resolver|Enable the built-in EFI Resolver plugin.|`boolean`|`True`|[`SettingsUserScope`]|corePlugins.efiResolver| |corePlugins|Firmware Ninja|Enable the Firmware Ninja plugin.|`boolean`|`True`|[`SettingsUserScope`]|corePlugins.firmwareNinja| +|corePlugins|Ghidra Import Plugin|Enable the built-in Ghidra import plugin.|`boolean`|`True`|[`SettingsUserScope`]|corePlugins.ghidraImport| |corePlugins|IDB Import Plugin|Enable the IDB import plugin.|`boolean`|`True`|[`SettingsUserScope`]|corePlugins.idbImport| |corePlugins|PDB Import Plugin|Enable the built-in PDB import plugin.|`boolean`|`True`|[`SettingsUserScope`]|corePlugins.pdbImport| |corePlugins|Stack Render Layer Plugin|Enable the built-in Stack Render Layer plugin.|`boolean`|`True`|[`SettingsUserScope`]|corePlugins.stackRenderLayer| @@ -582,4 +583,4 @@ The setting will appear under the Quick Settings section in the Function Setting |warp.matcher|Minimum Function Length|Functions below this length will not be matched.|`number`|`0`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|warp.matcher.minimumFunctionLength| |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`]|warp.matcher.minimumMatchedConstraints| |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`]|warp.matcher.trivialFunctionAdjacentAllowed| -|warp.matcher|Trivial Function Length|Functions below this length in bytes will be required to match on constraints.|`number`|`20`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|warp.matcher.trivialFunctionLength| \ No newline at end of file +|warp.matcher|Trivial Function Length|Functions below this length in bytes will be required to match on constraints.|`number`|`20`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|warp.matcher.trivialFunctionLength| -- cgit v1.3.1