Protecting the contents of the profile - mail

From MozillaZine Knowledge Base
Jump to navigationJump to search
This article was written for Thunderbird but also applies to Mozilla Suite / SeaMonkey (though some menu sequences may differ).

Messages are stored in text files within your profile folder. Somebody else could read them using Thunderbird or by viewing the appropiate file with a text editor. If you want to prevent this the first thing you need to do is decide how much effort to protect your messages is appropiate. The easiest option is to password-protect the profile with an extension, but this is trivial to bypass.

Several methods to consider:

Weak methods

  • The ProfilePassword extension requires a user to enter a password in order to use the profile. It is trivial to bypass by running in safe mode (to disable the extension) or by using a text editor such as Notepad to read the text files that Thunderbird stores the messages in. This method may be sufficient if other people accessing the same computer are not technical or if they are unlikely to deliberately snoop.
  • The master password is meant to protect your stored passwords, not your profile. If you configure one it will prompt the user for a master password when they run Thunderbird. However, if you press the X control or the cancel button three times its replaced by a prompt for the accounts password , which you can cancel. This method is not recommended, but some users might find it sufficient for casual snoopers. Another solution would be to use a free password safe that can auto-type passwords such as Keepass.
  • If you have multiple users on a machine, create a separate Windows user account for each person. Typically this will prevent anybody without admin privileges on that PC from accessing your profile. The easiest way for somebody to bypass that would be to boot another operating system using a bootable rescue CD or flash drive.

Medium methods

  • Use operating system commands to restrict access to the files. For example, if you store your profile on a NTFS partition you can right-click on the folder in Windows Explorer, select Properties, the Security tab, and then specify who has access to that folder. That can be bypassed by somebody else with admin privileges, or by booting another operating system using a live CD such as Knoppix. In a business environment an admin might consider using group or system policy settings to restrict access or store it in a password-protected file share on a file server.
  • The Professional version of Windows 2000 and later versions of Windows supports encrypting files and folders on NTFS volumes using EFS (encrypted file system). Right click on the profile folder in Windows Explorer, select Properties, Advanced, check "Encrypt contents to secure data" and then press the Apply button. One risk is that another user with admin privileges can decrypt a folder by modifying the Data Recovery Agent configuration and just wait for you to login again. Encrypting a folder doesn't prevent somebody from deleting it or listing its contents so you may want to set the NTFS permissions to prevent that (as described in the preceding paragraph).
  • Use an IMAP account. By default, IMAP stores messages on remote folders on a server which you can access as if they're local folders. This doesn't protect local cache. Nor does it protect your address book or other files in your profile. But it does simplify things since it does not download the message body to your hard disk, even when you're reading it. Somebody could still use any passwords you stored in the Password Manager unless you set a master password.

    Thunderbird 3 by default downloads all your messages to your computer via message synchronization. You need to disable that in Tools -> Account Settings -> Synchronization & Storage if you want to only store messages in remote folders.

    Note: You can password protect the contents of the message pane by setting mail.password_protect_local_cache to true using the configuration editor in conjunction with setting a master password in Thunderbird.

Strong methods

  • Store the profile on a password-protected encrypted disk partition. You want to use a encrypted disk partition to avoid being prompted to encrypt and decrypt each file. You don't necessarily have to use a real partition, typically this type of software also supports file containers, a way to make to make a file act like a partition. If the profile already exists, move it per these instructions.
  • TrueCrypt used to be the most frequently recommended solution due to its good reputation and it supporting Windows, OS X and Linux. Its unclear why the original project suddenly shut down in a bizarre way May 28, 2014, replacing version 7.1a with a version 7.2 that only lets you decrypt existing disk partitions but there is a project in Switzerland to revive it. The second round of a independent security audit will continue despite the project being suddenly shutdown. You can get the last usable version here. There is also a re-branded version of TrueCrypt for Linux called RealCrypt with a different license. [1] [2]
  • Diskcryptor was originally compatible with TrueCrypt but now supports its own format. It supports many configuration options for booting an encrypted operating system , supports Windows LiveCD, and has full support for external storage devices. Its only available for XP and later versions of MS Windows. Its frequently suggested as the best free alternative to TrueCrypt.
  • Symantec (they bought PGP) sells PGP whole disk encryption (encrypts entire disk) and PGP Desktop Email (encrypts just your mail). Thunderbird's built-in S/MIME support or the Enigmail (OpenPGP add-on) are free alternatives to PGP Desktop Email. The main problem with protecting your mail by sending and receiving encrypted messages is that you might be willing to deal with the hassles, but most people won't. You will typically have a mixture of encrypted and unprotected messages.
There is nothing necessarily wrong with the following solutions, but they don't have the same reputation:
  • FreeOTFE supports all versions of MS Windows from Windows 2000 onwards (including Windows 7). It can also create Linux compatible volumes (Cryptoloop "losetup", dm-crypt and LUKS are supported) for FAT32/NTFS. It does not require admin rights. There is also a version (FreeOTFE Explorer) that does not require you to install the application to use it. The major problem with FreeOTE is that it was last updated February 2010.
  • The combination of Rohos Mini Drive and Rohos Disk Browser supports on the fly encryption of FAT32/NTFS partitions on USB flash drives without requiring admin privileges. It might be the best choice for a roaming Windows user. See [3] and [4] for more information.

If you're fanatical about privacy:

  • Think about where your temporary files are stored. Thunderbird creates two temporary files when sending a message, and sometimes creates others in a MozillaMailnews subdirectory (in that directory). Opening an attachment will also typically create a temporary file. Under Windows you can set the TMP and TEMP environmental variables to point to where temporary files should be created. You might set it to a small RAM disk or a directory in an existing password-protected encrypted disk partition.
  • If you delete a message stored in your POP account or Local Folders directory the original message is still in that folder (just hidden from view and marked for deletion). When you compact a folder it physically deletes the "deleted" messages. It creates a temporary "nstmp" file and then deletes it when it does this. You'd need to use a secure data removal tool to prevent somebody from using a disk editor to read the sectors used to store those messages. However, if you stored the profile on a password-protected encrypted disk partition the messages in the freed sectors should still be encrypted, not clear text.
  • A IMAP account stores the headers for each folder in mail summary files on the hard disk. The *.msf files contain the subject and the email addresses for each message. One way to automatically remove those files would be to modify the Thunderbird shortcut to launch a batch file, and have it cleanup when you exit Thunderbird. The first line would launch Thunderbird. The second line could contain something like del accounts_pathname\*.msf /S to delete all of the *.msf files in the IMAP account directory in the profile. Doing this will force Thunderbird to fetch the headers for any remote folder you open (such as the inbox folder) the next time you run it.
  • Don't forget about the optional disk cache (Cache directory), offline folders (OfflineCache directory), search index (globl-message-db.sqlite) and *.wdseml files (Windows Search Integration) in the profile. Deleting an account doesn't delete its messages, it just makes Thunderbird forget about that account
  • There are products such as Passware Kit Forensic that can within an hour decrypt hard drives encrypted using BitLocker, FileVault and TrueCrypt. It can also recover passwords for PGP virtual disks and Mac keychain files. It doesn't 'break' the encryption, it does a memory dump to extract the keys while the user is logged in. This type of attack has been known for a long while and doesn't work if you power off rather than leave the computer in sleep mode, or dismount the volume. [5] [6]

See also

External links