hetzel.net

Threema Messages in Plain Text via USB and iCloud Backup

This translation was generated automatically.

Threema is an iOS messenger like the much-loved WhatsApp, with one key difference: data is encrypted in transit, and users hold the keys. The provider therefore cannot decrypt messages, and after comparing key fingerprints, users can be confident nobody is listening in on the connection.

The key is stored in the Keychain and apparently is not included in the iOS backup.

The decrypted messages themselves, however, are stored directly in the file system according to the FAQ, and are included in backups.

On iOS, Data Protection can protect the file system if the device has a passcode. Without a passcode, there is no such protection.

Without that protection, all messages can be read in plain text over USB—for example, with iExplorer—without a jailbreak.

Finally, the messages are also included in plain text in the iTunes backup and, if enabled, uploaded to the iCloud backup.

Threema

It’s easy to reproduce:

  1. Set up Threema and send a few messages.
  2. Make an iCloud backup.
  3. Erase the device completely.
  4. Restore from iCloud.
  5. Read the messages in plain text over USB.

I asked the developer for a comment. Despite the encrypted transmission, I find the handling of decrypted message text rather lax.

Update, August 13, 2013: Threema developer Manuel Kasper got in touch. In his view, iOS Data Protection protects the data well.

The locally stored data could be encrypted with another key, such as a long password, but that would significantly reduce usability.

I suggested encrypting the local data with the same key used to encrypt it in transit.

That wouldn’t solve the fundamental issue that the key is stored on the same device as the data. Manuel Kasper nevertheless thinks it’s a good idea in principle and might add it as an optional feature in a future update.

A useful Keychain detail (more here): entries can be bound to the device-specific UID key with the kSecAttrAccessibleWhenUnlockedThisDeviceOnly attribute. Backups therefore contain the encrypted Threema key, but it can only be used on the same device. It is not known whether Apple keeps a copy of that key.