Cracking the Anti-Debugging Protections of an iOS Widget App

2025-02-17
Cracking the Anti-Debugging Protections of an iOS Widget App

This post details the author's experience cracking the anti-debugging protections of an iOS Widget app. The app employed multiple protection methods, including blocking debugger attachment, early exit on code injection, and crashing the entire phone when run on a jailbroken device. The author systematically analyzed these protections, focusing on the use of the `ptrace` function's `PT_DENY_ATTACH` request to prevent debugger attachment. The author explains how to bypass `ptrace` and prevent the phone crash, ultimately succeeding in attaching the debugger and injecting code.