release 0.3.5 securedrop team and contributors › pdf › securedrop › release-0.3... ·...

209
SecureDrop Documentation Release 0.3.5 SecureDrop Team and Contributors June 03, 2016

Upload: others

Post on 24-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop DocumentationRelease 0.3.5

SecureDrop Team and Contributors

June 03, 2016

Page 2: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that
Page 3: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

User Guides

1 Source Guide 31.1 Choose who to submit to . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Get the Tor Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Making your First Submission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Continuing the Conversation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Journalist Guide 152.1 Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.2 Create GPG key for the journalist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.3 Connect to the Document Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.4 Move Documents to the Secure Viewing Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.5 Decrypt and work on the Secure Viewing Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.6 Interact With Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.7 Work with Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.8 Encrypt and move documents to Journalist Workstation . . . . . . . . . . . . . . . . . . . . . . . . 262.9 Decrypt and prepare to publish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3 Administrator Guide 293.1 Adding Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4 Overview 354.1 Technical Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.2 Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.3 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5 Terminology 395.1 App Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395.2 Monitor Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395.3 Source Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395.4 Document Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395.5 Journalist Workstation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395.6 Admin Workstation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.7 Secure Viewing Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.8 Two-Factor Authenticator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.9 Transfer Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6 Passphrases 416.1 Admin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416.2 Journalist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

i

Page 4: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

7 Hardware 437.1 Required Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437.2 Optional Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447.3 Specific Hardware Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

8 Before you begin 49

9 Create Tails USBs 519.1 Install Tails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519.2 Enable Persistent Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

10 Set up the Secure Viewing Station 53

11 Set up the Data Transfer Device 55

12 Generate the SecureDrop Application GPG Key 6112.1 Correct the system time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6112.2 Create the key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

13 Set up the Admin Workstation 6713.1 Start Tails with Persistence Enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6713.2 Download the SecureDrop repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6713.3 Create the Admin Passphrase Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

14 Set up the Network Firewall 6914.1 Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6914.2 Initial Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7114.3 SecureDrop Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7414.4 Keeping pfSense up to date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

15 Set up the Servers 8915.1 Install Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8915.2 Test Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9415.3 Set up SSH keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9415.4 Minor Admin Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

16 Install SecureDrop 9716.1 Install Ansible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9716.2 Configure the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9716.3 Run the Ansible playbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

17 Configure the Admin Workstation Post-Install 10117.1 Auto-connect to the Authenticated Tor Hidden Services . . . . . . . . . . . . . . . . . . . . . . . . 10117.2 Set up two-factor authentication for the Admin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

18 Create an admin account on the Document Interface 103

19 Test the Installation 10519.1 Test connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10519.2 Sanity-check the install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10519.3 Test the web interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

20 Onboard Journalists 10720.1 Determine access protocol for the Secure Viewing Station . . . . . . . . . . . . . . . . . . . . . . . 10720.2 Create a Journalist Tails USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10720.3 Set up automatic access to the Document Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

ii

Page 5: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

20.4 Add an account on the Document Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

21 SecureDrop Deployment Best Practices 10921.1 Landing Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10921.2 Minimum requirements for the SecureDrop environment . . . . . . . . . . . . . . . . . . . . . . . . 11221.3 Suggested . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11321.4 Whole Site Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

22 Google Authenticator 11522.1 iOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11522.2 Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

23 Useful Logs 11723.1 Both servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11723.2 App Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11723.3 Monitor Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

24 OSSEC Guide 11924.1 Setting up OSSEC alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11924.2 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12224.3 Analyzing the Alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

25 Tails Guide 12725.1 Installing Tails on USB sticks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12725.2 Configure Tails for use with SecureDrop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

26 Setting up a printer with Tails 131

27 SecureDrop On-Site Training Schedule 14127.1 Day 1: Preparation and Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14127.2 Day 2: Journalist and Admin Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

28 Using YubiKey with the Document Interface 14528.1 Download the YubiKey personalization tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14528.2 Set up OATH-HOTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14528.3 Set up a user with the OATH-HOTP secret key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

29 Backup and Restore SecureDrop 14929.1 Minimizing disk space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14929.2 Backing Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15029.3 Restoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

30 Upgrade to 0.3.x 15330.1 Upgrade from 0.2.1 to 0.3.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15330.2 Upgrade from 0.3pre to 0.3.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

31 Upgrade from 0.3.x to 0.3.5 15931.1 Important Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15931.2 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16031.3 Upgrade Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

32 Upgrade from 0.3.5 to 0.3.6 16332.1 Important Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16332.2 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16332.3 Upgrade Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

iii

Page 6: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

33 Upgrade from 0.3.6 to 0.3.7 16533.1 Upgrade Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

34 Upgrade Tails from 1.x to 2.x 16734.1 Upgrade each Tails device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16734.2 Finishing up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17634.3 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

35 Getting Started 18135.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18135.2 Clone the repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18235.3 Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18235.4 Tips & Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

36 Generating AppArmor profiles for Tor and Apache 187

37 SecureDrop apt repository 189

38 Documentation Guidelines 19138.1 Integration with Read the Docs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19138.2 Style Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

39 Serverspec Tests 19339.1 Install directions (Ubuntu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19339.2 Running the tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19339.3 Updating the tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19339.4 Spectest layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

40 Threat Model 19540.1 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19540.2 Attack Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

iv

Page 7: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

SecureDrop is an open-source whistleblower submission system that media organizations can use to securely acceptdocuments from and communicate with anonymous sources.

User Guides 1

Page 8: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

2 User Guides

Page 9: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 1

Source Guide

1.1 Choose who to submit to

There are currently over 20 organizations running SecureDrop. Each instance is totally independent, and submissionsto that instance are only available to journalists associated with that organization.

All organizations have a landing page that provides their own organization-specific recommendations for using Se-cureDrop. We encourage you to consider an organization’s landing page before submitting to them.

Most organizations make their landing page prominently accessible from their main website’s homepage. You canalso find an incomplete list of organizations accepting submissions through SecureDrop on the SecureDrop Directorymaintained by Freedom of the Press Foundation.

1.2 Get the Tor Browser

Each SecureDrop instance has a publicly available Source Interface: a website where sources can create anonymousaccounts, submit files and messages, and check back for replies.

Each Source Interface is only available as a Tor Hidden Service, which is a special type of website with an addressending in ”.onion” that is only accessible through Tor. Tor is an anonymizing network that makes it difficult foranybody observing the network to associate a user’s identity (e.g. their computer’s IP address) with their activity (e.g.uploading information to SecureDrop).

The easiest and most secure way to use Tor is to download the Tor Browser Bundle from the Tor Project website. Thisbundle includes the Tor Browser, a modified version of the Firefox web browser designed to protect your security andanonymity while using Tor.

Once you have the Tor Browser, launch it and enter the ”.onion” address for the Source Interface of the organizationthat you wish to submit to. You can find this address on the organization’s landing page, or listed on the SecureDropDirectory.

While using the Tor Browser on your personal computer helps hide your activity on the network, it leaves traces (ofits own installation) on your local machine. For even more deniability, we recommend booting into a live system suchas Tails for a higher level of security. Tails is specifically designed to run on your computer without leaving traces ofyour activity, and automatically routes all of your Internet browsing through Tor so you can easily access SecureDropsafely.

3

Page 10: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

1.3 Making your First Submission

Open the Tor Browser and navigate to the .onion address for the SecureDrop Source Interface you wish to make asubmission to. The page should look similar to the screenshot below, although it will probably have a logo specific tothe organization you are submitting to.

If this is the first time you’re using the Tor browser, it’s likely that you have Javascript enabled. If you do, there willbe a red warning banner at the top of the page that encourages you to disable it.

Click the Learn how to disable it link in the warning banner and a message bubble will pop up explaininghow to disable Javascript. Follow the instructions and the page should refresh automatically. Note that this will disableJavascript for every page in your Tor Browser, and this setting will persist across browser sessions.

4 Chapter 1. Source Guide

Page 11: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

The page should now look similar to the screenshot below. If this is the first time you are using SecureDrop, click theSubmit Documents button.

1.3. Making your First Submission 5

Page 12: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

You should now see a screen that shows the unique codename that SecureDrop has generated for you. In the examplescreenshot below the codename is sink los radium bcd nab privy nadir, but yours will be different. Itis extremely important that you both remember this code and keep it secret. After submitting documents, you willneed to provide this code to log back in and check for responses.

The best way to protect your codename is to memorize it. If you cannot memorize it right away, we recommendwriting it down and keeping it in a safe place at first, and gradually working to memorize it over time. Once you havememorized it, you should destroy the written copy.

SecureDrop allows you to choose the length of your codename, in case you want to create a longer codename for extrasecurity. Once you have generated a codename and put it somewhere safe, click Continue.

6 Chapter 1. Source Guide

Page 13: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

You will next be brought to the submission interface, where you may upload a document, enter a message to send tojournalists, or both. You can only submit one document at a time, so you may want to combine several files into a ziparchive if necessary. The maximum submission size is currently 500MB. If the files you wish to upload are over thatlimit, we recommend that you send a message to the journalist explaining this, so that they can set up another methodfor transferring the documents.

When your submission is ready, click Submit.

1.3. Making your First Submission 7

Page 14: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

After clicking Submit, a confirmation page should appear, showing that your message and/or documents have beensent successfully. On this page you can make another submission or view responses to your previous messages.

8 Chapter 1. Source Guide

Page 15: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

1.4 Continuing the Conversation

If you have already submitted a document and would like to check for responses, click the Check for aResponse button on the media organization’s SecureDrop homepage.

1.4. Continuing the Conversation 9

Page 16: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

The next page will ask for your secret codename. Enter it and click Continue.

10 Chapter 1. Source Guide

Page 17: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

If a journalist has responded, their message will appear on the next page. This page also allows you to upload anotherdocument or send another message to the journalist. Be sure to delete any messages here before navigating away.

After you delete the message from the journalist, make sure you see the below message.

1.4. Continuing the Conversation 11

Page 18: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

If the server experiences a large number of new sources signing up at once and is overloaded with submissions, thejournalist will flag your message on their end and you will see the message below. They can’t write a reply to youuntil you’ve seen this message for security reasons. This will only happen the first time a journalist replies and withsubsequent replies you will skip this step. Click Refresh or log in again to see if a journalist has responded.

12 Chapter 1. Source Guide

Page 19: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Repeat these steps to continue communicating with the journalist.

1.4. Continuing the Conversation 13

Page 20: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

14 Chapter 1. Source Guide

Page 21: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 2

Journalist Guide

Journalists viewing documents on SecureDrop must connect to the respective Source or Document Interface using theTails operating system, which your administrator should have already set up for you.

2.1 Workflow

2.2 Create GPG key for the journalist

Each journalist must have a personal GPG key that they use for encrypting files transferred from the Secure ViewingStation to their Journalist Workstation. The private key, used for decryption, stays on their Journalist Workstation. Thepublic key, used for encryption, gets copied to the Secure Viewing Station.

If a journalist does not yet have a GPG key, they can follow these instructions to set one up with GnuPG (GPG).

• GNU/Linux

• Windows

• Mac OS X

2.3 Connect to the Document Interface

Each journalist has their own authenticated Tor hidden service URL to login to the Document Interface. Thejournalist needs to use the browser in the Tails operating system to connect to the Document Interface. Thiswill take an extra few steps each time you want to login, but after practicing a few times, it will become automatic.

See our guide on setting up Tails for the Admin and Journalist Workstation before continuing. We recommend thatyou create bookmarks for the Source and Document Interfaces.

After clicking on the SecureDrop Document Interface link, you can log in with your username, password, andtwo-factor authentication token, as shown in the first screenshot below.

15

Page 22: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

If any sources have uploaded documents or sent you message, they will be listed on the homepage by a codename.Note: The codename the journalists see is different than the codename that sources see.

16 Chapter 2. Journalist Guide

Page 23: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

2.4 Move Documents to the Secure Viewing Station

You will only be able to view the documents the source has sent you on the Secure Viewing Station. Afterclicking on an individual source you will see the page below with the messages that source has sent you. Click on adocument or message name to save it, or select a number of documents and save them at once by clicking “DownloadSelected”.

2.4. Move Documents to the Secure Viewing Station 17

Page 24: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

In order to protect you from malware, the browser only allows you to download documents to a special sandbox folder,located at /home/amnesia/Tor Browser.

18 Chapter 2. Journalist Guide

Page 25: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Once downloaded to the sandbox folder, move the document to the designated USB stick you will use to transferthe documents from your Tails Journalist Workstation to the Secure Viewing Station. This will beknown as your Transfer Device.

2.4. Move Documents to the Secure Viewing Station 19

Page 26: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Eject your Transfer Device from your Journalist Workstation.

Next, boot up the Secure Viewing Station using Tails (remember, you must use a different Tails USB than youuse your normal Journalist Workstation) and enter the password for the Secure Viewing Station thepersistent volume. Once you have logged in, plug in the Transfer Device.

Copy these documents to the Persistent folder before decrypting them. This an important step. Otherwise youmight accidentally decrypt the documents on the USB stick, and they could be recoverable in the future. Youcan do this by clicking on the Computer icon on your desk top, clicking on the Transfer Device, and then youcan drag and drop the file into your Persistent folder.

20 Chapter 2. Journalist Guide

Page 27: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Make sure to then return to your Transfer Device folder, right click on the file, and then click “Wipe” to securelywipe the file from your device.

2.5 Decrypt and work on the Secure Viewing Station

To decrypt documents, return to your Persistent folder and double-click on zipped file folder. After you extract thefiles, click on each file individually, and it will prompt you for the application PGP key passphrase to decrypt thedocument.

2.5. Decrypt and work on the Secure Viewing Station 21

Page 28: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

When you decrypt the file it will have the same filename, but without the .gpg at the end.

You can double-click on the decrypted document to open it in its default application.

22 Chapter 2. Journalist Guide

Page 29: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

If the default application doesn’t work, you can right-click on the document and choose Open with OtherApplication... to try opening the document with OpenOffice Writer, or Document Viewer. You can right-clickon a file and choose Rename... to rename a document and give it a file extension.

2.6 Interact With Sources

Click on the codename to see the page specifically for that source. You will see all of the messages that they havewritten and documents that they have uploaded. Documents and messages are encrypted to the application’s GPGpublic key. In order to read the messages or look at the documents you will need to transfer them to the SecureViewing Station.But first, if you’d like to reply to the source, write your message in the text field and click Submit.

2.6. Interact With Sources 23

Page 30: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Once your reply has been successfully submitted, you will be returned to the source page and see a message confirmingthat the reply was stored. The source will see your reply the next time they log in with their unique codename. Tominimize sensitive data retention, the source interface UI encourages the source to delete the reply after reading it. Ifyou notice one or more replies disappear from the list of documents, you may infer that the source read and deletedthem. You may also delete replies if you change your mind after sending them.

2.6.1 Flag for reply

If the server experiences a large number of new sources signing up at once and is overloaded with submissions, youwill need to flag sources for reply before you can communicate with them. Click the Flag this source forreply button.

24 Chapter 2. Journalist Guide

Page 31: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

After clicking the Flag this source for reply button, you’ll see this confirmation page. Click through toget back to the page that displays that source’s documents and replies.

You will not be able to reply until after the source logs in again and sees that you would like to talk to him or her.So you may have to sit and wait. After the source sees that you’d like to reply, a GPG key pair will automatically be

2.6. Interact With Sources 25

Page 32: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

generated and you can log back in and send a reply.

2.7 Work with Documents

As long as you’re using the latest version of Tails, you should be able to open any document that gets submitted toyou without the risk of malicious documents compromising the Secure Viewing Station. However, if they docompromise it, Tails is designed so that the next time you reboot the malware will be gone.

Tails comes with lots of applications that will help you securely work with documents, including an office suite,graphics tools, desktop publishing tools, audio tools, and printing and scanning tools. For more information, visitWork on sensitive documents on the Tails website.

Tails also comes with the Metadata Anonymisation Toolkit (MAT) that is used to help strip metadata from a varietyof types of files, including png, jpg, OpenOffice/LibreOffice documents, Microsoft Office documents, pdf, tar, tar.bz2,tar.gz, zip, mp3, mp2, mp1, mpa, ogg, and flac. You can open MAT by clicking Applications in the top leftcorner, Accessories, Metadata Anonymisation Toolkit.

We recommend that you do as much work as you can inside of Tails before copying these documents back to yourJournalist Workstation, including stripping metadata with MAT.

When you no longer need documents you can right-click on them and choose Wipe to delete them.

2.8 Encrypt and move documents to Journalist Workstation

Before you move documents back to the Transfer Device to copy them to your workstation you should encryptthem to your personal GPG public key that you imported when setting up the Secure Viewing Station tobegin with.

Right-click on the document you want to encrypt and choose Encrypt...

26 Chapter 2. Journalist Guide

Page 33: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Then choose the public keys of the journalist you want to encrypt the documents to and click OK.

When you are done you will have another document with the same filename but ending in .gpg that is encrypted to theGPG keys you selected. You can copy the encrypted documents to the Transfer Device to transfer them to yourworkstation.

2.8. Encrypt and move documents to Journalist Workstation 27

Page 34: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

2.9 Decrypt and prepare to publish

Plug the Transfer Device into your workstation computer and copy the encrypted documents to it. Decrypt themwith gnupg.

Write articles and blog posts, edit video and audio, and publish. Expose crimes and corruption, and change the world.

28 Chapter 2. Journalist Guide

Page 35: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 3

Administrator Guide

At this point, you (the administrator) should have your own username and password, plus two-factor authenticationthrough either the Google Authenticator app on your smartphone or a YubiKey.

3.1 Adding Users

Now you can add new logins for the journalists at your news organization who will be checking the system forsubmissions. Make sure the journalist is physically in the same room as you when you do this, as they will have tocreate a password and scan a barcode for their two-factor authentication. Since you’re logged in, this is the screen youshould see now:

In the top right corner click the “Admin” link, which should bring you to this page:

Once there, click ‘Add User’ button, which will take you to this page:

29

Page 36: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Here, you will hand the keyboard over to the journalist so they can create their own username and password. Oncethey’re done entering a username and password for themselves, select whether you would like them to also be anadministrator (this allows them to add or delete other journalist accounts), and whether they will be using GoogleAuthenticator or a YubiKey for two-factor authentication.

3.1.1 Google Authenticator

If they are using Google Authenticator for their two-factor, they can just proceed to the next page:

At this point, the journalist should make sure they have downloaded the Google Authenticator app to their smartphone.It can be installed from the Apple Store for an iPhone or from the Google Play store for an Android phone. Once youdownload it and open it, the app does not require setup. It should prompt you to scan a barcode. The journalist shoulduse their phone’s camera to scan the barcode on the screen.

If they have difficulty scanning the barcode, they can use the “Manual Entry” option and use their phone’s keyboardto input the random characters that are highlighted in yellow.

Inside the Google Authenticator app, a new entry for this account will appear on the main screen, with a six digit

30 Chapter 3. Administrator Guide

Page 37: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

number that recycles to a new number every thirty seconds. Enter the six digit number under “Verification code” atthe bottom of the SecureDrop screen here, and hit enter:

If Google Authenticator was set up correctly, you will be redirected back to the Admin Interface and will see a flashedmessage that says “Two factor token successfully verified for user new username!”.

3.1.2 YubiKey

If the journalist wishes to use a YubiKey for two-factor authentication, check the box next to “I’m using a YubiKey”.You will then need to enter the OATH-HOTP Secret Key that your YubiKey is configured with. For more information,read the YubiKey Setup Guide.

3.1. Adding Users 31

Page 38: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Once you’ve configured your YubiKey and entered the Secret Key, click Add user. On the next page, enter a code fromyour YubiKey by inserting it into the workstation and pressing the button.

If everything was set up correctly, you will be redirected back to the Admin Interface, where you should see a flashedmessage that says “Two factor token successfully verified for user new username!”.

32 Chapter 3. Administrator Guide

Page 39: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Congratulations! You have successfully set up a journalist on SecureDrop. Make sure the journalist remembers theirusername and password and always has their 2 factor authentication device in their possession when they attempt tolog in to SecureDrop.

3.1. Adding Users 33

Page 40: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

34 Chapter 3. Administrator Guide

Page 41: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 4

Overview

SecureDrop is an open-source whistleblower submission system that media organizations can use to securely acceptdocuments from and communicate with anonymous sources. It was originally created by the late Aaron Swartz and iscurrently managed by Freedom of the Press Foundation.

4.1 Technical Summary

SecureDrop is a tool for sources to communicate securely with journalists. The SecureDrop application environmentconsists of three dedicated computers:

• Secure Viewing Station: An air-gapped laptop running the Tails operating system from a USBstick that journalists use to decrypt and view submitted documents.

• Application Server: Ubuntu server running two segmented Tor hidden services. The source con-nects to the Source Interface, a public-facing Tor hidden service, to send messages and documents tothe journalist. The journalist connects to the Document Interface, an authenticated Tor hidden service, todownload encrypted documents and respond to sources.

• Monitor server: Ubuntu server that monitors the Application Server with OSSEC and sendsemail alerts.

In addition to these dedicated computers, the journalist will also use their normal workstation computer:

• Journalist Workstation: The every-day laptop that the journalist uses for their work. The journal-ist will use this computer to connect to the Application Server to download encrypted documentsthat they will transfer to the Secure Viewing Station. The Journalist Workstation isalso used to respond to sources via the Document Interface.

Depending on the news organizations’s threat model, it is recommended that journalists always use the Tails operatingsystem on their Journalist Workstation when connecting to the Application Server. Alternatively,this can also be its own dedicated computer.

These computers should all physically be in your organization’s office.

4.2 Infrastructure

There are four main components of SecureDrop: the servers, the administrators, the sources, and the journalists.

35

Page 42: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

4.2.1 Servers

At SecureDrop’s heart is a pair of severs: the Application (“App”) Server, which runs the core SecureDrop software,and the Monitor (“Mon”) Server, which keeps track of the Application Server and sends out alerts if there’s a problem.These two servers run on dedicated hardware connected to a dedicated firewall appliance. They are typically locatedphysically inside the newsroom.

4.2.2 Administrators

The SecureDrop servers are managed by a systems administrator; for larger newsrooms, there may be a team ofsystems administrators. The administrator uses a dedicated Admin Workstation running Tails and connects to the Appand Mon servers over authenticated Tor Hidden Services and manages them using Ansible.

4.2.3 Sources

A source submits documents and messages by using Tor Browser (or Tails) to access the Source Interface: a publicTor Hidden Service. Submissions are encrypted in place on the App server as they are uploaded.

4.2.4 Journalists

Journalists working in the newsroom use two machines to interact with SecureDrop. First, they use a Journalist Work-station running Tails to connect to the Document Interface, an authenticated Tor Hidden Service. Journalists downloadGPG-encrypted submissions and copy them to a Transfer Device (a thumb drive or DVD). Those submissions are thenconnected to the airgapped Secure Viewing Station (SVS) which holds the key to decrypt them. Journalists can thenuse the SVS to read, print, and otherwise prepare documents for publication. Apart from those deliberately published,decrypted documents are never accessed on an Internet-connected computer.

36 Chapter 4. Overview

Page 43: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Note: The terms in italics are terms of art specific to SecureDrop. The Terminology Guide provides more-precisedefinitions of these and other terms. SecureDrop is designed against a comprehensive Threat Model, and has a specificnotion of the roles that are involved in its operation.

4.3 Operation

4.3.1 Planning & Preparation

Setting up SecureDrop is a multi-step process. Before getting started, you should make sure that you’re prepared tooperate and maintain it. You’ll need a systems administrator who’s familiar with Linux, the GNU utilities, and theBash shell. You’ll need the hardware on which SecureDrop runs — this will normally cost $2000-$3000 dollars. Thejournalists in your organization will need to be trained in the operation of SecureDrop, and you’ll need to publish andpromote your new SecureDrop instance afterwards — using your existing websites, mailing lists, and social media.

It is recommended that you have all of this planned out before you get started. If you need help, contact the Freedomof the Press Foundation who will be glad to help walk you through the process and make sure that you’re ready toproceeed.

4.3.2 Technical Setup

Once you are familiar with the architecture and have all the hardware, setting up SecureDrop will take at least a day’swork for your admin. We recommend that you set aside at least a week to complete and test your setup.

4.3.3 Provisioning & Training

Once SecureDrop is installed, journalists will need to be provided with accounts, two-factor tokens, workstations, andso on — and then trained to use these tools safely and reliably. You will probably also need to train additional backupadministrators so that you can be sure that your SecureDrop setup keeps running even when your main administratoris on holiday.

Introducing staff to SecureDrop takes half a day. Training a group to use SecureDrop proficiently takes at least a day— and a single trainer can only work with so many people at once. You will probably need to run several trainingsessions to instruct an entire newsroom. Depending on staff availability, training and provisioning may take a weekor more. If you have multiple offices, training will need to happen at each location. Again, the Freedom of the PressFoundation are happy to help you plan and train your team.

4.3.4 Going Public

Once you have a SecureDrop instance and your team knows how to use it, you should test it thoroughly and then tellthe world. The Freedom of the Press Foundation are happy to help you check that your SecureDrop setup is up-to-codeand properly grounded. After that, you’ll need to use your existing tools to announce and promote your SecureDrop.There are some best practices for ways to show off and communicate your SecureDrop address, but more is better.Create a promotion/advocacy plan and go wild.

4.3. Operation 37

Page 44: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

38 Chapter 4. Overview

Page 45: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 5

Terminology

A number of terms used in this guide, and in the SecureDrop workflow diagram, are specific to SecureDrop. The listbelow attempts to enumerate and define these terms.

5.1 App Server

The Application Server (or App Server for short) runs the SecureDrop application. This server hosts both the websitethat sources access (Source Interface) and the website that journalists access (Document Interface). You may onlyconnect to this server using Tor.

5.2 Monitor Server

The Monitor Server keeps track of the App Server and sends out an email alert if something seems wrong. You mayonly connect to this server using Tor.

5.3 Source Interface

The Source Interface is the website that sources will access when submitting documents and communicating withjournalists. This site is hosted on the App Server and can only be accessed over Tor.

5.4 Document Interface

The Document Interface is the website that journalists will access when downloading new documents and communi-cating with sources. This site is hosted on the App Server and can only be accessed over Tor.

5.5 Journalist Workstation

The Journalist Workstation is a machine that is online and used together with the Tails operating system on the onlineUSB stick. This machine will be used to connect to the Document Interface, download documents, and move them tothe Secure Viewing Station using the Transfer Device.

39

Page 46: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

5.6 Admin Workstation

The Admin Workstation is a machine that the system administrator can use to connect to the App Server and theMonitor Server using Tor and SSH. The administrator will also need to have an Android or iOS device with theGoogle Authenticator app installed.

5.7 Secure Viewing Station

The Secure Viewing Station (or SVS for short) is a machine that is kept offline and only ever used together with theTails operating system on the offline USB stick. This machine will be used to generate GPG keys for all journalistswith access to SecureDrop, as well as to decrypt and view submitted documents.

Since this machine will never touch the Internet or run an operating system other than Tails on a USB, it does not needa hard drive or network device. We recommend physically removing the drive and any networking cards (wireless,Bluetooth, etc.) from this machine.

This is also referred to as the “airgapped computer,” meaning there is a gap between it and a computer connected tothe Internet.

5.8 Two-Factor Authenticator

There are several places in the SecureDrop architecture where two-factor authentication is used to protect access tosensitive information or systems. These instances use the standard TOTP and/or HOTP algorithms, and so a variety ofdevices can be used to provide two factor authentication for devices. We recommend using one of:

• An Android or iOS device with Google Authenticator installed

• A YubiKey

5.9 Transfer Device

The Transfer Device is the physical media used to transfer encrypted documents from the Journalist Workstation tothe Secure Viewing Station. Examples: a dedicated USB stick, CD-R, DVD-R, or SD card.

If you use a USB stick for the transfer device, we recommend using a small one (4GB or less). You will want tosecurely wipe the entire device at times, and this process takes longer for larger devices.

Depending on your threat model, you may wish to only use one-time use media (such as CD-R or DVD-R) fortransferring files to and from the SVS. While doing so is cumbersome, it reduces the risk of malware (that could berun simply by opening a malicious submission) exfiltrating sensitive data, such as the private key used to decryptsubmissions or the content of decrypted submissions.

When we use the phrase “sneakernet” we mean physically moving documents on the Transfer Device from one com-puter to another.

40 Chapter 5. Terminology

Page 47: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 6

Passphrases

Each individual with a role (admin or journalist) at a given SecureDrop instance must generate and retain a numberof strong, unique passphrases. The document is an overview of the passphrases, keys, two-factor secrets, and othercredentials that are required for each role in a SecureDrop installation.

Note: We encourage each end user to use KeePassX, an easy-to-use password manager included in Tails, to generateand retain strong and unique passphrases. We have created a template password database that you can use to getstarted. For more information, see the Tails Guide.

6.1 Admin

The admin will be using the Admin Workstation with Tails to connect to the App Server and the Monitor Server usingTor and SSH. The tasks performed by the admin will require the following set of passphrases:

• A password for the persistent volume on the Admin Live USB.

• A master password for the KeePassX password manager, which unlocks passphrases to:

– The App Server and the Monitor Server (required to be the same).

– The network firewall.

– The SSH private key and, if set, the key’s passphrase.

– The GPG key that OSSEC will encrypt alerts to.

– The admin’s personal GPG key.

– The credentials for the email account that OSSEC will send alerts to.

– The Hidden Services values required to connect to the App and Monitor Server.

The admin will also need to have an Android or iOS device with the Google Authenticator app installed. This meansthe admin will also have the following two credentials:

• The secret code for the App Server’s two-factor authentication.

• The secret code for the Monitor Server’s two-factor authentication.

41

Page 48: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

6.2 Journalist

The journalist will be using the Journalist Workstation with Tails to connect to the Document Interface. The tasksperformed by the journalist will require the following set of passphrases:

• A master password for the persistent volume on the Tails device.

• A master password for the KeePassX password manager, which unlocks passphrases to:

– The Hidden Service value required to connect to the Document Interface.

– The Document Interface.

– The journalist’s personal GPG key.

The journalist will also need to have a two-factor authenticator, such as an Android or iOS device with Google Au-thenticator installed, or a YubiKey. This means the journalist will also have the following credential:

• The secret code for the Document Interface’s two-factor authentication.

6.2.1 Secure Viewing Station

The journalist will be using the Secure Viewing Station with Tails to decrypt and view submitted documents. The tasksperformed by the journalist will require the following passphrases:

• A master password for the persistent volume on the Tails device.

The backup that is created during the installation of SecureDrop is also encrypted with the application’s GPG key. Thebackup is stored on the persistent volume of the Admin Live USB.

42 Chapter 6. Passphrases

Page 49: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 7

Hardware

This document outlines the required hardware components necessary to successfully install and operate a SecureDropinstance, and recommends some specific components that we have found to work well. If you have any questions,please email [email protected].

7.1 Required Hardware

7.1.1 Servers

These are the core components of a SecureDrop instance.

• Application Server: 1 physical server to run the SecureDrop web services.

• Monitor Server: 1 physical server which monitors activity on the Application Server and sends email notifica-tions to an administrator.

• Network Firewall: 1 physical computer that is used as a dedicated firewall for the SecureDrop servers.

Warning: We are often asked if it is acceptable to run SecureDrop on cloud servers (e.g. Amazon EC2, DigitalO-cean, etc.) instead of on dedicated hardware. This request is generally motivated by a desire for cost savings andconvenience; however, cloud servers are trivially accessible and manipulable by the provider that operates them.In the context of SecureDrop, this means that the provider could access extremely sensitive information, such asthe plaintext of submissions or the encryption keys used to identify and access the Tor Hidden Services.One of the core goals of SecureDrop is to avoid the potential compromise of sources through the compromise ofthird party communications providers. Therefore, we consider the use of virtualization for production instances ofSecureDrop to be an unacceptable compromise and do not support it. While it is technically possible to modifySecureDrop’s automated installation process to work on virtualized servers (for example, we do so to support ourCI pipeline), doing so in order to run it on cloud servers is at your own risk and without our support or consent.

7.1.2 Workstations

These components are necessary to do the initial installation of SecureDrop and to process submissions using theairgapped workflow.

• Secure Viewing Station (SVS): 1 physical computer used as an airgap to decrypt and view submissions retrievedfrom the Application Server.

– The chosen hardware should be solely used for this purpose and should have any wireless networkinghardware removed before use.

43

Page 50: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

• Admin/Journalist Workstation(s): At least 1 physical computer that is used as a workstation for SecureDropadmins and/or journalists.

– Each Admin and Journalist will have their own bootable Tails USB with an encrypted persistent partitionthat they will use to access SecureDrop. You will need at least one workstation to boot the Tails USBs, andmay need more depending on: the number of admins/journalists you wish to grant access to SecureDrop,whether they can share the same workstation due to availability requirements, geographic distribution, etc.

• USB drive(s): At least 2 USB drives to use as a bootable Tails USB for the SVS and the Admin Tails/JournalistTails.

– If only one person is maintaining the system, you may use the same Tails instance as both the Admin Tailsand the Journalist Tails; otherwise, we recommend buying 1 drive for each admin and each journalist.

– We also recommend buying two additional USBs to use as bootable backups of the SVS and Admin Tails.

• Two-factor authenticator: Two-factor authentication is used when connecting to different parts of the Secure-Drop system. Each admin and each journalist needs a two-factor authenticator. We currently support two optionsfor two-factor authentication:

– Your existing smartphone with an app that computes TOTP codes (e.g. Google Authenticator)

– A dedicated hardware dongle that computes HOTP codes (e.g. a YubiKey).

• Transfer Device(s): You need a mechanism to transfer encrypted submissions from the Journalist Workstationto the SVS to decrypt and view them. The most common transfer devices are DVD/CD-R discs and USB drives.

– From a security perspective, it is preferable to use write-once media such as DVD/CD-R discs because iteliminates the risk of exfiltration by malware that persists on the Transfer Device (e.g. BadUSB).

– On the other hand, using write-once media to transfer data is typically inconvenient and time-consuming.You should consider your threat model and choose your transfer device accordingly.

• Monitor, Keyboard, Mouse: You will need these to do the initial installation of Ubuntu on the Application andMonitor servers.

– Depending on your setup, you may also need these to work on the SVS.

Note: If you cannot afford to purchase new hardware for your SecureDrop instance, we encourage you to considerre-purposing existing hardware to use with SecureDrop. If you are comfortable working with hardware, this is a greatway to set up a SecureDrop instance for cheap.

Since SecureDrop’s throughput is significantly limited by the use of Tor for all connections, there is no need to use topof the line hardware for any of the servers or the firewall. In our experience, relatively recent recycled Dell desktopsor servers are adequate for the SecureDrop servers, and recycled Thinkpad laptops work well for the Admin/Journalistworkstations.

If you choose to use recycled hardware, you should of course consider whether or not it is trustworthy; making thatdetermination is outside the scope of this document.

7.2 Optional Hardware

This hardware is not required to run a SecureDrop instance, but most of it is still recommended.

• Offline Printer: It is often useful to print submissions from the SVS for review and annotation.

– To maintain the integrity of the airgap, this printer should be dedicated to use with the SVS, connected viaa wired connection, and should not have any wireless communication capabilities.

44 Chapter 7. Hardware

Page 51: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

• Offline Storage: The SVS is booted from a Tails USB drive, which has an encrypted persistent volume buttypically has a fairly limited storage capacity since it’s just a USB drive. For installations that expect to receivea large volume of submissions, we recommend buying an external hard drive that can be encrypted and used tostore submissions that have been been transferred from the Application Server to the SVS.

• Backup storage: It’s useful to run periodic backups of the servers in case of failure. We recommend buying anexternal hard drive that can be encrypted and used to store server backups.

– Since this drive will be connected to the Admin Workstation to perform backups, it should not be thesame drive used for Offline Storage.

• Network Switch: If your firewall has fewer than four NIC’s, you will need an additional Ethernet switch toperform installation and maintenance tasks with the Admin Workstation. This switch is generally useful becauseit allows you to connect the Admin Workstation to your firewall’s LAN port without taking down either of theSecureDrop servers.

7.3 Specific Hardware Recommendations

7.3.1 Application/Monitor Servers

The Intel NUC (Next Unit of Computing) is a capable, cheap, quiet, and low-powered device that can be used for theSecureDrop servers. There are a variety of models to choose from. We recommend the D54250WYK because it has amid-range CPU (Intel i5), the common Mini DisplayPort connector for the monitor, and USB 3.0 ports for faster OSinstallation and data transfer.

Conveniently (for the paranoid), it supports wireless networking (Wifi and Bluetooth) through optional expansioncards not included by default - which means you don’t have to spend time ripping out the wireless hardware beforebeginning the installation.

Note: If you purchase the NUC from Amazon, make sure you click “With Powercord” to have one included in thepackage.

The NUCs come as kits, and some assembly is required. You will need to purchase the RAM and hard drive separatelyfor each NUC and insert the cards into the NUC before it can be used. We recommend:

• 2 240 GB SSDs

• A 4 GB (4GBx2) memory kit

– You can put one 4GB memory stick in each of the servers.

Note: The D54250WYK has recently been EOL’ed by Intel. Availability and prices may be subject to change. Weare working on analyzing alternative recommendations, but there are no immediately obvious alternatives that sharethe benefits of the D54250WYK (primarily, the lack of integrated wireless networking hardware).

Note: An earlier release of SecureDrop (0.2.1) was based on Ubuntu 12.04.1 (precise). We encountered issuesinstalling this version of Ubuntu on some types of Intel NUCs. The problem manifested after installing Ubuntu on theNUC. The installation would complete, but rebooting after installation would not succeed.

We have not encountered this or any similar problems in testing the current release series (0.3.x) with the Intel NUCs.Since 0.3 is based on Ubuntu 14.04.1 (trusty), we believe the issue has been resolved in the newer release of Ubuntu.

7.3. Specific Hardware Recommendations 45

Page 52: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

If you do encounter issues booting Ubuntu on the NUCs, try updating the BIOS according to these instructions.

Note: Some BIOS versions on the NUC will cause the server to brick itself if the device attempts to suspend. Somesuggestions include disabling suspend in the BIOS as well as OS options like “wake on LAN”.

7.3.2 Secure Viewing Station (SVS)

The Secure Viewing Station is a machine that is kept offline and only ever used together with the Tails operatingsystem. This machine will be used to generate the GPG keys used by SecureDrop to encrypt submissions, as well asdecrypt and view submissions. Since this machine will never touch the Internet or run an operating system other thanTails, it does not need a hard drive or network device; in fact, we recommend removing these components if they arealready present.

One option is to buy a Linux-compatible laptop such as a Lenovo Thinkpad. You can also repurpose an old laptop ifyou have one available.

Another option is to buy an Intel NUC D54250WYK (same model as the servers) with a power cord and 4 GB ofmemory, but note that you will also need to get a monitor and a wired keyboard and mouse. It does not come with ahard drive or wireless networking hardware by default, so you will not need to remove these components before usingit. However, we do recommend taping over the IR receiver with some opaque masking tape.

Note that if you do want to use a NUC for the SVS, you should not use any of the new generation of NUCs, which havenames starting with “NUC5” (e.g. NUC5i5RYK.. These NUCs have wireless networking built into the motherboard,and it is impossible to physically remove.

7.3.3 Tails USBs

We strongly recommend getting USB 3.0-compatible drives to run Tails from. The transfer speeds are significantlyfaster than USB 2.0, which means a live operating system booting from one will be much faster and more responsive.

You will need at least an 8GB drive to run Tails with an encrypted persistent partition. We recommend gettingsomething in the 16-64GB range so you can handle large amounts of submissions without hassle. Anything more thanthat is probably overkill.

Other than that, the choice of USB drive depends on capacity, form factor, cost, and a host of other factors. One optionthat we like is the Leef Supra.

7.3.4 Transfer Device

If you are using USBs for the transfer device, the same general recommendations for the Tails USBs also apply. Onething to consider is that you are going to have a lot of USB drives to keep track of, so you should consider how youwill label or identify them and buy drives accordingly. Drives that are physically larger are often easier to label (e.g.with tape or a label from a labelmaker).

If you are using DVD/CD-R’s for the transfer device, you will need two DVD/CD writers: one for burning DVDs fromthe Journalist Workstation, and one for reading the burned DVDs on the SVS. We recommend using two separatedrives instead of sharing the same drive to avoid the potential risk of malware exfiltrating data by compromising thedrive’s firmware. We’ve found the DVD/CD writers from Samsung and LG to work reasonably well, you can findsome examples here.

Finally, you will need a stack of blank DVD/CD-R’s, which you can buy anywhere.

46 Chapter 7. Hardware

Page 53: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

7.3.5 Network Firewall

We recommend the pfSense SG-2440.

7.3.6 Network Switch

This is optional, for people who are using a firewall with less than 4 ports (the recommended firewall has 4 ports).Any old switch with more than 3 ports will do, such as the 5-port Netgear ProSafe Ethernet Switch.

7.3.7 Printers

Careful consideration should be given to the printer used with the SVS. Most printers today have wireless functionality(WiFi or Bluetooth connectivity) which should be avoided because it could be used to compromise the airgap.

Unfortunately, it is difficult to find printers that work with Tails, and it is increasingly difficult to find non-wirelessprinters at all. To assist you, we have compiled the following partial list of airgap-safe printers that have been testedand are known to work with Tails:

Model Test-ingDate

TailsVer-sions

Price(new)

Price(used)

Notes

HPLaserJet400M401n

06/2015 1.4 $178.60(Ama-zon)

$115.00(Ama-zon)

Monochrome laser printer. Heavy (10 lbs.) When adding theprinter in Tails, you need to set “Make and model” to “HPLaserJet 400 CUPS+Gutenprint v5.2.9”.

HPDeskjet6940

04/2015 1.3.2 $639.99(Ama-zon)

$196.99(Ama-zon)

Monochrome Inkjet printer

If you know of another model of printer that fits our requirements and works with Tails, please submit a pull requestto add it to this list.

7.3.8 Monitor, Keyboard, Mouse

We don’t have anything specific to recommend when it comes to displays. You should make sure you know whatmonitor cable you need for the servers, since you will need to connect them to a monitor to do the initial Ubuntuinstallation.

You should use a wired (USB) keyboard and mouse, not wireless.

7.3. Specific Hardware Recommendations 47

Page 54: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

48 Chapter 7. Hardware

Page 55: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 8

Before you begin

Before you get started, you should familiarize yourself with the Overview, Terminology, and the Roles involved inSecureDrop’s operations. You may wish to leave these documents open in other tabs for reference as you work.

SecureDrop is a technical tool. It is designed to protect journalists and sources, but no tool can guarantee safety.This guide will instruct you in installing and configuring SecureDrop, but it does not explain how to use it safely andeffectively. Put another way: at the end of this guide, you will have built a car; you will not know how to drive. Makesure to review the SecureDrop Deployment Best Practices to get the most out of your new SecureDrop instance.

Installing SecureDrop is an extended manual process which requires a bunch of preparation and equipment. Youshould probably set aside a day to complete the install process. A successful install requires an administrator withat-least basic familiarity with Linux, the GNU core utilities and Bash shell. If you are not proficient in these areas, itis strongly recommended that you contact the Freedom of the Press Foundation for installation assistance.

Before you begin, you will need to assemble all the hardware that you are going to use.

When running commands or editing configuration files that include filenames, version numbers, usernames, and host-names or IP addresses, make sure you use the appropriate values for your instance.

Once you’re familiar with SecureDrop, you’ve made your plan, your organization is ready to follow-through and youhave the required hardware assembled before you, you’re ready to begin.

49

Page 56: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

50 Chapter 8. Before you begin

Page 57: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 9

Create Tails USBs

Tails is a privacy-enhancing live operating system that runs on removable media, such as a DVD or a USB stick. Itsends all your Internet traffic through Tor, does not touch your computer’s hard drive, and securely wipes unsavedwork on shutdown.

Most of the work of installing, administering, and using SecureDrop is done from computers using Tails, so the firstthing you need to do is set up several USB drives with the Tails operating system. To get started, you’ll need two Tailsdrives: one for the Admin Workstation and one for the Secure Viewing Station. Later, you’ll set up a bunch more Tailsdrives for your journalists and backups, but for now you just need two.

As soon as you create a new Tails drive, label it immediately. USB drives all look alike and you’re going to be jugglinga whole bunch of them throughout this installation. Label immediately. Always.

9.1 Install Tails

We recommend creating an initial Tails Live DVD or USB, and then using that to create additional Tails drives with theTails Installer, a special program that is only available from inside Tails. All of your Tails drives will need persistence:a way of safely saving files and so on between reboots. It is only possible to set up persistence on USB drives whichwere created via the Tails Installer.

The Tails website has detailed and up-to-date instructions on how to download and verify Tails, and how to create abootable Tails USB drive. Follow the instructions at these links and then return to this page:

• Download and verify the Tails .iso

• Install onto a USB drive

You will need to create 3 Tails USBs to perform the SecureDrop installation:

1. A “master” Tails USB, which you will create by copying a Tails .iso onto a USB drive, using one of the tech-niques outlined in the Tails documentation. This Tails USB is only used for creating other Tails USBs with theTails Installer.

2. The Secure Viewing Station Tails USB.

3. The Admin Workstation Tails USB.

Tip: This process will take some time, most of which will be spent waiting around. Once you have the “master” copyof Tails, you have to boot it, create another Tails drive with the Tails Installer, shut down, and boot into the new TailsUSB to complete the next step of setting up the persistence - for each additional Tails USB.

51

Page 58: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Note: Tails doesn’t always completely shut down and reboot properly when you click “restart”, so if you notice asignificant delay, you may have to manually power off and restart your computer for it to work properly.

9.2 Enable Persistent Storage

Creating an encrypted persistent volume will allow you to securely save information and settings in the free space thatis left on your Tails drive. This information will remain available to you even if you reboot Tails. (Tails securely erasesall other data on every shutdown.)

You will need to create a persistent storage on each Tails drive, with a unique password for each.

Please use the instructions on the Tails website to make the persistent volume on each Tails drive you create. Whencreating the persistence volume, you will be asked to select from a list of features, such as ‘Personal Data’. Werecommend that you enable all features.

Some other things to keep in mind:

• Right now, you need to create a persistent volume on both the Admin Workstation Tails drive and the SecureViewing Station Tails drive.

• Each Tails persistent volume should have an unique and complex passphrase that’s easy to write down or re-member. We recommend using Diceware passphrases..

• Each journalist will need their own Tails drive with their own persistent volume secured with their ownpassphrase — but that comes later.

• Journalists and admins will eventually need to remember these passphrases. We recommend using spaced-repetition to memorize Diceware passphrases.

Warning: Make sure that you never use the Secure Viewing Station Tails drive on a computer connected to theInternet or a local network. This Tails drive will only be used on the air-gapped Secure Viewing Station.

52 Chapter 9. Create Tails USBs

Page 59: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 10

Set up the Secure Viewing Station

The Secure Viewing Station is the computer where journalists read and respond to SecureDrop submissions. Oncesubmissions are encrypted on the Application Server, only the Secure Viewing Station has the key to decrypt them.The Secure Viewing Station is never connected to the internet or a local network, and only ever runs from a dedicatedTails drive. Journalists download encrypted submissions using their Journalist Workstation, copy them to a DataTransfer Device (a USB drive or a DVD) and physically transfer the Data Transfer Device to the Secure ViewingStation.

Since the Secure Viewing Station never uses a network connection or an internal hard drive, we recommend thatyou physically remove any any internal storage devices or networking hardware such as wireless cards or Bluetoothadapters. If the machine has network ports you can’t physically remove, you should clearly cover these ports withlabels noting not to use them. For an even safer approach, fill a port with epoxy to physically disable it. If you havequestions about repurposing hardware for the Secure Viewing Station, contact the Freedom of the Press Foundation.

You should have a Tails drive clearly labeled “SecureDrop Secure Viewing Station”. If it’s not labeled, label it rightnow, then boot it on the Secure Viewing Station. After it loads, you should see a “Welcome to Tails” screen with twooptions. Select Yes to enable the persistent volume and enter your password, but do NOT click Login yet. Under ‘MoreOptions,’ select Yes and click Forward.

Enter an Administration password for use with this specific Tails session and click Login.

Note: The Administration password is a one-time password. It is reset every time you shut down Tails.

53

Page 60: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

54 Chapter 10. Set up the Secure Viewing Station

Page 61: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 11

Set up the Data Transfer Device

Journalists copy submissions from their Journalist Workstation to the Secure Viewing Station using the Data TransferDevice which can be a DVD or a USB drive.

Using DVDs as the Data Transfer Device provides some protection against certain kinds of esoteric USB-based attackson the Secure Viewing Station, but requires that you keep blank DVDs on hand, have a dedicated DVD drive for theSecure Viewing Station, DVD drives for use with Journalist Workstations, and a shredder capable of destroying DVDs.Unless you are certain that you need to use DVDs as the Data Transfer Device, you should use USB drives instead. Ifyou have chosen to use DVDs instead, there is nothing to set up now — just make sure that you have all the hardwareon hand.

The easiest and recommended option for a Data Transfer Device is a USB drive. If you have a large team of journalistsyou may want to create several of these. Here we’ll just walk through making one Data Transfer Device. Note: thisprocess will destroy all data currently on the drive. You should probably use a new USB drive.

First, label your USB drive “SecureDrop Data Transfer Device”. Open the Applications menu in the top left corner

and select Accessories then Disk Utility.

Connect your Data Transfer Device then pick your device in the menu on the left. Since we’re going to destroy all the

55

Page 62: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

data on this drive, it’s important that you pick the right drive. It should be named something that sounds similar to themanufacturer’s label on the ouside of the drive, and it will only appear after you plug it in. Double check that you haveclicked on the correct drive.

Once you’re sure you have the right drive, click Format Drive. The default Scheme of Master Boot Record is fine.Click Format, then confirm by clicking Format again. Under the Volumes heading towards the bottom of the rightpane of Disk Utility click the large grey bar that represents your newly-formatted drive and then click Create Partitionbelow.

56 Chapter 11. Set up the Data Transfer Device

Page 63: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Give the new partition on your Data Transfer Device a descriptive name like “Transfer Device” and check the Encryptunderlying device box, then click Create to continue. You will now be prompted to create a passphrase.

57

Page 64: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

You won’t need to memorize this passphrase or type it more than a few times, so feel free to make a good long one.Pick the Remember forever option — this will save the passphrase securely on Secure Viewing Station‘s persistentvolume. Click Create to continue. After a few seconds, you new Data Transfer Device should be ready for use.

If you haven’t already, make sure to label it.

Since a Data Transfer Device is used to move files from a Journalist Workstation to the Secure Viewing Station, you’llalso need to enter the passphrase on each Journalist Workstation you use this Data Transfer Device with. When youconnect the Data Transfer Device to a new Journalist Workstation for the first time, you’ll be prompted to enter thepassphrase to unlock the encrypted disk.

58 Chapter 11. Set up the Data Transfer Device

Page 65: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Make sure to select the Remember forever option before entering your passphrase. As in the Disk Utility applicationthis will securely save the passphrase on the persistent volume of that Journalist Workstation, ensuring that you onlyever have to type in the passphrase once on any particular machine.

59

Page 66: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

60 Chapter 11. Set up the Data Transfer Device

Page 67: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 12

Generate the SecureDrop Application GPG Key

When a document or message is submitted to SecureDrop by a source, it is automatically encrypted with the Secure-Drop Application GPG Key. The private part of this key is only stored on the Secure Viewing Station which is neverconnected to the Internet. SecureDrop submissions can only be decrypted and read on the Secure Viewing Station.

We will now generate the SecureDrop Application GPG Key on the Secure Viewing Station.

12.1 Correct the system time

After booting up Tails on the Secure Viewing Station, you will need to manually set the system time before you createthe SecureDrop Application GPG Key. To set the system time:

1. Right-click the time in the top menu bar and select Adjust Date & Time.

2. Click Unlock in the top-right corner of the dialog window and enter your temporary Tails administration pass-word.

3. Set the correct time, region and city.

4. Click Lock, enter your temporary Tails administration password one more time and wait for the system time toupdate in the top panel.

Once that’s done, follow the steps below to create the key.

12.2 Create the key

• Open a terminal and run gpg --gen-key

• When it says Please select what kind of key you want, choose (1) RSA and RSA (default).

• When it asks What keysize do you want?, type 4096.

• When it asks Key is valid for?, press Enter to keep the default.

• When it asks Is this correct?, verify that you’ve entered everything correctly so far, then type y.

• For Real name, type: SecureDrop

• For Email address, leave the field blank and press Enter

• For Comment, type [Your Organization’s Name] SecureDrop Application GPG Key

• Verify that everything is correct so far, then type o for (O)kay

61

Page 68: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

• It will pop up a box asking you to type a passphrase, but it’s safe to click okay without typing one. The key isprotected by the encryption on the Tails persistent volume.

• Wait for your GPG key to finish generating

To manage GPG keys using the graphical interface (a program called Seahorse), click the clipboard icon in thetop right corner and select “Manage Keys”. You should see the key that you just generated under “GnuPG Keys.”

Select the key you just generated and click “File” then “Export”. Save the key to the Transfer Device asSecureDrop.pgp, and make sure you change the file type from “PGP keys” to “Armored PGP keys” which can beswitched right above the ‘Export’ button. Click the ‘Export’ button after switching to armored keys.

Note: This is the public key only.

62 Chapter 12. Generate the SecureDrop Application GPG Key

Page 69: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

12.2. Create the key 63

Page 70: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

You’ll need to provide the fingerprint of this new key during the installation. Double-click on the newly generated keyand change to the Details tab. Write down the 40 hexadecimal digits under Fingerprint.

64 Chapter 12. Generate the SecureDrop Application GPG Key

Page 71: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Note: Your fingerprint will be different from the one in the example screenshot.

12.2.1 Import GPG keys for journalists with access to SecureDrop

While working on a story, journalists may need to transfer some documents or notes from the Secure Viewing Stationto the journalist’s work computer on the corporate network. To do this, the journalists should re-encrypt them withtheir own keys. If a journalist does not already have a personal GPG key, they can follow the same steps above tocreate one. The journalist should store the private key somewhere safe; the public key should be stored on the SecureViewing Station.

If the journalist does have a key, transfer their public key from wherever it is located to the Secure Viewing Station,

using the Transfer Device. Open the file manager and double-click on the public key to import it. If the publickey is not importing, rename the file to end in ”.asc” and try again.

12.2. Create the key 65

Page 72: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

At this point, you are done with the Secure Viewing Station for now. You can shut down Tails, grab the admin TailsUSB and move over to your regular workstation.

66 Chapter 12. Generate the SecureDrop Application GPG Key

Page 73: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 13

Set up the Admin Workstation

Earlier, you should have created the admin Tails USB along with a persistence volume for it. Now, we are going toadd a couple more features to the admin Tails USB to facilitate SecureDrop’s setup.

If you have not switched to and booted the admin Tails USB on your regular workstation, do so now.

13.1 Start Tails with Persistence Enabled

After you boot the admin Tails USB on your normal workstation, you should see a Welcome to Tails screen with twooptions. Select Yes to enable the persistent volume and enter your password, but do NOT click Login yet. Under ‘MoreOptions,” select Yes and click Forward.

Enter an Administration password for use with this specific Tails session and click Login.

Note: The Administration password is a one-time password. It will reset every time you shut down Tails.

After Tails finishes booting, make sure you’re connected to the Internet and that the Tor’s Vidalia indicator onion

is green, using the icons in the upper right corner.

13.2 Download the SecureDrop repository

The rest of the SecureDrop-specific configuration is assisted by files stored in the SecureDrop Git repository. We’regoing to be using this again once SecureDrop is installed, but you should download it now. To get started, open a

terminal . You will use this Terminal throughout the rest of the install process.

Start by running the following commands to download the git repository.

cd ~/Persistentgit clone https://github.com/freedomofpress/securedrop.git

Note: Since the repository is fairly large and Tor can be slow, this may take a few minutes.

67

Page 74: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

13.2.1 Verify the Release Tag

First, download and verify the Freedom of the Press Foundation Master Signing Key.

gpg --recv-key "B89A 29DB 2128 160B 8E4B 1B4C BADD E0C7 FC9F 6818"

Note: It is important you type this out correctly. If you are not copy-pasting this command, we recommend youdouble-check you have entered it correctly before pressing enter.

When passing the full public key fingerprint to the --recv-key command, GPG will implicitly verify that thefingerprint of the key received matches the argument passed.

Caution: If GPG warns you that the fingerprint of the key received does not match the one requested do notproceed with the installation. If this happens, please email us at [email protected].

Verify that the current release tag was signed with the master signing key:

cd securedrop/git checkout 0.3.6git tag -v 0.3.6

You should see Good signature from "Freedom of the Press Foundation Master SigningKey" in the output of that last command.

Caution: If you do not, signature verification has failed and you should not proceed with the installation. If thishappens, please contact us at [email protected].

13.3 Create the Admin Passphrase Database

We provide a KeePassX password database template to make it easier for admins and journalists to generate strong,unique passphrases and store them securely. Once you have set up Tails with persistence and have cloned the repo,you can set up your personal password database using this template.

You can find the template in tails_files/securedrop-keepassx.xml in the SecureDrop repository thatyou just cloned.

Warning: You will not be able to access your passwords if you forget the master password or the location of thekey file used to protect the database.

To use the template:

• Open the KeePassX program which is already installed on Tails

• Select File, Import from..., and KeePassX XML (*.xml)

• Navigate to the location of securedrop-keepassx.xml, select it, and click Open

• Set a strong master password to protect the password database (you will have to write this down/memorize it)

• Click File and Save Database As

• Save the database in the Persistent folder

68 Chapter 13. Set up the Admin Workstation

Page 75: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 14

Set up the Network Firewall

Now that you’ve set up your password manager, you can move on to setting up the Network Firewall. You should staylogged in to your admin Tails USB to access the Network Firewall’s web interface for configuration.

Unfortunately, due to the wide variety of firewalls that may be used, we do not provide specific instructions to coverevery type or variation in software or hardware. This guide is based on pfSense, and assumes your firewall hardwarehas at least three interfaces: WAN, LAN, and OPT1. For hardware, you can build your own network firewall (notcovered in this guide) and install pfSense on it. For most installations, we recommend buying a dedicated firewallappliance with pfSense pre-installed, such as the one recommended in the Hardware Guide.

We used to recommend the 3-NIC Netgate APU 2, but it has since been discontinued. We currently recommend thepfSense SG-2440, which has 4 interfaces: WAN, LAN, OPT1, and OPT2. This guide covers both the old 3-NICconfiguration, for existing installs that are still using it, and the 4-NIC configuration recommended for new installs.

If your firewall only has 3 NICs (WAN, LAN, and OPT1), you will need to use a switch on the OPT1 interfaceto connect the Admin Workstation for the initial installation. If your firewall has 4 NICs (WAN, LAN, OPT1, andOPT2), a switch is not necessary.

If you are new to pfSense or firewall management in general, we recommend the following resources:

• Official pfSense Wiki

• pfSense: The Definitive Guide

– Note: This guide is now slightly out of date, although we found it to be a useful reference approximately1 year ago. To get the latest version of this book, you need to become a pfSense Gold Member.

14.1 Before you begin

First, consider how the firewall will be connected to the Internet. You will need to provision several unique subnets,which should not conflict with the network configuration on the WAN interface. If you are unsure, consult your localsysadmin.

Note that many firewalls, including the recommended Netgate pfSense, automatically set up the LAN interface on192.168.1.1/24. This particular private network is also a very common choice for home and office routers. If youare connecting the firewall to a router with the same subnet (common in a small office, home, or testing environment),you will probably be unable to connect to the network at first. However, you will be able to connect from the LAN tothe pfSense WebGUI configuration wizard, and from there you will be able to configure the network so it is workingcorrectly.

69

Page 76: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

14.1.1 4 NIC configuration

If your firewall has 4 NICs, as the SG-2440 does, we will refer to the ports as WAN, LAN, OPT1, and OPT2. In thiscase, we can now use a dedicated port on the network firewall for each component of SecureDrop (Application Server,Monitor Server, and Admin Workstation), so you do not need a switch like you do for the 3-NIC configuration.

Depending on your network configuration, you should define the following values before continuing. For the examplesin this guide, we have chosen:

• Admin Subnet: 10.20.1.0/24

• Admin Gateway: 10.20.1.1

• Admin Workstation: 10.20.1.2

• Application Subnet: 10.20.2.0/24

• Application Gateway: 10.20.2.1

• Application Server (OPT1): 10.20.2.2

• Monitor Subnet: 10.20.3.0/24

• Monitor Gateway: 10.20.3.1

• Monitor Server (OPT2) : 10.20.3.2

14.1.2 3 NIC configuration

If your firewall has 3 NICs, we will refer to them as WAN, LAN, and OPT1. WAN is used to connect to the externalnetwork. LAN and OPT1 are used for the Application and Monitor Servers, respectively. Putting them on separateinterfaces allows us to use the network firewall to filter and monitor the traffic between them.

In addition, you will need to be able to connect the Admin Workstation to this setup for the initial installation. BeforeSecureDrop is installed, the only way to connect to the servers is via SSH over the local network, so the AdminWorkstation needs to be directly connected. Once it is installed, SSH will be available remotely (as an authenticatedTor Hidden Servce) and you will not necessarily need to connect the Admin Workstation directly to adminster theservers - although you will still need to connect it directly to administer the network firewall. Since there isn’t anotherNIC to connect the Admin Workstation to, we recommend using a small switch on the LAN (the specific choice ofinterface doesn’t matter, but we recommend using the LAN to stay consistent with the rest of this guide) so you canconnect both the Admin Workstation and the Application Server.

Depending on your network configuration, you should define the following values before continuing. For the examplesin this guide, we have chosen:

• Admin/Application Gateway: 10.20.1.1

• Admin/Application Subnet: 10.20.1.0/24

• Application Server: 10.20.1.2

• Admin Workstation: 10.20.1.3

• Monitor Subnet: 10.20.2.0/24

• Monitor Gateway: 10.20.2.1

• Monitor Server: 10.20.2.2

70 Chapter 14. Set up the Network Firewall

Page 77: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

14.2 Initial Configuration

Unpack the firewall, connect power, and power on.

We will use the pfSense WebGUI to do the initial configuration of the network firewall.

14.2.1 Connect to the pfSense WebGUI

1. Boot the Admin Workstation into Tails from the Admin Live USB.

2. Connect the Admin Workstation to the LAN interface. You should see a popup notification in Tails that says“Connection Established”.

Warning: Make sure your only active connection is the one you just established with the network firewall.If you are connected to another network at the same time (e.g. a wireless network), you may encounterproblems trying to connect the pfSense WebGUI.

3. Launch the Unsafe Browser from the menu bar: Applications Internet Unsafe Browser.

Note: The Unsafe Browser is, as the name suggests, unsafe (its traffic is not routed through Tor). However, itis the only option because Tails intentionally disables LAN access in the Tor Browser.

4. A dialog will ask “Do you really want to launch the Unsafe Browser?”. Click Launch.

14.2. Initial Configuration 71

Page 78: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

5. You will see a pop-up notification that says “Starting the Unsafe Browser...”

6. After a few seconds, the Unsafe Browser should launch. The window has a bright red border to remind you tobe careful when using it. You should close it once you’re done configuring the firewall and use the Tor Browserfor any other web browsing you might do on the Admin Workstation.

72 Chapter 14. Set up the Network Firewall

Page 79: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

7. Navigate to the pfSense WebGUI in the Unsafe Browser: https://192.168.1.1

8. The firewall uses a self-signed certificate, so you will see a “This Connection Is Untrusted” warning when youconnect. This is expected. You can safely continue by clicking I Understand the Risks, Add Exception..., andConfirm Security Exception.

9. You should see the login page for the pfSense GUI. Log in with the default username and password (admin /pfsense).

14.2.2 Setup Wizard

If you’re setting up a brand new (or recently factory reset) router, logging in to the pfSense WebGUI will automaticallystart the Setup Wizard. Click next, then next again. Don’t sign up for a pfSense Gold subscription (unless you wantto).

On the “General Information” page, we recommend leaving your hostname as the default (pfSense). There is norelevant domain for SecureDrop, so we recommend setting this to securedrop.local or something similar. Useyour preferred DNS servers. If you don’t know what DNS servers to use, we recommend using Google’s DNS servers:8.8.8.8 and 8.8.4.4. Click Next.

Leave the defaults for “Time Server Information”. Click Next.

On “Configure WAN Interface”, enter the appropriate configuration for your network. Consult your local sysadmin ifyou are unsure what to enter here. For many environments, the default of DHCP will work and the rest of the fieldscan be left blank. Click Next.

For “Configure LAN Interface”, use the IP address and subnet mask of the gateway for the Admin Subnet. ClickNext.

14.2. Initial Configuration 73

Page 80: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Set a strong admin password. We recommend generating a strong password with KeePassX, and saving it in the TailsPersistent folder using the sprovided KeePassX database template. Click Next.

Click Reload. Once the reload completes and the web page refreshes, click the corresponding “here” link to “continueon to the pfSense webConfigurator”.

At this point, since you (probably) changed the LAN subnet settings from their defaults, you will no longer be able toconnect after reloading the firewall and the next request will probably time out. This is not an error - the firewall hasreloaded and is working correctly. To connect to the new LAN interface, unplug and reconnect your network cableto get a new network address assigned via DHCP. Note that if you used a subnet with fewer addresses than /24, thedefault DHCP configuration in pfSense may not work. In this case, you should assign the Admin Workstation a staticIP address that is known to be in the subnet to continue.

Now the WebGUI will be available on the Admin Gateway address. Navigate to https://<Admin GatewayIP> in the Unsafe Browser, and login as before except with the new passphrase you just set for the pfSense WebGUI.Once you’ve logged in to the WebGUI, you are ready to continue configuring the firewall.

14.2.3 Connect Interfaces and Test

Now that the initial configuration is completed, you can connect the WAN port without potentially conflicting with thedefault LAN settings (as explained earlier). Connect the WAN port to the external network. You can watch the WANentry in the Interfaces table on the pfSense WebGUI homepage to see as it changes from down (red arrow pointingdown) to up (green arrow pointing up). This usually takes several seconds. The WAN’s IP address will be shown onceit comes up.

Finally, test connectivity to make sure you are able to connect to the Internet through the WAN. The easiest way to dothis is to use ping (Diagnostics → Ping in the WebGUI). Enter an external hostname or IP that you expect to be up(e.g. google.com) and click “Ping”.

14.3 SecureDrop Configuration

SecureDrop uses the firewall to achieve two primary goals:

1. Isolating SecureDrop from the existing network, which may be compromised (especially if it is a venerablenetwork in a large organization like a newsroom).

2. Isolating the app and the monitor servers from each other as much as possible, to reduce attack surface.

In order to use the firewall to isolate the app and monitor servers from each other, we need to connect them to separateinterfaces, and then set up firewall rules that allow them to communicate.

14.3.1 Disable DHCP on the LAN

pfSense runs a DHCP server on the LAN interface by default. At this stage in the documentation, the Admin Worksta-tion has an IP address assigned via that DHCP server. You can easily check your current IP address by right-clickingthe networking icon (a blue cable going in to a white jack) in the top right of the menu bar, and choosing ConnectionInformation.

74 Chapter 14. Set up the Network Firewall

Page 81: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

In order to tighten the firewall rules as much as possible, we recommend disabling the DHCP server and assigning astatic IP address to the Admin Workstation instead.

Disable DHCP

To disable DHCP, navigate to Services DHCP Server in the pfSense WebGUI. Uncheck the box labeled EnableDHCP server on LAN interface, scroll down, and click the Save and then click Apply.

Assign a static IP address to the Admin Workstation

Now you will need to assign a static IP to the Admin Workstation. Use the Admin Workstation IP that you selectedearlier, and make sure you use the same IP when setting up the firewall rules later.

Start by right-clicking the networking icon in the top right of the menu bar, and choose Edit Connections....

14.3. SecureDrop Configuration 75

Page 82: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Select the name of the current connection from the list and click Edit....

76 Chapter 14. Set up the Network Firewall

Page 83: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Change to the IPv4 Settings tab. Change Method: from Automatic (DHCP) to Manual. Click Add and fill in thestatic networking information for the Admin Workstation.

Note: The Unsafe Browser will not launch when using a manual network configuration if it does not have DNS serversconfigured. This is technically unnecessary for our use case because we are only using it to access IP addresses on theLAN, and do not need to resolve anything with DNS. Nonetheless, you should configure some DNS servers here soyou can continue to use the Unsafe Browser to access the WebGUI in future sessions.

We recommend keeping it simple and using the same DNS servers that you used for the network firewall in the setupwizard.

14.3. SecureDrop Configuration 77

Page 84: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Click Save.... If the network does not come up within 15 seconds or so, try disconnecting and reconnecting yournetwork cable to trigger the change. You will need you have succeeded in connecting with your new static IP whenyou see a pop-up notification that says “Tor is ready. You can now access the Internet”.

78 Chapter 14. Set up the Network Firewall

Page 85: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Troubleshooting: DNS servers and the Unsafe Browser

After saving the new network configuration, you may still encounter the “No DNS servers configured” error whentrying to launch the Unsafe Browser. If you encounter this issue, you can resolve it by disconnecting from the networkand then reconnecting, which causes the network configuration to be reloaded.

To do this, click the network icon in the system toolbar, and click Disconnect under the name of the currently activenetwork connection, which is displayed in bold. After it disconnects, click the network icon again and click the nameof the connection to reconnect. You should see a popup notification that says “Connection Established”, followedseveral seconds later by the “Tor is ready” popup notification.

14.3.2 Set up OPT1

We set up the LAN interface during the initial configuration. We now need to set up the OPT1 interface for theApplication Server. Start by connecting the Application Server to the OPT1 port. Then use the WebGUI to configurethe OPT1 interface. Go to Interfaces OPT1, and check the box to Enable Interface. Use these settings:

• IPv4 Configuration Type: Static IPv4

• IPv4 Address: Application Gateway

Make sure that the CIDR routing prefix is correct. Leave everything else as the default. Save and Apply Changes.

14.3.3 Set up OPT2

If you have 4 NICs, you will have to enable the OPT2 interface. Go to Interfaces OPT2, and check the box to EnableInterface. OPT2 interface is set up similarly to how we set up OPT1 in the previous section. Use these settings:

• IPv4 Configuration Type: Static IPv4

• IPv4 Address: Monitor Gateway

Make sure that the CIDR routing prefix is correct. Leave everything else as the default. Save and Apply Changes.

14.3.4 Set up the Firewall Rules

Since there are a variety of firewalls with different configuration interfaces and underlying sets of software, we cannotprovide a set of network firewall rules to match every use case.

This document is currently geared towards pfSense configured using the WebGUI; as a result, the easiest way to set upyour firewall rules is to look at the screenshots of a correctly configured firewall below and edit the interfaces, aliases,and firewall rules on your firewall to match them.

Here are some general tips for setting up pfSense firewall rules:

1. Create aliases for the repeated values (IPs and ports).

2. pfSense is a stateful firewall, which means that you don’t need corresponding rules to allow incoming trafficin response to outgoing traffic (like you would in, e.g. iptables with --state ESTABLISHED,RELATED).pfSense does this for you automatically.

3. You should create the rules on the interface where the traffic originates.

4. Make sure you delete the default “allow all” rule on the LAN interface. Leave the “Anti-Lockout” rule enabled.

5. Any traffic that is not explicitly passed is logged and dropped by default in pfSense, so you don’t need to addexplicit rules (iptables LOGNDROP) for that.

14.3. SecureDrop Configuration 79

Page 86: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

6. Since some of the rules are almost identical except for whether they allow traffic from the App Server or theMonitor Server, you can use the “add a new rule based on this one” button to save time creating a copy of therule on the other interface.

7. If you are troubleshooting connectivity, the firewall logs can be very helpful. You can find them in the WebGUIin Status → System Logs → Firewall.

We recognize that this process is cumbersome and may be difficult for people inexperienced in managing a firewall.We are working on automating much of this for an upcoming SecureDrop release. If you’re unsure how to set up yourfirewall, use the screenshots in the next section as your guide.

For more experienced pfSense users, we have included a copy of the .xml backup from a correctly configured examplefirewall (SG-2440) in install_files/network_firewall/pfsense_full_backup.xml. Note that thisfile has been edited by hand to remove potentially sensitive information (admin password hashes and the test server’sTLS private key, among other things, were replaced with REDACTED), so you probably won’t be able to import itdirectly (we haven’t tried). The main sections of the file that you should be interested in are interfaces, filter(the firewall rules), and aliases (necessary to parse the firewall rules).

Example Screenshots

Here are some example screenshots of a working pfSense firewall configuration.

4 NICs Configuration

80 Chapter 14. Set up the Network Firewall

Page 87: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

14.3. SecureDrop Configuration 81

Page 88: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

82 Chapter 14. Set up the Network Firewall

Page 89: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

3 NICs Configuration

14.3. SecureDrop Configuration 83

Page 90: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

84 Chapter 14. Set up the Network Firewall

Page 91: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Once you’ve set up the firewall, exit the Unsafe Browser, and continue with the next step of the installation instructions.

14.4 Keeping pfSense up to date

Periodically, the pfSense project maintainers release an update to the pfSense software running on your firewall. Youwill be notified by the appearance of bold red text saying “Update available” in the Version section of the “Status:Dashboard” page (the home page of the WebGUI).

14.4. Keeping pfSense up to date 85

Page 92: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

If you see that an update is available, we recommend installing it. Most of these updates are for minor bugfixes,but occasionally they can contain important security fixes. If you are receiving support from Freedom of the PressFoundation, we will inform you when an important security update is available for your pfSense firewall. Alternatively,you can keep appraised of updates yourself by checking the pfSense Blog posts with the “releases” tag.

Note: Protip: Subscribe to the RSS feed.

To install the update, click the “click here” link next to “Update available”. We recommend checking the “performfull backup prior to upgrade” box in case something goes wrong. Click “Invoke auto upgrade”.

86 Chapter 14. Set up the Network Firewall

Page 93: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

You will see a blank page with a spinning progress indicator in the browser tab while pfSense performs the backupprior to upgrade. This typically takes a few minutes. Once that’s done, you will see a page with a progress bar at thetop that will periodically update as the upgrade progresses. Wait for the upgrade to complete, which may take a whiledepending on the speed of your network.

Note: In a recent test, the progress page did not successfully update itself as the upgraded progressed. After waitingfor some time, we refreshed the page and found that the upgrade had completed successfully. If your upgrade is takinglonger than expected or not showing any progress, try refreshing the page.

14.4. Keeping pfSense up to date 87

Page 94: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

88 Chapter 14. Set up the Network Firewall

Page 95: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 15

Set up the Servers

Now that the firewall is set up, you can plug the Application Server and the Monitor Server into the firewall. If youare using a setup where there is a switch on the LAN port, plug the Application Server into the switch and plug theMonitor Server into the OPT1 port.

15.1 Install Ubuntu

Note: Installing Ubuntu is simple and may even be something you are very familiar with, but we strongly encourageyou to read and follow this documentation exactly as there are some “gotchas” that may cause your SecureDrop set upto break.

The Admin Workstation, running Tails, should be used to download and verify Ubuntu Server. The Application Serverand the Monitor Server specifically require the 64-bit version of Ubuntu Server 14.04.2 LTS (Trusty Tahr). The imageyou want to get is named ubuntu-14.04.2-server-amd64.iso. In order to verify the installation media, youshould also download the files named SHA256SUMS and SHA256SUMS.gpg.

Note: Downloading Ubuntu over Tails may take a very long time because it’s being done over Tor.

15.1.1 Verify the Ubuntu installation media

First, you should verify the Ubuntu image you downloaded hasn’t been modified by a malicious attacker or otherwisecorrupted. We can do so by checking its integrity with cryptographic signatures and hashes.

First, we will download Ubuntu Image Signing Key and verify its fingerprint.

gpg --recv-key "C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451"

Note: It is important you type this out correctly. If you are not copy-pasting this command, we recommend youdouble-check you have entered it correctly before pressing enter.

Again, when passing the full public key fingerprint to the --recv-key command, GPG will implicitly verify thatthe fingerprint of the key received matches the argument passed.

89

Page 96: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Caution: If GPG warns you that the fingerprint of the key received does not match the one requested do notproceed with the installation. If this happens, please email us at [email protected].

Verify the SHA256SUMS file and move on to the next step if you see “Good Signature” in the output.

gpg --verify SHA256SUMS.gpg SHA256SUMS

The next and final step is to verify the Ubuntu image.

sha256sum -c <(grep ubuntu-14.04.2-server-amd64.iso SHA256SUMS)

If the final verification step is successful, you should see the following output in your terminal.

ubuntu-14.04.2-server-amd64.iso: OK

Caution: If you do not see the line above it is not safe to proceed with the installation. If this happens, pleasecontact us at [email protected].

15.1.2 Create the Ubuntu installation media

To create the Ubuntu installation media, you can either burn the ISO image to a CD-R or create a bootable USB stick.As a reliable method we recommend using the dd command to copy the hybrid ISO directly to a USB drive ratherthan a utility like UNetbootin which can result in errors. Once you have a CD or USB with an ISO image of Ubuntuon it, you may begin the Ubuntu installation on both SecureDrop servers.

To use dd you first need to find where the USB device you wish to install Tails on has been mapped. Simply runningthe command lsblk in the terminal will give you a list of your block storage device mappings (this includes harddrives and USB). If the USB you are writing the Ubuntu installer to is of a different size or brand than the USB you arerunning Tails from, it should be easy to identify which USB has which sdX identifier. If you are unsure, try runninglsblk before and after plugging in the USB you are using for the Ubuntu installer.

If your USB is mapped to /dev/sdX and you are currently in the directory that contains the Ubuntu ISO, you woulduse dd like so:

sudo dd conv=fdatasync if=ubuntu-14.04.2-server-amd64.iso of=/dev/sdX

15.1.3 Perform the Installation

The steps below are the same for both the Application Server and the Monitor Server.

Start by inserting the Ubuntu installation media into the server. Boot or reboot the server with the installation mediainserted, and enter the boot menu. To enter the boot menu, you need to press a key as soon as you turn the serveron. This key varies depending on server model, but common choices are Esc, F2, F10, and F12. Often, the serverwill briefly display a message on boot that shows which key should be pressed to enter the boot menu. Once you’veentered the boot menu, select the installation media (USB or CD) and press Enter to boot it.

After booting the Ubuntu image, select Install Ubuntu Server.

90 Chapter 15. Set up the Servers

Page 97: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Follow the steps to select your language, country and keyboard settings. Once that’s done, let the installation processcontinue.

15.1.4 Configure the network manually

The Ubuntu installer will try to autoconfigure networking for the server you are setting up; however, SecureDrop 0.3requires manual network configuration. You can hit Cancel at any point during network autoconfiguration to be giventhe choice to Configure the network manually.

If network autoconfiguration completes before you can do this, the next window will ask for your hostname. To getback to the choice of configuring the network manually, Cancel the step that asks you to set a hostname and choosethe manu option that says Configure the network manually instead.

For a production install with a pfSense network firewall in place, the Application Server and the Monitor Server are onseparate networks. You may choose your own network settings at this point, but make sure the settings you choose areunique on the firewall’s network and remember to propagate your choices through the rest of the installation process.

Below are two configurations you should enter, assuming you used the network settings from the network firewallguide. If you did not, adjust these settings accordingly.

3 NIC Firewall

• Application Server:

– Server IP address: 10.20.1.2

– Netmask (default is fine): 255.255.255.0

15.1. Install Ubuntu 91

Page 98: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

– Gateway: 10.20.1.1

– For DNS, use Google’s name servers: 8.8.8.8 and 8.8.4.4

– Hostname: app

– Domain name should be left blank

• Monitor Server:

– Server IP address: 10.20.2.2

– Netmask (default is fine): 255.255.255.0

– Gateway: 10.20.2.1

– For DNS, use Google’s name servers: 8.8.8.8 and 8.8.4.4

– Hostname: mon

– Domain name should be left blank

4 NIC Firewall

• Application Server:

• Server IP address: 10.20.2.2

• Netmask (default is fine): 255.255.255.0

• Gateway: 10.20.2.1

• For DNS, use Google’s name servers: 8.8.8.8 and 8.8.4.4

• Hostname: app

• Domain name should be left blank

• Monitor Server:

• Server IP address: 10.20.3.2

• Netmask (default is fine): 255.255.255.0

• Gateway: 10.20.3.1

• For DNS, use Google’s name servers: 8.8.8.8 and 8.8.4.4

• Hostname: mon

• Domain name should be left blank

15.1.5 Continue the installation

You can choose whatever username and password you would like. To make things easier later you should use thesame username and same password on both servers (but not the same password as username). Make sure to save thispassword in your admin KeePassX database afterwards.

Click ‘no’ when asked to encrypt the home directory. Then configure your time zone.

15.1.6 Partition the disks

Before setting up the server’s disk partitions and filesystems in the next step, you will need to decide if you would liketo enable *Full Disk Encryption (FDE)*. If the servers are ever powered down, FDE will ensure all of the informationon them stays private in case they are seized or stolen.

92 Chapter 15. Set up the Servers

Page 99: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Warning: The Ansible playbooks for SecureDrop will enable nightly reboots after the cron-apt task runsfor automatic updates. Using FDE would therefore require manual intervention every morning. Consequently westrongly discourage the use of FDE.

While FDE can be useful in some cases, we currently do not recommend that you enable it because there are notmany scenarios where it will be a net security benefit for SecureDrop operators. Doing so will introduce the need formore passwords and add even more responsibility on the administrator of the system (see this GitHub issue for moreinformation).

If you wish to proceed without FDE as recommended, choose the installation option that says Guided - use entire diskand set up LVM.

However, if you decide to go ahead and enable FDE, please note that doing so means SecureDrop will become un-reachable after an automatic reboot. An administrator will need to be on hand to enter the password in order to decryptthe disks and complete the startup process, which will occur anytime there is an automatic software update, andalso several times during SecureDrop’s installation. We recommend that the servers be integrated with a monitoringsolution that so that you receive an alert when the system becomes unavailable.

To enable FDE, select Guided - use entire disk and set up encrypted LVM during the disk partitioning step and writethe changes to disk. Follow the recommendations as to choosing a strong password. As the administrator, you will beresponsible for keeping this passphrase safe. Write it down somewhere and memorize it if you can. If inadvertentlylost it could result in total loss of the SecureDrop system.

After selecting either of those options you may be asked a few questions about overwriting anything currently on theserver you are using. Select yes. You do not need an HTTP proxy, so when asked, you can just click continue.

15.1.7 Finish the installation

Wait for the base system to finish installing. When you get to the Configure tasksel screen, choose No automaticupdates. The subsequent SecureDrop installation will include a task that handles regular software updates.

Note: The Ansible playbooks for SecureDrop will configure automatic updates via cron-apt. As part of theautomatic update process, the servers will reboot nightly. See the OSSEC guide for example notifications generatedby the reboots.

When you get to the software selection screen, only choose OpenSSH server by hitting the space bar (Note: hittingenter before the space bar will force you to start the installation process over).

Once OpenSSH Server is selected, hit Continue.

You will then have to wait for the packages to finish installing.

When the packages are finished installing, Ubuntu will automatically install the bootloader (GRUB). If it asks to installthe bootloader to the Master Boot Record, choose Yes. When everything is done, reboot.

You can now return to where you left off in the main SecureDrop install guide by clicking here.

15.1.8 Save the Configurations

When you are done, make sure you save the following information:

• The IP address of the App Server

• The IP address of the Monitor Server

• The non-root user’s name and password for the servers.

15.1. Install Ubuntu 93

Page 100: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

15.2 Test Connectivity

Now that both the network firewall and the servers are connected and configured, you should make sure you canconnect from the Admin Workstation to both of the servers before continuing with the installation.

In a terminal, verify that you can SSH into both servers, authenticating with your password:

$ ssh <username>@<App IP address> hostnameapp$ ssh <username>@<Monitor IP address> hostnamemon

Tip: If you cannot connect, check the network firewall logs for clues.

15.3 Set up SSH keys

Ubuntu’s default SSH configuration authenticates users with their passwords; however, public key authentication ismore secure, and once it’s set up it is also easier to use. In this section, we will create a new SSH key for authenticatingto both servers. Since the Admin Live USB was set up with SSH Client Persistence, this key will be saved on the AdminLive USB and can be used in the future to authenticate to the servers in order to perform administrative tasks.

First, generate the new SSH keypair:

$ ssh-keygen -t rsa -b 4096

You’ll be asked to “enter file in which to save the key.” Type Enter to use the default location.

If you choose to passphrase-protect this key, you must use a strong, diceword-generated, passphrase that you canmanually type (as Tails’ pinentry will not allow you to copy and paste a passphrase). It is also acceptable to leave thepassphrase blank in this case.

Once the key has finished generating, you need to copy the public key to both servers. Use ssh-copy-id to copythe public key to each server, authenticating with your password:

$ ssh-copy-id <username>@<App IP address>$ ssh-copy-id <username>@<Mon IP address>

Verify that you are able to authenticate to both servers by running the below commands. You should not be promptedfor a passphrase (unless you chose to passphrase-protect the key you just created).

$ ssh <username>@<App IP address> hostnameapp$ ssh <username>@<Monitor IP address> hostnamemon

15.4 Minor Admin Tasks

15.4.1 DNS

The network firewall rules are set up to disable DNS traffic to the gateway, so if your system has not set nameservers,DNS queries will fail. You can test this by running host freedom.press. If the host isn’t found, or there is someother sort of failure, check the pfSense logs. You may see UDP traffic to the gateway on port 53 being blocked.

94 Chapter 15. Set up the Servers

Page 101: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

If this is the case, you need add the following lines to /etc/resolvconf/resolv.conf.d/tail

nameserver 8.8.8.8nameserver 8.8.4.4

Then run sudo dpkg-reconfigure resolvconf. This will update /etc/resolv.conf to include thenew name servers. Verify that host freedom.press succeeds.

15.4.2 System Date

The ansible playbooks you will run later depend on the system clock being set accurately, so run sudo ntpdateon both servers.

15.4. Minor Admin Tasks 95

Page 102: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

96 Chapter 15. Set up the Servers

Page 103: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 16

Install SecureDrop

16.1 Install Ansible

SecureDrop uses the Ansible automation tool for installation and maintenance.

To install Ansible on the Admin Workstation, first update the apt package manager’s package lists to make sure youget the latest and greatest version of Ansible. This usually takes a few minutes over Tor. Once that’s done, you caninstall Ansible:

$ sudo apt-get update$ sudo apt-get install ansible

16.2 Configure the Installation

Make sure you have the following information and files before continuing:

• The App Server IP address

• The Monitor Server IP address

• The SecureDrop application’s GPG public key (from the Transfer Device)

• The SecureDrop application’s GPG key fingerprint

• The email address that will receive alerts from OSSEC

• The GPG public key and fingerprint for the email address that will receive the alerts

• Connection information for the SMTP relay that handles OSSEC alerts. For more information, see the OSSECAlerts Guide.

• The first username of a journalist who will be using SecureDrop (you can add more later)

• The username of the system administrator

• (Optional) An image to replace the SecureDrop logo on the Source Interface and Document Interface

– Recommended size: 500px x 450px

– Recommended format: PNG

From the base of the SecureDrop repo, change into the ansible-base directory:

$ cd install_files/ansible-base

97

Page 104: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

You will have to copy the following required files to install_files/ansible-base:

• SecureDrop Application GPG public key file

• Admin GPG public key file (for encrypting OSSEC alerts)

• (Optional) Custom header image file

The SecureDrop application GPG key should be located on your Transfer Device from earlier. It will depend on thelocation where the USB stick is mounted, but for example, if you are already in the ansible-base directory, you canjust run:

$ cp /media/[USB folder]/SecureDrop.asc .

Or you may use the copy and paste capabilities of the file manager. Repeat this step for the Admin GPG key andcustom header image.

Now you must edit a couple configuration files. You can do so using gedit, vim, or nano. Double-clicking will sufficeto open them.

Edit the inventory file, inventory, and update the default IP addresses with the ones you chose for app and mon.When you’re done, save the file.

Edit the file prod-specific.yml and fill it out with values that match your environment. At a minimum, you willneed to provide the following:

• User allowed to connect to both servers with SSH: ssh_users

• IP address of the Monitor Server: monitor_ip

• Hostname of the Monitor Server: monitor_hostname

• Hostname of the Application Server: app_hostname

• IP address of the Application Server: app_ip

• The SecureDrop application’s GPG public key: securedrop_app_gpg_public_key

• The SecureDrop application’s GPG key fingerprint: securedrop_app_gpg_fingerprint

• GPG public key used when encrypting OSSEC alerts: ossec_alert_gpg_public_key

• Fingerprint for key used when encrypting OSSEC alerts: ossec_gpg_fpr

• The email address that will receive alerts from OSSEC: ossec_alert_email

• The reachable hostname of your SMTP relay: smtp_relay

• The secure SMTP port of your SMTP relay: smtp_relay_port (typically 25, 587, or 465. Must supportTLS encryption)

• Email username to authenticate to the SMTP relay: sasl_username

• Domain name of the email used to send OSSEC alerts: sasl_domain

• Password of the email used to send OSSEC alerts: sasl_password

• The fingerprint of your SMTP relay (optional): smtp_relay_fingerprint

When you’re done, save the file and quit the editor.

98 Chapter 16. Install SecureDrop

Page 105: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

16.3 Run the Ansible playbook

Now you are ready to run the playbook! This will automatically configure the servers and install SecureDrop and allof its dependencies. <username> below is the user you created during the Ubuntu installation, and should be thesame user you copied the SSH public keys to.

$ ansible-playbook -i inventory -u <username> -K --sudo securedrop-prod.yml

You will be prompted to enter the sudo password for the app and monitor servers (which should be the same).

The Ansible playbook will run, installing SecureDrop plus configuring and hardening the servers. This will take sometime, and it will return the terminal to you when it is complete. If an error occurs while running the playbook, pleasesubmit a detailed GitHub issue or send an email to [email protected].

Once the installation is complete, the addresses for each Tor Hidden Service will be available in the following files ininstall_files/ansible-base:

• app-source-ths: This is the .onion address of the Source Interface

• app-document-aths: This is the HidServAuth configuration line for the Document Interface. During alater step, this will be automatically added to your Tor configuration file in order to exclusively connect to thehidden service.

• app-ssh-aths: Same as above, for SSH access to the Application Server.

• mon-ssh-aths: Same as above, for SSH access to the Monitor Server.

Update the inventory, replacing the IP addresses with the corresponding onion addresses from app-ssh-aths andmon-ssh-aths. This will allow you to re-run the Ansible playbooks in the future, even though part of SecureDrop’shardening restricts SSH to only being over the specific authenticated Tor Hidden Services.

16.3. Run the Ansible playbook 99

Page 106: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

100 Chapter 16. Install SecureDrop

Page 107: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 17

Configure the Admin Workstation Post-Install

17.1 Auto-connect to the Authenticated Tor Hidden Services

The SecureDrop installation process adds multiple layers of authentication to protect access to the most sensitive assetsin the SecureDrop system:

1. The Document Interface, because it provides access to submissions (although they are encrypted to an offlinekey), and some metadata about sources and submissions.

2. SSH on the Application Server

3. SSH on the Monitor Server

The installation process blocks direct access to each of these assets, and sets up Authenticated Tor Hidden Services(ATHS) to provide authenticated access instead. Authenticated Tor Hidden Services share the benefits of Tor HiddenServices, but are only accessible to users who possess a shared secret (auth-cookie in the Tor documentation) thatis generated during the hidden service setup process.

In order to access an ATHS, you need to add one or more “auth-cookie” values to your Tor configuration file(torrc) and restart Tor. Doing this manually is annoying and error-prone, so SecureDrop includes a set of scriptsin securedrop/tails_files that can set up a Tails instance to automatically configure Tor to access a set ofATHS. In order to persist these changes across reboots, the Tails instance must have persistence enabled (specifically,the “dotfiles persistence”).

Note: Starting in version 0.3.7, SecureDrop requires Tails 2.x or greater.

To install the auto-connect configuration, start by navigating to the directory with these scripts, and run the installscript:

cd ~/Persistent/securedrop/tails_files/sudo ./install.sh

Type the Administration Password that you selected when starting Tails and hit Enter. This script in-stalls a persistent script that runs every time you connect to a network in Tails, and automatically con-figures access to the Document Interface and to the servers via SSH. The HidServAuth info is col-lected from files in ~/Persistent/securedrop/install_files/ansible-base and stored in~/Persistent/.securedrop/torrc_additions thereafter.

Tip: Copy the files app-document-aths and app-source-ths to the Transfer Device in preparation forsetting up the Journalist Workstation. Then you can use the install.sh script to configure access for Journalists

101

Page 108: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

as well.

In addition, the script creates desktop and menu shortcuts for the Source and Document Interfaces, updates the Ansibleinventory file to access the servers playbooks over Tor in the future, directs Tails to install Ansible at the beginning ofevery session, and sets up SSH host aliases for the servers.

The only thing you need to remember to do is enable persistence when you boot the Admin Workstation. If you areusing the Admin Workstation and are unable to connect to any of the authenticated hidden services, restart Tails andmake sure to enable persistence.

17.2 Set up two-factor authentication for the Admin

The SecureDrop servers should always be accessed over SSH from the Admin Workstation. In the event of a connec-tivity problem, Admins can log in directly to the servers by attaching a keyboard and a display. In order to do so, youwill need to configure 2FA TOTP access.

102 Chapter 17. Configure the Admin Workstation Post-Install

Page 109: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 18

Create an admin account on the Document Interface

In order for any user (administrator or journalist) to access the Document Interface, they need:

1. The auth-cookie for the Document Interface’s ATHS

2. An account on the Document Interface, which requires the following credentials to log in:

• Username

• Password

• Two-factor authentication code

You should create a separate account on the Document Interface for each user who needs access. This makes it easyto enable or disable access to the Document Interface on an individual basis, so you can grant access to new usersor revoke access for users who have left the organization or should no longer be allowed to access the DocumentInterface.

There are two types of accounts on the Document Interface: admin accounts and normal accounts. Admins accountsare like normal accounts, but they are additionally allowed to manage (add, change, delete) other user accounts throughthe web interface.

You must create the first admin account on the Document Interface by running a command on the App Server. Afterthat, the Document Interface admin can create additional accounts through the web interface.

To create the first admin account, SSH to the App Server, then:

$ sudo su$ cd /var/www/securedrop$ ./manage.py add_admin

Follow the prompts.

Once that’s done, you should open the Tor Browser and navigate to the Document Interface’s .onion address. Verifythat you can log in to the Document Interface with the admin account you just created.

For adding more user accounts, please refer now to our Admin Interface Guide.

103

Page 110: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

104 Chapter 18. Create an admin account on the Document Interface

Page 111: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 19

Test the Installation

19.1 Test connectivity

19.1.1 SSH to both servers over Tor

On the Admin Workstation, you should be able to SSH to the App Server and the Monitor Server.

$ ssh app$ ssh mon

The SSH aliases should have been configured automatically by running the install.sh script. If you’re unable toconnect via aliases, try using the verbose command format to troubleshoot:

$ ssh <username>@<app .onion>$ ssh <username>@<mon .onion>

Tip: You can find the Onion URLs for SSH in app-ssh-aths and mon-ssh-aths inside theinstall_files/ansible-base directory.

19.1.2 Log in to both servers via TTY

All access to the SecureDrop servers should be performed over SSH from the Admin Workstation. To aid in trou-bleshooting, physical logins via TTY are supported, but require 2FA to be configured. See the 2FA setup guide forinformation how to enable console logins.

Test the 2FA functionality by connecting a keyboard and display to each server, then login with the Admin username.You will need:

• sudo password for the Admin username

• TOTP code from a 2FA app such as Google Authenticator or FreeOTP

Confirm that logging in via TTY prompts for a 2FA code, and that the code generated by your smartphone app permitslogging in to an interactive shell.

19.2 Sanity-check the install

On each server:

105

Page 112: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

1. Check that you can execute privileged commands by running sudo su.

2. Verify that you are booted into a grsec kernel: run uname -r and verify that the name of the running kernelends with -grsec.

3. Check the AppArmor status with sudo aa-status. On a production instance all profiles should be inenforce mode.

4. Check the current applied iptables rules with iptables-save. It should output approximately 50 lines.

5. You should have received an email alert from OSSEC when it first started. If not, review our OSSEC AlertsGuide.

19.3 Test the web interfaces

1. Make sure the Source Interface is available, and that you can make a submission.

• Do this by opening the Tor Browser and navigating to the onion URL from app-source-ths. Proceedthrough the codename generation (copy this down somewhere) and you can submit a message or attachany random unimportant file.

• Usage of the Source Interface is covered by our Source User Manual.

2. Test that you can access the Document Interface, and that you can log in as the admin user you just created.

• Open the Tor Browser and navigate to the onion URL from app-document-aths. Enter your password andtwo-factor authentication code to log in.

• If you have problems logging in to the Admin/Document Interface, SSH to the App Server and restart thentp daemon to synchronize the time: sudo service ntp restart. Also check that your smart-phone’s time is accurate and set to network time in its device settings.

3. Test replying to the test submission.

• While logged in as an admin, you can send a reply to the test source submission you made earlier.

• Usage of the Document Interface is covered by our Journalist User Manual.

4. Test that the source received the reply.

• Within Tor Browser, navigate back to the app-source-ths URL and use your previous test source codenameto log in (or reload the page if it’s still open) and check that the reply you just made is present.

5. We highly recommend that you create persistent bookmarks for the Source and Document Interface addresseswithin Tor Browser.

6. Remove the test submissions you made prior to putting SecureDrop to real use. On the main Document Interfacepage, select all sources and click ‘Delete selected’.

Once you’ve tested the installation and verified that everything is working, see How to Use SecureDrop.

106 Chapter 19. Test the Installation

Page 113: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 20

Onboard Journalists

Congratulations! You’ve successfully installed SecureDrop.

At this point, the only person who has access to the system is the administrator. In order to grant access to journalists,you will need to do some additional setup for each individual journalist.

In order to use SecureDrop, each journalist needs two things:

1. A Journalist Tails USB.

The Document Interface is only accessible as an authenticated Tor Hidden Service (ATHS). For easeof configuration and security, we require journalists to set up a Tails USB with persistence that theyare required to use to access the Document Interface.

2. Access to the Secure Viewing Station.

The Document Interface allows journalists to download submissions from sources, but they are en-crypted to the offline private key that is stored on the Secure Viewing Station Tails USB. In order forthe journalist to decrypt and view submissions, they need access to a Secure Viewing Station.

20.1 Determine access protocol for the Secure Viewing Station

Currently, SecureDrop only supports encrypting submissions to a single public/private key pair - the SecureDropApplication GPG Key. As a result, each journalist needs a way to access the Secure Viewing Station with a Tails USBthat includes the application private key.

The access protocol for the Secure Viewing Station depends on the structure and distribution of your organization. Ifyour organization is centralized and there are only a few journalists with access to SecureDrop, they should be finewith sharing a single Secure Viewing Station. On the other hand, if your organization is distributed, or if you havea lot of journalists who wish to access SecureDrop concurrently, you will need to provision multiple Secure ViewingStations.

20.2 Create a Journalist Tails USB

Each journalist will need a Journalist Tails USB and a Journalist Workstation, which is the computer they use to boottheir Tails USB.

To create a Journalist Tails USB, just follow the same procedure you used to create a Tails USB with persistence forthe Admin Tails USB, as documented in the Tails Setup Guide.

Once you’re done, boot into the new Journalist Tails USB on the Journalist Workstation. Enable persistence and setan administrator password before continuing with the next section.

107

Page 114: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

20.3 Set up automatic access to the Document Interface

Since the Document Interface is an ATHS, we need to set up the Journalist Tails USB to auto-configure Tor just as wedid with the Admin Tails USB. The procedure is essentially identical, except the SSH configuration will be skipped,since only Administrators need to access the servers over SSH.

Tip: Copy the files app-document-aths and app-source-ths from the Admin Workstation via the TransferDevice. Place these files in ~/Persistent/securedrop/install_files/ansible-base on the Jour-nalist Workstation, and the install.sh script will automatically use them.

Warning: Do not copy the files app-ssh-aths and mon-ssh-aths to the Journalist Workstation. Thosefiles grant access via SSH, and only the Admin Workstation should have shell access to the servers.

Since you need will the Tails setup scripts (securedrop/tails_files) that you used to Configure the AdminWorkstation Post-Install, clone (and verify) the SecureDrop repository on the Journalist Workstation, just like you didfor the Admin Workstation. Refer to the docs for cloning the SecureDrop repository, then return here to continuesetting up the Journalist Workstation.

Once you’ve done this, run the install script to configure the shortcuts for the Source and Document Interfaces:

cd ~/Persistent/securedrop/tails_files/sudo ./install.sh

If you did not copy over the app-source-ths and app-document-aths files from the Admin Workstation, thescript will prompt for the information. Make sure to type the information carefully, as any typos will break access forthe Journalist Workstation.

Once the install.sh script is finished, you should be able to access the Document Interface. Open the Tor Browserand navigate to the .onion address for the Document Interface. You should be able to connect, and will be automaticallytaken to a login page.

20.4 Add an account on the Document Interface

Finally, you need to add an account on the Document Interface so the journalist can log in and access submissions.See the section on Adding Users in the Administrator Guide.

108 Chapter 20. Onboard Journalists

Page 115: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 21

SecureDrop Deployment Best Practices

SecureDrop is only as secure as the environment that surrounds it. To keep sources safe, the news organization’swebsite must employ a set of basic security best practices or else you risk losing any source protection provided bySecureDrop.

While SecureDrop itself is located on a Tor hidden service, news organizations also need to create a SecureDroplanding page that will explain how SecureDrop works, give sources instructions on how to access the Tor hiddenservice, and disclose the risks.

It is important to keep in mind that implementing SecureDrop will bring more attention to your organization by securityresearchers, hackers, and other like-minded people. If the landing page minimum requirements are not implemented,these people will be sure to loudly point this out on Twitter and other blogs as a #SecurityFail. This will discouragepotential sources from using your instance of SecureDrop. However, it can easily be avoided by following the belowbest practices.

Freedom of the Press Foundation eventually plans to list all of those SecureDrop onion URLs as “verified” on itswebsite that meet the minimum requirements for deployment best practices. If your organization cannot follow theminimum guidelines we cannot recommend to users that your SecureDrop instance is safe to use.

In addition to implementing the below best practices, it is strongly recommended that you have a reputable securityfirm perform a security review of your organization’s public website prior to launching an instance of SecureDrop.Upon request, we can help put you in touch with a few security firms if you need more assistance.

21.1 Landing Page

URL and location

Ideally you would not use a separate subdomain, but would use a path at your top-level domain, e.g. organiza-tion.com/securedrop. This is because TLS does not encrypt the hostname, so a SecureDrop user whose connection isbeing monitored would be trivially discovered.

If the landing page is deployed on the same domain as another site, you might consider having some specific config-uration (such as the security headers below) apply only to the /securedrop request URI. This can be done in Apacheby the encapsulating these settings within a <Location> block, which can be defined similarly in nginx by using thelocation {} directive.

HTTPS only (no mixed content)

Most news organizations, in fact almost all, do not use HTTPS encryption by default. This is the number one minimumrequirement for the SecureDrop landing page on your website. Without HTTPS, a source can easily be exposed as avisitor to your site.

109

Page 116: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

This may be difficult if your website serves advertisements or utilizes a legacy content delivery network. You shouldmake sure the SecureDrop landing page does not serve ads of any kind, even if the rest of your site does.

If you do not serve ads on any of your site, you should also consider switching your whole site over to HTTPS bydefault immediately. If you do serve ads, consider pressuring your ad networks to enable you to switch to HTTPS foryour entire website in the future.

If your website needs to operate in both HTTPS and HTTP mode, use protocol-relative URLs for resources such asimages, CSS and JavaScript in common templates to ensure your page does not end up in a mixed HTTPS/HTTP state.

Consider submitting your domain to be included in the Chrome HSTS preload list if you can meet all of the require-ments. This will tell web browsers that the site is only ever to be reached over HTTPS.

Perfect Forward Secrecy

Perfect Forward Secrecy (PFS) is a property of encryption protocols that ensures each SSL session has a unique key,meaning that if the key is compromised in the future it can’t be used to decrypt previously recorded SSL sessions.You may need to talk to your CA (certificate authority) and CDN (content delivery network) for this, although ourrecommended configuration below provides forward secrecy.

SSL certificate recommendations

Regardless of where you choose to purchase your SSL cert and which CA issues it, you’ll often be asked to generatethe private key and a CSR (certificate signing request).

When you do this, it’s imperative that you use SHA-2 as the hashing algorithm instead of SHA-1, which is beingphased out. You should also choose a key size of at least 2048 bits. These parameters will help ensure that theencryption used on your landing page is sufficiently strong. The following example OpenSSL command will create aprivate key and CSR with a 4096-bit key length and a SHA-256 signature:

openssl req -new -newkey rsa:4096 -nodes -sha256 -keyout domain.com.key -out domain.com.csr

Don’t load any resources (scripts, web fonts, etc.) from 3rd parties (e.g. Google Web Fonts)

This will potentially leak information about sources to third parties, which can more easily be accessed by law en-forcement agencies. Simply copy them to your server and serve them yourself to avoid this problem.

Don’t use 3rd party analytics, tracking, or advertising

Most news websites, even those that are non-profits, use 3rd-party analytics tools or tracking bugs on their websites.It is vital that these are disabled for the SecureDrop landing page.

Both the New Yorker and Forbes were heavily criticized when launching their version of SecureDrop because theirlanding page contained trackers. They were claiming they were going to great lengths to protect source’s anonymity,but by having trackers on their landing page, also opened up multiple avenues for third parties to collect informationon those sources. This information can potentially be accessed by law enforcement or intelligence agencies and couldunduly expose a source.

Apply applicable security headers

Security headers give instructions to the web browser on how to handle requests from the web application. Theseheaders set strict rules for the browser and help mitigate against potential attacks. Given the browser is a main avenuefor attack, it is important these headers are as strict as possible.

You can use the site securityheaders.com to easily test your website’s security headers.

If you use Apache, you can use these:

Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"Header edit Set-Cookie ^(.*)$ $;HttpOnlyHeader set Pragma "no-cache"Header set Expires "-1"Header always append X-Frame-Options: DENY

110 Chapter 21. SecureDrop Deployment Best Practices

Page 117: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Header set X-XSS-Protection: "1; mode=block"Header set X-Content-Type-Options: nosniffHeader set X-Content-Security-Policy: "default-src 'self'"Header set X-Download-Options: noopenHeader set X-Permitted-Cross-Domain-Policies: master-onlyHeader set Content-Security-Policy: "default-src 'self'"

If you intend to run nginx as your webserver instead, this will work:

add_header Cache-Control "max-age=0, no-cache, no-store, must-revalidate";add_header Pragma no-cache;add_header Expires -1;add_header X-Frame-Options DENY;add_header X-XSS-Protection "1; mode=block";add_header X-Content-Type-Options nosniff;add_header Content-Security-Policy "default-src 'self'";add_header X-Download-Options: noopen;add_header X-Permitted-Cross-Domain-Policies master-only;

Additional Apache configuration

To enforce HTTPS/SSL always, you need to set up redirection within the HTTP (port 80) virtual host:

RewriteEngine OnRewriteCond %{HTTPS} offRewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

In your SSL (port 443) virtual host, set up HSTS and use these settings to give preference to the most secure ciphersuites:

Header set Strict-Transport-Security "max-age=16070400;"SSLProtocol all -SSLv2 -SSLv3SSLHonorCipherOrder onSSLCompression offSSLCipherSuite EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5

Here’s a similar example for nginx:

add_header Strict-Transport-Security max-age=16070400;ssl_protocols TLSv1 TLSv1.1 TLSv1.2;ssl_prefer_server_ciphers on;ssl_ciphers "EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";

Note: We have balanced security and compatibility with legacy clients in selecting these cipher suites, originallybased upon CloudFlare’s SSL configuration. For other examples, check out Cipherli.st.

You’ll need to run a2enmod headers ssl rewrite for all these to work. You should also setServerSignature Off and ServerTokens Prod, typically in /etc/apache2/conf.d/security. For nginx, useserver_tokens off; so that the webserver doesn’t leak extra information.

If you use nginx, you can follow this link and use the configuration example provided by ProPublica.

Change detection monitoring for the web application configuration and landing page content

OSSEC is a free and open source host-based intrusion detection suite that includes a file integrity monitor. Moreinformation can be found here.

Don’t log access to the landing page in the webserver

Here’s an Apache example that would exclude the landing page from logging:

21.1. Landing Page 111

Page 118: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

SetEnvIf Request_URI "^/securedrop$" dontlogCustomLog logs/access_log common env=!dontlog

In nginx, logging can be disabled like so:

access_log off;error_log off;

Security suggestions

To guard your landing page against being modified by an attacker and directing sources to a rogue SecureDrop instance,you will need good security practices applying to the machine where it is hosted. Whether it’s a VPS in the cloud ordedicated server in your office, you should consider the following:

• Brute force login protection (see sshguard or fail2ban)

• Disable root SSH login

• Use SSH keys instead of passwords

• Use long, random and complex passwords

• Firewall rules to restrict accessible ports (see iptables or ufw)

• AppArmor, grsecurity, SELINUX, modsecurity

• Intrusion and/or integrity monitoring (see Logwatch, OSSEC, Snort, rkhunter, chkrootkit)

• Downtime alerts (Nagios or Pingdom)

• Two-factor authentication (see libpam-google-authenticator, libpam-yubico)

It’s preferable for the landing page to have its own segmented environment instead of hosting it alongside other sitesrunning potentially vulnerable software or content management systems. Check that user and group file permissionsare locked down and that modules or gateway interfaces for dynamic scripting languages are not enabled. You don’twant any unnecessary code or services running as this increases the attack surface.

21.2 Minimum requirements for the SecureDrop environment

• The Application and Monitor servers should be dedicated physical machines, not virtual machines.

• A trusted location to host the servers. The servers should be hosted in a location that is owned or occupied bythe organization to ensure that their legal can not be bypassed with gag orders.

• The SecureDrop servers should be on a separate internet connection or completely segmented from corporatenetwork.

• All traffic from the corporate network should be blocked at the SecureDrop’s point of demarcation.

• Video monitoring should be recorded of the server area and the organizations safe.

• Journalist should ensure that while using the air-gapped viewing station they are in an area without video cam-eras.

• An established monitoring plan and incident response plan. Who will receive the OSSEC alerts and what theirresponse plan will be? These should cover technical outages and a compromised environment plan.

112 Chapter 21. SecureDrop Deployment Best Practices

Page 119: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

21.3 Suggested

• For publicly advertised SecureDrop instances display the Source Interface’s hidden service onion address on allof the organization public pages.

• Mirror the Tor Browser and Tails so sources do not have to visit torproject.org to download it.

21.4 Whole Site Changes

Ideally, some or all of the following changes are made to improve the overall security of the path to the landing pageand obfuscate traffic analysis.

1. Make the entire site available under ‘ssl.washingtonpost.com’ (ideally without the ‘.ssl’ prefix).

• That way, the domain won’t be as suspicious as it is right now. I suspect that this is more or less the onlycontent hosted on the domain.

2. Include an iframe for all (or a random subset of) visitors, loading this particular URL (hidden).

• By artificially generating traffic to the endpoint it will be harder to distinguish these from other, ‘real’requests.

• Use a random delay for adding the iframe (otherwise the ‘pairing’ with the initial HTTP request maydistinguish this traffic).

3. Print the link, URL and info block on the dead trees (the paper), as others have suggested.

4. Add HSTS headers.

21.3. Suggested 113

Page 120: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

114 Chapter 21. SecureDrop Deployment Best Practices

Page 121: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 22

Google Authenticator

As part of the SecureDrop installation process, you will need to set up two factor authentication using the GoogleAuthenticator app for both the App and Monitor Servers.

Connect to each of the servers using ssh and run google-authenticator. Follow the prompts, saying “yes”when prompted for a “yes/no” response. When you’ve finished, open the Google Authenticator app on your smart-phone and follow the steps below for either iOS or Android. Once you’ve properly set up the first server, repeat thesesteps again on the other.

22.1 iOS

• Select the pencil in the top-right corner

• Select the plus sign at the bottom to add a new entry

• Select Scan Barcode

• Scan the barcode using your phone’s camera

A new entry will automatically be added to the list. If you wish to edit this entry and give it a new name, do thefollowing:

• Select the pencil in the top-right corner

• Select the pencil next to the entry you wish to edit

• Select the checkmark in the top-right corner to save

To complete the setup process, say y to each prompt presented by google-authenticator.

22.2 Android

• Select the menu bar in the top-right corner

• Select Set up account

• Select Scan a barcode

• Scan the barcode using your phone’s camera

A new entry will automatically be added to the list. If you wish to edit this entry and give it a new name, do thefollowing:

• Highlight the entry with a long press

115

Page 122: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

• Select the pencil in the top-right corner

• Edit the entry’s name and press Save

To complete the setup process, say y to each prompt presented by google-authenticator.

116 Chapter 22. Google Authenticator

Page 123: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 23

Useful Logs

23.1 Both servers

• AppArmor and grsec errors: /var/log/kern.log

• iptables: /var/log/syslog

23.2 App Server

• Apache: /var/log/apache2/*

If an event triggers it’s in the SecureDrop application log: /var/www/securedrop/securedrop.log

23.3 Monitor Server

• OSSEC

/var/ossec/logs/ossec.log/var/ossec/logs/alerts/alerts.log

• Postfix/Procmail

/var/log/mail.log/var/log/procmail.log

117

Page 124: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

118 Chapter 23. Useful Logs

Page 125: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 24

OSSEC Guide

24.1 Setting up OSSEC alerts

OSSEC is an open source host-based intrusion detection system (IDS) that we use to perform log analysis, file integritychecking, policy monitoring, rootkit detection and real-time alerting. It is installed on the Monitor Server and con-stitutes that machine’s main function. OSSEC works in a server-agent scheme, that is, the OSSEC server extends itsexisting functions to the App Server through an agent installed on that server, covering monitoring for both machines.

In order to receive email alerts from OSSEC, you need to supply several settings to Ansible in the playbook for yourenvironment. If you don’t already have a working mail server or don’t know what to do, then see the section belowabout using Gmail as a fallback option. We assume that you’re working out of the ‘securedrop’ directory you clonedthe code into, and editing install_files/ansible-base/prod-specific.yml prior to installing SecureDrop.

What you need:

• The GPG key that OSSEC will encrypt alerts to

• The email address that will receive alerts from OSSEC

• Information for your SMTP server or relay (hostname, port)

• Credentials for the email address that OSSEC will send alerts from

Receiving email alerts from OSSEC requires that you have an SMTP relay to route the emails. You can use an SMTPrelay hosted internally, if one is available to you, or you can use a third-party SMTP relay such as Gmail. The SMTPrelay does not have to be on the same domain as the destination email address, i.e. smtp.gmail.com can be the SMTPrelay and the destination address can be [email protected].

While there are risks involved with receiving these alerts, such as information leakage through metadata, we feel thebenefit of knowing how the SecureDrop servers are functioning is worth it. If a third-party SMTP relay is used, thatrelay will be able to learn information such as the IP address the alerts were sent from, the subject of the alerts, andthe destination email address the alerts were sent to. Only the body of an alert email is encrypted with the recipient’sGPG key. A third-party SMTP relay could also prevent you from receiving any or specific alerts.

The SMTP relay that you use should support SASL authentication and SMTP TLS protocols TLSv1.2, TLSv1.1, andTLSv1. Most enterprise email solutions should be able to meet those requirements.

These are the values you must specify in prod-specific.yml:

• GPG public key used to encrypt OSSEC alerts: ossec_alert_gpg_public_key

• Fingerprint of key used when encrypting OSSEC alerts: ossec_gpg_fpr

• The email address that will receive alerts from OSSEC: ossec_alert_email

• The reachable hostname of your SMTP relay: smtp_relay

119

Page 126: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

• The secure SMTP port of your SMTP relay: smtp_relay_port (typically 25, 587, or 465. must supportTLS encryption)

• Email username to authenticate to the SMTP relay: sasl_username

• Domain name of the email used to send OSSEC alerts: sasl_domain

• Password of the email used to send OSSEC alerts: sasl_password

If you don’t know what value to enter for one of these, please ask your organization’s email administrator for the fullconfiguration before proceeding. It is better to get these right the first time rather than changing them after SecureDropis installed. If you’re not sure of the correct smtp_relay_port number, you can use a simple mail client such asThunderbird to test different settings or a port scanning tool such as nmap to see what’s open. You could also use telnetto make sure you can connect to an SMTP server, which will always transmit a reply code of 220 meaning “Serviceready” upon a successful connection.

The smtp_relay mail server hostname is often, but not always, different from the sasl_domain, e.g.smtp.gmail.com and gmail.com.

In some cases, authentication or transport encryption mechanisms will vary and you may require later edits to thePostfix configuration (mainly /etc/postfix/main.cf) on the Monitor Server in order to get alerts to work. You can consultPostfix’s official documentation for help, although we’ve described some common scenarios in the troubleshootingsection of this document.

If you have your GPG public key handy, copy it to install_files/ansible-base and then specify the filename in theossec_alert_gpg_public_key line of prod-specific.yml.

If you don’t have your GPG key ready, you can run GnuPG on the command line in order to find, import, and exportyour public key. It’s best to copy the key from a trusted and verified source, but you can also request it from keyserversusing the known fingerprint. Looking it up by email address or a shorter key ID format could cause you to obtaina wrong, malicious, or expired key. Instead, we recommend you type out your fingerprint in groups of four (justlike GPG prints it) enclosed by double quotes. The reason we suggest this formatting for the fingerprint is simplybecause it’s easiest to type and verify correctly. In the code below simply replace <fingerprint> with your full,space-separated fingerprint:

Download your key and import it into the local keyring:

gpg --recv-key "<fingerprint>"

Note: It is important you type this out correctly. If you are not copy-pasting this command, we recommend youdouble-check you have entered it correctly before pressing enter.

Again, when passing the full public key fingerprint to the --recv-key command, GPG will implicitly verify thatthe fingerprint of the key received matches the argument passed.

Caution: If GPG warns you that the fingerprint of the key received does not match the one requested do notproceed with the installation. If this happens, please email us at [email protected].

Next we export the key to a local file.

gpg --export -a "<fingerprint>" > ossec.pub

Copy the key to a directory where it’s accessible by the SecureDrop installation:

cp ossec.pub install_files/ansible-base/

The fingerprint is a unique identifier for an encryption (public) key. The short and long key ids correspond to the last8 and 16 hexadecimal digits of the fingerprint, respectively, and are thus a subset of the fingerprint. The value for

120 Chapter 24. OSSEC Guide

Page 127: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

ossec_gpg_fpr must be the full 40 hexadecimal digit GPG fingerprint for this same key, with all capital lettersand no spaces. The following command will retrieve and format the fingerprint per our requirements:

gpg --with-colons --fingerprint "<fingerprint>" | grep "^fpr" | cut -d: -f10

Next you specify the e-mail that you’ll be sending alerts to, as ossec_alert_email. This could be your workemail, or an alias for a group of IT administrators at your organization. It helps for your mail client to have the abilityto filter the numerous messages from OSSEC into a separate folder.

Now you can move on to the SMTP and SASL settings, which are straightforward. These correspond to the outgoinge-mail address used to send the alerts instead of where you’re receiving them. If that e-mail is [email protected],the sasl_username would be ossec and sasl_domain would be news-org.com.

The Postfix configuration enforces certificate verification, and requires both a valid certificate and STARTTLS supporton the SMTP relay. By default the system CAs will be used for validating the relay certificate. If you need to providea custom CA to perform the validation, copy the cert file to install_files/ansible-base add a new variableto prod-specific.yml:

smtp_relay_cert_override_file: MyOrg.crt

where MyOrg.crt is the filename. The file will be copied to the server in /etc/ssl/certs_local and thesystem CAs will be ignored when validating the SMTP relay TLS certificate.

Save prod-specific.yml, exit the editor and proceed with the installation by running the playbooks.

24.1.1 Using Gmail for OSSEC alerts

It’s easy to get SecureDrop to use Google’s servers to deliver the alerts, but it’s not ideal from a security perspective.This option should be regarded as a backup plan. Keep in mind that you’re leaking metadata about the timing ofalerts to a third party — the alerts are encrypted and only readable to you, however that timing may prove useful to anattacker.

First you should sign up for a new account. While it’s technically possible to use an existing Gmail account, it’s bestto compartmentalize these alerts from any of your other activities. Choose a strong and random passphrase for thenew account. Skip the creation of a Google+ profile and continue straight to Gmail. Next, enable Google’s 2-StepVerification. With 2-Step Verification enabled, you won’t use the normal account password in this configuration — itwill not work; instead you must navigate (using the settings in the top right) to Account > Signing in > App passwords,and generate a new App password which you will use as the sasl_passwd.

Once the account is created you can log out and provide the values for sasl_username as your new Gmail username(without the domain), sasl_domain, which is typically gmail.com (or your custom Google Apps domain), andsasl_passwd. Remember to use the App password generated from the 2-step config for sasl_passwd, as theprimary account password won’t work. The smtp_relay is smtp.gmail.com and the smtp_relay_port is 587.

24.1.2 Configuring fingerprint verification

If you run your own mail server, you may wish to increase the security level used by Postfix for sending mail tofingerprint, rather than secure. Doing so will require an exact match for the fingerprint of TLS certificateon the SMTP relay. The advantage to fingerprint verification is additional security, but the disadvantage is potentialmaintenance cost if the fingerprint changes often. If you manage the mail server and handle the certificate rotation, youshould update the SecureDrop configuration whenever the certificate changes, so that OSSEC alerts continue to send.Using fingerprint verification does not work well for popular mail relays such as smtp.gmail.com, as those fingerprintscan change frequently, due to load balancing or other factors.

You can retrieve the fingerprint of your SMTP relay by running the command below (all on one line). Please note thatyou will need to replace smtp.gmail.com and 587 with the correct domain and port for your SMTP relay.

24.1. Setting up OSSEC alerts 121

Page 128: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

openssl s_client -connect smtp.gmail.com:587 -starttls smtp < /dev/null 2>/dev/null |openssl x509 -fingerprint -noout -in /dev/stdin | cut -d'=' -f2

If you are using Tails, you will not be able to connect directly with openssl s_client due to the default firewallrules. To get around this, proxy the requests over Tor by adding torify at the beginning of the command. The outputof the command above should look like the following:

6D:87:EE:CB:D0:37:2F:88:B8:29:06:FB:35:F4:65:00:7F:FD:84:29

Finally, add a new variable to prod-specific.yml as smtp_relay_fingerprint, like so:

smtp_relay_fingerprint: "6D:87:EE:CB:D0:37:2F:88:B8:29:06:FB:35:F4:65:00:7F:FD:84:29"

Specifying the fingerprint will configure Postfix to use it for verification on the next playbook run. (To disable finger-print verification, simply delete the variable line you added, and rerun the playbooks.) Save prod-specific.yml,exit the editor and proceed with the installation by running the playbooks.

24.2 Troubleshooting

Some OSSEC alerts should begin to arrive as soon as the installation has finished.

The easiest way to test that OSSEC is working is to SSH to the Monitor Server and run service ossec restart.This will trigger an Alert level 3 saying: “Ossec server started.”

So you’ve finished installing SecureDrop, but you haven’t received any OSSEC alerts. First, check your spam/junkfolder. If they’re not in there, then most likely there is a problem with the email configuration. In order to find outwhat’s wrong, you’ll have to SSH to the Monitor Server and take a look at the logs. To examine the mail log createdby Postfix, run the following command:

tail /var/log/mail.log

The output will show you attempts to send the alerts and provide hints as to what went wrong. Here’s a few possibilitiesand how to fix them:

Problem SolutionConnection timed out

Check that the hostname and port is correct in therelayhost line of/etc/postfix/main.cf

Server certificate not verified

Check that the relay certificate is valid (for moredetailed help, see Troubleshooting SMTP TLS).Consider addingsmtp_relay_cert_override_file

to prod_specific.yml as described above.

Authentication failure

Edit /etc/postfix/sasl_passwd and make surethe username, domain and password are correct. Runpostmap /etc/postfix/sasl_passwd

to update when finished.

122 Chapter 24. OSSEC Guide

Page 129: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

After making changes to the Postfix configuration, you should run service postfix reload and test the newsettings by restarting the OSSEC service.

Tip: If you change the SMTP relay port after installation for any reason, you must update the smtp_relay_portvariable in the prod-specific.yml file, then rerun the Ansible playbook. As a general best practice, we recom-mend modifying and rerunning the Ansible playbook instead of manually editing the files live on the servers, sincevalues like smtp_relay_port are used in several locations throughout the config.

24.2.1 Useful log files for OSSEC

Other log files that may contain useful information:

/var/log/procmail.log Includes lines for sending mail containing OSSEC alerts.

/var/log/syslog Messages related to grsecurity, AppArmor and iptables.

/var/ossec/logs/ossec.log OSSEC’s general operation is covered here.

/var/ossec/logs/alerts/alerts.log Contains details of every recent OSSEC alert.

Tip: Remember to encrypt any log files before sending via email, for example to [email protected], in orderto protect security-related information about your organization’s SecureDrop instance.

24.2.2 Troubleshooting SMTP TLS

Your choice of SMTP relay server must support STARTTLS and have a valid server certificate. By de-fault, the Monitor Server’s Postfix configuration will try to validate the server certificate using the default rootstore (in Ubuntu, this is maintained in the ca-certificates package). You can override this by settingsmtp_relay_cert_override_file as described earlier in this document.

In either situation, it can be helpful to use the openssl command line tool to verify that you can successfully connectto your chosen SMTP relay securely. We recommend doing this before running the playbook, but it can also be usefulas part of troubleshooting OSSEC email send failures.

In either case, start by attempting to make a STARTTLS connection to your chosensmtp_relay:smtp_relay_port (get the values from your prod-specific.yml file). On a machinerunning Ubuntu, run the following openssl command, replacing smtp_relay and smtp_relay_port withyour specific values:

openssl s_client -showcerts -starttls smtp -connect smtp_relay:smtp_relay_port < /dev/null 2> /dev/null

Note that you will not be able to run this command on the Application Server because of the firewall rules. You canrun it on the Monitor Server, but you will need to run it as the Postfix user (again, due to the firewall rules):

sudo -u postfix openssl s_client -showcerts -starttls smtp -connect smtp.gmail.com:587 < /dev/null 2> /dev/null

If the command fails with “Could not connect” or a similar message, then this mail server does not support STARTTLS.Verify that the values you are using for smtp_relay and smtp_relay_port are correct. If they are, you shouldcontact the admin of that relay and talk to them about supporting STARTTLS, or consider using another relay thatalready has support.

If the command succeeds, the first line of the output should be “CONNECTED” followed by a lot of diagnosticinformation about the connection. You should look for the line that starts with “Verify return code”, which is usu-ally one of the last lines of the output. Since we did not give openssl any information about how to verify cer-

24.2. Troubleshooting 123

Page 130: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

tificates in the previous command, it should be a non-zero value (indicating verification failed). In my case, it isVerify return code: 20 (unable to get local issuer certificate), which indicates thatopenssl does not know how to build the certificate chain to a trusted root.

If you are using the default verification setup, you can check whether your cert is verifiable by the default root storewith -CApath:

openssl s_client -CApath /etc/ssl/certs -showcerts -starttls smtp -connect smtp_relay:smtp_relay_port < /dev/null 2> /dev/null

For example, if I’m testing Gmail as my SMTP relay (smtp.gmail.com:587), running the openssl with thedefault root store results in Verify return code: 0 (ok) because their certificate is valid and signed byone of the roots in the default store. This indicates that can be successfully used to securely relay email in the defaultconfiguration of the Monitor Server.

If your SMTP relay server does not successfully verify, you should use the return code and its text description to helpyou diagnose the cause. Your cert may be expired, in which case you should renew it. It may not be signed by a trustedCA, in which case you should obtain a signature from a trusted CA and install it on the mail server. It may not havethe right hostnames in the Common Name or Subject Alternative Names, in which case you will need to generate anew CSR with the correct hostnames and then obtain a new certificate and install it. Etc., etc.

If you are not using the the default verification setup, and intentionally do not want to use a certificate signedby one of the default CA’s in Ubuntu, you can still use openssl to test whether you can successfully negoti-ate a secure connection. Begin by copying your certificate file (smtp_relay_cert_override_file fromprod-specific.yml) to the computer you are using for testing. You can use -CAfile to test if your connectionwill succeed using your custom root certificate:

openssl s_client -CAfile /path/to/smtp_relay_cert_override_file -showcerts -starttls smtp -connect smtp_relay:smtp_relay_port < /dev/null 2> /dev/null

Finally, if you have a specific server in mind but are not sure what certificate you need to verify the connection, you canuse the output of openssl s_client to figure it out. Since we have -showcerts turned on, openssl printsthe entire certificate chain it receives from the server. A properly configured server will provide all of the certificatesin the chain up to the root cert, which needs to be identified as “trusted” for the verification to succeed. To see thechain, find the part of the output that start with Certificate chain. It will look something like this (examplefrom smtp.gmail.com, with certificate contents snipped for brevity):

---Certificate chain0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.comi:/C=US/O=Google Inc/CN=Google Internet Authority G2-----BEGIN CERTIFICATE-----<snip>-----END CERTIFICATE-----1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA-----BEGIN CERTIFICATE-----<snip>-----END CERTIFICATE-----2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CAi:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority-----BEGIN CERTIFICATE-----<snip>-----END CERTIFICATE--------

The certificates are in reverse order from leaf to root. openssl handily prints the Subject (s:) and Issuer (i:)information for each cert. In order to find the root certificate, look at the Issuer of the last certificate. In this case, that’sEquifax Secure Certificate Authority. This is the root certificate that issued the first certificate in thechain, and it is what you need to tell Postfix to use in order to trust the whole connection.

124 Chapter 24. OSSEC Guide

Page 131: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Actually obtaining this certificate and establishing trust in it is beyond the scope of this document. Typically, if youare using your own SMTP relay with a custom CA, you will be able to obtain this certificate from an intranet portalor someone on your IT staff. For a well-known global CA, you can obtain it from the CA’s website. For example,a quick search for “Equifax Secure Certificate Authority” finds the web page of GeoTrust’s Root Certificates, whichhave accompanying background information and are available for download.

Once you have the root certificate file, you can use -CAfile to test that it will successfully verify the connection.

24.3 Analyzing the Alerts

Understanding the contents of the OSSEC alerts requires a background and knowledge in Linux systems administra-tion. They may be confusing, and at first it will be hard to tell between a genuine problem and a fluke. You shouldexamine these alerts regularly to ensure that the SecureDrop environment has not been compromised in any way, andfollow up on any particularly concerning messages with direct investigation.

24.3.1 Common OSSEC Alerts

The SecureDrop Application and Monitor Servers reboot every night, as part of the unattended upgrades process.When the servers come back up, OSSEC will start again and report the change in status. Therefore you should receivean email alert every morning containing text similar to:

Received From: mon->ossec-monitordRule: 502 fired (level 3) -> "Ossec server started."Portion of the log(s):

ossec: Ossec started.

This is a normal alert, and informs you that the system is working as expected.

24.3.2 Uncommon OSSEC Alerts

If you believe that the system is behaving abnormally, you should contact us at [email protected] for help.

24.3. Analyzing the Alerts 125

Page 132: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

126 Chapter 24. OSSEC Guide

Page 133: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 25

Tails Guide

To log-in SecureDrop and retreived messages sent by sources, the journalist must be using the Tails operating system.The admin must also use Tails to access the Document Interface and create new users.

If you followed the SecureDrop Installation instructions correctly, you should have already created a journalist TailsUSB and an admin Tails USB and enabled the persistence volume on each. If you have not, or need to create anotherjournalist Tails USB for a second journalist, follow the steps below.

If you already know how to boot the admin Tails USB or the journalist Tails USB with persistence, you can skip downto the step ‘download the repository’.

Note that for all of these instructions to work, you should have already installed the main SecureDrop application. Itis also required that you use Tails version 2.x or greater.

25.1 Installing Tails on USB sticks

Tails is a live operating system that is run from removable media, such as a DVD or a USB stick. For SecureDrop,you’ll need to install Tails onto USB sticks and enable persistent storage.

We recommend creating an initial Tails Live USB or DVD, and then using that to create additional Tails Live USBswith the Tails Installer, a special program that is only available from inside Tails. You will only be able to createpersistent volumes on USB sticks that had Tails installed via the Tails Installer.

The Tails website has detailed and up-to-date instructions on how to download and verify Tails, and how to create aTails USB stick. Here are some links to help you out:

• Download and verify the Tails .iso

• Install onto a USB stick or SD card

• Create & configure the persistent volume

25.1.1 Note for Mac OS X users manually installing Tails

The Tails documentation for manually installing Tails onto a USB device on Mac OS X describes how to copy thedownloaded .iso image to a USB stick in Section 4, “Do the copy”. This section includes the following dd invocationto copy the .iso to the USB:

dd if=[tails.iso] of=/dev/diskX

This command is very slow. In our testing, it took about 18 minutes to copy the .iso to a USB 2.0 drive. You can speedit up by changing the arguments to dd like so:

127

Page 134: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

dd if=[tails.iso] of=/dev/rdiskX bs=1m

Note the change from diskX to rdiskX. This reduced the copy time to 3 minutes for us.

25.2 Configure Tails for use with SecureDrop

25.2.1 Persistence

Creating an encrypted persistent volume will allow you to securely save information in the free space that is left on theTransfer Device. This information will remain available to you even if you reboot Tails. Instructions on how to createand use this volume can be found on the Tails website. You will be asked to select from a list of persistence features,such as personal data. We require that you enable all features.

25.2.2 Start Tails and enable the persistent volume

When starting Tails, you should see a “Welcome to Tails” screen with two options. Select Yes to enable the persistentvolume and enter your password. Select Yes to show more options and click Forward. Enter an Administrationpassword for use with this specific Tails session and click Login.

25.2.3 Download the repository

The rest of the SecureDrop-specific configuration is assisted by files stored in the SecureDrop git repository. To getstarted, open a terminal and run the following commands to download the git repository. Note that since the repositoryis fairly large and Tor can be slow, this may take a few minutes.

cd ~/Persistentgit clone https://github.com/freedomofpress/securedrop.git

25.2.4 Passphrase Database

As mentioned in the installation documentation, we provide a KeePassX password database template to make it easierfor admins and journalists to generate strong, unique passphrases and store the securely. Once you have set up Tailswith persistence and have cloned the repo, you can set up your personal password database using this template.

You can find the template in tails_files/securedrop-keepassx.xml inside the securedrop repository.Note that you will not be able to access your passwords if you forget the master password or the location of the keyfile used to protect the database.

To use the template:

• Open the KeePassX program

• Select File, Import from..., and KeePassX XML (*.xml)

• Navigate to the location of securedrop-keepassx.xml, select it, and click Open

• Set a strong master password or choose a key file to protect the password database

• Click File and Save Database As

• Save the database in the Tails Persistent folder

128 Chapter 25. Tails Guide

Page 135: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

25.2.5 Set up easy access to the Document Interface

To complete setup of the Admin Workstation or Journalist Workstation, we recommend using the scripts intails_files to easily configure Tor to access the Document Interface.

Navigate to the directory with the setup scripts and begin the installation by typing these commands into the terminal:

cd securedrop/tails_files/sudo ./install.sh

Type the administration password that you selected when starting Tails and hit enter. This installation script does thefollowing:

• Downloads additional software

• Installs a program that automatically and persistently configures Tor to access the SecureDrop servers and inter-faces, by adding HidServAuth values to /etc/tor/torrc.

• Sets up desktop and main menu shortcuts for the Document Interface and Source Interface

• Sets up SSH host aliases for mon and app

• Updates your Ansible inventory file to run the playbooks over Tor in the future

• Makes it so that Tails installs Ansible at the beginning of every session

If you are missing any files, the script will exit with an error. If you’re running this script as an admin, the entire setupshould be automatic.

If you’re running the script as a journalist, you will need the .onion addresses for each interface, provided to you bythe admin.

We use an “authenticated” Tor Hidden Service so that adversaries cannot access the Document Interface, providinga layer of defense-in-depth which protects the Document Interface even if there is a security vulnerability in the webapplication, or if the journalist’s username, password, and two-factor token are stolen. The extra configuration that isrequired is handled by this script.

Our install.sh sets up Tails to work with SecureDrop every time you login. As long as Tails is booted with thepersistent volume enabled then you can open the Tor Browser and connect to the Document Interface as normal.

25.2.6 Create bookmarks for Source and Document Interfaces

If you want, you can open the browser and create bookmarks for the Source and Document Interfaces. Navigate tothe site you wish to bookmark, select Bookmarks and Bookmark This Page, give the site a useful name (e.g. SourceInterface), and click Done. Tails will remember the bookmarks even if you reboot.

25.2. Configure Tails for use with SecureDrop 129

Page 136: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

130 Chapter 25. Tails Guide

Page 137: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 26

Setting up a printer with Tails

Because Tails is supposed to be as “amnesiac” as possible, you want to shield your Tails stick from any extra inputsfrom, and outputs to, a potentially untrusted network. This is why we strongly recommend using a printer that doesnot have WiFi or Bluetooth, and hooking up to it using a regular USB cable to print.

Normally, any printer should work with Tails “out of the box.” Most difficulties stem from not selecting the right driver(extra software needed for the printer and computer to communicate). Luckily, Tails has a large number of drivers forjust about any popularly manufactured printer on hand, without even having to download new drivers from the web.

Boot up Tails with both your persistent volume, and set an admin passphrase.

Make sure your computer is NOT connected to the internet. This will make sure that your printer set-up is neverinfluenced by a network connection.

Plug in your printer and navigate to Printing. “Applications -> System Tools -> Administration -> Printing”. You willneed to authenticate this action with the admin passphrase you set when booting up Tails.

131

Page 138: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Click Add.

132 Chapter 26. Setting up a printer with Tails

Page 139: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Immediately, Tails will recongize the plugged-in printer, and make the best suggestion from its on-board database ofprinter drivers.

Tails will guide you through a default set-up, suggesting the best match for the printer you have. These choices comefrom Tails’ pre-installed driver database.

133

Page 140: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

The recommended driver does not always match the actual make and model of your printer, but starting with therecommendations is a good idea. Sometimes you get lucky, and Tails suggests a perfect match. Click Forward, andApply your settings.

134 Chapter 26. Setting up a printer with Tails

Page 141: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

You’ll notice that the printer is now listed in your Printing Configurations in your persistent storage.

The only way to be sure you have the right driver is by doing a test print. Right-click on your new printer config andselect Properties to open its settings, then click Print Test Page.

135

Page 142: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

In this initial test, the recommended driver was wrong! My test page came out garbled, and my printer gave me awarning that I had to manually clear before the page printed.

136 Chapter 26. Setting up a printer with Tails

Page 143: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

137

Page 144: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Don’t worry if this happens to you; you can edit the printer configuration to point it to the correct driver for yourmodel. Select Properties again and choose Change... next to the “Make and Model” directive.

138 Chapter 26. Setting up a printer with Tails

Page 145: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

To fix this problem, I selected the CUPS + Gutenprint driver, even though it wasn’t recommended. Click Forward tosave your changes.

Do another test print, checking your printer for indicators that it’s working or not. This time, printing works perfectly.If you still experience garbled text, try another driver from your selections. It is a process of trial-and-error.

139

Page 146: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

140 Chapter 26. Setting up a printer with Tails

Page 147: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 27

SecureDrop On-Site Training Schedule

This is a high level schedule for what happens for the 2 days during an on-site install.

27.1 Day 1: Preparation and Install

27.1.1 Setup and Introductions

Time: 30min

Participants: all

Required: projector, WiFi access, pre-configured demo SecureDrop instance and 2 laptops to act as the JournalistWorkstation and SVS

• The demo instance has multiple sources to try and give a feel of what it will look like at 2 weeks past beingpublic with sources in different states of the reply process

27.1.2 Overview of SecureDrop

Time: 2 hours

Participants: journalists, editors, SecureDrop admins, OSSEC alert recipients and anyone else interested

• Go over the SecureDrop FAQs

• Go over the SecureDrop environment diagrams

• Importance of the landing page security and Twitter feedback

• Demo the source submission process

• Demo the journalist’s processes for checking the Document Interface

• Demo the journalist’s processes for replies

• Demo working with submissions on the SVS

• Discuss scrubbing submitted documents prior to publication

• Options for distributing with other news organizations

• Show example of an OSSEC alert, briefly cover what it does

• Show example of ‘is it up?’ Nagios monitoring alerts for Source Interface

141

Page 148: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

• Explain why the Document Interface does not have ‘is it up?’ monitoring

• Discuss vanity onion URLs with Shallot and Scallion

• How to brand the Source and Document Interface

• Physical security of servers and SVS

• How to securely publicize the organization’s Source Interface Tor URL

• Distribute important info:

• Third-party security mailing lists to subscribe to

• https://freedom.press/about/staff

• https://securedrop.org

• Hardware for SecureDrop

• SecureDrop Deployment Best Practices

• Source Best Practice Guide

• Journalist Best Practice Guide

• Answering the client vs. server side crypto debate

• Link to security audits

• Bunch of other in-progress docs are on securedrop.hackpad.com, many are still in draft form

27.1.3 Questions

Time: 30 min

27.1.4 Installing SecureDrop

Time: 6 hours

• Follow Installing SecureDrop

27.2 Day 2: Journalist and Admin Training

27.2.1 Journalist Training

Time: 2 separate sessions, about 2 hours each

Participants: journalists and admins

• Check access to previously created Tails USB

• Generate personnel GPG keys

• Setup KeyPassX manager (one for SVS, one for personnel Tails)

• Options between YubiKey/Google Authenticator app for 2FA (SSH, Document Interface, FDE and passwordmanagers)

• Secure-deleting and difference between wipe and erase free space on Tails, and when to use each

• Disaster recovery for 2FA and password manager, personnel GPG keys

142 Chapter 27. SecureDrop On-Site Training Schedule

Page 149: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

• Updating Tails

• Backing up the SVS

• If needed, process for distributing the Application’s private GPG key to a distant journalist’s air-gapped SVS

• Do complete journalist process walk through twice, either on different days or between morning/afternoonsessions

• Using MAT (Metadata Anonymisation Toolkit)

• What to do for unsupported formats

27.2.2 Admin training

Time: 2 hours

Participants: admins

• Check access to previously created Tails USB

• Generate personnel GPG keys

• Setup KeyPassX manager (one for SVS, one for personnel Tails)

• Options between YubiKey/Google Authenticator app for 2FA (SSH, Document Interface, FDE and passwordmanagers)

• Secure-deleting and difference between wipe and erase free space on Tails, and when to use each

• Disaster recovery for 2FA and password manager, personnel GPG keys

• Updating Tails

• Setting up SSH aliases for the admin Tails workstation

• How to use screen or tmux to help prevent being locked out of the system

• Adding packages to Tails

• Go over common OSSEC alerts for security updates and daily reports

• Disaster recovery for application, remote access and SVS

• Common admin actions

• Adding/removing users

• Enabling logging

• Sending logs to FPF

• Generating new Tor hidden services

• Updating application’s GPG key

• Re-IP’ing

• Backups

• Disk space monitoring

• Updating SMTP and OSSEC alert configs

• Changing passwords (for FDE, persistent volumes, 2FA, KeePassX managers...)

• What will happen to local modifications to prod system after updates

• Updating SecureDrop Application

27.2. Day 2: Journalist and Admin Training 143

Page 150: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

– Unattended upgrades

– Upgrades that require admin intervention

144 Chapter 27. SecureDrop On-Site Training Schedule

Page 151: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 28

Using YubiKey with the Document Interface

This is a quick and dirty guide to using YubiKey for two-factor authentication on the Document Interface.

28.1 Download the YubiKey personalization tool

YubiKeys are modifiable using the YubiKey personalization tool, which is available for Windows/Mac/Linux andcan be downloaded here: https://www.yubico.com/products/services-software/personalization-tools/use/. If youwish to use Tails, install the YubiKey personalization tool on the command line with apt-get installyubikey-personalization-gui.

Once you have downloaded and installed the personalization program, insert your YubiKey and launch the program.If you are running Tails, you need to launch the program as the root user.

28.2 Set up OATH-HOTP

When you first launch the program, you will see the heading “Personalize your YubiKey in:” following by a list ofconfiguration options. The SecureDrop admin interface uses “OATH-HOTP mode”, so click that entry in the list.

The next window will have the heading “Program in OATH-HOTP mode” and will offer you a choice between “Quick”or “Advanced” configuration. Choose “Quick”.

First choose the configuration slot for this token. Unless you already use the YubiKey for something else, you shouldchoose Configuration Slot 1. If you already using the first slot, choose Configuration Slot 2. Note that you will haveto press and hold for several seconds to use the token from Slot 2 instead of the one in Slot 1. See the YubiKey manualfor more information.

In the section title “OATH-HOTP parameters”, you will need to change the default settings. First, uncheck the check-box for “OATH Token Identifier (6 bytes)”. Also uncheck the box for “Hide secret”. This will display the data in the“Secret Key (20 bytes hex)” field. This data cannot be copied unless the “Hide secret” box is unchecked.

145

Page 152: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Now that you have chosen the correct configuration options for use with SecureDrop, click the “Write Configuration”button. Click through the warning about overwriting Configuration Slot 1 and choose a location to save the log file.

When the configuration has been successfully written, you should see green text saying “YubiKey successfully con-figured” at the top of the window.

28.3 Set up a user with the OATH-HOTP secret key

Now you will have to set up a new user for the Document Interface with the secret key from the “Secret Key (20 byteshex)” field.

28.3.1 manage.py

If you have just installed SecureDrop, you will need to add the first admin user to the Document Interfacewith manage.py. cd to the SECUREDROP_ROOT, which is /vagrant/securedrop in development and/var/www/securedrop in production. Run ./manage.py add_admin. Fill in the username and passwordprompts. When it asks “Is this admin using a YubiKey [HOTP]? (y/N)”, type “y”, then enter. At the “Please configureyour YubiKey and enter the secret:” prompt, enter the Secret Key value and hit enter. Note that the spaces are optional.When you are done, you should see a message saying “Admin ‘(your username)’ successfully added”.

146 Chapter 28. Using YubiKey with the Document Interface

Page 153: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

28.3.2 Admin Interface

If you already have an admin user configured, use the “Add user” page in the admin interface to add new users. If theywant to use YubiKey for two-factor, just check the “I’m using a YubiKey [HOTP]” checkbox and enter the Secret Keyin the “HOTP secret” field.

28.3. Set up a user with the OATH-HOTP secret key 147

Page 154: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

148 Chapter 28. Using YubiKey with the Document Interface

Page 155: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 29

Backup and Restore SecureDrop

There are a number of reasons why you might want to backup and restore your SecureDrop. You may want to movean existing SecureDrop installation to new hardware. Performing such a migration consists of:

1. Backup the existing installation.

2. Do a new install of the same version of SecureDrop on the new hardware.

3. Restore the backup to the new installation.

Maintaining periodic backups are generally a good practice to guard against data loss. In the event of hardware failureon the SecureDrop servers, having a recent backup will enable you to redeploy the system without changing OnionURLs, recreating Journalist accounts, or losing historical submissions from sources.

Note: The backup and restore functionality described in this guide was introduced in SecureDrop 0.3.7. Prior versionsof SecureDrop included a less featureful backup process. Make sure you have upgraded to SecureDrop 0.3.7 or greaterbefore continuing.

29.1 Minimizing disk space

Since the backup and restore operations both involve transferring all of your SecureDrop’s stored submissions overTor, the process can take a long time. To save time and improve reliability for the transfers, take a moment to clean upolder submissions in the Document Interface. As a general practice, you should encourage your Journalists to deletesubmissions from the Document Interface regularly.

Tip: The throughput of a Tor Hidden Service seems to average around 150 kB/s, or roughly 4 hours for 2GB. Planyour backup and restore accordingly.

You can use the following command to determine the volume of submissions currently on the Application Server bySSHing in and running sudo du -sh /var/lib/securedrop/store.

Note: Submissions are deleted asynchronously and one at a time, so if you delete a lot of submissions throughthe Document Interface, it may take a while for all of the submissions to actually be deleted. This is es-pecially true because SecureDrop uses srm to securely erase file submissions, which takes significantly moretime than normal file deletion. You can monitor the progress of queued deletion jobs with sudo tail -f/var/log/securedrop_worker/err.log.

149

Page 156: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

If you find you cannot perform a backup or restore due to this constraint, and have already deleted old submissionsfrom the Document Interface, contact us through the SecureDrop Support Portal.

29.2 Backing Up

Open a Terminal on the Admin Workstation and cd to your clone of the SecureDrop git repository (usually~/Persistent/securedrop). Ensure you have SecureDrop version 0.3.7 or later checked out (you can rungit describe --exact-match to see what Git tag you’ve checked out).

Note: The backups are stored in the Admin Workstation’s persistent volume. You should verify that you haveenough space to store the backups before running the backup command.

You can use the du command described earlier to get the approximate size of the backup file (since the majority of thebackup archive is the stored submissions), and you can use Tails’ Disks utility to see how much free space you haveon your persistent volume.

29.2.1 Check connectivity

First, verify that your Admin Workstation is able to run Ansible and connect to the SecureDrop servers.

cd install_files/ansible-baseansible -i inventory -u <SSH username> -m ping all

Tip: If you forgot your SSH username, it is the value of the ssh_users variable in prod-specific.yml.

If this command fails (usually with an error like “SSH Error: data could not be sent to the remote host. Make sure thishost can be reached over ssh”), you need to debug your connectivity before proceeding further. Make sure:

• Ansible is installed (which ansible should return a path instead of “not found”).

– Ansible should be automatically installed by the Tails auto-configuration for SecureDrop. If it is not, youprobably need to re-run tails_files/install.sh. See Configure the Admin Workstation Post-Install for detailed instructions).

• The Admin Workstation is connected to the Internet.

• Tor started successfully.

• The HidServAuth values from app-ssh-aths and mon-ssh-aths are in Tails’ /etc/tor/torrc.

– Tor should be automatically configured to connect to the authenticated Tor Hidden Servicesby the Tails auto-configuration for SecureDrop. If it is not, you probably need to re-runtails_files/install.sh. See Configure the Admin Workstation Post-Install for detailed instruc-tions).

29.2.2 Run the backup Ansible role

Now you can run the production Ansible playbook with special flags tag to perform the backup:

cd install_files/ansible-baseansible-playbook -i inventory -t backup securedrop-prod.yml -e perform_backup=true

150 Chapter 29. Backup and Restore SecureDrop

Page 157: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

The backup role will print out the results of its tasks as it completes them. You can expect the fetch the backupfile step to take a long time, especially if you have a lot of saved submissions.

When the backup role is complete, the backup will be stored as a tar archive in ansible-base. The filename willstart with sd-backup, have a timestamp of when the backup was initiated, and end with .tar.gz. You can findthe full path to the backup archive in the output of the fetch the backup file task, as the value of the variable"dest" in the results dictionary.

Warning: The backup file contains sensitive information! Be careful where you copy it.

29.3 Restoring

29.3.1 Prerequisites

The process for restoring a backup is very similar to the process of creating one. As before, to get started, boot theAdmin Workstation, cd to the SecureDrop repository, and ensure that you have SecureDrop 0.3.7 or later checked out.

The restore role expects to find a .tar.gz backup archive in install_files/ansible-base under the Se-cureDrop repository root directory. If you are using the same Admin Workstation to do a restore from a previousbackup, it should already be there because it was placed there by the backup role. Otherwise, you should copy thebackup archive that you wish to restore to install_files/ansible-base.

Note: The backup strategy used for SecureDrop versions prior to 0.3.7 created encrypted archives with the extension.zip.gpg. You can safely remove those files once you’ve created the .tar.gz backup archive described in thisguide.

29.3.2 Run the restore Ansible role

To perform a restore, simply run the same command that you ran to perform a backup:

cd install_files/ansible-baseansible-playbook -i inventory -t backup securedrop-prod.yml -e restore_file="<your backup archive filename>"

This actually performs a backup, followed by a restore. A backup is done before the restore as an emergency precau-tion, to ensure you can recover the server in case something goes wrong with the restore.

Once the restore is done, the Ansible playbook will fetch the Tor HidServAuth credentials for the various Au-thenticated Tor Hidden Services (ATHS) back to the Admin Workstation. This synchronizes the state on the Ad-min Workstation with the state of the restored server. You should re-run the Tails custom configuration script(tails_files/install.sh, see Configure the Admin Workstation Post-Install for detailed instructions).

29.3. Restoring 151

Page 158: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

152 Chapter 29. Backup and Restore SecureDrop

Page 159: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 30

Upgrade to 0.3.x

There are two upgrade paths to the SecureDrop 0.3.x release series: one from SecureDrop 0.2.1, and one from Secure-Drop 0.3pre (an unofficial release that some instances used from November 2014 - March 2015).

Choose the appropriate guide below, based on the version of SecureDrop you are currently running:

30.1 Upgrade from 0.2.1 to 0.3.x

Since the changes between 0.2.1 and 0.3.x are substantial (including changing the default operating system fromUbuntu 12 LTS to Ubuntu 14 LTS), it is impossible to automatically migrate a 0.2.1 instance to 0.3.x.

Instead, the process of upgrading a 0.2.1 version involves:

1. Backing up the existing 0.2.1 instance’s data

2. A clean install (including re-installing Ubuntu) of 0.3.x

3. Migrating the old instance data from the backup to the new instance.

30.1.1 Prerequisites

• A networked Admin tails workstation configured with the SecureDrop repo cloned to the Persistent direc-tory.

• Physical/remote access to the app and monitor servers

30.1.2 Upgrade Procedure

1. Verify the version of the latest stable release of SecureDrop.

• If you have an up-to-date clone/pull of the SecureDrop git repository, you could find the most recent taggedversion with git describe --abbrev=0.

• You can also check the “Current version” banner on the SecureDrop website.

2. The upgrade steps in this document will work for each 0.3.x SecureDrop version. Throughout the rest of thisdocument, substitute 0.3.x with the current release’s version number.

3. Checkout and verify the current release on the Admin Workstation.

153

Page 160: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

cd /home/amnesia/Persistent/SecureDropgit pullgit tag -v 0.3.x # Make sure you get a "Good signature"git checkout 0.3.x

4. Copy the 0.2.1 migration script to the app server using scp or physical media (usb).

/home/amnesia/Persistent/securedrop/migration_scripts/0.2.1/0.2.1_collect.py

5. On the app server, run 0.2.1_collect.py as root and provide a name for the backup file (it will have a.tar.gz extension appended automatically).

sudo ./0.2.1_collect.py sdbackup

6. Copy sdbackup.tar.gz to removable media and transfer it to the new instance’s app server. If you arere-using the same hardware for your 0.3.x installation as you did for 0.2.1, make sure you copy this file to aexternal media before beginning the 0.3.x installation - otherwise you will lose your data!

7. Ensure that you’ve completed the installation process for the latest stable version of SecureDrop, and ensurethat you’ve created at least one user on the Document Interface (with ./manage.py add_admin) beforecontinuing.

8. Once you’ve successfully installed 0.3.x, copy sdbackup.tar.gz to any location on the 0.3.x app server.You will also need to copy the migration_scripts/0.2.1 directory to the new app server. You can copyit from the git repository on the Admin Workstation and transfer it to the app server with a flash drive, or gitclone the repo to your home directory on the app server.

9. cd into migration_scripts/0.2.1 and run 0.3_migrate.py as root, passing the path to the backupfile from the 0.2.1 instance.

sudo ./0.3_migrate.py sdbackup.tar.gz

The script will say “Done!” when it completes successfully. Otherwise, it will print an error and a Python traceback. Ifyou encounter such an error, please send an encrypted email with the traceback attached to [email protected].

Finally, test your new installation and make sure that everything was successfully migrated.

30.2 Upgrade from 0.3pre to 0.3.x

SecureDrop 0.3pre was based on the same version of Ubuntu as SecureDrop 0.3.x, so there is no need to do a wipeand clean install of 0.3.x. There is a helper script available to perform the backup and restore.

The upgrade steps in this document will upgrade a 0.3pre SecureDrop to any 0.3.x SecureDrop version. Throughoutthe rest of this document, substitute 0.3.x with the current release’s version number.

30.2.1 Important Changes

Document Interface Port Change

To make accessing the document interface easier for new users, the Document Interface port for the onion addresshas been changed from 8080 to 80. This means you will need to update existing Journalists’ bookmarks in their torbrowser and remove the :8080 from the end of the onion url.

154 Chapter 30. Upgrade to 0.3.x

Page 161: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

30.2.2 Prerequisites

• An Admin networked Tails workstation with persistence enabled and an Admin password set during boot.

• A filled out prod-specific.yml file

30.2.3 Upgrade Procedure

The upgrade procedure can be performed entirely from the Admin Workstation that you set up when you installed0.3pre. Start by booting the Admin Tails USB on the Admin Workstation. Make sure you set an AdminstratorPassword in the Tails Greeter.

1. Open a terminal (it is an icon on the top of the screen that looks like a little black TV).

2. Change into the SecureDrop repo directory

cd /home/amnesia/Persistent/securedrop

3. Stash your local changes to the inventory and prod-specific.yml

git stash save "site specific configs"

4. Pull the latest code

git pull

5. Verify the signed git tag for the latest stable release

git tag -v 0.3.x

6. Checkout the latest release

git checkout 0.3.x

7. Pop the site specific configs back in place

git stash pop

8. Run the 0.3 upgrade helper script. This script will do some basic sanity checks for your ansible inventory,prod-specific.yml and the system’s torrc file are properly configured and then run the correct ansible playbooks.

./migration_scripts/0.3pre/upgrade.sh

30.2.4 Note on the Ansible “backup” Role

The backup role will not run automatically. This is because unintentionally running the backup role can causelarge file transfers over Tor, causing substantial problems during upgrade. If you wish to run a backup manually priorto running the upgrade script, use these commands:

sudo apt-get install ansiblecd /home/amnesia/Persistent/securedrop/install_files/ansible-baseansible-playbook -i inventory -u $SSH_USER --sudo securedrop-prod.yml --tags backup

Note: Don’t forget to replace $SSH_USER in the command above with the admin username on the app and monitorservers.

30.2. Upgrade from 0.3pre to 0.3.x 155

Page 162: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Note: If you encounter connection timeouts during the backup, make sure to remove unnecessary submissionsfrom the Document Interface, then run the command again. If you still have problems, contact us at [email protected].

30.2.5 Troubleshooting the 0.3pre upgrade script

If you get an error from the upgrade script, see the list of potential errors and their resolutions below.

• Error: This script must be run as root.

Use the ‘sudo’ command and provide the administrative password you created at the beginning of the Tailssession.

• Error: This script must be run on Tails with a persistent volume.

In order for this to work, you must be running Tails on the admin workstation and have access to a persistentvolume. Did you unlock your persistent storage at the beginning of the Tails session?

• Error: There is no SSH key file present.

When you installed SecureDrop, you generated an SSH key (and probably saved to the default location:~/.ssh/id_rsa) for the user ‘amnesia’ and copied it to both the App and Mon server. You should stillhave access to that key through the OpenSSH persistence in Tails. If you got this error, check if you lost the keyor saved it to a different location. You won’t be able to login to the servers remotely without it.

• Error: This script must be run with SecureDrop’s git repository cloned to’securedrop’ in your Persistent folder.

When you first installed SecureDrop, we assume that you cloned our GitHub repository to a specific location:/home/amnesia/Persistent/securedrop. If it’s not there, you either need to move it there or startanew.

• Error: There are no HidServAuth values in your torrc file.

Did you run the ‘SecureDrop Init’ script located in the Persistent folder? The init script and the additions itmakes to Tor’s configuration file are needed in order to access the App and Mon servers using SSH over Tor.

• Error: monitor_ip or app_ip in prod-specific.yml is not an IP address.

The production playbook in /install_files/ansible-base/prod-specific.yml needs to befully filled out, with the local IP address for each server specified.

• Error: ssh_users is not defined in prod-specific.yml.

Inside the production playbook, you must have ssh_users defined as the name of the user which you use tolog in to the App and Mon servers. This is the non-root user account you created when you installed UbuntuServer.

• Error: the app or mon ansible_ssh_host in Ansible’s inventory file is notan .onion address.

Our new provisioner, Ansible, must be run over Tor in order to reach the servers. Replace the IP addresses in/install_files/ansible-base/inventorywith the .onion hostnames for the App and Mon server’sTor hidden services for SSH.

• Error: can’t connect to the Application or Monitor Server via SSH.

Something’s wrong and we can’t connect. You can re-run the script to try again.

– Is the Vidalia connection indicator green?

156 Chapter 30. Upgrade to 0.3.x

Page 163: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

– Did you enter the .onion addresses correctly?

– Are both servers powered on?

– Try to SSH to the servers manually - did your client accept the server’s host key?

– Did the server accept your client’s key?

30.2. Upgrade from 0.3pre to 0.3.x 157

Page 164: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

158 Chapter 30. Upgrade to 0.3.x

Page 165: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 31

Upgrade from 0.3.x to 0.3.5

SecureDrop 0.3.5 updates how TLS certificates for the SMTP relay used to send OSSEC notifications are handled. Italso updates the AppArmor profile for Apache to ensure the service starts successfully.

The upgrade steps in this document will upgrade a 0.3.x (where x < 5) SecureDrop instance to 0.3.5.

31.1 Important Changes

31.1.1 OSSEC Postfix configuration

The Postfix configuration on the Monitor Server previously used a hard-coded fingerprint value, specified assmtp_relay_fingerprint in the prod-specific.yml file, to verify the TLS certificate prior to sendingmail.Some mail providers use load balancing on the SMTP relay, which causes the fingerprint to change periodiciallyduring normal use. With a hard-coded fingerprint, this caused OSSEC alerts to be delayed, so the default functionalityis now to trust the system CAs on the Monitor Server.

In order to upgrade to the new verification functionality, admins update the prod-specific.yml file and run aspecial git command designed to merge site-specific changes in safely.

31.1.2 Allow log rotation for Apache

The AppArmor profile for Apache was aggressively preventing the service from creating new log files, which preventednormal log rotation functionality. The adjustments to the AppArmor profile not only restore the expected rotation, butwill also reduce false positives reported by OSSEC.

31.1.3 Prevent reboots during cron-apt upgrade

The servers are set to reboot nightly, to ensure submissions are not retained in memory. The timing of the reboot taskwas fuzzy, and it was possible that a reboot would interrupt a running upgrade for cron-apt. The new logic ensuresthat the reboot only takes place after cron-apt exits.

31.1.4 Blacklist additional kernel modules

Newer versions of the Intel NUCs come with wifi and bluetooth hardware, so the playbooks now disable the btusband iwlmvm kernel modules, in addition to bluetooth and iwlwifi, which are still blacklisted.

159

Page 166: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

31.2 Prerequisites

• An Admin networked Tails workstation with persistence enabled and an Admin password set during boot.

• A running SecureDrop instance of 0.3.x, where x is less than 5.

Note: If your organization uses an internal SMTP relay, you may wish to continue using fingerprint-style verificationof the TLS certificate. You can therefore skip #3 below.

31.3 Upgrade Procedure

The upgrade procedure can be performed entirely from the Admin Workstation. Start by booting the Admin Tails USBon the Admin Workstation. Make sure you set an Adminstrator Password in the Tails Greeter.

1. Open a terminal (it is an icon on the top of the screen that looks like a little black TV).

2. Change into the SecureDrop repo directory

cd /home/amnesia/Persistent/securedrop/install_files/ansible-base

3. Open prod-specific.yml in your preferred text editor. Delete the line that starts withsmtp_relay_fingerprint and save the file. If you are using your own or your organization’s SMTPrelay (not Google’s), you may want want to continue using fingerprint verification. If you are unsure, contact usand we will help you make a determination.

4. Stash your updated local changes

git stash save "site specific configs"

5. Pull the latest code

git pull

6. Verify the signed git tag for the latest stable release

git tag -v 0.3.5

7. Checkout the latest release

git checkout 0.3.5

8. Restore your instance-specific settings

git checkout stash -- prod-specific.yml inventorygit reset

Note: SecureDrop upgrades typically recommend using the simpler git stash pop command to restoreinstance-specific settings. Since 0.3.5 makes changes to the prod-specific.yml file, more verbose gitcommands are necessary to avoid a merge conflict.

#. Make sure you have Ansible installed. If running which ansible returns ansible not found, you should

sudo apt-get updatesudo apt-get install ansible

160 Chapter 31. Upgrade from 0.3.x to 0.3.5

Page 167: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

#. Run the Ansible playbooks (substitute the admin account on the servers for <user>)

ansible-playbook -i inventory -s -u <user> securedrop-prod.yml

During the playbook run, the Postfix TLS verification settings will be updated on the Monitor Server, and both serverswill receive new logic for rebooting after unattended-upgrades.

31.3. Upgrade Procedure 161

Page 168: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

162 Chapter 31. Upgrade from 0.3.x to 0.3.5

Page 169: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 32

Upgrade from 0.3.5 to 0.3.6

SecureDrop 0.3.6 was a maintenance release to update the expiration date on the GPG signing key used for the Freedomof the Press apt repository. The signing key expired on October 26, 2015, preventing automatic updates from Freedomof the Press until the issue is manually resolved.

Note: We’re considering creating a separate Debian package to manage the signing keys into the future. If you havestrong feelings about how the signing key is managed, open an issue.

The upgrade steps in this document will upgrade a 0.3.5 SecureDrop to 0.3.6. If you have not yet upgraded to 0.3.5,do that first.

32.1 Important Changes

32.1.1 Update Expired GPG Signing Key (Admin Workstation)

The Admin Workstation is used to verify the signed git tag on new SecureDrop releases. Prior to running the 0.3.6upgrade, the Admin Workstation should update the signing key.

32.1.2 Update Expired GPG Signing Key (SecureDrop Servers)

The Application Server and Monitor Server will need to have their apt keyrings updated, which can be accomplishedby running the Ansible playbooks.

32.2 Prerequisites

• An Admin networked Tails workstation with persistence enabled and an Admin password set during boot.

• A running SecureDrop instance of 0.3.5.

Note: If your SecureDrop instance is not already running 0.3.5, run that upgrade first. Failure to do so will result in amerge conflict for your site-specific settings, which can be tedious to resolve if you’re not experienced with git.

163

Page 170: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

32.3 Upgrade Procedure

The upgrade procedure can be performed entirely from the Admin Workstation. Start by booting the Admin Tails USBon the Admin Workstation. Make sure you set an Adminstrator Password in the Tails Greeter.

1. Open a terminal (it is an icon on the top of the screen that looks like a little black TV).

2. Change into the SecureDrop repo directory

cd /home/amnesia/Persistent/securedrop

3. Stash your local changes to the inventory and prod-specific.yml

git stash save "site specific configs"

4. Update the Freedom of the Press signing key (these commands are from the Set up the Admin Workstationguide)

gpg --recv-key "B89A 29DB 2128 160B 8E4B 1B4C BADD E0C7 FC9F 6818"

Tip: The GPG Master Signing Key is also available from the Freedom of the Press website, and the key issigned by the Lead Developer’s personal GPG keys, so you can verify that you have the correct key through theGPG Web of Trust (WoT).

5. Pull the latest code

git pull

6. Verify the signed git tag for the latest stable release

git tag -v 0.3.6

7. Checkout the latest release

git checkout 0.3.6

8. Pop the site specific configs back in place

git stash pop

9. Make sure you have Ansible installed. If running which ansible returns ansible not found, youshould

sudo apt-get updatesudo apt-get install ansible

10. Run the Ansible playbooks (substitute the admin account on the servers for <user>)

ansible-playbook -i inventory -s -u <user> securedrop-prod.yml

During the playbook run, the GPG signing key will be updated, and all packages will be upgraded on both servers.The new signing key is valid until October 2016, at which point another manual update may be necessary.

164 Chapter 32. Upgrade from 0.3.5 to 0.3.6

Page 171: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 33

Upgrade from 0.3.6 to 0.3.7

SecureDrop 0.3.7 is a point release that:

• Makes it possible for SecureDrop users to upgrade to Tails 2.x

• Improves and documents the backup and restore process

• Upgrades SecureDrop’s Python dependencies

There is no need for admins to re-run the Ansible playbooks for 0.3.7. All changes to the servers are contained in theDebian packages for 0.3.7, which all servers that are running 0.3.6 will automatically upgrade to use within 24 hoursof their release.

However, if you want to:

• Take advantage of the improved backup and restore procedures, or

• Upgrade your Tails USBs to Tails 2.x,

you will need to follow the steps in this guide to safely update your copy of SecureDrop on your Tails USB.

Note: It is strongly recommended that Admins and Journalists upgrade their Tails workstations to the latest versionas soon as possible. The procedure for upgrading your Tails USBs is documented in detail in Upgrade Tails from 1.xto 2.x.

33.1 Upgrade Procedure

Boot into your Tails USB (an Admin Tails USB or a Journalist Tails USB). At the Tails Greeter, enable persistenceand set a root password.

Open a Terminal and navigate to your SecureDrop directory.

cd ~/Persistent/securedrop

Stash your local configuration, fetch the latest code, and verify the tag for the latest release (0.3.7 or later),

git stash save "site specific configs"git fetchgit tag -v 0.3.7

165

Page 172: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Warning: The output of git tag -v should include Good signature from "Freedom of thePress Foundation Master Signing Key". If it does not, please contact us immediately at [email protected].

Once you’ve verified the latest release, check it out, then pop your local configuration back into place:

git checkout 0.3.7git stash pop

Note: Although we try to avoid it, it’s possible that you may get merge conflicts when you pop your site-specificchanges back onto the latest version of the SecurDrop code. If you are comfortable resolving the merge conflictsyourself, open the affected files listed by git in your favorite editor and resolve the conflicts. If you are not comfortabledoing this yourself, contact us at [email protected].

Congratulations, you’ve successfully upgraded your local copy of SecureDrop to 0.3.7. At this point, you may beinterested in:

• Upgrading to Tails 2.x: Upgrade Tails from 1.x to 2.x

• Backing up and restoring your SecureDrop installation: Backup and Restore SecureDrop

166 Chapter 33. Upgrade from 0.3.6 to 0.3.7

Page 173: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 34

Upgrade Tails from 1.x to 2.x

Starting with SecureDrop version 0.3.7, SecureDrop’s Tails integration leverages improvements to the Tails OS sincethe introduction of Tails 2.0. It is critical to upgrade all of your Tails USBs to the latest version of Tails beforeupgrading SecureDrop to 0.3.7 or later.

Warning: Tails 1.x is no longer receiving updates, and is therefore vulnerable to a growing list of securityvulnerabilities. We strongly encourage you to upgrade all of your Tails USBs to the latest version of Tails as soonas possible.

Upgrading Tails from 1.x to 2.x must be done manually. Please follow this guide to updating each Tails USB stickused in your SecureDrop instance. Be sure to use the Secure Viewing Station computer so you benefit from its airgapwhile transfering sensitive data.

Note: You will need:

1. A master Tails USB running the most recent version of Tails (at least v2.3).

2. A backup device, a separate, encrypted USB drive used to store backups of the old Tails sticks.

3. Your existing SecureDrop Tails USB sticks (Admin, Journalist, and Secure Viewing Station).

4. An airgapped machine to perform the Tails upgrades. It is ok to reuse the Secure Viewing Station for this task.

An airgapped machine (such as the SVS) is required in order to perform these upgrades safely. By isolating themachine from all network access, you reduce the exposure of sensitive data to networked computers, thereby reducingthe threat of compromise by adversaries who wish to gain access to your SecureDrop instance.

The airgapped machine should have 3 USB ports, so you can plug in all 3 devices at the same time. If you don’t have3 USB ports available, you can use a USB hub, which may reduce transfer speeds.

34.1 Upgrade each Tails device

34.1.1 1. Prepare the master Tails USB

Because Tails 2.x is incompatible with older versions, you must create a new “master” Tails USB stick for subsequentinstallations and upgrades to the USB sticks already in-use by your organization. To create this brand-new masterTails, follow the same directions for provisioning the first USB sticks on another networked computer.

Once you’ve created a new Tails 2.x USB, boot into it from your airgapped computer to perform the next steps. At theTails Greeter screen, be sure to enable admin privileges.

167

Page 174: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

34.1.2 2. Prepare the Backup Device

We will use the Tails Installer to upgrade your Tails 1.x USB to Tails 2.x. While this usually works without anyissues, we’re going to start by making backups of the important data on your current Tails USBs, so you can use themfor recovery in case something goes wrong.

Tip: While it’s recommended to use a fresh USB stick for any backup operation, to cut down on cost, clutter, and/orwaste, you may also repurpose old USB sticks to function as Backup Devices. Note that this process will permanentlyerase any data stored on the Backup Device.

After logging into the master Tails device, open the Disks Utility by navigating to Applications Utilities Disks.Insert the Backup Device into a USB port. It will appear in the list of disks in the left column. Select it.

Click the button with the interlocking gears icon and choose Format....

168 Chapter 34. Upgrade Tails from 1.x to 2.x

Page 175: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Fill out the Format Volume settings as shown in the screenshot below. There’s no need to overwrite existing data, anddoing so can take a long time. You should use a strong passphrase to encrypt the drive.

Note: If you plan on using this USB stick as a permanent backup, you will be responsible for retaining this passphrasefor the long-haul. If you only want to use this USB as an intermediary backup, and plan on discarding the data after asuccessful migration, you may discard the passphrase once all steps are completed.

34.1. Upgrade each Tails device 169

Page 176: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Click Format.... A dialog box will ask: “Are you sure you want to format the volume?”. Click Format.

While the drive is being formatted, you will see a spinning progress indicator next to the drive’s name in the leftcolumn. Wait until it is done. When it is done, you will see the partition layout has two nested partitions (LUKS andext4), like this:

170 Chapter 34. Upgrade Tails from 1.x to 2.x

Page 177: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

You’re ready to start backing up your current Tails USBs.

34.1.3 3. Backup a Tails USB

Insert the Tails USB (that you want to back up) into a free USB port.

Mount it by navigating to Places Computer, and clicking on the encrypted disk. You will be prompted to enter thepassphrase to unlock the disk (the same passphrase you normally use to log into Tails on that USB stick).

Open a Nautilus window with admin priviledges by navigating to Applications System Tools Root Terminal. Atthe terminal prompt, simply type nautilus.

34.1. Upgrade each Tails device 171

Page 178: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

The Nautilus window should show both the Backup Device and the TailsData partition as mounted.

Copy the all data from the TailsData partition onto the Backup Device except:

• persistence.conf In older versions of Tails, this file might have slightly different directives in it thatcould temporarily brick a Tails 2.x USB.

• claws-mail Claws Mail is no longer included in Tails. The OS uses Icebird instead. Some users might nothave this folder, so if you don’t see it there, do not be alarmed.

172 Chapter 34. Upgrade Tails from 1.x to 2.x

Page 179: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Ensure that all critical data has been successfully copied. Specifically, be sure the the gnupg, bookmarks, andPersistent folders are completely copied. Any loss of data from these folders could prevent users from accessingsubmissions.

Tip: Create subdirectories for each USB drive (Admin, Journalist, and SVS) within the Backup Device. Not onlywill doing so speed up the upgrade process, it will also provide you with long-term encrypted backups of the USBdevices. In the event of a lost or stolen drive, you can restore access via this encryped backup device.

Once data are correctly copied, unmount the TailsData partition.

34.1. Upgrade each Tails device 173

Page 180: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

34.1.4 4. Upgrade a Tails USB

With the Admin/Journo/SVS Tails USB still insterted in the machine, navigate to Applications Tails Tails Installerand select the Upgrade by cloning option.

Select the Tails 1.x USB that you wish to upgrade from the drop-down menu labeled Target Device. If it is the onlyother USB plugged in to the computer, it should be automatically selected.

174 Chapter 34. Upgrade Tails from 1.x to 2.x

Page 181: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

The clone process will take a few minutes, and will display a message once it is complete. If you see an error messageabout the device not being ready, try unplugging and remounting the Tails device you’re trying to upgrade.

34.1.5 5. Re-install the automatic Tails configuration

Note: This step is only applicable to Admin Tails USBs and Journalist Tails USBs. If you are upgrading the SecureViewing Station Tails USB, you can skip this step.

Shut down the Tails USB on the airgapped computer and move it to the computer you normally use it on. Boot intoeach newly upgraded Tails USB, enabling persistence, and setting a root password. Confirm that the persistent filesare present on the upgraded Tails USB. If they are not, or something else went wrong, see Troubleshooting.

34.1. Upgrade each Tails device 175

Page 182: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Now that you have successfully upgraded to Tails 2.x with your persistence intact, the final step is to re-install theTails automatic configuration from the latest version of SecureDrop (0.3.7 or above). The Tails auto-configuration wasoriginally set up during installation in Configure the Admin Workstation Post-Install and Onboard Journalists. Therewere enough changes in Tails 2.x that we had to update various aspects of the auto-configuration to work properly onit, which is why you need to re-install.

First, you need to update your local copy of SecureDrop to the latest version (0.3.7 or later). This is documented inUpgrade from 0.3.6 to 0.3.7. Once you’ve done that, you can re-install the Tails auto-configuration:

cd tails_files # from ~/Persistent/securedropsudo ./install.sh

This is the same process as described in Configure the Admin Workstation Post-Install (for the Admin Workstation)and Onboard Journalists (for the Journalist Workstations). If you have questions, consult that documentation first.

When you’re done, repeat this final step on the rest of the Tails devices. Once you have re-installed the Tails auto-configuration on all of the Tails devices, move on to the Finishing up section below.

34.2 Finishing up

34.2.1 Verify all devices are working

Shut down each Tails USB on the airgapped computer and move it to the computer you normally use it on. Bootinto each newly upgraded Tails USB, enabling persistence. Confirm that the persistent files are present and that yourworkflow is unaffected.

As a test, consider submitting a test submission, downloading it on the Journalist Workstation, and finally decryptingit on the SVS. If you are able to decrypt the submission successfully, you have verified that the Journalist Workstationand SVS are working correctly after the upgrade.

To test the Admin Workstation, make sure you can still SSH into the servers:

$ ssh <username>@<app server .onion address> hostnameapp$ ssh <username>@<monitor server .onion address> hostnamemon

Tip: If you forgot, your SSH username is in install_files/ansible-base/prod-specific.ymlas the value of the ssh_users variable. The .onion addresses for SSHfor each server are in install_files/ansible-base/app-ssh-aths andinstall_files/ansible-base/mon-ssh-aths, respectively.

Tip: Consider retaining the encrypted backup drive as a disaster recovery device. Document the passphrase in theAdmin Workstation KeePassX database, and store the physical Backup Device in a locked safe or other secure location.

34.2.2 Wipe the Backup Device

If you do not have a secure location for storing the backups, or already have other backups, you should wipe theBackup Device. There is a lot of debate over the best way to do this, but we think it’s sufficient to simply overwrite itwith random data a couple of times. Since the Backup Device is encrypted with LUKS, which employs a number ofanti-forensic-recovery techniques, this should be enough to prevent forensic recovery.

176 Chapter 34. Upgrade Tails from 1.x to 2.x

Page 183: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

First, find the path to the Backup Device. You can find the path with the Disks application, selecting the drive in theleft column, and looking at the Device entry. It is usually a string that starts with /dev/sd.

Warning: Make sure you use the correct path for the Backup Device in the next command! Otherwise, you runthe risk of irreversibly wiping a different drive on the system, such as the Tails USB you are running.

To overwrite the Backup Device, open a Terminal and run:

dd if=/dev/urandom of=<path to Backup Device>

Re-run this command at least twice. Each run will take a while.

If you want to reuse the drive for another purpose, use the Disks utility to reformat it appropriately.

Note: While it probably isn’t necessary to physically destroy a Backup Device (because it’s encrypted, and LUKS isdesigned to thwart forensic recovery), if you’re really paranoid you can additionally smash the device with a hammeruntil the chips containing its flash memory are broken up, then dispose of the pieces in the garbage.

34.3 Troubleshooting

The steps described above should cleanly update your Tails devices without issue. In the event that one or more ofyour upgraded Tails USBs are not working as expected, don’t worry: you can still manually restore from the BackupDevice you created. (Isn’t it great to have backups?)

34.3.1 1. Restore data from the Backup Device

On the same airgapped machine, boot up the Tails USB stick you want to restore, with both persistence and adminprivileges. Insert your Backup Device into a free USB port, and mount it by navigating to Places Computer, andclicking on the encrypted disk. You will be prompted to enter its passphrase.

Open a Nautilus window with admin priviledges by navigating to Applications System Tools Root Terminal. Atthe terminal prompt, simply type nautilus and hit Enter. Type ctrl + l, type /live/persistence/TailsData_unlocked,and hit Enter to navigate there.

34.3. Troubleshooting 177

Page 184: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

Open a new tab in Nautilus (ctrl + t) and navigate to your Backup Device. Drag and drop the backup data fromyour Backup Device onto the TailsData_unlocked tab.

When copying a folder, select the Apply this action to all files option and click Merge to apply to all subfolders.Then you might have to select again the Apply this action to all files option and click Replace to apply to all files.

In a root terminal, or as sudo, execute the following command to fix the ownership of your personal files:

178 Chapter 34. Upgrade Tails from 1.x to 2.x

Page 185: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

find /live/persistence/TailsData_unlocked/ -uid 1000 -exec chown -R 1000:1000 '{}' \;

34.3.2 2. Verify the restored data

Shut down, and reboot the Tails USB. Now that you’ve restored the files, you should re-do the post-upgrade verificationto make sure everything is working correctly.

34.3. Troubleshooting 179

Page 186: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

180 Chapter 34. Upgrade Tails from 1.x to 2.x

Page 187: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 35

Getting Started

35.1 Prerequisites

SecureDrop is a multi-machine design. To make development and testing easy, we provide a set of virtual environ-ments, each tailored for a specific type of development task. We use Vagrant and VirtualBox to conveniently developwith a set of virtual environments, and our Ansible playbooks can provison these environments on either virtual ma-chines or physical hardware.

To get started, you will need to install Vagrant, VirtualBox, and Ansible on your development workstation.

35.1.1 Ubuntu/Debian

Note: Tested on: Ubuntu 14.04

sudo apt-get install -y dpkg-dev virtualbox-dkms linux-headers-$(uname -r) build-essential git

We recommend using the latest stable version of Vagrant (1.7.4 at the time of this writing), which might be newerthan what is in your distro’s package repositories.

If apt-cache policy vagrant says your candidate version is not at least 1.7, you should download the currentversion from the Vagrant Downloads page and then install it.

# If you downloaded vagrant.deb from vagrantup.comsudo dpkg -i vagrant.deb# OR this, if your OS vagrant is recent enoughsudo apt-get install vagrant

We do not recommend using a version of Vagrant older than 1.7. For instance, the version of Vagrant currently in theUbuntu Trusty repositories is 1.5.4, which is signficantly out of date and known not to work with SecureDrop (Github#932).

Either way, once you’ve installed Vagrant you should run:

sudo dpkg-reconfigure virtualbox-dkms

Finally, install Ansible so it can be used with Vagrant to automatically provision VMs. We recommend installingAnsible from PyPi with pip to ensure you have the latest stable version.

sudo apt-get install python-pipsudo pip install -U ansible

181

Page 188: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

If you’re using Ubuntu, you can install a sufficiently recent version of Ansible from backports (if you prefer): sudoapt-get install ansible/trusty-backports

Note: Tested: Ansible 1.9.4

Warning: We do not recommend installing vagrant-cachier. It destroys apt’s state unless the VMs are alwaysshut down/rebooted with Vagrant, which conflicts with the tasks in the Ansible playbooks. The instructions inVagrantfile that would enable vagrant-cachier are currently commented out.

35.1.2 Mac OS X

Install the dependencies for the development environment:

1. Vagrant

2. VirtualBox

3. Ansible.

There are several ways to install Ansible on a Mac. We recommend installing from PyPi using pip so you willget the latest stable version:

sudo easy_install pip && sudo pip install -U ansible

35.2 Clone the repository

Once you’ve installed the prerequisites for the development environment, use git to clone the SecureDrop repo.

git clone https://github.com/freedomofpress/securedrop.git

SecureDrop uses a branching model based on git-flow. The master branch always points to the latest stable release.Use this branch if you are interested in installing or auditing SecureDrop. Development for the upcoming release ofSecureDrop takes place on develop, which is the default branch. If you want to contribute, you should branch fromand submit pull requests to develop.

35.3 Virtual Environments

35.3.1 Overview

There are several predefined virtual environments in the Vagrantfile: development, staging, and prod (production).

• development: for working on the application code

– Source Interface: localhost:8080

– Document Interface: localhost:8081

• app-staging: for working on the environment and hardening

– Source Interface: localhost:8082

– Document Interface: localhost:8083

– The interfaces and SSH are also available over Tor.

182 Chapter 35. Getting Started

Page 189: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

– A copy of the the onion URLs for source, document and SSH access are written to the Vagrant host’sansible-base directory. The files will be named: app-source-ths, app-document-aths, app-ssh-aths

• mon-staging: for working on the environment and hardening

– OSSEC alert configuration is in install_files/ansible-base/staging-specific.yml

• app-prod: This is like a production installation with all of the hardening applied but virtualized

– A copy of the the onion URLs for source, document and SSH access are written to the Vagrant host’sansible-base directory. The files will be named: app-source-ths, app-document-aths, app-ssh-aths

– Putting the AppArmor profiles in complain mode (default) or enforce mode can be done with the Ansibletags apparmor-complain or apparmor-enforce.

• mon-prod: This is like a production installation with all of the hardening applied but virtualized

If you plan to alter the configuration of any of these machines, make sure to review the Development Guide forServerspec Tests.

35.3.2 Development

This VM is intended for rapid development on the SecureDrop web application. It syncs the top level of the Secure-Drop repo to the /vagrant directory on the VM, which means you can use your favorite editor on your host machineto edit the code. This machine has no security hardening or monitoring.

This is the default VM, so you don’t need to specify the development machine name when running commands likevagrant up and vagrant ssh. Of course, you can specify the name if you want to.

vagrant upvagrant sshcd /vagrant/securedrop./manage.py run # run development servers./manage.py test # run the unit and functional tests./manage.py reset # resets the state of the development instance./manage.py add_admin # create a user to use when logging in to the Document Interface

SecureDrop consists of two separate web appications (the Source Interface and the Document Interface) that runconcurrently. The development servers will detect code changes when they are saved and automatically reload.

35.3.3 Staging

The staging environment is almost identical to the production, but the security hardening is weakened slightly to allowdirect access (without Tor) to SSH and the web server. This is a convenient environment to test how changes workacross the full stack.

If you want to receive OSSEC alerts or change any other settings, you will need to fill out your local copy ofsecuredrop/install_files/ansible_base/staging-specific.yml.

vagrant up /staging$/vagrant ssh app-stagingsudo sucd /var/www/securedrop./manage.py add_admin./manage.py test

35.3. Virtual Environments 183

Page 190: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

35.3.4 Prod

You will need to fill out the production configuration file: securedrop/install_files/ansible_base/prod-specific.yml.Part of the production playbook validates that staging values are not used in production. One of the values itverifies is that the user Ansible runs as is not vagrant To be able to run this playbook in a virtualized en-vironment for testing, you will need to disable the validate role, which you can do by running exportSECUREDROP_PROD_SKIP_TAGS=validate before provisioning.

To create only the prod servers, run:

vagrant up /prod$/vagrant ssh app-prodsudo sucd /var/www/securedrop/./manage.py add_admin

In order to access the servers after the install is completed you will need to install and configure a proxy tool to proxyyour SSH connection over Tor. Torify and connect-proxy are two tools that can be used to proxy SSH connectionsover Tor.

connect-proxy (Ubuntu only)

sudo apt-get install connect-proxy

After installing connect-proxy via apt-get and appending the tor config options to your local config, you can exportthe environment variable SECUREDROP_SSH_OVER_TOR=1 in order to use vagrant ssh to access the prodinstances. Here is an example of how that works:

$ vagrant up --provision /prod/ # restricts SSH to Tor after final reboot$ vagrant ssh-config app-prod # will show incorrect info due to lack of env varHost app-prod

HostName 127.0.0.1User vagrantPort 2201UserKnownHostsFile /dev/nullStrictHostKeyChecking noPasswordAuthentication noIdentityFile /home/conor/.vagrant.d/insecure_private_keyIdentitiesOnly yesLogLevel FATAL

$ vagrant ssh app-prod -c 'echo hello' # will fail due to incorrect ssh-configssh_exchange_identification: read: Connection reset by peer$ export SECUREDROP_SSH_OVER_TOR=1 # instruct Vagrant to use Tor for SSH$ vagrant ssh-config app-prod # will show correct info, with ProxyCommandHost app-prod

HostName l57xhqhltlu323vi.onionUser vagrantPort 22UserKnownHostsFile /dev/nullStrictHostKeyChecking noPasswordAuthentication noIdentityFile /home/conor/.vagrant.d/insecure_private_keyIdentitiesOnly yesLogLevel FATALProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p

$ # ensure ATHS values are active in local Tor config:$ cat *-aths | sudo tee -a /etc/tor/torrc > /dev/null && sudo service tor reload

184 Chapter 35. Getting Started

Page 191: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

$ vagrant ssh app-prod -c 'echo hello' # workshelloConnection to l57xhqhltlu323vi.onion closed.

If SECUREDROP_SSH_OVER_TOR is declared, Vagrant will look up the ATHS URLs and HidServAuthvalues for each server by examining the contents of app-ssh-aths and mon-ssh-aths in./install_files/ansible-base. You can manually inspect these files to append values to your localtorrc, as in the cat example above. Note that the cat example above will also add the ATHS info for theDocument Interface, as well, which is useful for testing.

torify (Ubuntu and Mac OS X)

• Ubuntu

torsocks should be installed by the tor package. If it is not installed, make sure you are using tor from theTor Project’s repo, and not Ubuntu’s package.

• Mac OS X (Homebrew)

brew install torsocks

If you have torify on your system (which torify) and you’re Tor running in the background, simply prepend it tothe SSH command:

torify ssh [email protected]

35.4 Tips & Tricks

35.4.1 Using Tor Browser with the development environment

We strongly encourage sources to use the Tor Browser when they access the Source Interface. Tor Browser is the easiestway for the average person to use Tor without making potentially catastrophic mistakes, makes disabling Javascripteasy via the handy NoScript icon in the toolbar, and prevents state about the source’s browsing habits (including theiruse of SecureDrop) from being persisted to disk.

Since Tor Browser is based on an older version of Firefox (usually the current ESR release), it does not always renderHTML/CSS the same as other browsers (especially more recent versions of browsers). Therefore, we recommendtesting all changes to the web application in the Tor Browser instead of whatever browser you normally use for webdevelopment. Unfortunately, it is not possible to access the local development servers by default, due to Tor Browser’sproxy configuration.

To test the development environment in Tor Browser, you need to add an exception to allow Tor Browser to accesslocalhost:

1. Open the “Tor Browser” menu and click “Preferences...”

2. Choose the “Advanced” section and the “Network” subtab under it

3. In the “Connection” section, click “Settings...”

4. In the text box labeled “No Proxy for:”, enter 127.0.0.1

• Note: for some reason, localhost doesn’t work here.

5. Click “Ok” and close the Preferences window

You should now be able to access the development server in the Tor Browser by navigating to 127.0.0.1:8080and 127.0.0.1:8081.

35.4. Tips & Tricks 185

Page 192: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

186 Chapter 35. Getting Started

Page 193: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 36

Generating AppArmor profiles for Tor and Apache

vagrant up /staging$/vagrant ssh app-stagingsudo sucd /var/www/securedrop

(run tests, use the application, restart service, power off power on)

aa-logprof

(follow prompts and save at the end)

aa-complain /etc/apparmor.d/PROFILE_NAME

(run tests, use the application, restart service, power off power on)

aa-logprof

Repeat.

The AppArmor profiles are saved in /etc/apparmor.d/. There are two profiles:

• usr.sbin.tor

• usr.sbin.apache2

After running aa-logprof you will need to copy the modified profile back to your host machine.

cp /etc/apparmor.d/usr.sbin.apache2 /vagrant/install_files/ansible-basecp /etc/apparmor.d/usr.sbin.tor /vagrant/install_files/ansible-base

The AppArmor profiles are packaged with the securedrop-app-code.

The securedrop-app-code postinst puts the AppArmor profiles in enforce mode.

The app-test Ansible module (which is run as part of staging but not prod) puts the AppArmor profiles in enforcemode.

187

Page 194: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

188 Chapter 36. Generating AppArmor profiles for Tor and Apache

Page 195: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 37

SecureDrop apt repository

This document contains a brief description of the Debian packages which are hosted and maintained by Freedom ofthe Press Foundation in our apt repository at apt.freedom.press.

linux-image-3.14.*-grsec This package contains the Linux kernel image, patched with grsecurity.

linux-headers-3.14.*-grsec Header files related to the Linux kernel.

ossec-agent Installs the OSSEC agent.

ossec-server Installs the OSSEC manager.

securedrop-app-code Packages the SecureDrop application code, Python pip dependencies and AppArmor profiles.

securedrop-ossec-agent Installs the SecureDrop-specific OSSEC configuration for the App Server.

securedrop-ossec-server Installs the SecureDrop-specific OSSEC configuration for the Mon Server.

securedrop-grsec SecureDrop grsec kernel (metapackage depending on the latest version).

Note: To be added in the future:

securedrop-keyring Packages the public signing key used in conjunction with this apt repository.

189

Page 196: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

190 Chapter 37. SecureDrop apt repository

Page 197: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 38

Documentation Guidelines

Caution: This is an early draft. Our documentation guidelines are subject to change at any time until this noticeis removed.

Warning: We recently auto-converted the documentation from Markdown to ReST, and are still cleaning up theoutput from that auto-conversion. If you find style issues, broken links or references, or any other similar issues,pull requests are welcome!

SecureDrop’s documentation is written in ReStructuredText (ReST), and is built by and hosted on Read the Docs(RTD). The documentation files are stored in the primary SecureDrop git repository under the docs/ directory.

To get started editing the docs:

1. Install the dependencies:

$ pip install sphinx sphinx-autobuild sphinx_rtd_theme

2. Clone the SecureDrop repository:

$ git clone https://github.com/freedomofpress/securedrop.git$ cd securedrop/docs

3. Build the docs and open the index page in your web browser:

$ make html$ open _build/html/index.html

Tip: You can use sphinx-autobuild to automatically rebuild and reload your docs as you work on them.Run sphinx-autobuild . _build/html.

Occasionally, the docs get out of whack and rebuilding them doesn’t work as it should. You can usually resolve thisby clearing out the build artifacts and re-building the docs from scratch:

$ make clean && make html

38.1 Integration with Read the Docs

Our documentation is built and hosted by Read the Docs and is available at https://securedrop.readthedocs.org. The“latest” documentation is currently based on the develop branch of the upstream Git repository. We use a webhook so

191

Page 198: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

the docs are rebuilt automatically when commits get pushed to the branch.

38.2 Style Guide

• When specific elements from a user interface are mentioned by name or by label, bold it.

“Once you’re sure you have the right drive, click Format Drive.”

• When SecureDrop-specific terminology is used, italicize it.

“To get started, you’ll need two Tails drives: one for the Admin Workstation and one for the SecureViewing Station.”

192 Chapter 38. Documentation Guidelines

Page 199: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 39

Serverspec Tests

serverspec tests verify the end state of the vagrant machines. Any changes to the Ansible configuration should have acorresponding spectest.

39.1 Install directions (Ubuntu)

apt-get install bundlercd spec_tests/bundle update

39.2 Running the tests

cd spec_tests/bundle exec rake spec

This will run the tests against all configured hosts, specifically:

• development

• app-staging

• mon-staging

• build

In order to run the tests, each VM will be created and provisioned, if necessary. Running all VMs concurrently maycause performance problems if you have less than 8GB of RAM. You can isolate specific machines for faster testing:

cd spec_testsbundle exec rake --tasks # check output for desired machinebundle exec rake spec:development

39.3 Updating the tests

Changes to the ansible config should result in failing spectests, but only if an existing task was modified. If you add anew task, make sure to add a corresponding spectest to validate that state after a new provisioning run. Tests importvariables from separate YAML files than the Ansible playbooks:

193

Page 200: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

spec_tests/spec/vars-- development.yml-- staging.yml

Any variable changes in the Ansible config should have a corresponding entry in these vars files. These vars aredynamically loaded for each host via the spec_helper.rb file. Make sure to add your tests to relevant location forthe host you plan to test:

spec_tests/spec/app-staging-- apache_spec.rb-- apparmor_spec.rb-- iptables_spec.rb-- ossec_agent_spec.rb-- securedrop_app_spec.rb-- securedrop_app_test_spec.rb-- tor_spec.rb

In the example above, to add a new test for the app-staging host, add a new file to thespec_tests/spec/app-staging directory.

39.4 Spectest layout

The serverspec tests are mostly broken up according to machines in the Vagrantfile:

spec_tests/spec-- app-staging-- build-- common-development-- common-staging-- development-- mon-staging-- vars

There are a few exceptions:

• common-development shares tests between development and app-staging

• common-staging shares tests between app-staging and mon-staging

Ideally the serverspec tests would be broken up according to roles, mirroring the Ansible configuration. Prior to thereorganization of the Ansible layout, the tests are rather tightly coupled to hosts. The layout of spectests is thereforesubject to change.

194 Chapter 39. Serverspec Tests

Page 201: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

CHAPTER 40

Threat Model

This document outlines the threat model for SecureDrop 0.3 and is inspired by the threat model document AdamLangley wrote for Pond. The threat model is defined in terms of what each possible adversary can achieve. Thisdocument is still a work in progress. If you have questions or comments, please open an issue on GitHub or send anemail to [email protected].

40.1 Assumptions

40.1.1 Assumptions about the source

• The source acts reasonably and in good faith, e.g. if the user were to give their codename or private key materialto the attacker that would be unreasonable.

• The source would like to remain anonymous, even against a forensic attacker.

• The source obtains an authentic copy of Tails or the Tor Browser.

• The source follows our guidelines for using SecureDrop.

• The source is accessing an authentic SecureDrop site.

40.1.2 Assumptions about the admin and the journalist

• The admin and the journalist act reasonably and in good faith, e.g. if either of them were to give their credentialsor private key material to the attacker that would be unreasonable.

• The admin and the journalist obtain authentic copies of Tails.

• The journalist follows our guidelines for using SecureDrop and working with submitted documents.

40.1.3 Assumptions about the person installing SecureDrop, usually the admin

• The person acts reasonably and in good faith, e.g. if they were to give the attacker system-level access thatwould be unreasonable.

• The person obtains an authentic copy of SecureDrop and its dependencies.

• The person follows our guidelines for deploying the system, setting up the landing page for the organization,and for installing SecureDrop.

195

Page 202: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

40.1.4 Assumptions about the source’s computer

• The computer correctly executes Tails or the Tor Browser.

• The computer is not compromised by malware.

40.1.5 Assumptions about the Admin Workstation and the Journalist Workstation

• The computer correctly executes Tails.

• The computer and the Tails device are not compromised by malware.

• The two-factor authentication device used with the workstation are not compromised by malware.

40.1.6 Assumptions about the Secure Viewing Station

• The computer is airgapped.

• The computer correctly executes Tails.

• The computer and the Tails device are not compromised by malware.

40.1.7 Assumptions about the SecureDrop hardware

• The servers correctly execute Ubuntu, SecureDrop and its dependencies.

• The servers, network firewall, and physical media are not compromised by malware.

40.1.8 Assumptions about the organization hosting SecureDrop

• The organization wants to preserve the anonymity of its sources.

• The organization acts in the interest of allowing sources to submit documents, regardless of the contents of thesedocuments.

• The users of the system, and those with physical access to the servers, can be trusted to uphold the previousassumptions unless the entire organization has been compromised.

• The organization is prepared to push back on any and all requests to compromise the integrity of the system andits users, including requests to deanonymize sources, block document submissions, or hand over encrypted ordecrypted submissions.

40.1.9 Assumptions about the world

• The security assumptions of RSA (4096-bit GPG and SSH keys) are valid.

• The security assumptions of scrypt with randomly-generated salts are valid.

• The security/anonymity assumptions of Tor and the Hidden Service protocol are valid.

• The security assumptions of the Tails operating system are valid.

196 Chapter 40. Threat Model

Page 203: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

40.2 Attack Scenarios

40.2.1 What the Application Server can achieve

• The server sees the plaintext codename, used as the login identifier, of every source.

• The server sees all HTTP requests made by the source, the admin, and the journalist.

• The server sees the plaintext submissions of every source.

• The server sees the plaintext communication between journalists and their sources.

• The server stores hashes of codenames, created with scrypt and randomly-generated salts.

• The server stores only encrypted submissions and communication on disk.

• The server stores a GPG key for each source, with the source’s codename as the passphrase.

• The server may store plaintext submissions in memory for at most 24 hours.

• The server stores sanitized Tor logs, created using the SafeLogging option, for the Source Interface, the Docu-ment Interface, and SSH.

• The server stores both access and error logs for the Document Interface.

• The server stores connection history and audit logs for the admin.

• The server can connect to the Monitor server using an SSH key and a passphrase.

40.2.2 What the Monitor Server can achieve

• The server stores the plaintext alerts on disk, data may also reside in RAM.

• The server stores the GPG public key the OSSEC alerts are encrypted to.

• The server stores plaintext credentials for the SMTP relay used to send OSSEC alerts.

• The server stores the email address the encrypted OSSEC alerts are sent to.

• The server stores sanitized Tor logs, created using the SafeLogging option, for SSH.

• The server stores connection history and audit logs for the admin.

• The server stores OSSEC and Procmail logs on disk.

• The server can connect to the Application Server using an SSH key and a passphrase.

40.2.3 What the Workstations can achieve

• The Admin Workstation requires Tails with a persistent volume, which stores information such as GPG andSSH keys, as well as a database with passphrases for the Application Server, the Monitor Server, and the GPGkey the Monitor Server will encrypt OSSEC alerts to.

• The Journalist Workstation requires Tails with a persistent volume, which stores information such as theHidden Service value required to connect to the Document Interface, as well as a database with passphrases forthe Document Interface and the journalist’s personal GPG key.

• The Secure Viewing Station requires Tails with a persistent volume, which stores information such as theSecureDrop application’s GPG key, as well as a database with the passphrase for that key.

40.2. Attack Scenarios 197

Page 204: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

40.2.4 What a compromise of the source’s property can achieve

• Use of the Tor Browser will leave traces that can be discovered through a forensic analysis of the source’sproperty following either a compromise or physical seizure. Unless the compromise or seizure happens whilethe source is submitting documents to SecureDrop, the traces will not include information about sites visited oractions performed in the browser.

• Use of Tails with a persistent volume will leave traces on the device the operating system was installed on.Unless the compromise or seizure happens while the source is submitting documents to SecureDrop, or usingthe persistent volume, the traces will not include information about sites visited or actions performed in thebrowser or on the system.

• SecureDrop 0.3 encourages sources to protect their codenames by memorizing them. If a source cannot memo-rize the codename right away, we recommend writing it down and keeping it in a safe place at first, and graduallyworking to memorize it over time. Once the source has memorized it, they should destroy the written copy. Ifthe source does write down the codename, a compromise or physical seizure of the source’s property may resultin the attacker obtaining the source’s codename.

• An attacker with access to the source’s codename can:

– Show that the source has visited the SecureDrop site, but not necessarily submitted anything.

– Upload new documents or submit messages.

– Communicate with the journalist as that source.

– See any replies from journalists that the source has not yet deleted.

40.2.5 What a physical seizure of the source’s property can achieve

• Document use of Tor or Tails, but not necessarily research into SecureDrop

• Prevent the source from submitting documents by taking the device the documents are stored on.

• If the property is seized while powered on, the attacker can also analyze any plaintext information that residesin RAM.

• Tamper with the hardware.

• A physical seizure of, and access to, the source’s codename will allow the attacker to access the Source Interfaceas that source.

• A physical seizure of the admin’s property will allow the attacker to:

– Prevent the admin from working on SecureDrop for some period of time.

– Access any stored, decrypted documents taken off the Secure Viewing Station.

– If the property is seized while powered on, the attacker can also analyze any plaintext information thatresides in RAM.

• A physical seizure of, and access to, the admin’s Tails persistent volume, password database, and two-factorauthentication device will allow the attacker to access both servers and the Document Interface.

40.2.6 What a compromise of the admin’s property can achieve

• To access the Document Interface, the Application Server, or the Monitor Server, the attacker needs to obtainthe admin’s login credentials and the admin’s two-factor authentication device. Unless the attacker has physicalaccess to the servers, the attacker will also need to obtain the Hidden Service values for the Interface and theservers. This information is stored in a password-protected database in a persistent volume on the admin’s Tails

198 Chapter 40. Threat Model

Page 205: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

device. The volume is protected by a passphrase. If the admin’s two-factor authentication device is a mobilephone, this will also be protected by a passphrase.

• An attacker with access to the admin’s computer can:

– Access any stored, decrypted documents taken off the Secure Viewing Station.

• An attacker with access to the persistent volume on the admin’s Tails device can:

– Add, modify, and delete files on the volume.

– Access the Hidden Service values used by the Interfaces and the servers.

– Access SSH keys and passphrases for the Application Server and the Monitor Server.

– Access the GPG key and passphrase for the encrypted OSSEC email alerts.

– Access the credentials for the account the encrypt alerts are sent to.

– Access the admin’s personal GPG key.

• An attacker with admin access to the Document Interface can:

– Add, modify, and delete journalist users.

– Change the codenames associated with sources within the Interface.

– Download, but not decrypt, submissions.

– Communicate with sources.

– Delete one or more submissions.

– Delete one or more sources, which destroys all communication with that source and prevents the sourcefrom ever logging back in with that codename.

• An attacker with admin access to the Application Server can:

– Add, modify, and delete software, configurations, and other files.

– See all HTTP requests made by the source, the admin, and the journalist.

– See the plaintext codename of a source as they are logging in.

– See the plaintext communication between a source and a journalist as it happens.

– See the stored list of hashed codenames.

– Access the GPG public key used to encrypt communications between a journalist and a source.

– Download stored, encrypted submissions and replies from the journalists.

– Decrypt replies from the journalists if the source’s codename, and thus the passphrase, is known.

– Analyze any plaintext information that resides in RAM, which may include plaintext of submissions madewithin the past 24 hours.

– Review logs stored on the system.

– Access the Monitor Server.

• An attacker with admin access to the Monitor Server can:

– Add, modify, and delete software, configurations, and other files.

– Change the SMTP relay, email address, and GPG key used for OSSEC alerts.

– Analyze any plaintext information that resides in RAM.

– Review logs stored on the system.

40.2. Attack Scenarios 199

Page 206: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

– Trigger arbitrary commands to be executed by the OSSEC agent user, which, assuming the attacker is ableto escalate privileges, may affect the Application Server.

40.2.7 What a physical seizure of the admin’s property can achieve

• Tamper with the hardware.

• Prevent the admin from working on SecureDrop for some period of time.

• Access any stored, decrypted documents taken off the Secure Viewing Station.

• If the property is seized while powered on, the attacker can also analyze any plaintext information that residesin RAM.

• A physical seizure of, and access to, the admin’s Tails persistent volume, password database, and two-factorauthentication device will allow the attacker to access both servers and the Document Interface.

40.2.8 What a compromise of the journalist’s property can achieve

• To access the Document Interface, the attacker needs to obtain the journalist’s login credentials and the journal-ist’s two-factor authentication device. Unless the attacker has physical access to the server, the attacker will alsoneed to obtain the Hidden Service value for the Interface. This information is stored in a password-protecteddatabase in a persistent volume on the journalist’s Tails device. The volume is protected by a passphrase. If thejournalist’s two-factor authentication device is a mobile phone, this will also be protected by a passphrase.

• An attacker with access to the journalist’s computer can:

– Access any stored, decrypted documents taken off the Secure Viewing Station.

• An attacker with access to the persistent volume on the journalist’s Tails device can:

– Add, modify, and delete files on the volume.

– Access the Hidden Service values used by the Document Interface.

– Access SSH keys and passphrases for the Application Server and the Monitor Server.

– Access the journalist’s personal GPG key.

• An attacker with journalist access to the Document Interface can:

– Change the codenames associated with sources within the Interface.

– Download, but not decrypt, submissions.

– Delete one or more submissions.

– Communicate with sources.

40.2.9 What a physical seizure of the journalist’s property can achieve

• Tamper with the hardware.

• Prevent the journalist from working on SecureDrop for some period of time.

• Access any stored, decrypted documents taken off the Secure Viewing Station.

• If the property is seized while powered on, the attacker can also analyze any plaintext information that residesin RAM.

200 Chapter 40. Threat Model

Page 207: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

• A physical seizure of, and access to, the journalist’s Tails persistent volume, password database, and two-factorauthentication device will allow the attacker to access the Document Interface.

40.2.10 What a compromise of the Application Server can achieve

• If the Application Server is compromised, the system user the attacker has control over defines what kind ofinformation the attacker will be able to view and what kind of actions the attacker can perform.

• An attacker with access to the debian-tor user can:

– View, modify, and delete all files owned by this user. This includes sanitized Tor logs, created using theSafeLogging option, for SSH, the Source Interface and the Document Interface.

– View, modify, and delete the Tor configuration file, root is required to reload the config.

• An attacker with access to the ossec user can:

– Add, view, modify, and delete the log files, and in doing so send inaccurate information to the MonitorServer and the admin.

• An attacker with access to the www-data user can:

– View, modify, and delete all files owned by this user. This includes all files in use by the SecureDropapplication, such as text, code, the database containing encrypted submissions and communications. Theattacker needs root access to reload configuration files.

– View, modify, and delete both access and error logs for the Document Interface.

– View any HTTP requests made by the source, the admin, and the journalist in that moment. This includesseeing plaintext codenames, submissions, and communications.

– Add and delete communications between a journalist and a source by writing to the database.

• An attacker with access to the root user can:

– Do anything the www-data user can do in terms of the SecureDrop application, this user is in full controlof the server and can view, modify, and delete anything at will. This user is not able to decrypt submissionsor communications, unless the attacker has access to the encryption key required to do so.

40.2.11 What a physical seizure of the Application Server can achieve

• If the Application Server is seized, the attacker will be able to view any and all unencrypted files on the server.This includes all files in use by the SecureDrop Application. If the server is seized while it is powered on, theattacker can also analyze any plaintext information that resides in RAM. The attacker can also tamper with thehardware.

40.2.12 What a compromise of the Monitor Server can achieve

• If the Monitor Server is compromised, the system user the attacker has control over defines what kind of infor-mation the attacker will be able to view and what kind of actions the attacker can perform.

• An attacker with access to the debian-tor user can:

– View, modify, and delete all files owned by this user. This includes sanitized Tor logs, created using theSafeLogging option, for SSH.

– View, modify, and delete the Tor configuration file, root is required to reload the config.

• An attacker with access to the ossec user can:

40.2. Attack Scenarios 201

Page 208: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

– ???

• An attacker with access to the root user can:

– Do anything the ossec user can do in terms of the SecureDrop application, this user is in full control of theserver and can view, modify, and delete anything at will. This user is not able to decrypt encrypted emailalerts, unless the attacker has access to the encryption key required to do so.

40.2.13 What a physical seizure of the Monitor Server can achieve

• If the Monitor Server is seized, the attacker will be able to view any and all unencrypted files on the server. Thisincludes all files in use by OSSEC. If the server is seized while it is powered on, the attacker can also analyzeany plaintext information that resides in RAM. The attacker can also tamper with the hardware.

40.2.14 What a compromise of the Secure Viewing Station can achieve

• The Secure Viewing Station is only useful to an attacker while powered on and with the Tails persistent volumemounted. The attacker may learn more if the Transfer device is in use at the time of compromise or seizure. Aphysical seizure of this machine, the Tails device or the Transfer device will also achieve nothing, assuming thatTails’ implementation of full-disk encryption works as expected.

• A compromise of the Secure Viewing Station allows the attacker to:

– Run commands as the amnesia user.

– View, modify, and delete files owned by the amnesia user. This includes the GPG private key used toencrypt and decrypt submitted documents.

– View, modify, and delete encrypted–and possibly also decrypted submissions–if the Transfer device is inuse.

40.2.15 What a physical seizure of the Secure Viewing Station can achieve

• The Secure Viewing Station is only useful to an attacker while powered on and with the Tails persistent volumemounted. The attacker may learn more if the Transfer device is in use at the time of compromise or seizure. Aphysical seizure of this machine, the Tails device or the Transfer device will also achieve nothing, assuming thatTails’ implementation of full-disk encryption works as expected.

• A physical seizure of the Secure Viewing Station, while on and with the persistent volume decrypted andmounted, allows the attacker to:

– Tamper with the hardware.

– Run commands as the amnesia user.

– View, modify, and delete the GPG private key used to encrypt and decrypt submitted documents.

– View, modify, and delete encrypted–and possibly also decrypted submissions–if the Transfer device is inuse.

40.2.16 What a local network attacker can achieve against the source, admin, orjournalist:

• A local network can observe when they are using Tor.

• A local network can block Tor and prevent them from accessing SecureDrop.

202 Chapter 40. Threat Model

Page 209: Release 0.3.5 SecureDrop Team and Contributors › pdf › securedrop › release-0.3... · 2019-04-02 · SecureDrop Documentation, Release 0.3.5 You should now see a screen that

SecureDrop Documentation, Release 0.3.5

• A local network may be able to deduce use of SecureDrop by looking at request sizes, plaintext uploads andencrypted downloads, although research suggests this is very difficult.

40.2.17 What a global adversary can achieve against the source, admin, or journal-ist:

• A global adversary capable of observing all Internet traffic may have more luck than the local network attackerin deducing use of SecureDrop by looking at request sizes, plaintext uploads and encrypted downloads.

• A global adversary may be able to link a source to a specific SecureDrop server.

• A global adversary may be able to link a source to a specific journalist.

• A global adversary may be able to correlate data points during a leak investigation, including looking at whohas read up on SecureDrop and who has used Tor.

• A global adversary may be able to forge an SSL certificate and use it to spoof an organization’s HTTPS landingpage, thereby tricking the source into visiting a fake SecureDrop site.

40.2.18 What a random person on the Internet can achieve

• A random person can attempt to DoS the SecureDrop server and overwhelm the journalists by generating a highnumber of codenames and uploading many large documents.

• A random person can submit empty, forged, or inaccurate documents.

• A random person can submit malicious documents, e.g. malware that will attempt to compromise the SecureViewing Station.

• A random person can attempt to get sensitive information from a SecureDrop user’s browser session, such asthe source’s codename.

• A random person can attempt to compromise the SecureDrop server by attacking the exposed attack surface,including the kernel network stack, Tor, Apache, the SecureDrop web interfaces, Python, OpenSSH, and theTLS implementation.

40.2. Attack Scenarios 203