I have need to bypass JailBreak detection in iOS application, for pt. I have patched/changed its few related parts e.g. where it is detecting cydia etc. And uploaded back to the iDevice to found that it is crashing.
Do I need to sign it-- even on Jailbroken phone? if so can I self sign it?
Or I am doing something else wrong?
Will appreciate your views
Yes, you need to re-sign it.
All iOS apps must be signed with an Apple issued cert on iOS.
On the iOS device, the user must also have selected \Settings\General\Profiles & Device Management\ for the Developer Cert to be trusted.
Re-signing a patched iOS binary (the iPA file) can be achieved a number of ways. Try this as a starting point: https://github.com/nowsecure/node-applesign/wiki
Since xCode 7 you could get a free developer cert to sign app bundles and frameworks. This free account works fine for patching and re-signing app.
As a sidenote: the same rule do not quite apply to Android. You must sign the Android app (the APK file). But a self-signed APK will work if the device has Allow Sideloaded App = true.
Related
I’ve modified an .ipa file by unzipping contents, decrypted and modified a few scripts, and re-zipped. How can I test the new app as quickly as possible to see the new changes, without having to go through code signing (yet)? Do I require to jailbreak my phone or is there any other way I can emulate the new ipa?
Thank you!
Jailbreak
With recent jailbreaks could be not that easy as it was in the earlier days. Even the simplest things don't work like you expect.
Resign IPA with developer account
This could be problematic due to entitlements. If the application uses them extensively then you would have to create provisioning profile containing all of them possibly also modifying the application binaries as some entitlements can't be recreated as is (like app groups and iCloud containers which are globally unique across all developer accounts).
Free developer account is even worse as it doesn't have access to some entitlements. You would have to examine the application signature and see which entitlements it uses and what the probability that it might work without them. For example, re-signing an app without SiriKit entitlement might cause a crash. When an app tries to access the API iOS will kill it due to missing entitlement.
You might heard about Cydia Impactor which does exactly that. But it actually does a pretty poor job of it. It doesn't preserve entitlements, so there's high probability that the app will crash. Pretty much all remotely complex apps use many entitlements. But it's worth a try anyway.
I think this tool maybe helpful for you: https://github.com/DanTheMan827/ios-app-signer.
If you wish to run app on iOS devices, a valid code signature is required unless that device is already jailbroken.
In fact, jailbreaking does not enable you to run un-signed code on iOS devices. It just allows you to install some plugin to tweak the system. You still need something like AppSync (https://github.com/angelXwind/AppSync) to bypass the system-level code signature verification.
So you have to sign you executable if you don't want to jailbreak. Xcode provides free app provisioning file that you only need a Apple ID and you can get a 7-day app provisioning to let you run the ipa.
Recently I saw a website that include lots of AppStore applications and they resigned that applications via their Enterprise account and let people to download them directly to their iPhone/iPads.
I am wondering how they do this? I had resigned .ipa files that was created for Ad-Hoc via Enterprise; but how they resign AppStore applications with enterprise account too?
I am wondering for the answer because it is important and we should consider more security challenges for the case of resigning our appstore applications with enterprise accounts.
When an IPA is downloaded from the app store (including by Xcode), the binaries in that IPA are encrypted by Apple. Simply resigning these binaries will not work. One way to remove the DRM, and this may be illegal in your country, is to extract the unencrypted binary during runtime on a jailbroken device.
Note that when resigning apps, such services need to use a different provisioning profile than you originally used, and that provisioning profile will have a different bundle identifier than the one in your Info.plist. You can use tools such as TCMobileProvision to inspect and compare the two identifiers. This is a mouse and cat game, as they could actively look for that code and remove it statically, but you will most likely reduce the possibility of your app being resigned significantly.
Adding on to Leo's answer:
There are tools available such as Clutch to help decrypt the Apple signed binary on a jailbroken device at runtime. After decrypting the binary, you will need to figure out the app's bundle id and entitlements. Some versions of Theos (such as theos-jailed) come with an info tool that dumps the application entitlements. When regenerating your patched provisioning profiles, you must be sure your patched profile match the entitlements of the original profile used by the target app.
Everything after the decryption step can be accomplished without a jailbroken device. A jailbreak is required to remove the AppleFairplay DRM by dumping/decrypting the signed app by patching into the device's runtime.
I'm in Flash CC... I've created a certificate and provisioning profile for app development, but when I try to publish to the device via the AIR 3.8 for iOS, it processes for about 1min30, and then throws up this error. I'm not sure how to fix it or what could be causing it. I've chosen an app id com.mycompany.myappname for the provisioning profile... does my flash file need to incorporate that structure anywhere?
Any help appreciated.
Thanks.
You need to do a few things (some of which you may have already done, just outlining them all):
Create a development certificate, convert it to a .p12 as instructed by Adobe
Create an app in the portal.
Add your device's UDID to the portal. You must use iTunes or Xcode to get this. As of iOS 7, the API used to grab the UDID on the device is removed so any app that claims to do it is returning a false UDID (false UDIDs will start with a bunch of "F"'s, I believe)
Create your provisioning profile. Make sure it is a development profile and that it includes your device's UDID and the appropriate App
I am unsure if you still have to do this, but you used to have to enable developer mode on device. This may have been done away with in iOS 7, however, as I cannot find the setting on my iPad
When compiling, your app must use the exact id that the App you created in step 2 did
Extra Tips:
Avoid doing WiFi debugging. It works, but not well. Stick to USB debug
If you have a previous version of the app on your device, try deleting it (long press the icon, hit the X)
Make sure your version number is valid (should be x.y.z, where x, y, and z are all a number between 0 and 999)
Some of that is obvious, but make sure you follow it all.
i had the same issue and the points given above didn't solved it... after banging my head for two days i deleted the Entitlement tag from the project xml file..and that solved it digging deeper i found that the issue was i had a key in it beta-reports-active and that only works for Store Submission
When I try to test my app on my jailbroken 5s I keep getting this error for some reason, it just started happening as well... I was able to test on my apps on my device this morning but now it doesn't work, and yes I tried restarting xCode.
Error message:
The identity used to sign the executable is no longer valid. Please
verify that your device’s clock is properly set, and that your signing
certificate is not expired. (0xE8008018).
My device time is set to automatic so I don't see how it could be incorrect, and the certificate is still valid, I just made a new one...
Please don't tell me I need to pay the 99 dollar developer fee to do this. I am jailbroken and I will not do this, nor will I install app sync as I didn't need it installed before. I have already created a self signing certificate and everything, even edited all the plist files and changed the build settings in my app, nothing works.
Did you try to reverify the device in Xcode? If not try that. Else something tells me the system discovered your self made certificate.
You can't use self-signed certificates with Xcode to my knowledge. You must use an Apple-issued certificate to publish using Xcode. There are special ways to install self-signed apps on jailbroken phones, and Xcode isn't one of them. In theory, you could modify the Xcode project's build procedure to use this special method, but it really isn't worth the hassle in my opinion. If $99 is honestly too much for you to have access to Apple's awesome developer community, then Android will always accept new developers. Just remember that $99 is not much money for most in the developed world, and if you own a Mac and an iPhone (or several) then you certainly can afford it, and it's definitely worth the money considering what it gets you.
Thank you, for Reading my question post. i will make it simple & easy to read post
-> These are the steps i took, please help troubleshoot.
1) Finished the Game App on a Windows PC with Adobe Flash pro cc
2) >"Steps Before exporting on Publishing setting"<
A)"Created" Apple Certificate {"Tools"-Windows OpenSSL, to create
Apple Cert. on windows pc." (Completed)
//Note its a Develop Cert.//
B) "Created" App iD (Completed)
C) "Created" Provisonals Profile with the (ipad device, cert, app
id). (Completed)
3) Publishing Settings -"Target" *4.0 *Adobe air * for *IOS*
4) install app on itunes transfer and sync with ipad !Done
5) on the ipad tap the app to install and it should work
Whats happening Now!
App will never install "Stuck in a Frozen State" & " Icon Seems to be Grey"
My Tech Specs ##
Windows 7
Flash Pro CC
4.0 Air for ios
AS(3)
Ipad Air Ios 7
"I do not own a Mac pc"
Random troubleshooting thoughts
is it ipad air ios 7 hurting me? or do i have to add some actionscript 3 code in my actions in flash.
or is it my windows pc export to my ipad. at this point my brain is fryed i need some serious help
so upset i finished a game i can't even try it on the ipad for development testing it is my first game i ever created in my life. runs fine on "mobile testing device" when you test movie "in flash pro cc on windows".
thank you for reading
This is a certificate issue. The infinite install/gray icon issue is specific to iOS 7; previously it would give you an alert saying it failed to install. Note that this is not an iOS 7 issue, just the way iOS 7 displays the same issue present in all versions of iOS.
You must use a mobile provisioning profile that includes the device's UDID, unless you are downloading from the App Store or using an Enterprise license. Additionally, you can no longer use an app to get the UDID and you must use iTunes instead. If your UDID starts with "FFFFFF" or similar, it's wrong.
Additionally, the P12 file you generate must be generated using Adobe's process (you can find a link to instructions in the window where you set the certs). Other methods may fail. Even further, I have never successfully converted a .cer file to P12 using a Windows util. I always have to use Keychain on OS X, although I never tried any command line tools.
You also need to make sure you are using the correct profile. If your device is set up as a Developer device (I believe you have to do this in Xcode, though there may be other ways), you can install a Development Profile app on your device. If you do not, you can only use Ad Hoc to install. App Store Profile apps cannot be installed on common devices; only by Apple or through the App Store.
And one final thing: make sure your cert matches your profile. You have two types of certificates: Developer and Distribution. If you are using a developer profile, you must use a Developer cert. If you are using an Ad Hoc or App Store profile, you must use a Distribution cert.
I was also banging my head against the wall with this one... and about a week or so later, after retracing my steps, and making sure I've jumped through all the Apple provisioning hoops and keychain bs. No need for xCode in any step of the process either, I'm all Flash Pro CC.
Anyway here it is, after adding the client's device to the device list in Apple's Dev Center, I failed to remember (and thanks to an old Lee Brimlow video) that you have to click the checkbox next to the devices listed in the development provisioning profile you will be using. Click Edit on your provisioning profile, click the missing checkboxes, save the changes, download, replace your dev prov, publish again, do the iTunes sync and boom. No more gray installing problem.
Hope this helps someone.