Radare2 Explained

Radare2
Author:Sergi Alvarez (pancake)
Developer:pancake and the community
Programming Language:C[1]
Operating System:Linux, BSD, macOS, Microsoft Windows, Haiku, Android, iOS, Solaris
Language:English
Genre:Disassembler
License:LGPL

Radare2 (also known as r2) is a complete framework for reverse-engineering and analyzing binaries; composed of a set of small utilities that can be used together or independently from the command line. Built around a disassembler for computer software which generates assembly language source code from machine-executable code, it supports a variety of executable formats for different processor architectures and operating systems.

History

Radare2 was created in February 2006,[2] aiming to provide a free and simple command-line interface for a hexadecimal editor supporting 64 bit offsets to make searches and recovering data from hard-disks, for forensic purposes. Since then, the project has grown with the aim changed to provide a complete framework for analyzing binaries while adhering to several principles of the Unix philosophy.[3]

In 2009, the decision was made to completely rewrite it, to get around limitations in the initial design. Since then, the project continued to grow, and attracted several resident developers.

In 2016, the first r2con took place in Barcelona,[4] [5] gathering more than 100 participants, featuring various talks about various features and improvements of the framework.

Radare2 has been the focus of multiple presentations at several high-profile security conferences, like the recon,[6] hack.lu,[7] 33c3.

Features and usage

Radare2 has a steep learning curve since its main executable binaries are operated by command line and does not have a GUI by itself. Originally built around a hexadecimal editor, it has now a multitude of tools and features, and also bindings for several languages.[8] Meanwhile it has a WebUI[9] and the official graphical user interface project for Radare2 is called Iaito.[10]

Static analysis

Radare2 is able to assemble and disassemble a lot of software programs, mainly executables, but it can also perform binary diffing with graphs,[11] extract information like relocations symbols, and various other types of data. Internally, it uses a NoSQL database named sdb to keep track of analysis information that can be inferred by Radare2 or manually added by the user. Since it is able to deal with malformed binaries, it has also been used by software security researchers for analysis purposes.[12] [13] [14]

Dynamic analysis

Radare2 has a built-in debugger that is lower-level than GDB. It can also interface with GDB and WineDBG[15] to debug Windows binaries on other systems. In addition, it can also be used as a kernel debugger with VMWare.

Software exploitation

Since it features a disassembler and a low-level debugger, Radare2 can be useful to developers of exploits. The software has features which assist in exploit development, such as a ROP gadget search engine and mitigation detection. Because of the software's flexibility and support for many file formats, it is often used by capture the flag teams[16] [17] and other security-oriented personnel.[18] Radare2 can also assist in creating shellcodes with its 'ragg2' tool, similar to metasploit.

Graphical user interface (GUI)

Project [//github.com/hteso/iaito Iaito] has been developed as the first dedicated graphical user interface (GUI) for Radare2; it's been forked by [//github.com/rizinorg/cutter Cutter] as secondly developed graphical user interface (GUI) for Radare2. When the Cutter project was separated from Radare2 project at the end of 2020,[19] Iaito was re-developed to be the current official Radare2 graphical user interface (GUI) maintained by Radare2 project members.[10]

Supported architectures/formats

Further reading

External links

Notes and References

  1. Web site: radareorg/radare2. January 18, 2024. GitHub.
  2. Web site: Radare demystified. 2016-12-29. Chaos Computer Club media site. CCC. 2016-12-29.
  3. Web site: I have written more than 300.000 code lines for Radare. www.cigtr.info. https://web.archive.org/web/20181103021531/http://www.cigtr.info/2015/07/i-have-written-more-than-300000-code.html. 2017-01-21. 2018-11-03.
  4. Web site: r2con 2016. NCC Group. 2017-01-21.
  5. News: The hacker behind open-source, reverse-engineering tool Radare.... Bakken. Sam. 2016-08-09. NowSecure. en-US. 2017-01-21.
  6. Web site: Recon 2015 Schedule. recon.cx. 2017-01-21.
  7. News: Talks at Hack.lu 2015. Hack.lu 2015. en-US. 2017-01-21.
  8. Web site: radareorg/radare2-bindings. December 12, 2023. GitHub.
  9. Web site: The new web interface. radare.today. https://web.archive.org/web/20160729185304/http://radare.today/posts/the-new-web-interface/ . 2016-07-29 .
  10. Web site: iaito . rada.re . 14 August 2021.
  11. Web site: "Binary Diffing" visual en Linux con Radare2.
  12. Web site: OSX/Leverage.a Analysis. Eduardo De la. Arada. cybersecurity.att.com. 18 May 2024 .
  13. Web site: None.
  14. PHDays IV, May 21, 2014, 'Anton Kochkov', Application of radare2 illustrated by Shylock/Caphaw.D and Snakso.A analysis
  15. Web site: Gmane archive about WinDBG support in radare2.
  16. Web site: Plaid CTF 2014 - Tiffany writeup. Dragon Sector.
  17. Web site: DEFCON2K12 Prequals: pwn300 writeup. June 4, 2012. LSE Blog.
  18. Web site: manual binary mangling with radare. .:: Phrack Magazine ::..
  19. Web site: Announcing Rizin . rizin.re . 8 December 2020 . 8 December 2020.
  20. Web site: dyld_shared_cache - iPhone Development Wiki. iphonedev.wiki.
  21. Web site: .XBE File Format. www.caustik.com.
  22. Web site: Fun with Constrained Programming.