Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding attacks and countermeasures to SD threat model public docs #4244

Merged

Conversation

olivemartini
Copy link
Contributor

Status

Work in progress

Description of Changes

Fixes #3349

Changes proposed in this pull request:

Testing

How should the reviewer test this PR? Please send feedback about formatting and style. All comments welcome.

Deployment

Any special considerations for deployment? Docs only.

Checklist

If you made changes to documentation:

  • [ x ] Doc linting (make docs-lint) passed locally

@olivemartini olivemartini changed the base branch from docs-update-threat-model to develop March 6, 2019 22:02
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olivemartini thank you very much for submitting this PR !

I've rebased your branch against current develop branch, which appears to have fixed the ci "failures" 🎉

I've left a few comments inline for discussion, interested in seeing what you think !

- Communications vulnerability in *Source Interface* or *Journalist Interface*
- Error handling and logging vulnerability in *Source Interface* or *Journalist Interface*
- HTTP security configuration vulnerability in *Source Interface* or *Journalist Interface*
- File and resource vulnerability in *Journalist interface*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For File and Resource, Business logic and Web services vulnerabilities, they should be listed as threats to both source and journalist interfaces

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Business logic and web services i just added to our internal document due to omission, but file and resource were already there.

Attacks to the Application Code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Configuration vulnerability in *Source Interface* or *Journalist Interface*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of repetition here, what would you think about creating a subtitle called something like "source and journalist interface" or "SecureDrop Application - Source and journalist interface" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a really good Idea. I will rework this section, and break out the Interfaces attacks for clarity and concision.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- *Journalist Interface* is located behind an authenticated hidden service and only privileged users have required authorization token
- Tor hidden service protocol is end-to-end encrypted, and TLS is opt-in with EV cert, but no config option is supported
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TLS is not currently available on the Journalist interface


- All source submissions are encrypted with GPG at rest using the airgapped submission key
- Sensitive source and submission data is sent through HTTP POST
- *Source Interface* runs on an end-to-end encrypted Tor onion service, and TLS is opt-in with an EV cert
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's optional and a distinct layer of encryption, it might make sense to list it in a separate bullet point

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

- All *Source Interface* session data (except language and locale selection) is discarded at logout, and fully deleted upon exiting the Tor Browser
- *A number of mitigations are in place as protection against malicious input vulnerabilities*: X-XSS-PROTECTION is enabled and Content-Security-Policy is set to self; SQLAlchemy is used as ORM for all database queries; and Application does not execute uploaded data
- *A number of mitigations are in place as protection against the risk of an HTTP misconfiguration*: Only HTTP GET, POST and HEAD are allowed; HTTP headers do not expose version information of system components; X-Content-Type is set to "nosniff;" Content-Security-Policy is set to "self;" and X-XSS-Protection is set to "1"
- *A number of mitigations are in place as protection against access control vulnerabilities*: Cache control header is set to “no store;” Source codenames are long and automatically generated, and stored in a database hashed with a unique salt; Source codename reset functionality is not available; Source login does not display information about prior submissions; Souce login requires 7-word codename to check Source Interface for replies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Cache-control would be best suited in the HTTP misconfiguration section above.


Countermeasures Against Malicious Tails or Ubuntu ISOs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- SecureDrop dmin guide (https://docs.securedrop.org/en/stable/admin.html) instructs Users/Admins to validate checksum/signatures of downloaded images
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dmin -> admin

Countermeasures in News Organization Corporate Network
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- SecureDrop environment should be strictly segregated from corporate environment
- Most SecureDrop traffic goes over Tor and as such is encrypted end-to-end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: SecureDrop application traffic

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- SecureDrop environment should be strictly segregated from corporate environment
- Most SecureDrop traffic goes over Tor and as such is encrypted end-to-end
- Alert emails to Journalists and Admins are GPG-encrypted (but not signed) to provide confidentiality and prevent tampering
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tampering is not assured in this case since the message is not signed. Let's remove and prevent tampering here. This was an error in the original document, and it has been updated.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- All SecureDrop infrastructure is provisioned via infrastructure-as-code (Ansible scripts).
- *Monitor Server* should only expose SSH via Tor hidden service. All other traffic should be blocked by firewall
- FPF performs vulnerability management for software dependencies as well automatic nightly updates for dependencies and OS packages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vulnerability management and automatic updates for os packages should be distinct bullets. Furthermore they are also countermeasures on the Application server as well

- For SecureDrop Developers, 2-factor authentication is mandated on GitHub
- Community trust is built through 3 trusted code owners and code reviews

Attacks and Countermeasures on the *Application Server* and *Monitor Server*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this section, there's a lot of repetition for countermeasures, specifically os-level hardening items (grsecurity, apparmor, ossec...)Perhaps it would make sense to use sections and subsections to represent the hierarchy of what it would look like in the dataflow diagram, for example:
app server

  1. Application server

1.1 operating sytem

  • grsec
  • apparmor

1.2 securedrop application

  • All the application-level countermeasures

1.2.1 application server dependencies

  • vulnerability management

1.3 tor

  • Hidden service auth

Do you think this would make sense in the context of this PR?

@emkll emkll force-pushed the docs-update-threat-model branch 3 times, most recently from 89a9e0f to b80328d Compare April 2, 2019 19:27
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @olivemartini for the fixes, this looks great! I've rebased this branch on develop due to some changes required in (unrelated) tests and appended two commits:

I'm approving this PR but not merging it, could another maintainer take a look at my commits in this PR? Thanks

@conorsch
Copy link
Contributor

conorsch commented Apr 4, 2019

Splendid! Thank you for your hard work on this, @olivemartini! Took another pass through the docs changes, including the small clarifications @emkll appended most recently. Merging!

@conorsch conorsch merged commit e0dc811 into freedomofpress:develop Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants