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 🙂
Level 3 Cat App
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