Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

The iOS data protection API and its implementation are fairly well documented, but it is only really useful if apps actually use some level other than NSFileProtectionNone for their files.

Is there any information on what protection level the stock iOS apps use for various data? Apple mentions that the Mail app uses the "Protected Unless Open" class for attachments downloaded in the background and stores and stores messages protected with NSFileProtectionComplete, but says nothing about other data like contacts, photos etc.

What about third-party developers; is there any research on how common the use of data protection is with popular apps? For iOS 7, Apple mentions that "[a]ll third-party apps now have data protection enabled automatically", but I wonder if that applies to "legacy" apps as well, and if some even actively disable the protection.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can check the implemented data protection of any application yourself. on a jailbroken phone use cycript to attach to SpringBoard (or any other process) eg:

cycript -p SpringBoard

and run the following script inside:

A cycript script to list the FileProtection class of every file in a given path

?expand


var path=@"/var/mobile/Library/Preferences/";
var fm = [ NSFileManager defaultManager ];
fin = [ fm enumeratorAtPath:path ];
ps= [] ;
while (name=[fin nextObject] )
{
 fPath=path+name;
 pClass=[[ fm attributesOfItemAtPath:fPath error:nil ] objectForKey:@"NSFileProtectionKey" ]
 pName=name
 ps.push(""+pName+":"+pClass+"")
 }
 ps.toString().replace(/,/g,"\n");

on a 5.1.1 iOS i got these results for Stocks application and for youtube application:

com.apple.stocks.plist:NSFileProtectionNone
com.apple.youtube.dp.plist:NSFileProtectionComplete

On a 6.1.2 iOS device things didn't look different:

com.apple.stocks.plist:NSFileProtectionNone
com.apple.youtube.dp.plist:NSFileProtectionComplete

you can try running it on your device and see what has changed on other versions

@_coreDump

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.