Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dipping your toes into web security

FHV
September 22, 2016

Dipping your toes into web security

HTTPS! DNS! The pipes of the internet, in Harry Potter metaphors, suitable for muggles.

FHV

September 22, 2016
Tweet

More Decks by FHV

Other Decks in Technology

Transcript

  1. Dipping your toes into web security part I: how https

    helps Florencia Herra Vega CTO, Peerio
  2. Why is the internet so insecure? why is learning about

    security hard? why does learning about security matter?
  3. What happens when you request a webpage in your browser?

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

    0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001 0110100101000111011011001010101010010101001
  5. 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
  6. 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?
  7. 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
  8. browser OS router ISP find! cache for n seconds! TTL

    cache for n seconds! cache for n seconds! cache for n seconds! authoritative nameserver
  9. 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
  10. HTTP HTTP/1.1 200 OK <html> <head> <title>Harry’s blog</title> </head> <body>

    This is a v political blog. </body> </html> GET / HTTP/1.1 Host: harryblogs.potter-weasley-family.com
  11. 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
  12. browser OS router ISP find! cache for n seconds! authoritative

    nameserver insert a record A simple prank
  13. insert malicious record browser OS router ISP find! cache for

    n seconds! cache for n seconds! cache for n seconds! authoritative nameserver cache poisoning
  14. 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
  15. symmetrical encryption let us use this one key for magic

    math stuff … I will send it to you by carrier pigeon
  16. 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
  17. 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.
  18. Why should I use HTTPS on my websites? • Protects

    your users from snooping. • Will raise hell if someone pretends to be you.
  19. 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
  20. 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
  21. 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!
  22. 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