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

James Hall & Lawrence Dudley - Circumventing SSL

Hey! Presents
February 25, 2014

James Hall & Lawrence Dudley - Circumventing SSL

Presented at Hey!Stac #7 on 25th February, 2014.

Hey! Presents

February 25, 2014
Tweet

More Decks by Hey! Presents

Other Decks in Technology

Transcript

  1. Contents • How local networks work - introduction to ARP

    • ARP spoofing • Man in the middle - demo • SSL in brief • Certificate validation and user feedback • SSL strip - demo • Super evil injection - demo
  2. How we thought they worked: 1. You plug it in

    2. You get an IP address 3. Internet
  3. There’s more to it than meets the eye As web

    developers we forget that the things we do run on hardware. We think of networks as TCP/IP or even just HTTP. ! There’s actually 7 layers involved. ! We’re going to discuss layers 2 and 3 - network and data link.
  4. Layer 3 - Network This is typically IPv4 and consists

    of IP addresses. ! ! ! ! Layer 2 - Data Link This layer communicates using MAC addresses. Layers 2 and 3 - what do they do? 192.168.1.1 10:DD:B1:F3:38:66
  5. The network translates this to a MAC address Example network

    request Data Packet Destination: 10:DD:B1:F3:38:66
  6. IP/MAC Relationship IP addresses are translated into a MAC address

    for transport on the network. IP addresses are an abstraction. ! How does a host know which IP belongs on which MAC?
  7. Address resolution protocol ARP is essentially a shared network phone

    book that maps IP and MAC addresses together. ! Each host tells the rest of the network which IP/MAC combinations it has. MAC Address IP Address 10:DD:B1:F3:38:66 192.168.1.1 00:B0:D0:86:BB:F6 192.168.1.1 00:B0:D0:86:BB:F8 192.168.1.2 00:B0:D0:86:BB:F7 192.168.1.3
  8. The problem ARP lacks any kind of authentication. If you

    tell a node that a certain IP address belongs on a MAC address, it will believe you.
  9. Normal operation Data Packet Destination: 192.168.1.1 Data Packet Destination: 10:DD:B1:F3:38:66

    MAC Address IP Address 10:DD:B1:F3:38:66 192.168.1.1 00:B0:D0:86:BB:F6 192.168.1.1 00:B0:D0:86:BB:F8 192.168.1.2 00:B0:D0:86:BB:F7 192.168.1.3
  10. Device on network sends false info Data Packet Destination: 192.168.1.1

    Data Packet Destination: 10:DD:B1:F3:38:66 MAC Address IP Address 10:DD:B1:F3:38:66 192.168.1.1 00:B0:D0:86:BB:F6 192.168.1.1 00:B0:D0:86:BB:F8 192.168.1.2 00:B0:D0:86:BB:F7 192.168.1.3
  11. MAC Address IP Address 10:DD:B1:F3:38:66 192.168.1.1 00:B0:D0:86:BB:F6 192.168.1.1 00:B0:D0:86:BB:F8 192.168.1.2

    00:B0:D0:86:BB:F7 192.168.1.3 Device on network sends false info ! ! ! ! Data Packet Destination: 192.168.1.1 Data Packet Destination: 00:A0:C9:14:C8:29 MAC Address IP Address 00:A0:C9:14:C8:29 192.168.1.1 00:B0:D0:86:BB:F6 192.168.1.1 00:B0:D0:86:BB:F8 192.168.1.2 00:B0:D0:86:BB:F7 192.168.1.3 Data Packet Destination: 10:DD:B1:F3:38:66 Because ARP doesn’t contain any authentication, it’s trivial to convince a node to send data to the wrong place.
  12. Typical local network Most networks these days have clients, switches

    and routers. Most networks have a combined switch/router.
  13. Internet access Access to the Internet is via the router.

    A client sends packets to the router which sends them to the Internet.
  14. Internet access Access to the Internet is via the router.

    A client sends packets to the router which sends them to the Internet. Data Packet
  15. Internet access Access to the Internet is via the router.

    A client sends packets to the router which sends them to the Internet. Data Packet
  16. Man in the middle By spoofing the MAC address, it’s

    possible to direct the data elsewhere, then send it on to the router. Data Packet
  17. Man in the middle By spoofing the MAC address, it’s

    possible to direct the data elsewhere, then send it on to the router. Data Packet
  18. Man in the middle By spoofing the MAC address, it’s

    possible to direct the data elsewhere, then send it on to the router. Data Packet
  19. The Solution: SSL SSL was invented to get around man

    in the middle attacks. “OMG at hey!stack watching @helloparallax. It’s awesome”
  20. SSL Validation SSL works on a trust basis. When a

    certificate isn’t trusted, you know about it.
  21. SSL Strip We take the HTTPS connection and turn it

    into an HTTP one, ignoring any redirects to the secure version of a site. The average user is none the wiser.