November 22, 2026
Tool Guide: Radare2 — A flexible reverse engineering toolchain
A framework specialized in reverse engineering. Ideal for malware analysts, security researchers and CTF players.

By F0XGL0V3
5 min read
Cybersecurity Guide
Radare2
Reverse engineering framework
Radare2: A flexible reverse engineering toolchain
What is Radare2?
Originally a rework of the radare project, Radare2 is a collection of libraries, tools and plugins all specialized in reverse engineering. It offers many capabilities from static to dynamic analysis. It's available on Unix-like systems, although there are ways to get it running on Windows. Many computer scientists find this toolset useful for code analysis, debugging, cracking, malware analysis, solving CTF challenges, and more.
Advantages and Disadvantages
Pros
- Great for quick inspection through CLI
- Plenty of features and integrations thanks to plugins and tools diversity
- Clear and concise community-driven documentation
Cons
- Reverse-engineering in CLI can be less practical
- GUI requires installing a separate plugin
- Commands lack intuitiveness
Configuring Radare2
Radare2 can be configured in two ways: Firstly by editing the ~/.radare2rc file, which serves as a permanent configuration; and secondly, the -e flag can be added while running a command for further tuning. Note that the config file is not created by default.
1. Core Utilities
radare2 (or r2)
Probably the most important tool of Radare2 as it serves as the interactive shell to analyse binaries. Other main utilities such as rabin2 and rasm2 can be used within this shell. r2 can target binary files, but also live processes by specifying a pid.
Examples:
r2 <binary_file|pid> # start interactive shell
r2 -d <binary_file|pid> # launch debugger mode
r2 -A <binary_file|pid> # start shell and perform deep analysis (same as 'aaa')r2 <binary_file|pid> # start interactive shell
r2 -d <binary_file|pid> # launch debugger mode
r2 -A <binary_file|pid> # start shell and perform deep analysis (same as 'aaa')Interactive Shell Commands:
Those commands can be run inside Radare2's interactive shell.
i # show general info
aaa # perform thorough analysis, remove one "a" for basic analysis
afl # list binary's functions
pdf [@<address|function_name>] # disassemble functioni # show general info
aaa # perform thorough analysis, remove one "a" for basic analysis
afl # list binary's functions
pdf [@<address|function_name>] # disassemble functionNote: '@' is for temporary seek, the cursor doesn't move position
rasm2
This is another essential binary of Radare2 as it acts as the framework's assembler and disassembler tool. It supports multiple architectures including x86, x86–64, ARM and MIPS.
Examples:
rasm2 -L [name] # list supported architecture, (e.g. [name] can be "mips")
rasm2 -d "<hexpair_bytes>" # disassemble hex into assembly instructions
-D "<hexpair_bytes>" # this flag displays more details
rasm2 "instruction" # assemble instruction
-S <intel|att> # specify syntax, e.i. intel or AT&T
-a <architecture> # specify arch (e.g. arm, mips, x86), see "rasm2 -L"
-b <bits> # specify CPU register size (e.g. 8, 16, 32, 64)
-e # add this flag to use big endian insteadrasm2 -L [name] # list supported architecture, (e.g. [name] can be "mips")
rasm2 -d "<hexpair_bytes>" # disassemble hex into assembly instructions
-D "<hexpair_bytes>" # this flag displays more details
rasm2 "instruction" # assemble instruction
-S <intel|att> # specify syntax, e.i. intel or AT&T
-a <architecture> # specify arch (e.g. arm, mips, x86), see "rasm2 -L"
-b <bits> # specify CPU register size (e.g. 8, 16, 32, 64)
-e # add this flag to use big endian insteadrabin2
This utility extracts metadata information from programs - such as their imports, headers and sections - without running nor disassembling them.
Examples:
rabin2 -I <binary_file> # display general info
rabin2 -l <binary_file> # display link libraries
rabin2 -e <binary_file> # show entrypoint
rabin2 -i|-E <binary_file> # display imports/exportables
rabin2 -H <binary_file> # display headers
rabin2 -S <binary_file> # display sections
rabin2 -c <binary_file> # show classes (OOP languages)
rabin2 -z <binary_file> # show strings in .data section
rabin2 -s <binary_file> # show symbolsrabin2 -I <binary_file> # display general info
rabin2 -l <binary_file> # display link libraries
rabin2 -e <binary_file> # show entrypoint
rabin2 -i|-E <binary_file> # display imports/exportables
rabin2 -H <binary_file> # display headers
rabin2 -S <binary_file> # display sections
rabin2 -c <binary_file> # show classes (OOP languages)
rabin2 -z <binary_file> # show strings in .data section
rabin2 -s <binary_file> # show symbolsrafind2
This is the search command of Radare2. It can find strings, patterns and byte sequences in multiple binaries at once.
Examples:
rafind2 -s <string> <binary_file|directory> # look for ASCII string
rafind2 -x <hex_byte> <binary_file|directory> # look for hex pattern
rafind2 -e <pattern> <binary_file|directory> # use RegEx to find patternrafind2 -s <string> <binary_file|directory> # look for ASCII string
rafind2 -x <hex_byte> <binary_file|directory> # look for hex pattern
rafind2 -e <pattern> <binary_file|directory> # use RegEx to find patternrarun2
rarun2 allows the execution of programs in customized environments, which is quite handy for debugging and testing. To do so, it uses profile configuration files recognizable by a .rr2 or .rr extension.
Examples:
rarun2 <script_file>.rr2 # Run a profile configuration filerarun2 <script_file>.rr2 # Run a profile configuration fileProfile Sample (.rr2):
#!/usr/bin/rarun2
program=./example.bin # program to run
arg0="enable" # specify first argument
stdin=file.txt # use "file.txt" content as standard input
stdout=result.txt # redirect output to "result.txt"
setenv=FOO=BAR # set an env variable with key "FOO" and value "BAR"
aslr=no # disable ASLR#!/usr/bin/rarun2
program=./example.bin # program to run
arg0="enable" # specify first argument
stdin=file.txt # use "file.txt" content as standard input
stdout=result.txt # redirect output to "result.txt"
setenv=FOO=BAR # set an env variable with key "FOO" and value "BAR"
aslr=no # disable ASLRrax2
As the name suggests, this is an expression evaluator. It can perform radix conversion (e.g. hexadecimal, octal), arithmetic operations, encoding/decoding (e.g. base64, ASCII) and endianness swapping.
Examples:
rax2 -b <expr> # binary to string
rax2 -B <expr> # string to binary
rax2 -e <expr> # swap endianness
rax2 -D|-E <expr> # Decode/Encode to base64rax2 -b <expr> # binary to string
rax2 -B <expr> # string to binary
rax2 -e <expr> # swap endianness
rax2 -D|-E <expr> # Decode/Encode to base64radiff2
This is Radare2's equivalent of diff on UNIX-like systems, but with an in-depth focus on binaries. It can find differences at byte and assembly-level.
Examples:
radiff2 <binary1> <binary2> # byte-level comparison
radiff2 -d <binary1> <binary2> # perform delta diffing
radiff2 -x <binary1> <binary2> # use hexdump diffingradiff2 <binary1> <binary2> # byte-level comparison
radiff2 -d <binary1> <binary2> # perform delta diffing
radiff2 -x <binary1> <binary2> # use hexdump diffingrahash2
This tool handles the cryptography part of Radare2. It supports a wide range of hash algorithms as well as cipher operations. It was mainly integrated to the framework as a way to verify checksums. Note that this utility can be used on a file, a string using the -s flag, or hexadecimal bytes using the -x flag.
Examples:
rahash2 -L # list available charsets, crypto, encodings and hashing plugins
rahash2 -a <algo1[,algo2,...]> <binary_file> # get hash of file
rahash2 -E <algo> [-S <key>] [-I <iv>] <binary_file> # encrypt/encode file
rahash2 -D <algo> <binary_file> # decrypt/decode filerahash2 -L # list available charsets, crypto, encodings and hashing plugins
rahash2 -a <algo1[,algo2,...]> <binary_file> # get hash of file
rahash2 -E <algo> [-S <key>] [-I <iv>] <binary_file> # encrypt/encode file
rahash2 -D <algo> <binary_file> # decrypt/decode fileragg2
This is Radare's shellcode compiler; it turns scripts into machine code that can be injected into processes and binaries. It also has obfuscation features.
Examples:
ragg2 -L # list encoders and shellcodes
ragg2 <script_file> # turn script into shellcode
-i <shellcode> # use built-in shellcode instead of script file, see "ragg2 -L"
-a <architecture> # specify arch (e.g. arm, mips, x86)
-b <bits> # specify CPU register size (e.g. 8, 16, 32, 64)
-k <linux|bsd|osx|w32> # specify target os
-E <encoder> # apply encoder, see "ragg2 -L"
-o <output_file> # save to output fileragg2 -L # list encoders and shellcodes
ragg2 <script_file> # turn script into shellcode
-i <shellcode> # use built-in shellcode instead of script file, see "ragg2 -L"
-a <architecture> # specify arch (e.g. arm, mips, x86)
-b <bits> # specify CPU register size (e.g. 8, 16, 32, 64)
-k <linux|bsd|osx|w32> # specify target os
-E <encoder> # apply encoder, see "ragg2 -L"
-o <output_file> # save to output file2. Package Manager
r2pm
In order to manage all of its plugins and tools, Radare2 has got its own package manager. It fetches them from r2pm's own repo, although extra packages can be found here as well.
Repo
Examples:
r2pm -s <keyword> # search for packages with specified keyword
r2pm -l # list installed packages
r2pm -U # initialize and update database
r2pm -UU # upgrade installed packages
r2pm -gi <package_name> # install package system-wide
r2pm -[c]i <package_name> # install package locally
r2pm -u <package_name> # uninstall package
r2pm -ui <package_name> # re-install packager2pm -s <keyword> # search for packages with specified keyword
r2pm -l # list installed packages
r2pm -U # initialize and update database
r2pm -UU # upgrade installed packages
r2pm -gi <package_name> # install package system-wide
r2pm -[c]i <package_name> # install package locally
r2pm -u <package_name> # uninstall package
r2pm -ui <package_name> # re-install package3. Core Plugins
iaito
Iaito is one of Radare2's most popular plugin as it implements a Graphic User Interface (GUI) and brings panel views to the terminal. It serves as the continuation of the Cutter plugin. Repo
r2pipe
Along with iaito, r2pipe is another essential plugin as it incorporates scripting to Radare2. Programming languages such as Python, Java, Go, Rust, and PHP are supported as well as many more. It also has a second version known as r2pipe2 which adds more verbosity by using JSON-formatted input and output.
Repo
r2ghidra
This plugin brings Ghidra's decompiler to Radare2 without the need to have Ghidra installed, wait for its GUI to load and have to create a project. Repo
r2frida
Frida is known to be an instrumentation toolkit; it provides in-depth runtime capabilities that Radare2 may lack. This plugin merges Frida's features so that there is no need to switch between both tools during reverse engineering. Repo
r2yara
Radare2's integration of YARA rules. YARA rules are descriptions meant to detect and classify Indicators of Compromise (IOCs). This plugin is strongly recommended for doing malware analysis with Radare2. Repo
r2ai
This is an implementation of Large Language Models (LLMs) for Radare2. It can be used locally (e.g. ollama) or remotely (e.g. Gemini) with an API. Repo
r2mcp
In addition to r2ai, Radare2 also possesses an integration of the Model Context Protocol (MCP) to connect external AI agents to the framework. Repo
r2renef
Renef is another instrumentation toolkit, but for Android ARM64. R2renef allows the combination of both Radare2 and Renef. Note that adb is required for the plugin to work. Repo
4. Hands-on Practice for radare2
Ioli Crackmes
An official series of crackmes to learn how to reverse-engineer using Radare2.
Other hands-on practice include reverse engineering challenges from CTF platforms like CyLab Security Academy, CTFlearn, etc...
5. Resources
If you liked this guide, visit my website for more cybersecurity-related content and follow me on my socials!