radare2 README

The project's README from github.com/radareorg/radare2. As one markdown file: README.md.

screenshot

Radare2: Libre Reversing Framework for Unix Geeks

Latest packaged version Tests Status build tcc CII Best Practices Build Status Discord

Current git master branch is 6.2.3, next release will be 6.2.4.

Description

r2 is a complete rewrite of radare. It provides a set of libraries, tools and plugins to ease reverse engineering tasks. Distributed under LGPLv3, despite each plugin can have different licenses (see r2 -Lj for details)

The radare project started as a simple command-line hexadecimal editor focused on forensics. Today, r2 is a full-featured low-level command-line tool with support for scripting with the embedded Javascript interpreter or via r2pipe.

r2 can edit files on local hard drives, view kernel memory, and debug programs locally or via a remote gdb/windbg servers. r2's wide architecture support allows you to analyze, emulate, debug, modify, and disassemble any binary.

screenshot

Installation

Download the last released binaries.

The recommended way to install radare2 is from Git repository source:

git clone https://github.com/radareorg/radare2
radare2/sys/install.sh

Nix

radare2 provides Nix packaging under dist/nix.

Source Build

On Windows use the .bat scripts and msvc:

preconfigure.bat       REM setup python, meson, ninja
configure.bat          REM run meson b + vs project
make.bat               REM run ninja -C b
prefix\bin\radare2.exe

Using the r2pm tool you can browse and install many plugins and tools that use radare2.

Usage

These are the first steps to use r2, read the book or find tutorials for more details

$ r2 /bin/ls   # open file in read-only
> aaa          # analyse the program (r2 -A)
> afl          # list all functions (try aflt, aflm)
> px 32        # print 32 byte hexdump current block
> s sym.main   # seek to main (using flag name)
> f~foo        # filter flags matching 'foo' (internal |grep)
> iS;is        # list sections and symbols (rabin2 -Ss)
> pdf; agf     # disassembly and ascii-art function graph
> oo+;w hello  # reopen in read-write and write a string
> ?*~...       # interactive filter in all command help
> q            # quit

Many plugins are included in r2 by default. But you can extend its capabilities by using the r2pm package manager.

r2pm -s <word>  # search packages matching a word
r2pm -Uci <pkg> # update database and clean install a package
r2pm -u <pkg>   # uninstall the given package
r2pm -l <pkg>   # list installed packages

Resources

Documentation

Learn more about r2 watching youtube talks from r2con. There are also many blogposts, slidedecks and the official radare2 book, but it's always a good idea to join any of the official chats and drop your questions or feedback there.

Community

Supported Platforms

Operating Systems

Windows (since XP for x86/x64/arm64), Linux, Darwin, GNU/Hurd, Apple's {Mac,i,iPad,watch}OS, Android, Wasmer, [Dragonfly, Net, Free, Open] BSD, Z/OS, QNX, SerenityOS, Solaris, AIX, Haiku, Vinix, FirefoxOS.

Architectures

i386, x86-64, Alpha, ARM, AVR, BPF, sBPF, MIPS, PowerPC, SPARC, RISC-V, SH, m68k, S390, XCore, CR16, HPPA, ARC, Blackfin, Z80, H8/300, V810, PDP11, m680x, V850, CRIS, XAP (CSR), PIC, LM32, 8051, 6502, i4004, i8080, Propeller, EVM, OR1K Tricore, CHIP-8, LH5801, T8200, GameBoy, SNES, SPC700, MSP430, Xtensa, xcore, NIOS II, Java, Dalvik, Pickle, WebAssembly, MSIL, EBC, TMS320 (c54x, c55x, c55+, c64x), Hexagon, Brainfuck, Malbolge, whitespace, DCPU16, LANAI, lm32, MSIL, InfernoDis, UXN, Cosmac, PythonBytecode, Sharp sm5xx MCPus, FreeScale QIQa, MCORE, mcs96, RSP, SuperH-4, VAX, KVX, Am29000, LOONGARCH, JDH8, s390x, STM8.

File Formats

ELF, Mach-O, Fatmach-O, PE, PE+, MZ, COFF, XCOFF, OMF, TE, XBE, SEP64, BIOS/UEFI, BFLT, Pebble apps, Apple Dyldcache, Kernelcache, MCLF trustlets, DEX, ART, Java class, Android boot image, Plan9 executables, Amiga HUNK, ZIMG, MBN/SBL bootloader, ELF coredump, MDMP (Windows minidump), PDP11, XTAC, CGC, DotNet, WASM (WebAssembly binary), Commodore VICE emulator, DOL, QNX, WAD, OFF, TIC-80, GB/GBA, PSX, PRG (C64), Apple Classic PEF, NDS, z64, and N3DS ...

FileSystems

Mount in userland several filesystems like NTFS, FAT, HFS+, EXT, APFS, BeosFS, BFS, MINIX, ReiserFS, SFS, ubifs, ufs, jfs, ISO9660, UDF, xfs

Packaging Status

radare2 (radareorg/radare2)

Searching Database…

25.1K ·GitHub
这是干什么的?r2(radare2)是一款自由开源的逆向工程框架,面向类 Unix 系统:它是一组库、工具和插件,可以用来分析、反汇编、模拟运行、调试和修改二进制文件。
那它是我链接的库,还是直接运行的工具?两者都是,但它的核心是一个功能齐全的底层命令行工具。这个项目最初只是一个专注于取证分析的简单命令行十六进制编辑器。
我需要先装好哪些东西?只需要在类 Unix 系统上有一套构建工具链:make,或者 meson/ninja(muon/samu 也可以)。在 Windows 上构建则需要 meson,编译器用 msvc 或 mingw。
有图形界面吗,还是全靠终端?r2 开箱即用只有终端;图形界面走 iaito,这是官方的 Qt 界面,以插件方式安装。
它能运行在哪些平台上?几乎什么都能跑:Windows(XP 及以上,x86/x64/arm64)、Linux、macOS 和 iOS、Android、各种 BSD、QNX、Solaris、Haiku 等等——一款典型的跨平台 Unix 工具。
它的许可证清晰吗?大体上清晰:核心采用 LGPLv3,但每个插件可能使用不同的许可证——打包分发之前,先用 r2 -Lj 查看具体情况。
有反编译器吗?有,还不止一个:r2ghidra 通过 pdg 命令调用 Ghidra 原生反编译器,r2dec 是基于 JS 的反编译器,用 pdd 命令调用,decai 则是基于 AI 的反编译器。
我能用其他语言给它写脚本吗?可以——r2pipe 让你用任何编程语言来驱动 r2,r2papi 在它之上封装了一层高级 API,r2 本身还内置了 JavaScript 解释器。
它能反汇编哪些 CPU 架构?几十种:x86、ARM、MIPS、RISC-V、PowerPC、SPARC、m68k,还有 AVR、Z80、6502、8051 这类嵌入式和老式芯片,另外也支持 Java/Dalvik 字节码、WebAssembly 和 MSIL。
它能打开哪些文件格式?ELF、PE/PE+、Mach-O 和 COFF 二进制文件,DEX 和 Java class 文件,WASM,BIOS/UEFI 镜像,内核缓存,Windows minidump,还有 GB/GBA、NDS、PSX 这类游戏机格式。
Creator
radareorg
Size
207.3 MB
Stars
25.1K
Age
14y
Commits · 90 Days