Measures to prevent MITM attack and their effectiveness CSCI 5931 Web Security Submitted By Pradeep Rath Date : 23 rd March 2004
Introduction Definition: When two users are communicating remotely through internet, exchange public keys to start a reliable and secure communication. During this process if somehow both the keys are intercepted on its route by someone, he can send on the messages to both the parties involved in communication but with his own faked public keys.
Digital Certificates Digital certificates are an electronic file Used to uniquely identify a person or a website (server). Digital certificates are issued by certificate authority such as Verisign, thwate… They validate the public key used by the server in transaction and key exchange.
How does it work?
Is it completely foolproof? It is not completely foolproof. Ways to work around the system: Using a chain of certificates. Anyone with a valid CA-signed certificate for any domain can generate a valid CA- signed certificate for any other domain.
How Does this Work ? Whenever this is a chain of certificates. Browser is supposed to check the common name CN field of the leaf certificate is the same as the domain he is connected to. [Issuer: Verisign / Subject: Verisign] -> [Issuer: Verisign / Subject: Intermediate CA] -> [Issuer: Intermediate CA / Subject:
Contd… The browser performs a check for validity by checking the intermediate CA certificate and then the intermediate CA is signed by the Root CA (Verisign). The next check required is to check that all intermediate certificates have valid CA Basic Constraints.
Contd… The problem lies in the browser some browser do not check the valid CA basic constraints, which means Anybody with a valid CA signed certificate could generate a valid certificate for any other domain. [CERT - Issuer: Verisign / Subject: Verisign] -> [CERT - Issuer: Verisign / Subject: -> [CERT - Issuer: / Subject:
Contd… Here the browser accepts the certificate chain to be a valid amazon.com certificate. So anybody with standard tools for connection hijacking can combine this flaw into a successful MITM. Affected browser is Internet explorer whereas netscape and mozilla are unaffected.
Other Techniques There is another way MITM can be achieved that is by DNS spoofing. As there is no way for server to authenticate the client, after the client is made to believe that the attacker is the server, the attacker could perform MITM. When a attacker uses DNS spoofing he assumes that the browser is not configured to issue warnings against use of a fake certificate.
Contd… DNS spoofing is a simple redirection mechanism and can be done using tools like Dsniff. If the attacker could get the user to trust the fake certificate and install it into the list of trusted CA’s all further communications are compromised.
Solutions. The MITM attacks rely upon spoofing ARP and DNS. Sites should use static ARP tables when possible, Servers and site should migrate to DNSSEC as soon as practicable. Deploy an intrusion detection device. Use proper and better configured versions of a browser.
References Mike Benham IE SSL Vulnerability. -mitm.html -mitm.html Discussion of verisign's Technical Brief: "Building an E-Commerce Trust Infrastructure: SSL Server Certificates and Online Payment Services"
Thank You! Any Questions ?