Code Monkey home page Code Monkey logo

ghidra2dwarf's Introduction

Ghidra2Dwarf

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:

  1. list <function> to display the function's source code.
  2. n to step one source code line instruction.
  3. ni to step one assembly instruction.
  4. p variable to 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 NationalSecurityAgency/ghidra#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

ghidra2dwarf's People

Contributors

meowmeowxw avatar nextlight avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.