Questions tagged [ghidra]

Use this tag when asking questions related specifically to the NSA's Ghidra reverse engineering tool.

Filter by
Sorted by
Tagged with
1
vote
1answer
606 views

Way to get all the function prototype using Ghidra

I have been trying to extract the function prototypes from a binary file using Ghidra. Up till now what I have done was to use Ghidra's included "Decompile" script and filtered out the function ...
1
vote
1answer
1k views

How do I read this decompiled code?

I want to know what command line arguments are accepted by an application. I have decompiled it using Ghidra and found a function called ParseCommandLine, but I don't understand what it is doing. I ...
1
vote
1answer
268 views

With ghidra/x64dbg sync, how to display dynamic values in ghidra's decompile window?

I'm reversing a program and a library without debugging symbols. I'm using x64dbg to break at specific regions and observe what is happening at runtime, and annotate the decompile version in ghidra. I'...
1
vote
2answers
387 views

What does this decompiled line mean?

__dest = (byte *)(**(code **)(*plVar5 + 0x10))(plVar5,(ulonglong)(numBytes + 1)); memcpy(__dest,param_2,numBytes + 1); Can someone please explain what the first line does step by step? I get that ...
1
vote
1answer
801 views

Ghidra can't Decompile kernelbase.dll exported functions?

I was trying to understand the IsDebuggerPresent() function exported by kernelbase.dll by importing the file on Ghidra. But Ghidra can't show me the proper disassembly or decompilation of function ...
1
vote
3answers
1k views

Cyber security student wanting to start learning reverse engineering [duplicate]

I'm really interested in learning reverse engineering. Especially in regards to malware. Any help is much appreciated What should I learn before I start to learn reverse engineering? Is learning C/...
1
vote
1answer
367 views

Ghidra add data types from open source project

I know that the program I am decompiling uses openSSL. I'd like to add the types from the include folder of the project to the data types. To do that, I use File => Parse C Source. I then select ...
1
vote
1answer
190 views

Finding Ropper/ROPgadget offsets in Ghidra disassembly

How is the offsets returned from ROP gadget finders related to the files they come from? For example, if the ROP gadget finder says that a certain gadget is at offset 0x0002ae74 in libuClibc.0.9.3.so ...
1
vote
1answer
126 views

How to create an uninitialized variable in Ghidra?

The code under inspection is a native Android library used in an Android application. The decompiler is showing me a lot of lines in the style DAT_12345678 = 0x12345678 with ascending addresses. I ...
1
vote
1answer
102 views

Specify which analyses to perform in Ghidra headless mode

Basically, Ghidra in headless mode is divided into three phases: preScript, analysis, and postScript. Pre/post scripts are written extending the GhidraScript class, while analysis ones extend the ...
1
vote
1answer
113 views

What does the “=>” sign means in ARM assembly LDR?

what does this arm instruction means? LDRB param_1,[r12,r5]=>local_b0 In particular I don't understand the "=>local_b0" part. Ghidra decompiles it to local_b0._0_1_ = *(byte *)((int)&...
1
vote
1answer
263 views

Ghidra wrong function arguments and returns

I'm a newbie here but I'm stuck with this problem. I'm trying to decompile a function that in turns call another function (named charTranslateToHex). This is the charTranslateToHex assembly code ...
1
vote
1answer
228 views

Ghidra python - get string x-refs in a binary

In Ghidra, there is Defined Strings window, that lists all the strings in the binary and their location. I want to access the strings from Ghidra Python, and to get all the x-refs to those strings. ...
1
vote
1answer
255 views

Defining all undefined functions

I analyzed a binary, and lots of functions weren't detected as such - the bytes weren't detected as assembly. I read about the Aggressive Instruction Finder analysis and used it. Now the instructions ...
1
vote
1answer
201 views

Statically Reverse Engineering Shellcode - IDA to Ghidra

I'm trying to follow along with this tutorial which is using IDA in it's example. https://0ffset.net/reverse-engineering/malware-analysis/common-shellcode-techniques/ Hash: ...
1
vote
1answer
677 views

Segmentation fault after export binary file in Ghidra even without any changes [closed]

I trying solve some https://crackmes.one/ simple quests. I newbie on it. But after export binary file (even without any changes), when I run the program in the terminal, I get the message "...
1
vote
1answer
49 views

How to turn off XREF comments in Ghidra's disassembly view?

Sometimes a function will have a series of XREF comments next to it in the disassembly view such as in the following example: ******************************************************...
1
vote
1answer
80 views

Compiled binary functional comparison through different versions / assembled functions

Good Day! I've not hit upon a solution to compare different compiled binaries for identical functions. Take, say, BusyBox. A very common application with a rich history and source code. Say take 3 ...
1
vote
3answers
547 views

Ghidra Python - Get x-refs of a specific function

What is the best way to get calling x-refs for a specific function? I am aware of the following method: func = getFirstFunction() while func is not None: func_name = func.getName() if ...
1
vote
1answer
685 views

Understanding ghidra disassembly

I'm kind of new to assembly and ghidra as a tool. I have a question about the meaning of this line Mov dword PTR [ESP] => local_70 , eax I get we are moving eax into the left side but I'm not ...
1
vote
1answer
503 views

Weird Ghidra decompiler output for simple crack me

Here is the Ghidra decompiler output for a crackme problem. Specifically, this one: Code: undefined8 entry(undefined8 param_1,char *param_2) { int iVar1; size_t sVar2; char *pcVar3; char *...
1
vote
3answers
317 views

What is the difference between malware that is 'dumped' and one that is 'unpacked'?

On malware sharing communities, I have been noticing that the samples shared are marked as unpacked or dumped. I have tried to load the dumped malware in IDAFree, however, there is nothing in the ...
1
vote
1answer
537 views

How can I debug Ghidra plugin Python scripts in IDE?

I'd like to debug Ghidra plugin scripts written in python using an IDE such as Eclipse. I have installed Pydev and the GhidraDev plugin (from Ghidra open a script in Eclipse to autoinstall the plugin)...
1
vote
1answer
70 views

Accessing Call String of CALLOTHER Pcode Instruction via Java API?

Is there a way to access the call string of a CALLOTHER Pcode instruction when iterating over the Pcode in Java? The listing below shows an example of what I mean: 048 ...
1
vote
1answer
142 views

ghidra scripting: how to distinguish between function and global symbol

I have a following program: int b2[4]; int foo() { static int b2[10]; b2[5] = 4; } int main() { static int b2[10]; int b[5]; b[0] = 1; b2[9] = 4; int *ptr = b; int c = *(ptr + 10); ...
1
vote
1answer
433 views

How to open new window of decompiler or resize the decompiler of Ghidra?

This is very small and inconvenient to read. How do i open new Window (any shortcut key) or resize it, for some reason i cant resize. Any help? EDIT: Oh thanks Shane Riley, i clicked the blue button ...
1
vote
1answer
117 views

How to enlarge block in Ghidra's Function Graph View?

I can't seem to figure out how to do such a trivial task: Basically, how can I enlarge a block in Ghidra's Function Graph View so that I can see all of the instructions (instead of ...). There does ...
1
vote
2answers
124 views

Renaming a function globally

I have decompiled a DLL, and in the Symbol tree, I have clicked a function. This function looks like this in the Decompile window: undefined4 process_something(undefined4 param_1,undefined4 param_2) {...
1
vote
1answer
494 views

Ghidra scripting get information from decompile window

I am using Ghidra and when clicking for example in the decompile window on a specific raw, it change the cursor in the assembly window to the exact location in the assembly. Is there any option to do ...
1
vote
1answer
132 views

empty .data section in AARCH64 elf binaries

My question is: Why does readelf -x .data bin.so give me empty data when ghidra does not? (0x00 repeated for section length until last element 0xFFFFFFFF). ghidra/JEB contradict me by showing that ...
1
vote
1answer
92 views

Type inference inconsistency

I'm testing several decompilers against the following C code static int bar(int i) { return ++i; } static int apply(int (*fun)(int), int i) { return i % fun(i); } static int foo(int (*app)(...
1
vote
2answers
2k views

Local variables and addition not shown in Ghidra

I am having some troubles with my learning of Assembly and reverse engineering. Specifically, I am learning about Global vs Local variables. For Global variables I have managed to get insights in ...
1
vote
1answer
900 views

Get stack references in Ghidra of a function from the java api

How can one access all references to the stack (also outside of its frame) a function has via the Java Plugin API? Example: This instructions write values outside of the stack frame of the function: ...
1
vote
0answers
82 views

Getting value of local variable in Ghidra

I've been trying to solve a crackme challenge by examining it's decompiled version by Ghidra. So I figured the code where the strcmp is done as shown in the figure below. Now I need to to patch the ...
1
vote
0answers
40 views

Tool/parser for symbol tables produced with objdump -t to be used with IDA / Ghidra?

Working with a binary (arm64) file that seems to be some sort of a broken ELF file. The header data is missing and for some reason it contains a symbol table in a format that to me seem to be equal to ...
1
vote
0answers
91 views

Ghidra : iOS Application : Mach-O binary -> Symbol files of dylib or framework are not generated

I'm performing my first reverse on a Mach-O file binary through Ghidra. My problem is that Ghidra doesn't create symbol files of the dylib/frameworks that are loaded in the project. It is really ...
1
vote
1answer
60 views

How to make a reference to a different segment?

I am reverse engineering a very old LE MS-DOS binary and have convinced Ghidra that there are two segments in the file, one is the code segment and another one is the data segment. Now when I look ad ...
1
vote
0answers
29 views

Ghidra SDK Register TypeFlags are not populated

I am using the Ghidra P-Code in a Ghidra script and I am looking for an architecture-independent way to decide if a register used in a P-Code Op is the Stack or the Base Pointer (basically making the ...
1
vote
1answer
57 views

CC3200 Firmware - gaining information about - Registers / Memory (Ghidra) - SVD / CMSIS

I am currently reversing a firmware for the TI CC3200 (ARM Cortex M4) via ghidra. For other ARM chips I have learned that I may use a SVD-Loader to load all information about the registers and memory ...
1
vote
0answers
97 views

Ghidra: What are “hash” function variables in the listing view

The variables at the bottom prefixed with HASH:xxxxx:8, what are these variables and why are they here? When I delete them Ghidra insists on re-adding them when I Commit local names so I'm guessing ...
1
vote
0answers
54 views

What do you think is the optimum environment for reverse engineering dynamically-linked aarch64 Golang binaries developed in Alpine Linux?

Direct quote from Golang's website: "GDB does not understand Go programs well. The stack management, threading, and runtime contain aspects that differ enough from the execution model GDB expects ...
1
vote
0answers
146 views

Compare ELF files using Ghidra+Bindiff based on dwarf debug info

So this is a question not strictly about reverse engineering, but since there are many people using Ghidra and Bindiff here I'll try asking anyway. I have an embedded ARM cortex-M C++ project and I ...
1
vote
1answer
339 views

I want to insert instructions but don't have enough space to do so

Sorry if it is a very basic question/bad place to ask/for my bad english. I'm using Ghidra to patch instructions inside the binary of a game. Most of the time I could find some undefined bytes ...
1
vote
0answers
289 views

which has better pseudocode? IDA or Ghidra [closed]

I would like to know which of the two has a better pseudo code generator in C, IDA or Ghidra, if possible, point out the strengths and low points of each one.
1
vote
1answer
121 views

Is Ghidra's decompilation of ARMv7 strb.w instruction broken?

I'm currently disassembling some firmware, when I stumbled across the following code snippet produced by Ghidra (the names are already my own ones): void memset(byte *addr,byte value,int count) ...
1
vote
0answers
565 views

What does the code keyword in Ghidra mean?

I'm reversing a binary and I found this strange keyword I haven't seen before called 'code'. I looked up the C++ keywords and there doesn't seem to be one. Could anyone provide me with more ...
1
vote
0answers
118 views

Removing/bypassing a BIOS whitelist

I am trying to bypass or erase the BIOS whitelist on my Thinkpad T440p. So far I've used flashrom and a soic8 clip to dump the bios to a bios.img file made another dump and compared with diff bios....
1
vote
0answers
261 views

Ghidra export to C header, how to remove “.conflict”?

When using the export to C header functionality of Ghidra it keeps outputting double and triple symbols with ".conflict" appended. When I change how the data type manager should deal with conflicts it ...
1
vote
0answers
72 views

ARM chip gpio/ identification from firmware code

Device: i was able to recover bricked Chinese IOT a Sous Vide cooker. Replaced damaged capacitor. it works. it has ARM soc/mcu/processor WI-FI (broadcom) LCD touch screen + 16bit STM mcu. EEPROM ...
1
vote
0answers
43 views

Force Format/Analyser on obfuscated/anti-disassembly file

I have a clear .class file, which is likely obfuscated. However, Ghidra is not detecting it as Java, and shows it as Raw binary, which prevents me from using the Java Class Analyzer on the file. How ...