Add technique for non-jailbroken iOS dynamic analysis (#3724)#3731
Add technique for non-jailbroken iOS dynamic analysis (#3724)#3731Galaxy-sc wants to merge 5 commits intoOWASP:masterfrom
Conversation
|
Thank you for your contribution! However, you are not assigned to any of the linked issues:
To contribute to this project, please:
This helps us coordinate contributions and avoid duplicate work. |
cpholguera
left a comment
There was a problem hiding this comment.
Thanks for the PR @Galaxy-sc, please take a look at the suggestions.
techniques/ios/MASTG-TECH-0146.md
Outdated
|
|
||
| Follow @MASTG-TECH-0054 to obtain the IPA file for the app you want to test and ensure you obtain a **non-encrypted version before proceeding** (you'll need a jailbroken device). | ||
|
|
||
| ### Overcoming Decryption Constraints (Version Mismatch) |
There was a problem hiding this comment.
This content seems like it belongs in MASTG-TECH-0054. This technique, 0146 is an overview/summary wrapper so to say.
In addition to that:
- you mentioned that you got this "workaround" from an online article. Please always include the sources, in this case as an inline markdown link
[](). - we also require links to other things like the Apple Configurator (this could even be added as a new MASTG-TOOL.
- Is AppSync Unified the only way of installing the app? Do we have this as a MASTG-TOOL? We have a MASTG-TECH for installing apps, please refer to it using @MASTG-TECH-XXXX and in case it doesn't use AppSync Unified yet, you can add it as a subsection.
- frida-ios-dump has a MASTG ID, Please use it with @ as well.
There was a problem hiding this comment.
Done! Moved the workaround to MASTG-TECH-0054, added the source link, and referenced AppSync Unified via @MASTG-TOOL-0127
techniques/ios/MASTG-TECH-0146.md
Outdated
|
|
||
| Follow @MASTG-TECH-0056 to install the signed IPA on your device. Note that because you've modified the IPA, the Bundle Identifier may have changed depending on the signing tool you used. | ||
|
|
||
| ### Modern Sideloading for Persistence |
There was a problem hiding this comment.
Same here, this seems to belong in MASTG-TECH-0056. Also, the 2 tools mentioned should be added as MASTG tools if not already there (and referenced with @ from MASTG-TECH-0056).
There was a problem hiding this comment.
Done! Moved this section to MASTG-TECH-0056 and created the new tool files for SideStore (@MASTG-TOOL-0150) and TrollStore (@MASTG-TOOL-0151).
techniques/ios/MASTG-TECH-0146.md
Outdated
|
|
||
| Follow @MASTG-TECH-0055 to launch the repackaged app in debug mode. Launching via SpringBoard will cause it to crash; you must use the debug launch method so the Frida Gadget can start and wait for your connection. | ||
|
|
||
| ## Automated Dynamic Analysis with MobSF |
There was a problem hiding this comment.
This doesn't seem to belong here. Or are you suggesting that the app cannot be launched following the current instructions in MASTG-TECH-0055?
Since this is information specific to MobSF, in the MASTG-TOOL for it, you could add a short sentence with an inline link to MobSF's documentation where this is explained. In general, for tools we try to link to their docs instead of duplicating info that's already there. We do this to lower maintenance effort in the MASTG side.
There was a problem hiding this comment.
Done! Removed this section entirely to keep 0146 purely as a wrapper. I moved the usbmuxd Docker snippet directly to the MobSF tool file and referenced @MASTG-TOOL-0069.
…ol files - Modularize MASTG-TECH-0146 to act purely as a wrapper - Move MinimumOSVersion workaround to MASTG-TECH-0054 - Move persistence/sideloading to MASTG-TECH-0056 - Add new tool files for SideStore and TrollStore - Move MobSF Docker workaround to MobSF tool file - Add correct cross-references for AppSync and usbmuxd
|
Hi @cpholguera, thanks for the detailed review! I agree that keeping the architecture modular makes sense here. I've applied all your suggestions: I moved the workarounds and sideloading methods to their appropriate tech files (0054 and 0056), created the new tool files, and stripped 0146 down to a pure wrapper by moving the MobSF Docker/USB snippet to its specific tool file, where it belongs for analyzing repackaged apps. |
|
Great, thank you @Galaxy-sc! |
There was a problem hiding this comment.
Pull request overview
This PR expands the MASTG documentation to better support dynamic analysis workflows on non-jailbroken iOS devices, adding supporting tool references and updating related techniques/tool pages so v2 tests can reference a practical black-box setup.
Changes:
- Add new iOS tool reference pages for SideStore and TrollStore.
- Extend the MobSF tool page with guidance for using Docker with a physical iOS device via
usbmuxd. - Update iOS techniques with modern iOS caveats, persistence-oriented sideloading options, and a decryption/version-mismatch workaround.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/ios/MASTG-TOOL-0150.md | New tool page for SideStore to support longer-running sideloading workflows. |
| tools/ios/MASTG-TOOL-0151.md | New tool page for TrollStore as an alternative persistence option on affected iOS versions. |
| tools/generic/MASTG-TOOL-0035.md | Adds guidance for using MobSF (Docker) with physical non-jailbroken iOS devices via usbmuxd. |
| techniques/ios/MASTG-TECH-0146.md | Adds troubleshooting notes for modern iOS (Lockdown Mode / PAC) in the non-jailbroken dynamic analysis technique. |
| techniques/ios/MASTG-TECH-0056.md | Adds a “Modern Sideloading for Persistence” section referencing the new tools. |
| techniques/ios/MASTG-TECH-0054.md | Adds a version-mismatch workaround to obtain decrypted binaries when iOS requirements exceed the jailbreak device OS. |
tools/ios/MASTG-TOOL-0150.md
Outdated
| source: https://sidestore.io/ | ||
| --- | ||
|
|
||
| SideStore is an iOS sideloading app that allows you to sign and install apps using your Apple ID, bypassing the 7-day limit by refreshing them on-device via a local WireGuard VPN. |
There was a problem hiding this comment.
Use consistent prose formatting for numbers (the style guide spells out zero through ten). Consider changing "7-day limit" to "seven-day limit" here to match the rest of the iOS sideloading guidance.
| SideStore is an iOS sideloading app that allows you to sign and install apps using your Apple ID, bypassing the 7-day limit by refreshing them on-device via a local WireGuard VPN. | |
| SideStore is an iOS sideloading app that allows you to sign and install apps using your Apple ID, bypassing the seven-day limit by refreshing them on-device via a local WireGuard VPN. |
tools/ios/MASTG-TOOL-0151.md
Outdated
| source: https://github.com/opa334/TrollStore | ||
| --- | ||
|
|
||
| TrollStore is a permasigned jailed app that can permanently install any IPA you open in it, exploiting the CoreTrust bug on specific iOS versions to bypass the standard seven-day expiration. |
There was a problem hiding this comment.
"permasigned" is informal jargon and may be unclear for readers. Consider using a more explicit term like "permanently signed" (or briefly defining what "perma-signed" means in this context).
| TrollStore is a permasigned jailed app that can permanently install any IPA you open in it, exploiting the CoreTrust bug on specific iOS versions to bypass the standard seven-day expiration. | |
| TrollStore is a permanently signed jailed app that can permanently install any IPA you open in it, exploiting the CoreTrust bug on specific iOS versions to bypass the standard seven-day expiration. |
tools/generic/MASTG-TOOL-0035.md
Outdated
| @@ -26,3 +26,11 @@ run.bat # For Windows | |||
| ``` | |||
|
|
|||
| Once you have MobSF up and running you can open it in your browser by navigating to <http://127.0.0.1:8000>. Simply drag the APK you want to analyze into the upload area and MobSF will start its job. | |||
There was a problem hiding this comment.
This tool page now mentions uploading a repackaged IPA for iOS, but the earlier instruction still says to drag an APK into the upload area. Consider generalizing that sentence to "APK or IPA" (or otherwise clarifying Android vs iOS) so the workflow reads consistently.
| Once you have MobSF up and running you can open it in your browser by navigating to <http://127.0.0.1:8000>. Simply drag the APK you want to analyze into the upload area and MobSF will start its job. | |
| Once you have MobSF up and running you can open it in your browser by navigating to <http://127.0.0.1:8000>. Simply drag the APK or IPA you want to analyze into the upload area and MobSF will start its job. |
|
Applied Copilot's style and grammar suggestions. |
|
Great, thank you! Next time, please incorporate any suggestions using the GitHub UI's buttons for "Add suggestion to batch" and then "Commit suggestions" this help us keep track of Copilot's (or other reviewer's) commits and also auto resolves the conversations which saves us a lot of time especially when there are a lot of them (not the case here but still helpful). Again, not an issue but just FYI for next time 🙏 |
tools/generic/MASTG-TOOL-0035.md
Outdated
| docker run -it --rm -p 8000:8000 -v /var/run/usbmuxd:/var/run/usbmuxd opensecurity/mobile-security-framework-mobsf:latest | ||
| ``` | ||
|
|
||
| Once the container has USB access, upload your repackaged IPA to the MobSF web interface. |
There was a problem hiding this comment.
For this line and the above: how about APK and Android physical devices?
There was a problem hiding this comment.
Done! I’ve updated the section to clarify Android physical device support via --device /dev/bus/usb, generalized the final step to include APKs, and aligned the wording to virtual jailbroken or rooted devices.
Co-authored-by: Carlos Holguera <perezholguera@gmail.com>
|
@Galaxy-sc can you give some examples of packages on which you applied this technique? I've tried it a few times already but was not able to do so. Mostly due to entitlement limitations (eg entitlements that don't exist on older ios versions) or app extensions. |
|
I tried it on an even older jailbroken device, with iOS 12.4 and unc0ver and used a recent version of a well known app. I can install the App on the jailbroken device, but I can't install iridium on it: I could install When I unzip the created IPA from flexdump it's still encrypted: When trying to use flexdecrypt on the binary I get this error: @Galaxy-sc can you please share your test setup and what worked for you:
This seems to me like a very fragile setup and might only word in very specific use cases, and this we need to point out and document properly. So far I couldn't replicate it on 2 jailbroken devices. |
sushi2k
left a comment
There was a problem hiding this comment.
Can you please. clarify this comment. @Galaxy-sc
| 1. Extract the FairPlay-encrypted IPA via [Apple Configurator](https://support.apple.com/apple-configurator). | ||
| 2. Unzip the archive and modify the `MinimumOSVersion` key within the `Info.plist` file to match the older jailbroken device's iOS version. | ||
| 3. Repackage and force-install the app. Please refer to @MASTG-TECH-0056 for standard app installation methods. If standard methods fail due to the version mismatch, using a tweak like @MASTG-TOOL-0127 is a common workaround. | ||
| 4. The app will probably crash right away due to missing modern APIs. However, the decrypted Mach-O binary is usually already loaded in memory. You can dump it during this early initialization stage using standard tools like @MASTG-TOOL-0050 (`frida-ios-dump`). Once you have the decrypted payload, just transfer it to your modern non-jailbroken device for patching. |
There was a problem hiding this comment.
I installed an app that needs > iOS 17 on a jailbroken iOS 15.8.3 device (with palera1n) by changing the min iOS version in the Info.plist. The app is installed, it crashes when it starts.
But if the app crashes, frida-ios-dump is not able to dump the app binary from memory. At least for me it wasn't working. My understanding is that the app/process need to run, ideally in the foreground. Please let me know if this would work otherwise. I tried to start the app multiple times, it crashes and then a time out comes.
$ ./dump.py TARGET_TEST -u mobile -P alpine
Start the target app TARGET_TEST
unexpectedly timed out while waiting for app to launch

Description
Adds a technique for dynamic analysis on non-jailbroken iOS devices. This follows the discussion in the issue and documents the decryption and sideloading approach used in practice.
Linted locally with
markdownlint-cli2.AI Tool Disclosure
Contributor Checklist
Closes #3724