Slide 1

Slide 1 text

Dipping your toes into web security part I: how https helps Florencia Herra Vega CTO, Peerio

Slide 2

Slide 2 text

Why is the internet so insecure?

Slide 3

Slide 3 text

Why is the internet so insecure? why is learning about security hard?

Slide 4

Slide 4 text

Why is the internet so insecure? why is learning about security hard? why does learning about security matter?

Slide 5

Slide 5 text

What happens when you request a webpage in your browser?

Slide 6

Slide 6 text

What happens when you request a webpage in your browser?

Slide 7

Slide 7 text

what assumptions do we make about the cloud?

Slide 8

Slide 8 text

http://harryblogs.potter-weasley-family.com

Slide 9

Slide 9 text

What happens when you request a webpage in your browser? 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001

Slide 10

Slide 10 text

What happens when you request a webpage in your browser? 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001

Slide 11

Slide 11 text

What happens when you request a webpage in your browser?

Slide 12

Slide 12 text

What happens when you request a webpage in your browser?

Slide 13

Slide 13 text

http://harryblogs.potter-weasley-family.com wtf?

Slide 14

Slide 14 text

104.236.208.232 101.222.28.111 92.32.112.30

Slide 15

Slide 15 text

Domain Name System browser OS router ISP authoritative nameserver found! ? ? ? ?

Slide 16

Slide 16 text

DNS hey browser, do you know about harryblogs.potter-weasley-family.com? nope

Slide 17

Slide 17 text

DNS hey OS, do you know about harryblogs.potter-weasley-family.com? nope

Slide 18

Slide 18 text

DNS hey router, do you know about harryblogs.potter-weasley-family.com? nope

Slide 19

Slide 19 text

DNS hey ISP, do you know about harryblogs.potter-weasley-family.com? nope

Slide 20

Slide 20 text

DNS hey root domain name server, do you know about harryblogs.potter-weasley-family.com? nope… but I know about .com go ask the .com TLD DNS server root

Slide 21

Slide 21 text

DNS nope… but I know about potter-weasley- family.com: ns1.diagonalhosting.com .com hey .com TLD name server, do you know about harryblogs.potter-weasley-family.com?

Slide 22

Slide 22 text

DNS WHY YES here is an IP: 159.203.37.70 .com hey ns1.diagonalhosting.com, do you know about harryblogs.potter-weasley-family.com? authoritative nameserver

Slide 23

Slide 23 text

browser OS router ISP find! cache for n seconds! TTL cache for n seconds! cache for n seconds! cache for n seconds! authoritative nameserver

Slide 24

Slide 24 text

DNS hey ISP, do you know about harryblogs.potter-weasley-family.com? WHY YES here is an IP: 159.203.37.70

Slide 25

Slide 25 text

all this for an address…

Slide 26

Slide 26 text

diagonal hosting old pc in luna lovegood’s basement some isp

Slide 27

Slide 27 text

old pc in luna lovegood’s basement some isp

Slide 28

Slide 28 text

TCP: SHALL WE DANCE? Hey buddy can I talk to you for a second? SYN Me? You wanna talk to me? SYN/ACK Yes you! ACK

Slide 29

Slide 29 text

HTTP GET / HTTP/1.1 Host: harryblogs.potter-weasley-family.com

Slide 30

Slide 30 text

HTTP HTTP/1.1 200 OK Harry’s blog This is a v political blog. GET / HTTP/1.1 Host: harryblogs.potter-weasley-family.com

Slide 31

Slide 31 text

larger broomsticks & love potions 4 u one weird trick wow wow Entrepreneur piverate integrate grok Steve Jobs innovate big data experiential. Minimum viable product 360 campaign ship it grok responsive ship it co-working iterate. Sticky note viral ideate user centered design agile unicorn 360 campaign workflow hacker earned media parallax viral. Personas personas Steve Jobs quantitative vs. qualitative moleskine convergence pitch deck experiential co-working responsive responsive pair programming thought leader personas. Disrupt entrepreneur personas fund minimum viable. Like this! Tweet this! fave wizardvine clips yay comments muggle studies cancelled!? buy my signed quidditch robes Patreon GitTip Flattr Bitcoin

Slide 32

Slide 32 text

How can we break this perfectly simple and logical system?

Slide 33

Slide 33 text

diagonal hosting some isp 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001

Slide 34

Slide 34 text

A simple prank > vi /etc/hosts 104.16.126.167 your-friends-favourite-blog.com

Slide 35

Slide 35 text

A simple prank > vi /etc/hosts 104.16.126.167 your-friends-favourite-blog.com

Slide 36

Slide 36 text

browser OS router ISP find! cache for n seconds! authoritative nameserver insert a record A simple prank

Slide 37

Slide 37 text

Some DNS only resolves locally.

Slide 38

Slide 38 text

insert malicious record browser OS router ISP find! cache for n seconds! cache for n seconds! cache for n seconds! authoritative nameserver cache poisoning

Slide 39

Slide 39 text

Problems • I can see what you’re saying • I can see your passwords • I can fool you into accessing the wrong website through DNS • I can fool you into accessing the wrong website a bunch of other ways too

Slide 40

Slide 40 text

Defence against the dark arts

Slide 41

Slide 41 text

Cleartext I want to volunteer! Here is my personal info

Slide 42

Slide 42 text

wow math encrypt all the things!

Slide 43

Slide 43 text

HTTPS wow AmfhZQFJ6lBRRWWRyHfOwmLnF4Zi7HafG jXMfDdvm2KRd3qXhxOoeTP9vyddrZ05o4 PkE86q54ySQOJA6UwwHt0NxQ+0RO0/ DnRbbPs1phgVX6wrZ93PVRLP xxHPwNBOQZg0qcxvEcl2fixs/ OtxhEHNfhlB

Slide 44

Slide 44 text

HTTPS not so wow AmfhZQFJ6lBRRWWRyHfOwmLnF4Zi7HafGjXMfD dvm2KRd3qXhxOoeTP9vyddrZ05o4PkE86q54yS QOJA6UwwHt0NxQ+0RO0/ DnRbbPs1phgVX6wrZ93PVRLP xxHPwNBOQZg0qcxvEcl2fixs/OtxhEHNfhlB

Slide 45

Slide 45 text

HTTPS not so wow Thanks! meet me at this totally legit location!

Slide 46

Slide 46 text

HTTPS not so wow I want to volunteer! Here is my personal info

Slide 47

Slide 47 text

math can do better!

Slide 48

Slide 48 text

symmetrical encryption let us use this one key for magic math stuff … I will send it to you by carrier pigeon

Slide 49

Slide 49 text

Asymmetrical encryption from this secret key i shall derive a public key which I shall publish and you will use it for magic math stuff

Slide 50

Slide 50 text

your public key is unique!

Slide 51

Slide 51 text

your public key is unique!

Slide 52

Slide 52 text

your public key is unique! domain: harryblogs.potter-weasley- family.com owner: harry potter

Slide 53

Slide 53 text

Signed Certificate Diagonal Hosting 1 Diagon Alley SEAL of APPROVAL

Slide 54

Slide 54 text

Chain of trust domain: diagonalhosting.com owner: diagonal Ltd

Slide 55

Slide 55 text

Chain of trust GRINGOTTS IDENTITIES 22 goblin lane SEAL of APPROVAL diagonalhosting.com

Slide 56

Slide 56 text

Chain of trust

Slide 57

Slide 57 text

Hello, I’d like to talk to Harry’s blog securely Yes this is Harry’s blog, v secure! Hold up, why should I trust that you’re actually Harry? Because Diagon Alley Hosting says so. Hey Diagon Alley Hosting, do you know this guy? Yes, we can vouch for him. But how do I know who you are? Look me up with Gringotts Identities.

Slide 58

Slide 58 text

Try your DNS tricks now, Voldy! your connection is not private attackers may steal etc

Slide 59

Slide 59 text

Why should I use HTTPS on my websites? • Protects your users from snooping. • Will raise hell if someone pretends to be you.

Slide 60

Slide 60 text

Why doesn’t everybody do this? • Money. • Pain. Bureaucracy + encryption = not cute.

Slide 61

Slide 61 text

Let’s Encrypt! • Certbot — https://certbot.eff.org/ • nginx guide — https://www.digitalocean.com/ community/tutorials/how-to-secure-nginx-with-let-s- encrypt-on-ubuntu-14-04 • apache guide — https://www.digitalocean.com/ community/tutorials/how-to-secure-apache-with-let-s- encrypt-on-ubuntu-14-04

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

Shared hosting providers that support Let’s Encrypt https://github.com/letsencrypt/letsencrypt/wiki/Web-Hosting- Supporting-LE

Slide 64

Slide 64 text

What can I do as a user? • HTTPS everywhere browser extension • https://chrome.google.com/webstore/detail/https- everywhere/gcbommkclmclpchllfjekcdonpmejbdp?hl=en • https://addons.mozilla.org/en-US/firefox/addon/https- everywhere/ • Ad and tracker blocking • https://chrome.google.com/webstore/detail/ublock- origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en • https://www.eff.org/privacybadger

Slide 65

Slide 65 text

What can I do as a developer? • Learn how to be evil! • play with Wireshark https://wireshark.org • Books from NoStarch Press: The Tangled Web, Silence on the Wire, Penetration Testing, etc. • Learn about the security features in the tools and frameworks you use!

Slide 66

Slide 66 text

More resources • “Server Farm to Table” — http://jenna.is/ server-farm-to-table-annotated.pdf • Computerphile “Man in the Middle attacks” — https://www.youtube.com/watch?v=-enHfpHMBo4 • Computerphile “Public key cryptography” — https://www.youtube.com/watch?v=GSIDS_lvRv4 • “Cat DNS” — https://www.youtube.com/watch? v=qDPhW9P44fI

Slide 67

Slide 67 text

get in touch! @flohdot