Among all the things you could find at MCH2022, there were a few CTFs (Capture The Flag exercises) – in particular, every badge contained an application that you could try and break into – only two teams have cracked this one! [dojoe] was part of one of them, and he has composed an extensive reverse-engineering story for us – complete with Ghidra disassembly of Xtensa code, remote code execution attempts, ROP gadget creation, and no detail left aside.
There was a catch: badges handed out to the participants didn’t contain the actual flag. You had to develop an exploit using your personal badge that only contained a placeholder flag, then go to the badge tent and apply your exploit over the network to one of the few badges with the real flag on them. The app in question turned out to be an echo server – sending back everything it received; notably, certain messages made it crash. One man’s crashes are another man’s exploit possibilities, and after a few hacking sessions, [dojoe]’s team got their well-deserved place on the scoreboard.
If you always thought that firmware reverse-engineering sounds cool, and you also happen to own a MCH2022 badge, you should try and follow the intricately documented steps of [dojoe]’s writeup. Even for people with little low-level programming experience, repeating this hack is realistic thanks to his extensive explanations, and you will leave with way more reverse-engineering experience than you had before.
The MCH2022 badge is a featureful creation of intricate engineering, with the ESP32 portion only being part of the badge – we’re eager to hear about what you’ve accomplished or are about to accomplish given everything it has to offer!
3 thoughts on “MCH2022 Badge CTF Solved, With Plenty To Learn From”
Indeed an amazing write-up, but from the perspective making code more secure. It’s fun seeing how a tiny mistake will allow people to leak secrets from something as trivial as an echo server. Cheers dojoe and HaD!
Participant badges didn’t have the real flags? And they were operating on their own badges which didn’t have the real flag?
… so could you call this a false flag operation?
Yea, and totally not a hack. ^_^
Seriously, loved the write-up. It had the perfect level of technical depth that i wish every hackaday article had.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)