Advertisement
Joker0day

How to Sanitize Thunderbird and Enigmail

Jul 12th, 2020
1,614
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.92 KB | None | 0 0
  1. How to Sanitize Thunderbird and Enigmail
  2. Posted at July 28, 2014
  3.  
  4. A couple of weeks ago, a good friend of mine @napoleon, was testing out the Mailvelope extension/add-on. He was interested in the idea of using OpenPGP encryption with Gmail. During his evaluation he noticed that Mailvelope likes to use the "Comment" armor header to advertise itself. This is a problem in a world where NSA targeted surveillance is real. Using OpenPGP suggests that you have the technical know-how to be private and that will likely make you interesting to the NSA and Xkeyscore. You should take care to disclose as little as possible about the privacy tools you use, if only to make it harder to run automated, targetted attacks against your computers and accounts. While @napoleon was patching the Mailvelope JS to disable its meta-data leak—because there is no config switch to turn it off—I took a look at Thunderbird with the Enigmail add-on and discovered a number of similar meta-data leaks, all of which can be stopped with just a little tweaking.
  5.  
  6. Disable the User-Agent Header
  7. The first meta-data leak in Thunderbird is the "User-Agent" header that identifies Thunderbird as the software that generated the email:
  8.  
  9. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0
  10. To disable the "User-Agent" header, follow these steps:
  11.  
  12. In the main menu, select "Preferences" to open the preferences dialog.
  13. Select the "Advanced" section in the top tool bar.
  14. Select the "General" tab.
  15. Click the "Config Editor" button in the lower right to open the configuration editor dialog. It will give you a warning about potentially breaking things, just click the button labeled "I'll be careful, I promise!".
  16. Anywhere in the list of configuration settings, right-click and select "New" > "String" to create a new setting.
  17. You will be asked to enter the new preference name, enter: "general.useragent.override" and click the "Ok" button.
  18. You will be asked to enter a value, leave it empty and click the "Ok" button.
  19. What you just did was tell Thunderbird that you want override the value of the "User-Agent" header in emails. By leaving the value blank, Thunderbird will not add the "User-Agent" header to emails at all.
  20.  
  21. Disable the X-Enigmail-Version Header
  22. The next meta-data leak is a header added to all emails that advertises Enigmail—and its version—as the encryption tool used to encrypt/sign the email:
  23.  
  24. X-Enigmail-Version: 1.6
  25. To disable the "X-Enigmail-Version" header, follow these steps:
  26.  
  27. Repeat steps 1–4 from the section above on disabling the "User-Agent" to open the config editor.
  28. In the "Search" box at the top of the config dialog, type "extensions.enigmail.addHeaders" and press the Enter key.
  29. Now double left-click on the value of the setting to change it from "true" to "false".
  30. You just told Enigmail that you do not want it to add any headers to your emails.
  31.  
  32. Disable OpenPGP Comment Armor Header
  33. In addition to email headers, the OpenPGP format described in RFC 4880 specifies a number of armor headers that can be included in the OpenPGP message block. One of the headers is a "Comment" used for any user-defined data. Mailvelope uses the "Comment" armor header to advertise itself and so does Enigmail:
  34.  
  35. Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
  36. To disable the "Comment" armor header, follow these steps:
  37.  
  38. Open the config editor by following steps 1–4 above.
  39. Search for the setting by typing in the search box: "extensions.enigmail.useDefaultComment" and pressing the Enter key.
  40. Double left-click on the value of the setting to change it from "false" to "true".
  41. This seems like a logic inversion bug to me. The default comment is the advertisement for engimail and it would seem like making the setting "false" would prevent it from adding the default comment. But, after testing both values, setting it to "true" disables the "Comment" armor header.
  42.  
  43. Disable OpenPGP Version Armor Header
  44. The last meta-data leak is another armor header that Enigmail uses to advertise the OpenPGP tool and version that it used to sign and/or encrypt the email message:
  45.  
  46. Version: GnuPG v1
  47. To disable the "Version" armor header, follow these steps:
  48.  
  49. In the main menu, select "Add-ons" to open the "Add-ons Manager" tab.
  50. In the "Add-ons Manager" select the "Extensions" tab on the left.
  51. In the list of extensions, select the Enigmail extension.
  52. Click on the "Preferences" button to open the OpenPGP preferences dialog.
  53. Select the "Advanced" tab.
  54. In the box labeled "Additional parameters for GnuPG", type: "--no-version".
  55. You are telling Enigmail to use the "--no-version" parameter when it executes GnuPG to encrypt and/or sign your email message. That prevents GnuPG from adding the "Version" armor header to its output.
  56.  
  57. Conclusion
  58. After making these changes to your stock Thunderbird and Enigmail installation, the encrypted emails you send will be much more sanitary and will disclose less information about the tools you use.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement