radj
radj

Reputation: 4377

Why doesn't NSFileProtectionKey attribute when a device is jailbroken?

I created an iOS test app that applies NSFileProtectionComplete for a test file's NSFileProtectionKey attribute. I kill the app, and lock the device with a passcode. I then SSH into the device. In the SSH session, I can still read the test file as if it wasn't encrypted or any protection was put in place.

Using FileDP via SSH on the test file, the protection level shows up as expected which was set to NSFileProtectionComplete.

I tried logging in as both root and mobile via SSH and the results are the same. Is on device encryption disabled if the device is jailbroken?

Or is SSH not a reliable test if the file has been protected? If not SSH, how should file protection be tested?

Upvotes: 3

Views: 1075

Answers (1)

davidisdk
davidisdk

Reputation: 3794

Make sure:

  • a passcode lock is set in the Settings app,
  • the device is effectively locked with the passcode (the setting called "Require Passcode" can lead to the screen being off but the lock not being active).

Note that:

  • the protection is only for the content of the file, not its name. So you can get a list of protected files even when the protection is active,
  • prior to iOS 8, marking a folder as NSFileProtectionComplete does not ensure the files it contains are protected (you needed to mark every file).

Upvotes: 2

Related Questions