Giter Site home page Giter Site logo

thomasthaddeus / ghidraautomation Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 22 KB

A quick and simple implementation of reverse engineering with ghidra

License: MIT License

Java 7.64% Python 88.17% Shell 4.20%
cybersecurity decompiler ghidra-scripts java python3

ghidraautomation's Introduction

Code Decompiler CLI

This tool provides a command-line interface (CLI) to automatically decompile binaries using Ghidra.

Prerequisites

  • Ghidra (Version 10.3.2 or newer recommended)
  • Python 3.x

Installation

  1. Ensure Ghidra is installed on your system.

  2. Update the GHIDRA_PATH variable in the decompile_cli.py script to point to your Ghidra installation directory.

  3. Clone this repository or download the necessary scripts (decompile_cli.py and ExportDecompiledCode.java).

  4. Optionally, run the install_tools.sh script to copy the necessary files to the correct location (if provided):

    chmod +x install_tools.sh
    ./install_tools.sh

Usage

Once installed, you can use the decompile_cli.py script to decompile binaries:

python3 /usr/local/bin/decompile_tools/decompile_cli.py -b <path_to_binary> -o <output_directory>

Arguments:

  • -b or --binary: The path to the binary you want to decompile.
  • -o or --output: The directory where you want to save the decompiled code.

Features

  • Automated decompilation without having to manually open Ghidra.
  • Outputs Ghidra's stdout and stderr for debugging purposes.
  • Saves decompiled code to the specified directory.

Limitations

  • Currently, the tool supports ELF binaries for 64-bit Linux systems. Support for other binary formats and platforms may be added in future versions.
  • The tool assumes Ghidra's analyzeHeadless script is accessible through the specified GHIDRA_PATH.
  • The ExportDecompiledCode.java script should be located at ../java/ExportDecompiledCode.java relative to the decompile_cli.py script, or its path should be updated in the script.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss proposed changes or report bugs.

License

This tool is released under the MIT License. See LICENSE for more details.

ghidraautomation's People

Contributors

thomasthaddeus avatar

Stargazers

 avatar

Watchers

 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.