mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 05:32:14 +00:00
1.3 KiB
1.3 KiB
Creating and Populating a BSim Database from the Ghidra GUI
This section explains how to create and populate an H2-backed BSim database from the Ghidra GUI.
Creating the Database
To create a BSim database, first create a directory on your file system to contain the database.
Next, perform the following steps from the Ghidra Code Browser:
- Run the Ghidra script
CreateH2BSimDatabaseScript.java
. - In the resulting dialog:
- Enter "example" in the Database Name field.
- Select the new directory in the Database Directory field.
- Don't change any of the other fields.
- Click OK.
Populating the Database
We now populate the database with an executable which is contained in the Ghidra distribution.
- Import and analyze the executable
<ghidra_install_dir>/GPL/DemanglerGnu/os/linux_x86_64/demangler_gnu_v2_41
using the default analysis options. - Run the Ghidra script
AddProgramToH2BSimDatabaseScript.java
on this program.- The script will ask you to select an H2 database file. Use
example.mv.db
in the database directory.
- The script will ask you to select an H2 database file. Use
- In general you can run this script on other programs to add their signatures to this database, but that's not necessary for the exercises in the next section.
Next Section: Basic BSim Queries