Radare2 (r2) is a Unix-like reverse engineering framework. The creation of this framework has resulted in a large internet comunity of people who want to use r2 for both clever and stupid things.
The author and maintainer of r2, Sergi “Pancake” Alvarez, is not slow about accepting pull requests. For perspective, r2 gets around 500 commits a month. Pancake somehow manages that madness and is always available in IRC/Telegram to answer questions.
I had the pleasure of speaking at r2con this year. R2con is a community convention where people from all over the world gather in Spain to learn about and contribute to r2. In this blog post, I’m sharing highlights from my conference attendance and speaking experience.
All the talks pertained to r2, so I was a bit surprised at the diversity. Serious talks were given, such as Nacho Sanmillan talking about how Linux malware could craft ELF headers to break automated scanning. Then, there were more light-hearted talks: Pau Oliva and Synacktiv spoke about reversing a Street Fighter game emulator. Some of these talks have started to make their way to Pancake’s YouTube channel.
Note: Pancake is editing the r2con speaker videos himself, so updates are forthcoming.
I wish I had participated in the capture the flag (CTF), but I was busy stressing over my talk. Some of the challenges looked really interesting.
The CTF winners were encouraged to write up solutions for the challenges. The CTF, like other events, served as a fun excuse to improve r2 and its user base. The rewards for winning looked awesome, too.
R2 wars is the epitome of stupid things that are very clever. Radare2 has an intermediate language, called ESIL, to facilitate and simplify analysis of algorithms. It is very powerful and can quickly break many obfuscation techniques. As it turns out, it can also be used to make two pieces of shellcode battle.
All in attendance were invited to submit “bots” for the battle. Two bots would battle by being put in the same memory region and emulated with ESIL. Each bot would try to outlive the other–If you segfault the other bot, or the other bot segfaults itself, you win the battle. If your bot wins the most battles, you get some pretty sweet r2 swag.
All of this was really just an entertaining way for participants to learn CPU architectures and to improve ESIL. This year’s r2 wars led to two bugs being reported, and both were fixed before the end of the convention.
Bot battles and Chiptune music set the atmosphere between talks. You could see the strategies people were using played out in little blocks on the screen. In the picture below, you can see one of the bots asking for help.