Slide 1

Slide 1 text

Security and Privacy on the Web in 2015 François Marier @fmarier mozilla

Slide 2

Slide 2 text

Firefox Security & Privacy

Slide 3

Slide 3 text

overview of what we work on

Slide 4

Slide 4 text

overview of what we work on interrupt me!

Slide 5

Slide 5 text

security privacy &

Slide 6

Slide 6 text

??????????????? ??????????????? security privacy &

Slide 7

Slide 7 text

security

Slide 8

Slide 8 text

security for users

Slide 9

Slide 9 text

Safe Browsing

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

pre-downloaded URL hash prefixes

Slide 12

Slide 12 text

pre-downloaded URL hash prefixes list updated every 30 minutes

Slide 13

Slide 13 text

pre-downloaded URL hash prefixes list updated every 30 minutes server completions on prefix hit (with noise entries)

Slide 14

Slide 14 text

pre-downloaded URL hash prefixes list updated every 30 minutes server completions on prefix hit (with noise entries) separate cookie jar

Slide 15

Slide 15 text

pre-downloaded URL hash prefixes list updated every 30 minutes server completions on prefix hit (with noise entries) separate cookie jar list entries expire after 45 minutes

Slide 16

Slide 16 text

about:config browser.safebrowsing.enabled (phishing) browser.safebrowsing.malware.enabled (malware)

Slide 17

Slide 17 text

Application Reputation

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

is it on the pre-downloaded list of dangerous hosts?

Slide 20

Slide 20 text

is it on the pre-downloaded list of dangerous hosts? is it signed by a known good software provider?

Slide 21

Slide 21 text

is it on the pre-downloaded list of dangerous hosts? is it signed by a known good software provider? is it an executable file (.exe, .com, .pif, .dmg, etc.)?

Slide 22

Slide 22 text

is it on the pre-downloaded list of dangerous hosts? is it signed by a known good software provider? is it an executable file (.exe, .com, .pif, .dmg, etc.)? what does the apprep server think about it?

Slide 23

Slide 23 text

about:config browser.safebrowsing.downloads.remote.enabled

Slide 24

Slide 24 text

security for developers

Slide 25

Slide 25 text

Content Security Policy aka CSP mechanism for preventing XSS

Slide 26

Slide 26 text

telling the browser what external content is allowed to load

Slide 27

Slide 27 text

Hi you alert('p0wned'); ! Tweet! What's on your mind?

Slide 28

Slide 28 text

without CSP

Slide 29

Slide 29 text

Hi you! John Doe - just moments ago p0wned Ok

Slide 30

Slide 30 text

with CSP

Slide 31

Slide 31 text

Hi you! John Doe - just moments ago

Slide 32

Slide 32 text

Content-Security-Policy: script-src 'self' https://cdn.example.com

Slide 33

Slide 33 text

script-src object-src style-src img-src media-src frame-src font-src connect-src

Slide 34

Slide 34 text

Strict Transport Security aka HSTS mechanism for preventing HTTPS to HTTP downgrades

Slide 35

Slide 35 text

telling the browser that your site should never be reached over HTTP

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

GET bank.ca 301 → GET https://bank.ca 200 → no HSTS, no sslstrip

Slide 38

Slide 38 text

GET bank.ca → 200 no HSTS, with sslstrip

Slide 39

Slide 39 text

what does HSTS look like?

Slide 40

Slide 40 text

$ curl -i https://example.com HTTP/1.1 200 OK Cache-Control: private Content-Type: text/html; charset=utf-8 Strict-Transport-Security: max-age=31536000 ...

Slide 41

Slide 41 text

with HSTS, with sslstrip GET https://bank.ca 200 →

Slide 42

Slide 42 text

no HTTP traffic for sslstrip to tamper with

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

https://ajax.googleapis.com /ajax/libs/jquery/1.8.0/ jquery.min.js

Slide 47

Slide 47 text

what would happen if that server were compromised?

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Bad Things™ steal sessions leak confidential data redirect to phishing sites enlist DDoS zombies

Slide 50

Slide 50 text

simple solution

Slide 51

Slide 51 text

instead of this:

Slide 52

Slide 52 text

do this:

Slide 53

Slide 53 text

guarantee: script won't change or it'll be blocked

Slide 54

Slide 54 text

security for sysadmins

Slide 55

Slide 55 text

HTTPS

Slide 56

Slide 56 text

if you're not using it, now is the time to start :)

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

mass surveillance of all Internet traffic is no longer theoretical

Slide 60

Slide 60 text

strong encryption of all Internet traffic is no longer optional

Slide 61

Slide 61 text

“If we only use encryption when we're working with important data, then encryption signals that data's importance. If only dissidents use encryption in a country, that country's authorities have an easy way of identifying them. But if everyone uses it all of the time, encryption ceases to be a signal. The government can't tell the dissidents from the rest of the population. Every time you use encryption, you're protecting someone who needs to use it to stay alive.” -Bruce Schneier

Slide 62

Slide 62 text

ps://gigaom.com/2015/02/19/dont-let-att-mislead-you-about-its-29-privacy-fee/

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

$ apt-get install letsencrypt $ letsencrypt example.com

Slide 65

Slide 65 text

automatically prove domain ownership download a free-as-in-beer certificate monitor and renew it before it expires

Slide 66

Slide 66 text

automatically prove domain ownership download a free-as-in-beer certificate monitor and renew it before it expires

Slide 67

Slide 67 text

automatically prove domain ownership download a free-as-in-beer certificate monitor and renew it before it expires

Slide 68

Slide 68 text

HTTPS is not enough you need to do it properly

Slide 69

Slide 69 text

RC4

Slide 70

Slide 70 text

SHA-1 RC4

Slide 71

Slide 71 text

SHA-1 1024-bit certificates RC4

Slide 72

Slide 72 text

SHA-1 1024-bit certificates RC4 weak DH parameters

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

https://people.mozilla.org/~fmarier/mixed-content.html

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

turn on full mixed-content blocking in development

Slide 80

Slide 80 text

privacy

Slide 81

Slide 81 text

privacy for users

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

Tracking Protection

Slide 86

Slide 86 text

Tracking Protection in Private Browsing mode

Slide 87

Slide 87 text

based on Safe Browsing pre-downloaded list of full hashes (no server lookups)

Slide 88

Slide 88 text

is this resource coming from a third-party server? is it on Disconnect's list of trackers? is it actually a third-party or does it belong to the same org?

Slide 89

Slide 89 text

Q: What does it do? A: It blocks network loads!

Slide 90

Slide 90 text

No cookies No fingerprinting No wasted bandwidth No performance hit

Slide 91

Slide 91 text

about:config privacy.trackingprotection.pbmode.enabled

Slide 92

Slide 92 text

about:config privacy.trackingprotection.enabled

Slide 93

Slide 93 text

privacy for developers

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

http://example.com/search?q=serious+medical+condition Click here for the cheapest insurance around! Bla bla bla, bla bla, bla bla bla bla. Bla bla bla, bla bla, bla bla bla bla. Bla bla bla, bla bla, bla bla bla bla. Bla bla bla, bla bla, bla bla bla bla. Bla bla bla, bla bla, bla bla bla bla. Bla bla bla, bla bla, bla bla bla bla. Bla bla bla, bla bla, bla bla bla bla. Bla bla bla, bla bla, bla bla bla bla. Bla bla bla, bla bla, bla bla bla bla. Bla bla bla, bla bla, bla bla bla bla.

Slide 97

Slide 97 text

No content

Slide 98

Slide 98 text

No Referrer No Referrer When Downgrade Origin Only Origin When Cross Origin Unsafe URL

Slide 99

Slide 99 text

No Referrer No Referrer When Downgrade Origin Only Origin When Cross Origin Unsafe URL

Slide 100

Slide 100 text

No Referrer No Referrer When Downgrade Origin Only Origin When Cross Origin Unsafe URL

Slide 101

Slide 101 text

No Referrer No Referrer When Downgrade Origin Only Origin When Cross Origin Unsafe URL

Slide 102

Slide 102 text

No Referrer No Referrer When Downgrade Origin Only Origin When Cross Origin Unsafe URL

Slide 103

Slide 103 text

Content-Security-Policy: referrer origin;

Slide 104

Slide 104 text

Content-Security-Policy: referrer origin;

Slide 105

Slide 105 text

Content-Security-Policy: referrer origin;

Slide 106

Slide 106 text

recommendations for users

Slide 107

Slide 107 text

Use the non-corporate browser primarily network.cookie.cookieBehavior = 3 network.http.referer.spoofSource = true privacy.trackingprotection.enabled = true Install the EFF's HTTPS Everywhere add-on

Slide 108

Slide 108 text

recommendations for developers

Slide 109

Slide 109 text

Use SRI for your external scripts Set a more restrictive Referrer policy Consider enabling CSP Watch out for mixed content Test your site with Tracking Protection

Slide 110

Slide 110 text

recommendations for sysadmins

Slide 111

Slide 111 text

Enable HTTPS and HSTS on all your sites Use our recommended TLS config Test your site periodically using SSL Labs

Slide 112

Slide 112 text

Questions? feedback: [email protected] mozilla.dev.security [email protected] © 2015 François Marier This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 License.

Slide 113

Slide 113 text

photo credits: tinfoil: https://www.flickr.com/photos/laurelrusswurm/15129449047 explosion: https://www.flickr.com/photos/-cavin-/2313239884/ snowden: https://www.flickr.com/photos/gageskidmore/16526354372