All Projects → rizinorg → Rz Ghidra

rizinorg / Rz Ghidra

Licence: lgpl-3.0
Deep ghidra decompiler and sleigh disassembler integration for rizin

Projects that are alternatives of or similar to Rz Ghidra

Pycdc
C++ python bytecode disassembler and decompiler
Stars: ✭ 842 (+76.15%)
Mutual labels:  disassembler, decompiler
Reko
Reko is a binary decompiler.
Stars: ✭ 942 (+97.07%)
Mutual labels:  disassembler, decompiler
Vdexextractor
Tool to decompile & extract Android Dex bytecode from Vdex files
Stars: ✭ 691 (+44.56%)
Mutual labels:  disassembler, decompiler
Replica
Ghidra Analysis Enhancer 🐉
Stars: ✭ 194 (-59.41%)
Mutual labels:  disassembler, decompiler
sleigh
Unofficial CMake build for Ghidra SLEIGH
Stars: ✭ 54 (-88.7%)
Mutual labels:  decompiler, disassembler
BEFA-Library
High-level library for executable binary file analysis
Stars: ✭ 14 (-97.07%)
Mutual labels:  decompiler, disassembler
Befa Library
High-level library for executable binary file analysis
Stars: ✭ 12 (-97.49%)
Mutual labels:  disassembler, decompiler
Il2cppspy
Unity IL2CPP Disassembler (for apk)
Stars: ✭ 213 (-55.44%)
Mutual labels:  disassembler, decompiler
SDA
SDA is a rich cross-platform tool for reverse engineering that focused firstly on analysis of computer games. I'm trying to create a mix of the Ghidra, Cheat Engine and x64dbg. My tool will combine static and dynamic analysis of programs. Now SDA is being developed.
Stars: ✭ 98 (-79.5%)
Mutual labels:  decompiler, disassembler
ethdasm
Tool for auditing Ethereum contracts
Stars: ✭ 52 (-89.12%)
Mutual labels:  decompiler, disassembler
MBBSDASM
MBBSDASM is an x86 Disassembler for 16-bit DOS / Windows 3.0 Segmented Executable (NE) EXE/DLL File Format with special features related to The MajorBBS & Worldgroup Modules
Stars: ✭ 34 (-92.89%)
Mutual labels:  decompiler, disassembler
Decomp
Components of a decompilation pipeline.
Stars: ✭ 343 (-28.24%)
Mutual labels:  decompiler
Ethersplay
EVM dissassembler
Stars: ✭ 304 (-36.4%)
Mutual labels:  disassembler
Wasmdec
WebAssembly to C decompiler
Stars: ✭ 290 (-39.33%)
Mutual labels:  decompiler
Plasma
Plasma is an interactive disassembler for x86/ARM/MIPS. It can generates indented pseudo-code with colored syntax.
Stars: ✭ 2,956 (+518.41%)
Mutual labels:  disassembler
Disasmo
VS2019 Add-in. Click on any method or class to see what .NET Core's JIT generates for them (ASM).
Stars: ✭ 380 (-20.5%)
Mutual labels:  disassembler
Beaengine
BeaEngine disasm project
Stars: ✭ 342 (-28.45%)
Mutual labels:  disassembler
Asmresolver
A library for editing PE files with full .NET metadata support
Stars: ✭ 267 (-44.14%)
Mutual labels:  disassembler
Boomerang
Boomerang Decompiler - Fighting the code-rot :)
Stars: ✭ 265 (-44.56%)
Mutual labels:  decompiler
Octopus
Security Analysis tool for WebAssembly module (wasm) and Blockchain Smart Contracts (BTC/ETH/NEO/EOS)
Stars: ✭ 261 (-45.4%)
Mutual labels:  disassembler
rz-ghidra logo

rz-ghidra

This is an integration of the Ghidra decompiler and Sleigh Disassembler for rizin. It is solely based on the decompiler part of Ghidra, which is written entirely in C++, so Ghidra itself is not required at all and the plugin can be built self-contained. This project was presented, initially for radare2, at r2con 2019 as part of the Cutter talk: https://youtu.be/eHtMiezr7l8?t=950

Installing

An rz-pm package is available that can easily be installed like:

rz-pm -i rz-ghidra

This package only installs the rizin part. To use rz-ghidra from cutter, either use a provided pre-built release starting with Cutter 1.9, which bundles rz-ghidra, or follow the build instructions below.

Usage

Usage: pdg   # Native Ghidra decompiler plugin
| pdg           # Decompile current function with the Ghidra decompiler
| pdgd          # Dump the debug XML Dump
| pdgx          # Dump the XML of the current decompiled function
| pdgj          # Dump the current decompiled function as JSON
| pdgo          # Decompile current function side by side with offsets
| pdgs          # Display loaded Sleigh Languages
| pdg*          # Decompiled code is returned to rizin as comment

The following config vars (for the e command) can be used to adjust rz-ghidra's behavior:

    ghidra.cmt.cpp: C++ comment style
 ghidra.cmt.indent: Comment indent
     ghidra.indent: Indent increment
       ghidra.lang: Custom Sleigh ID to override auto-detection (e.g. x86:LE:32:default)
    ghidra.linelen: Max line length
   ghidra.nl.brace: Newline before opening '{'
    ghidra.nl.else: Newline before else
 ghidra.sleighhome: SLEIGHHOME

Here, ghidra.sleighhome must point to a directory containing the *.sla, *.lspec, ... files for the architectures that should supported by the decompiler. This is however set up automatically when using the rz-pm package or installing as shown below.

Building

First, make sure the submodule contained within this repository is fetched and up to date:

git submodule init
git submodule update

Then, the rizin plugin can be built and installed as follows:

mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
make
make install

Here, set the CMAKE_INSTALL_PREFIX to a location where rizin can load the plugin from. The install step is necessary for the plugin to work because it includes installing the necessary Sleigh files.

To also build the Cutter plugin, pass -DBUILD_CUTTER_PLUGIN=ON -DCUTTER_SOURCE_DIR=/path/to/cutter/source to cmake, for example like this:

/my/path> git clone https://github.com/rizinorg/cutter
/my/path> # build Cutter, clone rz-ghidra, etc.
...
/my/path/rz-ghidra> mkdir build && cd build
/my/path/rz-ghidra/build> cmake -DBUILD_CUTTER_PLUGIN=ON -DCUTTER_SOURCE_DIR=/my/path/cutter -DCMAKE_INSTALL_PREFIX=~/.local ..
/my/path/rz-ghidra/build> make && make install

License

Please note that this plugin is available under the LGPLv3, which is more strict than Ghidra's license!

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].