GithubHelp home page GithubHelp logo

rob0tsunny / gdbghidra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from comsecuris/gdbghidra

0.0 1.0 0.0 2.6 MB

gdbghidra - a visual bridge between a GDB session and GHIDRA

License: MIT License

Python 18.59% CSS 3.90% HTML 1.29% Java 76.22%

gdbghidra's Introduction

gdbghidra - a visual bridge between a GDB session and GHIDRA

The purpose of gdbghidra is to provide means during interactive debug sessions in gdb to quickly follow the flow in GHIDRA; similar to our gdbida plugin for IDA Pro. gdbghidra is not meant to be a full debugger. Instead, it merely serves as a small helper tool to assist during interactive debug sessions that make use of a mixture of tools. It provides simple means to quickly follow along a gdb debug session in GHIDRA. Also it does not need any dependencies on the Python side.

gdbghidra consists of the following two parts:

  • dist/ghidra_9.0.1_PUBLIC_*_GDBGHIDRA.zip
  • data/gdb_ghidra_bridge_client.py : gdb python script

data/gdbghidra

Features

  • Sync/colorize cursor inside GHIDRA to PC of GDB session
  • Sync stack to GHIDRA on GDB break
  • Automatically set register values within GHIDRA for better decompilation
  • GHIDRA register window
  • Set/Toggle/Delete breakpoints from GHIDRA
  • Automatic relocation

Installation

Make a change the ~/.gdbinit configuration file to include the plugin:

source ~/gdb_ghidra_bridge_client.py

To install the plugin in GHIDRA follow these steps:

  • Open GHIDRA and select File/Install Extensions.
  • Press the green + button and select dist/ghidra_9.0.1_PUBLIC_*_GDBGHIDRA.zip.
  • Make sure the Plugin has a tick in the box left.
  • Start GHIDRA CodeBrowser.
  • Open File/Configure and press the adapter icon in above left oft 'Ghidra Core'.
  • Filter for gdb and make sure GDBGhidraPlugin is enabled.

Now you should see the GDBGhidraPlugin window. You can now configure the listener port using the configuration button and start the server using the refresh button.

Next, configure the gdb stub to connect to gdbghidras's port (either command line or gdbinit):

ghidrabridge 10.0.10.10:2305

Building

To build this plugin using gradle run the following command inside gdbghidra directory

gradle -PGHIDRA_INSTALL_DIR=<PATH_TO_GHIDRA_FOLDER>

This produces a fresh extension zip within the gdbghidra/dist folder.

Development

If you want to build gdbghidra from source using GHIDRA's eclipse environment make sure to add json-simple-1.1.1.jar to the classpath as follows:

  • Click the Run Menu and select Run Configurations.
  • Navigate to Ghidra/GDBGhidra and select Classpath.
  • Navigate down the list to User Entries, select User Entries and click on ADD JARS....
  • Select lib/json-simple-1.1.1.jar

Between GHIDRA and GDB a simple JSON message format is spoken which could also be used to connect other tools/debuggers to this GHIDRA plugin.

Notes

Please be aware that this is not considered to be finished. Specifically, the following thoughts are on my mind:

  • Network listening input masks untested for errors.
  • The network connection is not authenticated in any way.
  • A lot of potential for additional commands. For now, I kept it super simple.

gdbghidra's People

Contributors

bsw4p avatar rpw avatar

Watchers

James Cloos 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.