iOS Hacking | Hacking a C/C++ Application For Beginners

In today's video I will be showing you how to patch / hack a simple C or C++ application using Hopper Disassembler on macOS. C applications are quite practical to start with because you can deploy them fairly easy on a Jailbroken device and you can even try to reverse engineer it there (although MTerminal combined with the small iDevice's screen might not be the best user experience).
The application I've built is fairly simple as I am a beginner myself. The C app contains a function (main), and accepts input from the user. The application is made to require a specific key that is not gave out to the user and can't be found in the source code because a simple algorithm is used to check the validity of it.
This is an improved version of the binary from the Level 2 example on my GitHub which is also asking for a specific key (different than the one used in this level). Your challenge is to reverse engineer the binary with Hopper, IDA or Radare 2, locate the main function as shown in the video, locate the comparison instruction and the branch one and patch it so that the application will allow any kind of input and consider it valid.
You know you managed to do it once any key inserted in the tool will result in showing an output with the macOS kernel build details of your PC and some other strings along the lines of "Welcome to F.C.E. 365 Tool v31.1".
As I said, I am a newbie myself in this Reverse Engineering field, so I might make errors here and there; I would love your feedback if you spot such errors so that I can improve 🙂

==Resources==
Level 3 Cat App
Hopper Disassembler
ARM Assembly Documentation
How to Start iOS Hacking | Reverse Engineering With Radare2
Other iOS Hacking Tutorials
About the ARM registers
iOS 11, WWDC 17 & iOS 10.3.1 Jailbreak Info, Save SHSH2

GeoSn0w

About GeoSn0w

Expert Programmer | Security Analyst | Content Creator | Web Designer I like to bring the latest news from the iOS / iDevice / Jailbreak battlefield to you in a beautiful manner :) I hope you like the site. If you do, don't forget to check out my channel :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>