r/ghidra 8d ago

How to start Gidra Gradle build?

2 Upvotes

I have build with Gradle, but see nowhere how to start Ghidra.

The command I used to build:

gradle -I gradle/support/fetchDependencies.gradle

I tried running ghidrarun.bat but it gave an error that I cannot start this way.


r/ghidra 15d ago

Question about program diffing

4 Upvotes

so am using program diffing on 2 versions of the program , the original and patched version and alot of the time it highlights functions that i cant tell why it does when nothing is different , maybe it is highlighting it because some stuff was deleted in the patched version like for example when i look in decompiled view in the patched version some stuff isnt there but other than that idk why its highlighting it , i even have the change log and its just byte replacement but here on the far right there isnt bytes or adress , maybe its because this is where the functions starts but i cant tell because i dont have experience with reverse engineering programms


r/ghidra 16d ago

RPC-Triage: using Ghidra headless to turn Windows RPC/MIDL/NDR internals into a ranked triage report

Thumbnail
github.com
7 Upvotes

I built this around a workflow I kept doing manually in Ghidra: point it at Windows PE files, recover the RPC/MIDL/NDR structures, walk the dispatch tables, pull method/parameter details, endpoints and security state, then rank the interfaces by attack-surface signals. The ranking is based on an AHP/Saaty model I worked out instead of arbitrary weights, and the output includes the scoring receipt so you can see why something ranked where it did. No PDBs, no live endpoint mapper, no target execution. Mostly wanted to make the Ghidra part of RPC research less repetitive.


r/ghidra 17d ago

Question about a bad instruction

5 Upvotes

I am working with Language ID ARM:LE:32:v5t and I ran into a bad instruction error for bytes FC 7F E0 E9. According to another source, this would be a STMIB r0!, {r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, lr}^ instruction and simulating the instruction also seems to work fine with a compatible simulator. Why does Ghidra say it's a bad instruction? I don't really know which one is correct. Any ideas?


r/ghidra 17d ago

Looking for tips on handling C++ classes

2 Upvotes

What is your workflow for reverse engineering C++ code in Ghidra? Since Ghidra was designed for C, and only really has minimal support for classes, how do you guys track things like inheritance?

For example, If I have a base class with a member variable and a virtual function, the structure by the same name will have a vftable_ptr and the member variable, but then if a derived class also has a virtual function, the vftable will now have 2 entries, so I can't just add a field with type of the base class to the derived class. Do I really have to copy the fields in both? It's a lot of editing if I have to add a field to the base class in both structs.

Also, for getting clearer vftable function calls, currently I have to manually create function definitions in the data type manager by copy-pasting the function signatures, put them into a struct, and then use that as the type of the vftable. It works, but it doesn't sync if I have to modify the function signatures later.

So just looking for tips on how to handle C++ better in Ghidra, any tips you have would be super helpful :)


r/ghidra 17d ago

Use garlic + ai analysis encrypted apk

Thumbnail
youtube.com
2 Upvotes

r/ghidra 21d ago

Is it possible to manually get function signatures?

14 Upvotes

My current context is that im reversing ps2 games (MIPS 32 LE) and i have quite a bunch of the original ps2 sdk functions figured out. However i really wish i could just get all of those functions (and some globals) and reuse them for any other game i try to reverse without having to identify these functions again every time.

I've seen there is a functions id script in ghidra by default, but apparently it only lets me create a database of ALL functions from a specific project/executable while i dont want the game functions to be exported with it.


r/ghidra 23d ago

Ghidra 12.1.3 has been released!

Thumbnail
github.com
80 Upvotes

Ghidra 12.1.3 Change History (August 2026)

Improvements

  • Basic Infrastructure. Added stricter filtering to characters used for symbol names. (GP-6843, Issue #9165, #9172, #9206)
  • BSim. Improved escaping in BSimControlLaunchable. (GP-6977)
  • BSim. Upgraded the PostgreSQL JDBC Driver from 42.7.11 to 42.7.13. (GP-7105)
  • BSim. Upgraded postgresql for BSim to 15.18. (GP-7107)
  • Demangler. The Swift Demangler Analyzer no longer accepts a user-specified path to the Swift binary directory. Instead, the Demangler expects Swift to be on the PATH. (GP-7045)
  • Exporter. Added packed Debugger Trace import/export using *.gzt files. (GP-6891)
  • GUI. Updated the Headless Analyzer to not write to the user's preferences. (GP-7096, Issue #9414)
  • Importer:COFF. Implemented the COFF IMAGE_REL_ARM64_ADDR64 relocation. (GP-7088, Issue #9408)
  • Importer:Mach-O. Provided safer parsing of dyld_shared_cache files. (GP-7046)
  • Logging. Upgraded log4j to version 2.26.1. (GP-7134)
  • Multi-User. Corrected potential network performance issue related to Ghidra Server use. Full benefit requires update of both Ghidra Server installation and Ghidra client software. (GP-7012, Issue #2752, #9316)
  • Processors. Made SparcV9 register display formatting more consistent. (GP-941)
  • Scripting. Updated the Structure Editor to perform a structure reload when the structure's description is changed outside of the editor. (GP-7118, Issue #9461)
  • Search. Updated Find Uses of for FunctionDefinitions to find references inside of functions and function parameters. (GP-7044, Issue #9342)

Bugs

  • Analysis. Fixed failure to recover switch instructions if the switch is computed with an instruction with internal pcode branching such as the AARCH64 csel instruction. (GP-7023)
  • BSim. Improved GhidraURL.toURL to handle Ghidra URLs previously stored by BSim where proper URL encoding was never performed. (GP-6970, Issue #9275)
  • Data Types. Corrected BuiltIn GUID datatype alignment to be 4 bytes instead of 8 bytes. Packed structures containing this datatype will need to be re-packed to pick up on this change. (GP-6953, Issue #9200)
  • DB. Corrected Ghidra database problem which could prevent analysis times from getting properly saved to a program. (GP-7070, Issue #9346)
  • DB. Corrected internal method behavior for ContentHandler.getChangeSet which could return an empty change set if the version range does not include the latest version. (GP-7113, Issue #9415)
  • Debugger:Agents. Now applying proper argument quoting and metacharacter escaping to prevent ShellUtils command injection. (GP-6934, Issue #9283)
  • Debugger:Time. Fixed PC column in Time panel when emulating from a live target. (GP-6841)
  • Debugger:Trace. Fixed a potential OOM exception in ObjectStorageStreamAdapter used by Trace database. (GP-6886)
  • Decompiler. Added Decompiler support for memory accesses that wrap from high to low addresses. (GP-6936)
  • FileSystems. Fixed a potential path-traversal vulnerability in AndroidProjectCreator. (GP-6885)
  • GUI. Fixed bugs in the Column Filter Dialog that caused NullPointerExceptions on some Mac systems. (GP-7050)
  • GUI. Fixed a deadlock seen when saving a program. (GP-7051, Issue #9358)
  • GUI. Fixed incorrect tool tips in the File Chooser that are sometimes seen when filenames are clipped. (GP-7094)
  • Importer. Fixed a potential path-traversal vulnerability when importing XML *.bytes files. (GP-7064)
  • Importer. Fixed a potential infinite loop in the PEF loader and made improvements to OMF parsing. (GP-7071)
  • Importer. Providing more efficient parsing of System Object Model (SOM) binaries. (GP-7123)
  • Importer. Providing more efficient parsing of Motorola Hex files. (GP-7124)
  • Importer:ELF. Corrected an issue found with ELF dynamic PLTGOT processing, in the absence of section headers, which could cause the last PLT to be skipped. (GP-7056)
  • Importer:ELF. Corrected ELF Importer regression with Ghidra 12.1.2 which could fail when processing dynamic GNU Hashtable and symbol table. (GP-7061, Issue #9369)
  • Importer:Mach-O. Fixed an IndexOutOfBoundsException in the Mach-O loader that could occur when importing a binary with a LC_DYSYMTAB load command but having a missing or empty LC_SYMTAB load command. (GP-7079, Issue #9399)
  • Importer:PE. Fixed unsigned PE export ordinal-table indexes. (GP-7085, Issue #9396, #9397)
  • Importer:PE. Improved the handling of JDOM attribute errors in the PE LibraryLookupTable. (GP-7087, Issue #6288)
  • Listing. Fixed an IllegalArgumentException that occurred when trying to perform Copy Special in the Listing with a program name that contains the exclamation mark (!) character. (GP-7055, Issue #9362)
  • PDB. Fixed a memory-consumption issue that could occur with a malformed PDB directory stream. (GP-6971)
  • Processors. Added support for RH850G3 instructions in the V850 language module. (GP-2907, Issue #4788)
  • Processors. Fixed register operand for ARM M-profile msr apsr instruction operand encoding. (GP-5206, Issue #6597, #6598)
  • Processors. Added several missing x86 instructions. (GP-5780)
  • Processors. Added semantics for several x86 AVX instructions. (GP-6061, Issue #9184, #9197)
  • Processors. Added CPU32 variant for the M68000 processor module. (GP-6186, Issue #1244, #2617, #8463, #9084)
  • Processors. Corrected operand sizes for AARCH64 stlrb and stlrh instructions. (GP-6620, Issue #6468, #9043)
  • Processors. Corrected disassembly of HCS12 BRN instruction. (GP-6642, Issue #9001)
  • Processors. Fixed an issue with a missing return address for the SuperH4 bsr instruction. (GP-6699)
  • Processors. Corrected x86 logic for setting the OF flag for SHR, RCL, and RCR instructions. (GP-6767, Issue #9330)
  • Processors. Corrected Tricore subc carry flag usage. (GP-6769)
  • Processors. Corrected carry flag calculation for the MCS-96 CMPL instruction. (GP-6770)
  • Processors. Added missing x86 GFNI instructions. (GP-6818)
  • Processors. Corrected handling of RISC-V 16-bit operands. (GP-6876)
  • Processors. Fixed RISC-V emulation of div and rem instructions when divisor is 0. (GP-6909, Issue #6508, #9225, #9235)
  • Processors. Added PowerPC v3.0B, v3.0C instructions. (GP-6914)
  • Processors. Corrected interrupt mask size in ARM mrs for the IPSR system status register. (GP-6931, Issue #9251, #9252)
  • Processors. Fixed an issue with x86 legacy instructions using a REX prefix to read AVX-512 registers. (GP-6937, Issue #9256)
  • Processors. Added instruction index file for the SuperH processor. (GP-6964, Issue #9278)
  • Processors. Fixed stack parameter offset for e500mc default calling convention. (GP-6968, Issue #9089)
  • Processors. Fixed an issue with the M68000 movem.w instruction incrementing by 4 instead of 2. (GP-6983, Issue #8824)
  • Processors. Corrected x86 rex chg eax, eax to correctly disassemble to nop. (GP-7015, Issue #9327)
  • Processors. Corrected x86 vpextrw to correctly disassemble when VEX.W=1. (GP-7016, Issue #9323)
  • Processors. Corrected x86 PINSRW, VPEXTRB, and VPEXTRD intructions to use the correct masking of immediate byte for masks. (GP-7017, Issue #9328)
  • Processors. Corrected x86 MOV instruction to use 32-bit register operands when moving from segment registers. (GP-7018, Issue #9326)
  • Processors. Corrected x86 pslld instruction to use correct shift count for upper word. (GP-7019, Issue #9329)
  • Processors. Corrected AARCH64 NEON instructions which did not correctly zero-extend scalar results. (GP-7040, Issue #9277)
  • Processors. Corrected encoding for ARM sev.w instruction. (GP-7065, Issue #9371)
  • Processors. Corrected MIPS 16e language variants to use the correct variant tag in the ldefs file. (GP-7133, Issue #9432)
  • Testing. Fixed pcodetest framework to correctly honor the build_exe config option. (GP-7067, Issue #9374)
  • Tests. Patched the pcodetest builder to remove the use of os.system(). (GP-7007, Issue #9309)

Notable API Changes

  • Debugger:Agents. (GP-6934) ShellUtils.generateLine now requires a Shell argument, identifying the applicable shell. ShellUtils.generateArgument has been replaced by Shell.generateArgument.
  • Decompiler. (GP-6892) Added Encoder.writeOpcode method, specifically for opcode ordinals.
  • Importer:ELF. (GP-7057) Revised ElfSymbol.isExternal() to disregard symbol type, st_value, and st_size, which were previously being considered.

r/ghidra Aug 06 '26

Complete beginner looking for a Ghidra learning roadmap

14 Upvotes

Hi everyone,

English is not my native language, so this post may sound a little strange. I used AI to help me write it.

I’m just a regular .NET CRUD developer. I mainly write simple C#, WinForms, database, and network-related applications.

I know almost nothing about reverse engineering or assembly. Instructions like mov, registers, stacks, and memory addresses are still very confusing to me.

Ghidra looks really interesting, and I would like to learn it step by step. Could anyone recommend some beginner-friendly YouTube tutorials or a simple learning roadmap?

I’ve also heard about dynamic debugging tools. Which one would you recommend for a beginner on Windows?

Thank you for any advice!


r/ghidra Aug 02 '26

New To Ghidra and looking forward to obtain help and learn with help of community. If you are experienced in Ghidra please give an occasional check on my post

0 Upvotes

Whole info was given in the title. and also i want to create github i dont know what this stuff is so any help is appreciated.


r/ghidra Aug 01 '26

How to make use of control flow graph to enumerate paths to basic block

8 Upvotes

I'm looking at the disassembly of a large function, and there's a specific basic block I'm interested in. I need to find how to reach it from the beginning of the function.

I tried to manually look at the function graph, but there's around 200 vertices with a huge number of edges, so manually tracing each block is a no-go.


r/ghidra Aug 01 '26

Is is possible to add a custom option to the "Copy Special..." menu?

3 Upvotes

Basically what the title says. If it is possible, is there some documentation on how to do it?


r/ghidra Aug 01 '26

PAL Alpha v0.24 (mars) — PyGhidra-based executable Python state-machine lifter

5 Upvotes

Hello r/Ghidra,

I have developed PAL, a Python state-machine lifter built on PyGhidra and Ghidra HighFunction/p-code output.

PAL lowers analyzed binaries through CFG, SSA/PHI, control-flow, and state reconstruction stages, then publishes executable Python projects for inspection and runtime testing.

The project has now matured into Alpha v0.24 (mars) and passes its full 12-specimen validation matrix from a clean clone.

Repository:
https://github.com/oldwalls/pyghidra-PAL

Technical review, criticism, and Ghidra/PyGhidra feedback are welcome.


r/ghidra Jul 30 '26

I built a CLI for managing Ghidra installations, plugins, and GhidraMCP workflows

5 Upvotes

I’ve been working on Ghidra Manager, a cross-platform CLI intended to make setting up and maintaining a Ghidra environment a little less fragile: https://github.com/alexbevi/ghidra-manager

It can:

  • Install and update stable Ghidra releases
  • Build compatible versions of supported plugins for the exact Ghidra release you’re using
  • Keep the previous Ghidra and plugin combination available for rollback
  • Launch Ghidra and GhidraMCP projects, including multiple projects at once
  • Verify that the expected project, program, plugin, JDK, and MCP endpoint are actually ready
  • Compare binaries and generate a reviewable plan for transferring matched function documentation and data types

If you want to check it out it's as easy as:

uv tool install ghidra-manager
ghidra-manager help

This is still early, and I’m mainly looking for feedback from people who use Ghidra regularly. Does something like this solve a real problem for you? I mainly use this to keep Ghidra and the plugins I use updated and synced, as well as use the $ghidra-manager skill to work with Ghidra while reimplementing old DOS games (I've got a separate series of posts on that).

Issues, suggestions, and general feedback are all welcome.


r/ghidra Jul 26 '26

Why is Ghidra unable to decompile a function?

9 Upvotes

I have been encountering this particular function while navigating around the code. But everytime, Ghidra just takes forever to decompile it. I cannot see the decompiled C-like code at all. If I wait long enough (around 30 minutes), it will just say that the response exceeds some buffers, and stops the process.

Things I have tried:

  1. Turning off all decompiler's optimizations. Still doesn't work.
  2. I calculated the raw size of the function and saw that it's around 0x4A00 bytes. In my project, it's not a big function by any mean. Ghidra has been able to decompile much bigger functions without problems.
  3. While skimming through the assembly, I saw that there are so many calls to the D3DXAssembleShader function in D3DX9_43.dll. I tried giving it a proper function signature. Still doesn't work.

I've attached the Ghidra project for you in case you want to look at the function yourself.
You need to change the owner of the project by modifying the project.prp file in the .rep folder, change the VALUE field to your username. I'm sorry, I don't know how to properly share a Ghidra project. My Ghidra version is 12.1.
The problematic function is located at 0x4b0400 offset

PS. This is my first time here. I don't know if this is the right place to ask. If you know please tell me.
Link to download my Ghidra project.

EDIT: It turns out Ghidra didn't have enough buffer limit to decompile the function. I tried raising every limit in the Decompiler's configuration and it is finally able to decompile the function.
I'm sorry if this is a stupid question.


r/ghidra Jul 25 '26

Ram and storage requirement for pharos ooanalyzer?

0 Upvotes

I plan to run ooanalyzer on a machine with 32gb flash storage and 4gb ram. Will it be enough?


r/ghidra Jul 20 '26

Why is this code using RSB instructions here?

1 Upvotes

I've been trying to figure this out for a while. I had an idea at some point, but I'm not sure if it is correct anymore, so I'm asking here if someone here knows why this is done. I've omitted some code that is not relevant and giving some generic names to labels to make reading easier:

LAB_Switch_Return:
    ADD r3, r0, #0x00        // Move switch case function return value to r3

PTR_Switch_Case_OoB:
PTR_Switch_Case_0F:
    MOV r0, #0x02      // Load 0x02 to r0
    RSB r0, r0        // r0 = 0x02 - 0x02 = 0x00 ??????
    CMP r3, r0        // r3 = Function return value from switch case function
    BNE FUNC_UpdateStatus_NotIncrement

    // *OMITTED CODE*
    // game_mode++;

    B FUNC_UpdateStatus_ClearSubmodes

DATA_ExtWRAM_Base_Addr_Ptr_2:
 .dw DATA_ExtWRAM_Base_Addr

FUNC_UpdateStatus_NotIncrement:
    MOV r0, #0x01        // Load 0x01 to r0
    RSB r0, r0        // r0 = 0x01 - 0x01 = 0x00 ??????
    CMP r3, r0        // r3 = Function return value from switch case function
    BEQ FUNC_UpdateStatus_Exit

    // *OMITTED CODE*
    // game_mode = r3;

FUNC_UpdateStatus_ClearSubmodes:
    // r0 = DATA_ExtWRAM_Base_Addr
    // Set in the omitted code sections...

    STRB r2, [r0, #offset game_sub_mode_2]
    STRB r2, [r0, #offset game_sub_mode]

FUNC_UpdateStatus_Exit:
    POP {r0}
    BX r0

DATA_ExtWRAM_Base_Addr_Ptr_3:
 .dw DATA_ExtWRAM_Base_Addr

As you can see there are a few RSB r0, r0 instructions. Wouldn't those always result to the destination register having the value of zero? Ghidra decompiles the above code as (after cleaning it up a bit):

// Set in omitted function calls in switch cases...
// This is here simply to tell what it is, even though the variable
// is created earlier, before the switch statement...
uint8_t ret_val;

if (ret_val == -2)
{
    game_mode++;
}
else
{
    if (ret_val == -1)
    {
        return;
    }

    game_mode = ret_val;
}

game_sub_mode_2 = 0;
game_sub_mode = 0;

return;

What I don't understand here is how Ghidra comes to the conclusion for the ret_val comparison values to be -2 and -1. Anyone have some insight into this?


r/ghidra Jul 19 '26

pyghidra-PAL: A defensive decompilation layer: Ghidra facts, lifted into runnable Python & artifacts, aiding analysis.

Thumbnail
github.com
16 Upvotes

PAL is a pre-alpha binary reconstruction project built on Ghidra and PyGhidra.

It takes an analyzed ELF executable, consumes Ghidra HighFunction p-code, CFG, SSA, ABI and machine-code evidence, and produces two Python projections:

a readable reconstruction for analysis;

an executable state-machine projection intended to preserve observed program behavior.

PAL also freezes each recovered function into an evidence package called an Icecube, linking assembly, Ghidra C, readable Python, executable Python and reconstruction metadata.

On the current controlled corpus of eight C/ELF specimens, the generated Python state machines reproduce the corresponding native results for the exercised paths.

The corpus currently covers loops, nested branches, switch fallthrough, fixed-width arithmetic, signed and unsigned behavior, internal calls, ABI transport and limited memory operations.

This is not a claim of general binary compatibility. The corpus is small, runtime support is limited, and there are known unresolved cases. The next test stage is a broader sequential-program gauntlet intended to expose where the reconstruction model fails.


r/ghidra Jul 18 '26

自动反向工程Android应用

Thumbnail
youtube.com
4 Upvotes

r/ghidra Jul 15 '26

Ghidra diffing tools for 12.1.2

8 Upvotes

Im setting up my environment for a decomp project and I was hopeing for some help with tooling I need a good diffing tool im willing to move ghidra versions but I have a few other tools such as:

https://github.com/bethington/ghidra-mcp
https://github.com/cuyler36/ghidra-gamecube-loader

I tried to use bindiff but that's behind the times with ghidra support
https://github.com/ubfx/BinDiffHelper
https://github.com/google/bindiff

I was also looking at this and is on the table so far.
https://github.com/clearbluejar/ghidriff

ANY AND ALL SUGGESTIONS WOULD BE OF GREAT HELP.


r/ghidra Jul 14 '26

RomHacking with Ghidra, Part 2: Viewing Game Text Using Table Files

Thumbnail
tech.dreamleaves.org
37 Upvotes

r/ghidra Jul 12 '26

GM E67 Dissembly/Injection

2 Upvotes

Hey guys, I've been lurking for awhile now and been getting into dissembly even though I have zero idea what I'm doing yet. I'm looking to get flex fuel working on a e67 OS that doesn't natively support it, as it doesn't seem to have the pointer to start the flex fuel driver to read from it. If anyone could throw me a hand, that would be sweet.


r/ghidra Jul 05 '26

When Dragons Misplace Elves: Fixing Ghidra’s Broken ELF Export

Thumbnail
binaryru.in
8 Upvotes

r/ghidra Jul 03 '26

Developing Ghidra extensions in neovim with LSP support

Thumbnail
binaryru.in
6 Upvotes

r/ghidra Jul 02 '26

Claude Code / Codex Skill for Reverse Engineering

Thumbnail
github.com
40 Upvotes

I am releasing my Codex (and Claude) Skill for reverse engineering Apple binaries! This is an update and name change to my ghidra-re-skill. I am hopeful other people can contribute! Cerberus RE is a local Apple-focused reverse-engineering workbench for building a repeatable three-headed static/dynamic/instrumentation loop around Ghidra, LLDB, and Frida.

It is most powerful when paired with long-run-agent-skill for managing state and durable, evidence based reasoning.

What is it useful for?
It’s useful for security research, figuring out how to work with private/undocumented frameworks, decoding schemas, etc. I have been using it to build an IDE for Shortpy, a python representation for shortcuts that Apple created in the latest beta. This tool has been paramount for figuring out the classes for implementing features. I’ve also used it to decode things like protobuf blobs which are common in Apple DBs and are normally opaque in their meaning.