Questions tagged [radare2]

Use this tag for problems related to or involving Radare2, a portable reversing framework for dissembling , analyzing, and debugging binaries.

Radare2, sometimes referred to as r2, is a portable set of tools designed for reverse engineering binaries.

From the official website:

Radare is a LGPL portable reversing framework that can:

  • Disassemble (and assemble for) many different architectures
  • Debug natively or use remote targets (gdb, r2pipe, winedbg, windbg)
  • Run on Linux, *BSD, Windows, OSX, Android, iOS, Solaris and Haiku
  • Perform forensics on filesystems and data carving
  • Be scripted in Python, Javascript, Go and more
  • Support collaborative analysis using the embedded webserver
  • Visualize data structures of several file types
  • Patch programs to uncover new features or fix vulnerabilities
  • Use powerful analysis capabilities to speed up reversing
  • Aid in software exploitation

Related Resources

70 questions
2
votes
0 answers

Control flow graph of entire binary file

Is it possible to get the control flow graph of the entire binary file using any disassembler? IDA Pro generates the CFG for each function. Can we use it to get the CFG of the entire program?
ad99713
  • 21
  • 1
2
votes
0 answers

Strange decompilation code from radare2's r2ghidra-dec plugin

I wrote a simple C program. When I decompile it with radare2's r2ghidra-dec plugin and I am not very understand it's code. Gcc version gcc --version gcc (GCC) 10.1.0 Copyright (C)…
coolder
  • 144
  • 2
  • 9
2
votes
1 answer

Radare2 "pd" vs "pda"

I am currently trying to extract all opcodes from PE files. I am wondering what the difference between Radare2's "pd" command which "disassemble N bytes" and the "pda" command which "disassemble all possible opcodes (byte per byte)". Which command…
Allen Ye
  • 27
  • 2
  • 13
2
votes
0 answers

Setting entrypoints and sections in radare2

I am currently trying to follow this tutorial to reverse engineer an esp8266-01 firmware dump I retrieved from flash. The esp8266 processor is based on the Tensilica Xtensa and radare2 supports its instruction set when started with the -a xtensa…
heddha
  • 31
  • 2
2
votes
1 answer

radare2: r_reg_get: assertion 'reg && name' failed (line 296)

I'm developing asm plugin for radare2. I implemented disassemble function, so it is returning disassembled instruction using: r_strbuf_set (&op->buf_asm, line); Now, when I set asm.arch to my new architecture I am able to see contents of line…
v3l0c1r4pt0r
  • 134
  • 8
2
votes
1 answer

How to use radare2 for a PIC32 MX534F064H

I want to reverse engine a PIC32MX534 microcontroller using radare2. It's MIPS based, main flash is at 0x1D000000 in hex file but virtual address is at 0x9D000000 and I don't know how to set this on radare2. r2 -a mips…
2
votes
1 answer

How to dump function's disassembly using r2pipe

I'm about to write a software that puts a binary into radare2 and then dumps subroutines including instructions, addresses and binary representation of instructions into a text file. I got it working with IDA Pro and IDAPython but I also want to…
Melvin
  • 407
  • 5
  • 16
2
votes
1 answer

How to make radare2 accept hex input

I am currently debugging a C program in radare2 called "test", and I was wondering if there is any way for me to send in hex characters as input through radare2. What I mean by this is that when you're running something outside radare2, you could do…
2
votes
1 answer

x86 assembly - Encoding a relative jmp

I'm a bit confused by how gcc encodes relative jumps. I have the following: int main(void) { __asm__ __volatile__( "jmp label\n" "label:\n" "nop\n" ); return 0; } Building this (gcc -c -o test.o test.c) shows…
Martin
  • 940
  • 6
  • 26
2
votes
0 answers

How to switch stdin dynamically? -> radare2

i'm aware the it is possible to set the stdin to the content of file defined in the project profile. What i'd want though, is the ability to change the stdin while debugging. Is there any way to do this on a linux system? Basically i need this…
2
votes
3 answers

How to fix "r_cons.h/r_types.h:no such file or directory" while installing r2dec

I'm trying to install r2dec plugin for radare2. The Build fails because there are some files missing. first I did run following commands $r2pm init then $r2pm init then i tried to install it with : $r2pm -i r2dec When the build failed I…
Abrogans
  • 179
  • 1
  • 13
2
votes
1 answer

How to get a caller graph from a given symbol in a binary

This question is related to a question I've asked earlier this day: I wonder if it's possible to generate a caller graph from a given function (or symbol name e.g. taken from nm), even if the function of interest is not part of "my" source code…
frans
  • 8,868
  • 11
  • 58
  • 132
2
votes
0 answers

Can't install radare2-bindings due to `error: too many arguments to function 'void r_io_section_list_visual (...)`

I'm trying to install the radare2-bindings for Python (http://www.radare.org/r/down.html). After cloning the project from github and running ./configure --prefix=/usr, everything seems ok python-wide on the output (errors are from languages I won't…
Bruno Melo
  • 63
  • 5
1
vote
0 answers

How to scroll horizontally in radare2

I have opened a binary compiled from c++ code and function names are too long for my screen. I cannot read the whole function (also i can't see the comment i add after the line). This is an example of what it looks like: │ ; CODE XREF from main @…
tomaszu
  • 73
  • 7
1
vote
1 answer

rabin2 error: Library handler has failed for 'core_pdd.so'

I tried to run rabin2 (radare2 util) and got that error: rabin2 # ERROR: Library handler has failed for '~/.local/share/radare2/plugins/core_pdd.so' I've tried to google the error and got nothing: "Library handler has failed for" query with quotes…
Emil Viesná
  • 88
  • 1
  • 12