Project: titanium
Issue TIMOB-16488: iOS: Property List lacks of Secure Class Protection - NSFileProtectionKey
h3. Issue After a revision from customer Vulnerability assessment team they have raised a low priority issue in reference that the Property List lacks of Secure Class Protection - NSFileProtectionKey The list of files they are referring to is basically everything in the installed package on the device (Cache.db, Cookies.binarycookies, etc.) h3. Description On iOS, every file is encrypted with an unique encryption key as illustrated in the image. The content of a file is encrypted with a per-file key, which is wrapped with a class key (data protection class key) and stored in a file metadata, which is in turn encrypted with the file system key (EMF key). The file system key is generated from the hardware UID. UID is unique per device and it is embedded in hardware and inaccessible to code running on CPU. A file which is encrypted only with the file system key, upon physical access to the device custom ramdisk techniques can be used to steal the file from passcode protected devices. To overcome this problem Data protection was introduced. Data protection protects the data at rest on iOS devices using encryption keys that are tied to the device passcode and UID. So if the file is protected with a data protection class and the user sets a passcode for the device, an attacker cannot access the file using custom ram disk technique until he knows the passcode. Data protection provides another layer of security to files by encrypting them with a passcode generated key. File protection is enabled by setting an accessibility constant to NSFileProtectionKey file attribute. Later the files are encrypted with a protection class key respective to the accessibility constant marked for that file. Ex: If a file is marked with NSProtectionComplete accessibility constant then the file is encrypted with Class 1 protection class key and it is available only when the user unlocks the device. If a file is created without specifying any accessibility constant then the file is marked as NSProtectionNone and it is accessible even the device is locked . List of accessibility constants available for files are shown in the below table. h3. iOS Reference https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html
Story points: 13