Questions tagged [radare2]

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

Website | Source (Github)

radare2 is an open source framework for reverse engineering which implements a rich command line interface for disassembling, analyzing data, patching binaries, comparing data, searching, replacing, visualizing and more. It has great scripting capabilities, it runs on all major platforms (GNU/Linux, Windows, *BSD, iOS, OSX, Solaris…) and it supports tons of architectures and file formats.

features

  • Multi-architecture and multi-platform
    • GNU/Linux, Android, *BSD, OSX, iPhoneOS, Windows{32,64} and Solaris
    • x86{16,32,64}, dalvik, avr, arm, java, powerpc, sparc, mips, bf
    • pe{32,64}, [fat]mach0{32,64}, elf{32,64}, dex and java classes
  • Highly scriptable
    • Vala, Go, Python, Guile, Ruby, Perl, lua, Java, JavaScript, sh, ..
    • batch mode and native plugins with full internal API access
    • native scripting based in mnemonic commands and macros
  • Hexadecimal editor
    • 64bit offset support with virtual addressing and section maps
    • Assemble and disassemble from/to many architectures
    • colorizes opcodes, bytes and debug register changes
    • print data in various formats (int, float, disasm, timestamp, ..)
    • search multiple patterns or keywords with binary mask support
    • checksumming and data analysis of byte blocks
  • IO is wrapped
    • support Files, disks, processes and streams
    • virtual addressing with sections and multiple file mapping
    • handles gdb:// and rap:// remote protocols
  • Filesystems support
    • allows to mount ext2, vfat, ntfs, and many others
    • support partition types (gpt, msdos, ..)
  • Debugger support
    • gdb remote and brainfuck debugger support
    • software and hardware breakpoints
    • tracing and logging facilities
  • Diffing between two functions or binaries
    • graphviz friendly code analysis graphs
    • colorize nodes and edges
  • Code analysis at opcode, basicblock, function levels
    • embedded simple virtual machine to emulate code
    • keep track of code and data references
    • function calls and syscall decompilation
    • function description, comments and library signatures
347 questions
14
votes
2 answers

Find reference to string in radare2

In this crackme solution, first the strings are found: $ rabin2 -z crackserial_linux addr=0x00000aa0 off=0x00000aa0 ordinal=000 sz=7 len=7 section=.rodata type=A string=User: addr=0x00000aa7 off=0x00000aa7 ordinal=001 sz=11 len=11 section=.rodata…
robert
  • 887
  • 2
  • 12
  • 28
12
votes
1 answer

How to find a symbol in a binary using radare2?

I want to find an address of a symbol (e.g strcpy) inside a binary using radare2. I tried to use the f command to list all flags which are recognized by r2 but the list is enormous and it's not comfortable to find the address of a specific symbol…
api pota
  • 193
  • 1
  • 2
  • 7
10
votes
1 answer

Radare2- How to see stdout in Visual Mode

How can I display any standard write in visual mode. For example if I run dc command it runs the program normally and displays all the text normally. But if I enter visual mode with V< enter > and use S to run through the program it displays the…
Corey
  • 175
  • 6
9
votes
1 answer

How to get a nice stack view in radare2?

This is the stack view that I'm getting in radare2 after entering the visual panel mode: This is the view from immunity debugger: How can I get a view similar to immunity debugger in radare2?
Kennet Celeste
  • 245
  • 1
  • 3
  • 8
8
votes
1 answer

Radare2: inspecting renamed variables

I'm practicing with Radare2, latest commit. radare2 2.3.0-git 16814 @ linux-x86-64 git.2.2.0-5-g61a903315 During my sessions, I need to rename local variables to a more understandable name, e.g. var int local_110h @ rbp-0x110 :> afvn local_110h…
Kartone
  • 439
  • 4
  • 14
8
votes
3 answers

Examining memory in radare2

How can I examine a memory address in radare2 using registers? I would like to achive what this command does in gdb: x/s $ebp+0x4
robert
  • 887
  • 2
  • 12
  • 28
6
votes
2 answers

Radare2 Debugging: How do I pipe a program's output to another's input?

I wrote a C program that constructs a ROP payload and sends it to stdout. Using Radare2's debug mode, how would I pipe this output to a binary I am trying to exploit that accepts input on stdin? For example, if my compiled C program is exp and the…
peachykeen
  • 155
  • 1
  • 9
6
votes
1 answer

Viewing Radare keybindings for Visual Pane mode (Function hotkeys)?

Is there a way to view the keybinidngs inside of Radare? Such that I can see which function keys do things like Step Over and Step Into in Debug mode? e~key doesn't list any of the debug keys, key.S = key.f1 = key.f10 = key.f11 = key.f12 =…
Evan Carroll
  • 1,779
  • 1
  • 18
  • 50
5
votes
3 answers

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 supposed to flush or save?
Evan Carroll
  • 1,779
  • 1
  • 18
  • 50
5
votes
2 answers

Radare2 forwarding input to scanf from a file

I'm debugging a file with radare2 and when I come to scanf function I want to forward input from a .txt file. In gdb I would do this by typing r < text.txt. Is something like that possible in radare2? I've tried dc < text.txt but it seems that it's…
newbie
  • 139
  • 2
  • 9
4
votes
1 answer

Getting to the entry point using radare2

How do I get to the entry point of a .exe file using radare2? I tried using aa then [email protected], but a prompt showed saying "Cannot find function at 0x00000000"
4
votes
1 answer

Modify value to pass jump and print a message with Radare2

I have a problem with understanding, why after modifying variable var_4h and passing positively through jne at 0x000006c3 I still cannot see the message. I use radare2 In debug mode, just before cmp I use: wv \0x5 @rbp-0x4 52: main (); │ …
BTom
  • 41
  • 1
4
votes
1 answer

How do I permanently change the disassembly syntax in Radare2?

As the title says, I am trying to change the default disassembly syntax in Radare2 from Intel to AT&T. Looking up documentation, I found the following. [0x00405e1c]> e asm.syntax=att However, changing syntax this way does not persist across…
peachykeen
  • 155
  • 1
  • 9
4
votes
1 answer

Understanding output of rabin2

I am wondering what the crypto, linenum, pcalign, relocs and va values mean in the output of rabin2. I took a look in the source code of radare2 and it seems for ELF va is always true, I assume it means virtual…
PotatoDrug
  • 63
  • 4
4
votes
0 answers

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 analysis progress and if possible retain renamed…
1
2 3 4 5 6 7 8