Skip to content

Commit

Permalink
Merge pull request #1932 from su-vikas/ios_app_debug
Browse files Browse the repository at this point in the history
Patching iOS app for Debugging
  • Loading branch information
sushi2k authored Oct 26, 2021
2 parents 6f9ec97 + 959a46d commit 6a7637c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Document/0x06c-Reverse-Engineering-and-Tampering.md
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,12 @@ Successfully inserted a LC_LOAD_DYLIB command for arm64
Writing executable to Payload/UnCrackable Level 1.app/UnCrackable Level 1...
```
#### Patching Example: Making an App Debuggable
By default, an app available on the Apple App Store is not debuggable. In order to debug an iOS application, it must have the `get-task-allow` entitlement enabled. This entitlement allows other processes (like a debugger) to attach to the app. Xcode is not adding the `get-task-allow` entitlement in a distribution provisioning profile; it is only whitelisted and added in a development provisioning profile.
Thus, to debug an iOS application obtained from the App Store, it needs to be re-signed with a development provisioning profile with the `get-task-allow` entitlement. How to re-sign an application is discussed in the next section.
#### Repackaging and Re-Signing
Of course, tampering an app invalidates the main executable's code signature, so this won't run on a non-jailbroken device. You'll need to replace the provisioning profile and sign both the main executable and the files you've made include (e.g. `FridaGadget.dylib`) with the certificate listed in the profile.
Expand Down

0 comments on commit 6a7637c

Please sign in to comment.