Keychain iOS Security

we want to use certificates on iPhone for authentication for MS Exchange Sync. We do not know how the security concept is implemented to protect these certificates.

eg. Can I get full access to Keychain on iPhone if ScreenLock is not enabled? (or with the Jailbroken iPhone).

Does anyone have any links about this?

+53
ios iphone certificate keychain
Aug 24 '10 at 15:43
source share
4 answers

Fraunhofer iOS Keychain Security Study:

From what I can tell, there are two levels of encryption that iOS keychain uses. At the first level, the lock screen lock code is used as the encryption key. The second level uses a key generated and stored on the device.

Fraunhofer researchers have figured out how to get around the second level. This is the β€œsimpler” level to get around, as the encryption key is stored on the device. So, on iOS4, their method only works with keychain entries that DO NOT use kSecAttrAccessibleWhenUnlocked or kSecAttrAccessibleWhenUnlockedThisDeviceOnly, because these entries are stored in memory with first level decryption - even when the phone is locked.

  • Starting with iOS 4, keys with kSecAttrAccessibleWhenUnlocked and kSecAttrAccessibleWhenUnlockedThisDeviceOnly are protected by an additional level of encryption
  • In iOS 3.x and earlier, all keys can be decrypted using the Fraunhofer method, regardless of the accessibility attribute used.
  • Devices without any passwords will still be vulnerable
  • Devices with weak passwords (less than six digits) will still be vulnerable

β‰ˆ50 ms per password try; β†’ β‰ˆ20 attempts per second; β†’ β‰ˆ1.7 years for a 50% change in guessing the correct access code for a 6-digit alphanumeric code with a base of 36. A standard simple code of 4 digital digits to be rude-forced in less than 9 minutes. Based on the assumption that the counter for incorrect attempts in iOS can be bypassed, since this is not hardware

Apple Inc. WWDC 2010, Core OS, Session 209, Application Data Protection, Slide 24

Bottom line: If you need to store sensitive data, it's best to use your own encryption. And do not store the key on the device.

Edit: There are many articles that cite Fraunhofer research and assure that their readers are not worried if their devices are not stolen, because this attack can only be performed with physical access to the device.

I somehow doubt it. The fact that the researchers did their tests with physical access to the phone seems to be just a way to simplify the problem, rather than limit it. This is their description of what they did to decrypt the keychain entries:

After using the jailbreaking tool to access the shell, we run a small script to access and decrypt the passwords found in Keychain. Decryption is performed using the provided functions by the operating system itself.

Like anyone who used jailbreak.me, jailbreaking does not require access to a physical device. Theoretically, it should be trivial to modify the jailbreak.me code and automate its following:

  • Jailbreak as usual (all this requires the user to open a malicious PDF file).
  • Run Fraunhofer scripts after jailbreak
  • Send passwords over the network to a location that an attacker can read from

So, be careful what you put in the keychain.

+45
Jul 15 2018-11-21T00:
source share

Typically, a keyword would be the recommended way to store such a certificate. However, it has been discovered that jailbreaking can be used to circumvent keychain security ( article ).

+4
Mar 02 '11 at 10:20
source share

Franhofer conducted an iPhone Keychain security study:

http://www.sit.fraunhofer.de/Images/sc_iPhone%20Passwords_tcm501-80443.pdf

+3
Mar 19 '11 at 22:48
source share

I can answer part of your question, but since the other part is still unknown, I vote on the question, since I also want to know the answer.

The part I can answer is: "Can the application get full access to keychain if screen lock mode is not enabled." No, each application has its own iphone keychain area, which means that the application can only access its own secrets. These secrets are not blocked for the application itself, so there is no way to hide entries in the keychain file from the application itself. So, to summarize: the application can read its own entries and no other entries.

I am interested to know what happens on jailbroken devices. Are the key chains of all applications open after the device has jailbreak?

+2
Oct 11 2018-10-10
source share



All Articles