23
SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

  • Upload
    donhan

  • View
    240

  • Download
    1

Embed Size (px)

Citation preview

Page 1: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS and MITM attacks

A case study in Network SecurityBy Lars Nybom & Alexander Wall

Page 2: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS – Background

● SSL/TLS – Secure Socket Layer/Transport Layer Security (rfc 2246)

Page 3: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS – Background

● SSL/TLS – Secure Socket Layer/Transport Layer Security (rfc 2246)

● Originally developed by Netscape.

Page 4: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS – Background

● SSL/TLS – Secure Socket Layer/Transport Layer Security (rfc 2246)

● Originally developed by Netscape.● Used to deploy confidentiality, authenticity and

integrity between web client and web server.

Page 5: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS – How does it work?

Based on public key cryptography and certificate authority.

Page 6: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS - Components

● Tree structure where Certificate Authorities (CA) is nodes and Servers leafs.

Page 7: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS - Components

● Tree structure where Certificate Authorities (CA) is nodes and Servers leafs.

● Server certificate issued by CA one level above – meaning that it's signed by CA one level above.

Page 8: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS - Components

● Tree structure where Certificate Authorities (CA) is nodes and Servers leafs.

● Server certificate issued by CA one level above – meaning that it's signed by CA one level above.

● If Client doesn't trust Server identity he/she uses the CA's public key to verify that the Server certificate is legit.

Page 9: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS - Components

● Tree structure where Certificate Authorities (CA) is nodes and Servers leafs.

● Server certificate issued by CA one level above – meaning that it's signed by CA one level above.

● If Client doesn't trust Server identity he/she uses the CA's public key to verify that the Server certificate is legit.

● Root CA in top of tree – trusted by everyone.

Page 10: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS - Problem

● If there's a lot of intermediate CA's between the Server and Root CA, authenticity is weak.

Server → CA 1 → CA 2 → … → Root CA● This allowed for older form of attack SSLSniff,

where a MITM generates a bogus self-signed certificate sent to Client while connecting normally to Server.

● New attack SSLStrip.

Page 11: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

MITM

● Man-In-The-Middle attack is virtually transparent to the victim.

Page 12: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

ARP Spoofing

● In order to become ”in the middle” attacker needs to redirect the victims network traffic through his/hers computer – acting like a gateway.

Page 13: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

ARP Spoofing

● In order to become ”in the middle” attacker needs to redirect the victims network traffic through his/hers computer – acting like a gateway.

● Every network interface has a MAC address associated with its IP.

Page 14: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

ARP Spoofing

● In order to become ”in the middle” attacker needs to redirect the victims network traffic through his/hers computer – acting like a gateway.

● Every network interface has a MAC address associated with its IP.

● When a computer wants to communicate with another computer within it's subnet it needs to know that computers MAC address so it sends an ARP query.

Page 15: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

ARP Spoofing

● In a MITM attack the attacker sends out a false ARP reply telling the victim his/hers computer is the computer the victim is looking for.

Page 16: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSLStrip

● Client normally connects via HTTPS (SSL/TLS) to a Server because an user tries to GET/POST information on a webpage by a link/button that begins with ”https://...” (i.e. Facebook, Gmail and Hotmail)

Page 17: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSLStrip

● Client normally connects via HTTPS (SSL/TLS) to a Server because an user tries to GET/POST information on a webpage by a link/button that begins with ”https://...” (i.e. Facebook, Gmail and Hotmail)

● SSLStrip rewrites all HTTPS addresses as HTTP addresses and then saves traffic content.

Page 18: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSLStrip – How does it look?

Page 19: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSLStrip – How does it look?

Page 20: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

Countermeasures

● Before logging on webpage make sure that address in address bar begins with ”https://...”. If it doesn't, retype it so it does. (This only helps against SSLStrip, not SSLSniff.)

Page 21: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

Countermeasures

● Before logging on webpage make sure that address in address bar begins with ”https://...”. If it doesn't, retype it so it does. (This only helps against SSLStrip, not SSLSniff.)

● If the address begins with ”https://...” make sure that the certificate doesn't look fishy.

Page 22: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

Countermeasures

Page 23: SSL/TLS and MITM attacks - Uppsala University · SSL/TLS and MITM attacks A case study in Network Security By Lars Nybom & Alexander Wall

SSL/TLS and MITM attacks

The End