Ok, it has seen the light.

Finally Zero-the-Hero (or ZtH, or even 0tH) has seen the light. I have been working on it for month, and now it’s out.

What’s 0tH? Well, I am confident you know what is a Mach-O file (if not, then engage me for a course!). 0 is the next-gen otool and has a lot of features of the venerable jtool2. Plus some added value.

I am not really sharing the list of features - I just invite you to take a look here, download it, and play a little bit with it. Plus, you can always join Segment0, its mailing list. Wanna know more? Just visit zero-the-hero.run and look for yourself!

The lore, the gore, and more

So why did I write this? Well, the idea was learning Rust, from Zero to Hero. Did I make it? Ehm… no. I am far from being a Rust Hero. But being someone who started with Rust like 10 months ago, I am more than satisfied of the result. And my Rust is far better than many other people’s, by the way.

Why this endeavour? Why parsing Mach-O files? Well - I have written a lot of exploits for Linux, years ago. Then my direction shifted to other goals, for better or worse. Lots of API PenTesting (and thanks god I don’t have to compete with XSSrs and SQLMappers!), which is fine. I am also managing other pentest related projects - namely an API Scanner and a WTFAF (don’t ask. The best way to define the acronym is “a mix between WTF and WAF”. It’s gonna be funny, tho). So, long story short - I needed to go back to my roots. And I wanted to do it in the macOS world, no doubt about it.

Why not writing it in Python? I can write Python, it would have been faster for me to use that language but:

I also thought to go for Monicelli. I swear, that’s true. Monicelli! I love that language - plus, coming from Tuscany, for me it’s special. But at the end of the day, it’s another layer on top of C. I opted to keep C - including ObjC - out of the possible choices because I didn’t really want to mess with all the overhead coming from string management and pointer arithmetics. No, really. The last candidate was F#. It’s a great language (and I am no MS fan, by the way), but I wanted to be freekeen fast!

And that’s it.

What about the name?

Pure Sabbathian lore. I love Black Sabbath, and I love the Born Again album. And Zero the Hero is a badass song from it. No compromises. And yes, the real Sabbath fan doesn’t go like “you can only trust yourself and the first six Sabbath albums”. The real fan loves all eras - Including Gillan’s!

What can I expect from 0tH?

At the moment, it covers 15 load commands out of 52. The plan is expand the coverage with weekly builds. These builds will also include further features - I am thinking about a scan feature to spot out potential binary weaknesses.

A GUI? Yes, it’s in the pipeline. At the end of the day, I need to learn how to interface Rust with Objective C (yes, I am still an old-fashioned guy who writes in ObjC. Tough luck), and this chore looks the right chance to do so.

Final thoughts

This is not the classical bytearchitect post. No technicalities, nothing spicy. Just my self celebration. And you know? Sometimes it’s good to self celebrate.

TTY soon - ‘til then… Have fun!