Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [radare2]

Opensource reverse engineering framework to disassemble, debug, analyze, manipulate binary files and more.

1
vote
1answer
46 views

How to set a breakpoint in an execve'd program in radare2?

If I have a program A, which uses execve to run program B. How can I set a breakpoint in program B's main routine if I'm debugging program A? After a certain point in the execve routine, program B ...
1
vote
0answers
84 views

Password is right, but still wrong?

i am trying to find the password of a binary with radare2 - a crackme again :-) I already thought I've found the password ('pass'), but this seems to be not the right one. Or there is a trick I didn'...
0
votes
1answer
35 views

How to print the value of register with Radare 2

I am trying to solve this ELF - Ptrace challenge. I use Radare 2. This is the commands I execute to print the assembly code. radare2 ch3.bin [0x080482f0]> aaa [[anal.jmptbl] Missing cjmp bb in ...
2
votes
1answer
68 views

Radare2 does not display the entire assembler code

I am trying to solve this ELF - Ptrace crack me. Here are the commands I use : I start radare2 with the crack me as argument. radare2 ch3.bin I decide to go to the main and print the assembly code ...
1
vote
1answer
63 views

Setting register names in Radare2

I am reverse-engineering an 8051 architecture program of a specific chip. The disassembly naturally doesn't contain any function names, and the register names are minimal. For example, address 0xb3 is ...
-1
votes
0answers
25 views

Is the inability to run an application after the editing of a Mach O library due to improper editing or of a verification mismatch?

So there is an application (Audio Hijack specifically) that I am trying to edit after having downloaded it, and it (obviously) only includes the compiled code. This includes a Mach-O 64-bit ...
0
votes
1answer
38 views

how to use core file in radare2?

In gdb i can backtrace with core file and executable file. It seems radare2 can read core file. like this $ r2 core Setting up coredump: asm.arch <-> x86 and asm.bits <-> 64 Setting up ...
2
votes
1answer
45 views

radare2 how to interpret ascii-art color bars?

I can't understand the meaning of ascii-art color bars. what is the meaning of the # charaters? [0x08000210]> iS= 00 0x08000000 |---------------------------------| 0x08000000 0 --- 01 ...
0
votes
1answer
71 views

Radare2 Disassembler How Do You Organize Visual Panels (V!)?

I would like to use Radare2 to learn about how C is assembled into assembly but I am having trouble with the layout. I think the V! mode would be very handy as you can watch the registers update as ...
1
vote
1answer
59 views

Function names syntax returned by radare2's afl?

Radare2's afl command returns function names with a specific syntax that I could not find documentation on: For example: radare2 -2 -A -q -c "aflj" C:/Windows/system32/advapi32.dll 0x77cce13c 22 ...
0
votes
1answer
56 views

Print string at address with radare2

I have created a very basic golang program which display a message with fmt.Println(). Here is what is see in radare2: lea rcx, obj.main.statictmp_0 ; 0x4c84b0 ; "y[K" mov qword [local_48h], rcx lea ...
0
votes
2answers
45 views

How does this command modify the condition?

I'm new to radare2 here. Just started learning and I was trying out a challenge. What does the 3 columns in the radare2 visual mode represent? May I know how the command below: wa je 0x400976 @...
0
votes
1answer
58 views

rip adress not visible with dr command

I just finished this challenge. This is the content of main function : [0x08048a86]> pdf / (fcn) main 417 | main (int argc, char **argv, char **envp); | ; var int local_16h @ ebp-0x16 |...
2
votes
1answer
55 views

Debug point not hit with radare2

I am doing this reverse engenering challenge. I executed theses commands to analyse the main function : radare2.exe ch15.exe aaa s main pdf This is the output of the pdf command : [0x004017b8]> ...
2
votes
1answer
50 views

Why does -A (aaa) analysis show much more information, when using the -d (debug) CLI option in Radare2?

Why does -A (aaa) analysis show much more information, when using the -d (debug) CLI option in Radare2? I'm using the newest version of Radare2 to analyze the Windows application. As can be seen ...
1
vote
1answer
142 views

Impossible to execute a program with radare2 : TO DO continue

I am trying to crack a crackme. I already catch the flag because I seen the string variable which represants flag. I would like to catch the flag on an other way, I want to set a breakpoint when there ...
1
vote
1answer
110 views

Analyze all functions with radare2

I have a big library in which IDA found ~84300 functions but using aa in radare2 I was just able to found ~3000. I tried setting anal.hasnext to true, anal.from and anal.to to the start and the end ...
2
votes
1answer
69 views

How to make Radare2 automatically disassemble next instruction after each `ds` debug single-step?

How to make Radare2 automatically disassemble next instruction after each ds debug single-step? I thought that e asm.bytes=1 would achieve this, but that doesn't help. In particular, GDB supports ...
1
vote
1answer
47 views

Radare2 doesn't update current address, when single-step debugging using `ds`?

Radare2 doesn't update current address, when single-step debugging using ds? I'm debugging an ELF binary on Linux using single-step (ds). The problem is that the current address at the prompt doesn't ...
1
vote
1answer
47 views

How to get the memory-mapping (e.g. library) that contains a given address in Radare?

How to get the memory-mapping (e.g. library) that contains a given address in Radare? I've done a search in Radare for a specific string (search.in = dbg.maps), which resulted in an address. Now, I ...
0
votes
1answer
51 views

How to identify different memory regions of an elf binary in radare2?

I'm just starting out with reverse engineering, one thing I'm finding difficult is identifying different areas of memory. I'm using radare2, and I would like to be able to easily seek and identify ...
5
votes
2answers
793 views

Writing ELF headers in Radare?

Reading Keith Makan's, "Introduction to the ELF Format : The ELF Header", he modifies e_entry, The e_entry field lists the offset in the file where the program should start executing.Normally it ...
1
vote
1answer
51 views

Make r2 -i <script> use python3 rather than python2

I have a r2 script that I'm running with r2 -i script.py test.x. By default this command uses python2. How can I get it to use python3? I couldn't find anything in the config.
1
vote
1answer
119 views

Radare's `aaaa` and -AA what does it do, exactly?

When I run aaa, Radare tells me, [x] Use -AA or aaaa to perform additional experimental analysis. But what does aaaa do? It's not documented under aa? nor aaa? nor [0x000028e0]> aaa? Usage: See ...
1
vote
1answer
54 views

Learning fine grained analysis in Radare with `a`?

The Radare community generally seems to look down upon simply running AAA or AAAA claiming that you need to instead learn the fine grained analysis and what they do. However, there seems to be no ...
2
votes
2answers
187 views

Writing a file with radare2 `w`?

Radare2 supports a w which writes a string. w foobar write string 'foobar' However, it doesn't seem to work for me, touch foo radare2 ./foo w foobar The file foo remains empty. Am I ...
2
votes
0answers
134 views

How to save Radare2 Analysis?

How do I save a radare2 session after I did "aa"? I know there is a command for saving a project, but this isn't working out for some reason (Ps PROJECTNAME). So I am looking for a way to save my ...
1
vote
0answers
68 views

Techniques for reversing (basic) hash function

Hi I'm relatively new to RE, and I'm using GDB and Radare2. As part of a crackme I'm trying to reverse a weak hash function that's a little too complicated for me to undo by hand. I've been trying to ...
0
votes
0answers
53 views

Does Radare offer the ability to invoke the linker and disassemble a function (import or reloc)?

Sometimes I'm doing static analysis outside of the debugger, and I want to see what a function that a symbol points to will do after the linker does runtime relocation. All I see in the disassembly is ...
0
votes
1answer
26 views

Does the Radare Debugger support STABS?

From the wiki on Stabs stabs (sometimes written STABS) is a debugging data format for storing information about computer programs for use by symbolic and source-level debuggers. Does Radare ...
1
vote
1answer
37 views

How do I read the “ascii-art bar of metadata in file boundaries”?

Radare2 has an option, p-, Usage: p-[hj] [nblocks] bar|json|histogram blocks | p- show ascii-art bar of metadata in file boundaries | p-h show histogram analysis of metadata per block | p-j ...
1
vote
2answers
49 views

Getting a high level overview of comparative size differences of binary files?

I have two binary files, one of them is pulled from Protostar's (stack0 example). The other one I compiled (from source) with the latest version of GCC. The size difference is massive. My version is ...
0
votes
1answer
71 views

Is there a way to get an instruction count with Radare2?

Let's say I want to find out how many instructions an arbitrary function foo decodes to, is there an easy way to do this? I'm trying to check against a version I am compiling with a stored binary on ...
0
votes
2answers
120 views

Debugging a process running in a Virtual Machine with Radare2?

Is there anyway to debug a process running on a Virtual Machine (guest) with Radare2 from the host? I'm currently using VirtualBox. It provides a built in debugger. I'm not sure if it's possible for ...
3
votes
0answers
48 views

radare2 difference between function offset and minbound

I am trying to understand the difference between a function's offset and its minbound in radare2. Consider this function in radare2 (output of aflj): { "offset": 4549740, "name": "...
1
vote
0answers
32 views

Radare2: pd command ignores cfg.bigendian setting

I am currently using radare2 to disassemble a raw ARM binary (bootloader) in little endian format. I used the command e cfg.bigendian = false to set the endianness, but the pd command seems to ignore ...
2
votes
0answers
55 views

Understanding ESIL

I cross-compiled a simple program with the aarch-linux-gnu-gcc compiler for ARM. So the machine is "ARM aarch64". I want to understand a single instruction and it's realization in ESIL. The opcode of ...
1
vote
2answers
102 views

Can I search Radare's help system?

Radare2 seems to have thousands of commands. Is there a way to search all of those commands? Like let's say I want to find all commands that had rot (for rot13), is there a method to do this?
1
vote
1answer
74 views

What does paddr, baddr, laddr, haddr, and hvaddr refer to?

When I run ie, I get multiple addresses. [0x41417641]> ie [Entrypoints] vaddr=0x080483d0 paddr=0x000003d0 baddr=0x08048000 laddr=0x00000000 haddr=0x00000018 hvaddr=0x08048018 type=program What ...
0
votes
2answers
40 views

`dmi libc puts~GLOBAL` does not show puts, just putspent?

On the tutorial by Megabeets, "A journey into Radare 2 – Part 2: Exploitation" [0x080483d0]> dmi libc puts~&GLOBAL, puts:0 532 0x000fdd60 0xf7e0bd60 GLOBAL FUNC 1181 putspent [0x080483d0]&...
2
votes
1answer
52 views

What does the `$r` do in `pd $r`?

I was just looking at the Megabeets tutorial again, and it he has, pd $r @ main I don't see the the $r explained anywhere though. What does $r do in that? It's also not explained in pd?
0
votes
1answer
44 views

Does RAX2 support setting bit width?

Is there anyway to set the width of the twos compliment used in binary display =2? 2 10b -2 1111111111111111111111111111111111111111111111111111111111111110b I would like to see a 3bit signed twos ...
3
votes
1answer
65 views

How do I view the registers as signed intergers?

Is there any way to view the results of something like dr= in signed interger form? > dr rax = 298; dr rdx = 42; dr= rax 0x0000012a rbx 0x00000000 rcx 0x00000000 rdx ...
7
votes
1answer
115 views

Radare2 Call $+5 and register-based cross-references not found

I have a library of ~65MB which uses this "technique" as a kind of PIC. First, it gets some kind of base address (it is always the same): 0x00708497 e800000000 call 0x70849c 0x0070849c ...
5
votes
2answers
155 views

Understanding branch delay slots for reversing MIPS

I am statically reversing some software compiled for an Atheros AR7161 using radare2. This processor implements MIPS, and I do recall that MIPS has a branch delay slot. This is indeed noticeable in ...
2
votes
1answer
126 views

Radare2 webui - need help setting it up

How can you set up Radare2 webui in Kali or Ubuntu or any other OS? I've tried so many different methods but none of them have worked so far. I think both of them are debian based so that might be ...
1
vote
2answers
92 views

What is a “trit”?

With Radare when I do ?, I get a list of answers in the result, [0x00400a04]> ? -0x120 + 0x110 hex 0xfffffffffffffff0 octal 01777777777777777777760 unit 17179869184.0G segment fffff000:...
2
votes
1answer
87 views

How can you get the symbol visibility with radare?

I created a quick x86_64 Assembly file with NASM to generate the four different visibility classes for ELF 64. With readelf --symbols I get the Symbol Visibility in the Vis column: DEFAULT, INTERNAL, ...
1
vote
1answer
120 views

Working with 16bit offsets and segments in Radare2

I have a simple DOS COM program which I want to analyse using Radare2: USE16 ORG 100h mov ax, cs dec ax mov ds, ax mov dx, message+10h mov ah, 9 int 21h ret message: db "Hello ...
1
vote
1answer
50 views

Addresses displayed in radare2

I am disassembling a binary with radare2 and I see some lines like this: | 0x004007f1 488b05981820. mov rax, qword [0x00602090] ; 0x602090:8]=0x400c60 I do not understand, what are the addresses ...