cesena/ghidra2dwarf
์๊ฐ
๐ Export ghidra decompiled code to dwarf sections inside ELF binary
๋ณด์ ๋ฐ ๊ฐ์ธ์ ๋ณด ๋ณดํธ์ธก์ ๋ ์คํ ์ฆ๊ฐ
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +2
- in 1 month
- ๊ธฐ๋ก ์์ง ์ค
์๋ก ๊ฒน์น๋ ๊ธฐ๊ฐ์ ์์ฆ๊ฐ๋์ด๋ฉฐ ์ผ๋ณ ํฉ๊ณ๊ฐ ์๋๋๋ค. ์ธก์ ๊ฐ์ด ์์ผ๋ฉด ๋น์ ๋ก๋๋ค. ์คํ๋ ๊ด์ฌ๋๋ฅผ ๋ํ๋ด๋ฉฐ ํ์ง์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
README.md
OriginalGhidra2Dwarf

Inspired by: dwarfexport
Contributions are welcome, feel free to open an issue if something is broken.
Ghidra2Dwarf is a ghidra plugin that allows to exports informations (such as functions, decompiled code, types) from ghidra to dwarf sections inside ELF binaries.
More specifically it exports inside a source file named ${program}_dbg.c all the decompiled
functions, and create an ELF binary named ${program}_dbg that can be used to
do source code level debugging.
Example:

Inside gdb now you can use:
list <function>to display the function's source code.nto step one source code line instruction.nito step one assembly instruction.p variableto print the variable's value.
Install
- Unzip the latest release.
- In the script manager -> script directories add the extracted directory:

Run
Run ghidra2dwarf.py inside the script manager:

Headless mode
This mode only works in ghidra 9.1.2 at the moment https://github.com/NationalSecurityAgency/ghidra/issues/2561
Linux
If you saved the project and ghidra is closed, you can launch ghidra2dwarf.sh to run ghidra in headless mode and export the dwarf informations:
$ ./src/ghidra2dwarf.sh <Project directory> <Project name> <Binary path> <Binary>
$ # Example: ./src/ghidra2dwarf.sh ~/.local/share/ghidra/ TEST ~/CTF/ chall
Windows
TODO
๊ด๋ จ ํ๋ก์ ํธ ์ดํด๋ณด๊ธฐ
๋ถ๋ฌ์ค๋ ์คโฆ