Reverse Engineering
Radare2 (r2) is a complete open-source framework for reverse engineering and binary analysis. It bundles a disassembler, debugger, hex editor, and scripting engine into a single lightweight command-line toolkit that supports dozens of architectures and executable formats.
sudo apt install radare2
r2 [options] <binary>
Radare2 is a free, open-source command-line framework for reverse engineering and binary analysis. It was created in 2010 by the radareorg project and has grown into one of the most powerful and widely used reverse engineering toolkits in the cybersecurity community. Unlike GUI-heavy tools such as Ghidra or IDA Pro, Radare2 is designed from the ground up as a terminal-native application, which makes it fast, lightweight, scriptable, and perfect for headless servers, SSH sessions, and automated analysis pipelines.
At its core, Radare2 bundles four major capabilities into one toolkit: a multi-architecture disassembler that converts machine code back into human-readable assembly, a built-in debugger for stepping through live program execution, a full-featured hex editor for byte-level inspection and patching, and a scripting engine (r2pipe) that exposes the entire toolkit to Python, Ruby, Node.js, Go, and Lua programs. This combination lets a single tool handle the full reverse engineering workflow without switching applications.
Radare2 supports over 30 processor architectures — including x86, x86-64, ARM, ARM64, MIPS, RISC-V, PowerPC, and SPARC — and every major executable format: ELF (Linux), PE (Windows), Mach-O (macOS and iOS), DEX (Android), Java class files, WebAssembly, and raw firmware blobs. This breadth makes it a go-to tool for malware analysts examining Windows PE files, firmware researchers dissecting embedded device images, and CTF players tackling obscure architecture challenges.
The tool is widely used for CTF competitions, quick binary triage, automated malware analysis, binary patching, exploit development, and embedded system research. Its lightweight design means it starts instantly and runs comfortably on minimal hardware, making it ideal for the Kali Linux environment where resources may be constrained. Whether you are a beginner learning your first disassembly commands or an experienced researcher building automated analysis pipelines, Radare2 provides the depth and flexibility to support your workflow.
| Command | Purpose |
|---|---|
r2 -A <binary> | Open a binary and run aaa analysis. |
afl | List functions discovered by analysis. |
pdf @ sym.main | Disassemble the function flagged as sym.main. |
iz | List strings in data sections. |
r2 -A binaryOpen binary with automatic analysis — the recommended way to start every sessionaaaRun full analysis (analyze all) from inside an open r2 sessionaflList all functions discovered during analysispdf @ mainPrint disassembly of the main functionizList all strings found in data sections of the binarypx 128Print a 128-byte hex dump at the current seek positionaxt @ sym.imp.printfList cross-references (callers) of the printf importVVEnter visual graph mode to navigate the control-flow graph interactivelys 0x00400500Seek (jump) to a specific address in the binaryiiList all imported functions from shared librariesiEList all exported symbols the binary provides/ flag.txtSearch the binary for the string 'flag.txt'Inspect suspicious executables statically: list imports, extract strings, map cross-references, and identify malicious behavior without running the binary.
Solve reverse engineering CTF problems quickly with fast disassembly, visual graph mode, and multi-architecture support for obscure targets.
Audit compiled binaries for vulnerabilities by analyzing function logic, checking input validation, and tracing data flow through cross-references.
Dissect embedded device firmware images, identify bootloader code, and reverse engineer proprietary protocols in raw binary blobs.
Debug running processes locally or remotely, set breakpoints, step through execution, and inspect register and memory state in real time.
Understand how compiled programs work by reading assembly, following control flow, and reconstructing program logic from machine code.
Identify memory corruption vulnerabilities, analyze crash behavior with the debugger, and develop working exploits against vulnerable binaries.
Conduct deep security research on protocols, file formats, and proprietary software by combining static and dynamic analysis in one toolkit.
Rizin is a fork of Radare2 created by part of the original development team. It shares the same core architecture but has a reorganized command structure, different plugins, and separate development priorities. Radare2 (r2) remains the more widely adopted project with the larger community and ecosystem.
Radare2 can analyze DEX files and Java class files found inside APKs. First extract the APK with APKTool or unzip, then open classes.dex with 'r2 -A classes.dex'. For full APK analysis, combine Radare2 with JADX for Java decompilation and APKTool for resource extraction.
Yes, Radare2 is one of the most popular tools for CTF reverse engineering. Its fast startup, multi-architecture support, visual graph mode, and scripting capabilities make it ideal for time-pressured competitions. Practice on crackme challenges to build proficiency with its command set.
Stripped binaries show function names as 'fcn.00400500' (address-based placeholders). Radare2 still identifies function boundaries through analysis. Use 'aaa' for deep analysis, then rename functions manually with 'afn descriptive_name @ addr' as you identify their purpose.
Yes. Start a debug server on the target with 'r2 -a gdbserver://:9090 ./binary', then connect from your machine with 'r2 -d gdb://target-ip:9090'. This enables remote debugging of embedded devices or isolated systems without running Radare2 on the target.
Radare2 supports over 30 CPU architectures including x86, x86-64, ARM, ARM64, MIPS, RISC-V, PowerPC, SPARC, PPC, and many more. This breadth makes it useful for analyzing firmware, embedded systems, and binaries across different platforms from a single toolkit.
Reverse Engineering
Learn how to use GDB, the GNU Debugger, by building a small C program with debug symbols and following it from the first breakpoint to a crash. Use the same steps to inspect variables, read a backtrace, and tell when a core dump or a look at the assembly would help.
Reverse Engineering
Frida is a dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers. It allows you to inject snippets of JavaScript or your own library into native apps on various platforms — making it the industry standard for runtime analysis and mobile app security testing.
Reverse Engineering
This hands-on guide shows how to use Ghidra to inspect a program you compile yourself. You'll compare decompiled code with the underlying assembly, follow cross-references, and document what the binary does without executing it.
Reverse Engineering
strings prints the sequences of printable characters in files. Useful for finding hidden text, URLs, and clues in binaries.
Reverse Engineering
objdump displays information about object files. It can disassemble executables, show headers, symbols, and more.
Forensics
Learn how to use Binwalk to scan a firmware image, read the signature table, extract embedded filesystems, and spot encrypted regions — a beginner tutorial for Kali Linux.
Essential command line skills for cybersecurity professionals including navigation, text processing, scripting, and automation.
Security · IntermediateUnderstand different types of malware, basic analysis techniques, and strategies for protecting systems from malicious software.
Security Operations · AdvancedLearn digital forensics fundamentals including evidence collection, forensic imaging, memory analysis, timeline analysis, and proper chain of custody procedures for investigations.
Ethical Hacking · BeginnerLearn the core principles of ethical hacking, the five-phase penetration testing methodology, types of security testing, and how to build your own hacking lab.
Radare2 presents an interactive terminal interface. After running 'afl' you see a numbered table of functions with their addresses, sizes, and names — for example '0x00400546 12 main'. The 'pdf' command outputs a vertical block of assembly instructions with address prefixes, opcodes, and operand annotations. Hex dumps ('px') display raw bytes in a classic offset-hex-ASCII layout. Visual mode ('VV') replaces the terminal with an interactive ASCII-art control-flow graph where nodes represent basic blocks and arrows show jump targets. All output is text-based, which makes it easy to copy, grep, or pipe into other tools.This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.