0

I'm guessing that there are ways to run a modified app (where the app signature fails) on Cydia or any jailbroken device.

I would like to my currently-executing code to verify that it hasn't been modified.

What is the best way to have a self-check done within an iOS app?

makerofthings7
  • 60,103
  • 53
  • 215
  • 448
  • 3
    What if they modify the code that checks if the app is modified? In short: clients can never be trusted. – 4castle Apr 09 '17 at 23:38
  • It's not clear what you're exact goal is, but this is probably a duplicate of http://stackoverflow.com/questions/9181186/secure-https-encryption-for-iphone-app-to-webpage. The short answer is this is not a solvable problem. You can try to do something simple, and maybe throw some obfuscation in there, but if you're really serious about it, then at a minimum you'll need to regularly release new versions every time attackers reverse engineer your obfuscation. Make sure it's worth the work. It generally takes at least a small, ongoing team devoted to the problem. – Rob Napier Apr 10 '17 at 02:11
  • 1
    (BTW, in thinking through any solution, remember: if this were really solvable, then Apple would have used the same technique to prevent the jailbreak in the first place. They have people dedicated to preventing this kind of modification, and they control every aspect of the platform down to the hardware, and still jailbreaks happen pretty quickly. Set your expectations accordingly.) – Rob Napier Apr 10 '17 at 02:15
  • Thanks @RobNapier ... since you seem to know much about this, do you know what Cydia and others do for FairPlay DRM, iCloud / keychain connectivity, and anything with the secure element? – makerofthings7 Apr 10 '17 at 03:22
  • It's a pretty constant cat-and-mouse, and I haven't kept up with all the latest churn. There have been man-in-the-middle attacks, and there used to be an Apple debug tool (SniffPurple or something like that). Probably the best place to start researching is /r/jailbreak. (Of course, it's sometimes hard to get the specifics of attacks in public forums. That's part of the cat-and-mouse. Apple doesn't say how they protect things, and attackers don't always say exactly how they break them.) – Rob Napier Apr 10 '17 at 13:20
  • At any given time, one thing or another might still be "safe" against well-publicized attacks. That doesn't mean it's safe against folks who *don't* publicize their attacks, and that's a whole group, too. Basically, you can do a few simple things to try to keep the most simplistic attackers at bay (basically anything you come up with over an afternoon). Or you can create a security team and deal with it as an ongoing strategic struggle that you will never "win," but you can try to manage. – Rob Napier Apr 10 '17 at 13:25
  • 1
    @LamonteCristo, jailbreaks don't touch any of that stuff. iOS after jailbreak is pretty much unchaged apart from making a few tweaks in the kernel to allow running unsigned binaries. Some sandbox profiles may be more loose than they should be. Everything else still works as it is. – creker Apr 12 '17 at 12:59

0 Answers0