A Python-based tool to synchronize Ghidra and x64dbg/x32dbg with minimal setup.
This tool allows users to:
- Track the current instruction pointer from x64dbg inside Ghidra in real time
- Automatically rebase loaded modules in Ghidra to match x64dbg
- Export function symbols from Ghidra to x64dbg for clearer labeling and analysis
Install the package and download Python dependencies:
git clone https://github.com/totekuh/x64dra
pip3 install .
For running this package, you'll need to configure ghidra-bridge
and LyScript
:
Install the server scripts into a directory that's part of Ghidra’s script path (e.g. ~/ghidra_scripts
).
Note that you can add script directories in Ghidra via the Script Manager (click the three-line menu icon next to the red "+" button).
python3 -m ghidra_bridge.install_server C:\Users\<YourUsername>\ghidra_scripts
In Ghidra's Script Manager, select the Bridge
folder, then check the In Tool
box next to ghidra_bridge_server_background.py
and ghidra_bridge_server_shutdown.py
.
This makes them accessible from Tools → Ghidra Bridge
in the menu.
Download the LyScript plugin (or use the local copy in lib/LyScript.zip
, SHA256 hash: 4a616b8d6d615847317ca5a696015dadfcffbb8628ecd999aaaaf3abbd32d71e) - http://lyscript.lyshark.com/LyScript.zip
Inside, you'll find x32
and x64
folders—pick the right one for your x64dbg debugger:
Extract the following files:
LyScript.zip\LyScript\1.1.0\x32\LyScript
LyScript.zip\LyScript\1.1.0\x32\LyScript.dp32
to the following folder:
x64dbg\release\x32\plugins\
Extract the following files:
LyScript.zip\LyScript\1.1.0\x64\LyScript
LyScript.zip\LyScript\1.1.0\x64\LyScript.dp64
into the following folder:
x64dbg\release\x64\plugins\
- Load your binary in Ghidra.
- Load the same binary in x64dbg (x32dbg or x64dbg depending on architecture).
In Ghidra, click on Tools
-> Ghidra Bridge
-> Run in Background
to start the bridge server.
Now that both tools are prepped, run the sync tool from terminal:
x64dra --sync
Rebase loaded Ghidra modules to match x64dbg:
x64dra --rebase
Export function symbols from Ghidra to x64dbg
x64dra --ghidra-export-symbols
Print help:
x64dra --help