OpenSSL project published a security advisory yesterday (5th June 2014) providing information on a SSL/TLS Man-In-The-Middle vulnerability. By sending a special sequence of carefully crafted SSL packets to vulnerable client and server, an attacker posing as the Man-in-the-Middle can decrypt and eavesdrop/modify the traffic between the client and the server.
SSL/TLS also called Secure Socket Layer protocol/Transport Layer Security protocol is used predominantly in the Internet to encrypt the traffic between a client and a server. For e.g. the traffic between your browser and your financial organization (such as banks etc.) is encrypted using the SSL/TLS protocols. The OpenSSL project provides an open source toolkit to implement the SSL/TLS protocol. This toolkit is very widely used on a number of servers and also clients that communicate with the servers on the internet.
The following versions of OpenSSL are affected by this vulnerability:
OpenSSL 1.0.1 through 1.0.1g
OpenSSL 1.0.0 through 1.0.0l
all versions before OpenSSL 0.9.8y
It is advised to upgrade to the following or any later versions:
OpenSSL 1.0.1h
OpenSSL 1.0.0m
OpenSSL 0.9.8za
As part of the SSL/TLS protocol, during the setup of an encrypted communication channel between the client and the server, the client and server exchange information in a particular sequence.
Some of the important items exchanged during the setup of the encrypted channel are:
Client and Server negotiated encryption algorithm
Client random number
Server random number
Using the above, the client computes a pre-master key and sends it to the server. Both sides use the pre-master key to generate the master key which is then used to generate a session-key. Both sides then indicate that they will subsequently use the session-key for encrypting the communication by sending a “ChangeCipherSpec” message.
In order to exploit this vulnerability, an attacker acting as the man-in-the-middle can send this “ChangeCipherSpec” message to both client and server prior to the client sending the pre-master key. This causes a vulnerable version of OpenSSL to assume that the pre-master is zero length and to go ahead with the generation of the master key and the subsequent session-keys. The attacker himself can also generate the same master key/session-keys and hence can decrypt/modify the communication between the client and the server.
An important prerequisite to launch a successful exploit against this vulnerabil