sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.17k stars 825 forks source link

[bug] The patched app contains an app extension with an illegal bundle identifier #594

Open arjun-govindaraju opened 1 year ago

arjun-govindaraju commented 1 year ago

Describe the bug After patching an IPA and installing using the ios-deploy, get this error. Installation tried through both ios-deploy and using the xcode device management Error 0xe800009e: This app contains an app extension with an illegal bundle identifier. App extension bundle identifiers must have a prefix consisting of their containing application's bundle identifier followed by a '.'. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)

To Reproduce Steps to reproduce the behavior:

  1. Run command 'objection patchipa --source --codesign-signature < certID >'
  2. Run command 'unzip < patched >.ipa'
  3. Run command 'ios-deploy --bundle Payload/ -W -d'

Expected behavior Should be able to install the patched app into a device

Evidence / Logs / Screenshots

objection patchipa --source ~/Downloads/com.dummy.appname-59266-prerelease.ipa --codesign-signature 9524D78A8185778D1B3EBABA560B5FE115344E28
Using latest Github gadget version: 16.0.8
Patcher will be using Gadget version: 16.0.8
No provision file specified, searching for one...
Found provision file /Users/user/Library/Developer/Xcode/DerivedData/app1-fjudncfhvclytrbveytxrghhrlit/Build/Products/Debug-iphoneos/app1.app/embedded.mobileprovision expiring in 7 days, 4:08:00.397419
Found a valid provisioning profile
Mobile provision bundle identifier is: com.dummy.test.app1
Working with app: your test.app
Bundle identifier is: com.dummy.appname-dogfood
Codesigning 2 .dylib's with signature 9524D78A8185778D1B3EBABA560B5FE115344E28
Code signing: libswift_Concurrency.dylib
Code signing: FridaGadget.dylib
Creating new archive with patched contents...
Codesigning patched IPA...
[
  '/var/folders/_n/2g909kj527l11wck90h06c4r0000gq/T/com.dummy.appname-59266-prerelease-frida.ipa.5cd7b461-3de2-4cf5-9b98-947682a8bbee/Payload/your test.app/PlugIns/IntentExtension.appex/IntentExtension',
  '/var/folders/_n/2g909kj527l11wck90h06c4r0000gq/T/com.dummy.appname-59266-prerelease-frida.ipa.5cd7b461-3de2-4cf5-9b98-947682a8bbee/Payload/your test.app/PlugIns/IntentExtensionUI.appex/IntentExtensionUI',
  '/var/folders/_n/2g909kj527l11wck90h06c4r0000gq/T/com.dummy.appname-59266-prerelease-frida.ipa.5cd7b461-3de2-4cf5-9b98-947682a8bbee/Payload/your test.app/PlugIns/NotificationContentExtension.appex/NotificationContentExtension',
  '/var/folders/_n/2g909kj527l11wck90h06c4r0000gq/T/com.dummy.appname-59266-prerelease-frida.ipa.5cd7b461-3de2-4cf5-9b98-947682a8bbee/Payload/your test.app/PlugIns/NotificationServiceExtension.appex/NotificationServiceExtension',
  '/var/folders/_n/2g909kj527l11wck90h06c4r0000gq/T/com.dummy.appname-59266-prerelease-frida.ipa.5cd7b461-3de2-4cf5-9b98-947682a8bbee/Payload/your test.app/PlugIns/ShareExtension.appex/ShareExtension',
  '/var/folders/_n/2g909kj527l11wck90h06c4r0000gq/T/com.dummy.appname-59266-prerelease-frida.ipa.5cd7b461-3de2-4cf5-9b98-947682a8bbee/Payload/your test.app/PlugIns/WidgetsExtension.appex/WidgetsExtension'
]
Cannot resolve rpath for: @rpath/libswiftCore.dylib from /var/folders/_n/2g909kj527l11wck90h06c4r0000gq/T/com.dummy.appname-59266-prerelease-frida.ipa.5cd7b461-3de2-4cf5-9b98-947682a8bbee/Payload/your test.app/Frameworks/libswift_Concurrency.dylib
Warning: Cannot resolve dependency library: /var/folders/_n/2g909kj527l11wck90h06c4r0000gq/T/com.dummy.appname-59266-prerelease-frida.ipa.5cd7b461-3de2-4cf5-9b98-947682a8bbee/Payload/your test.app/Frameworks/libswift_Concurrency.dylib
Warning: missing file: @rpath/libswiftCore.dylib

Copying final ipa from /var/folders/_n/2g909kj527l11wck90h06c4r0000gq/T/com.dummy.appname-59266-prerelease-frida-codesigned.ipa to current directory...
Cleaning up temp files...

Environment (please complete the following information):

Additional context Application should have some extensions defined in it? Sorry I'm not a iOS developer, so I'm not sure of the lingo