Introduction

Internet usage is growing dramatically, but the vast majority of Internet users don’t have any security backgrounds. Nor do a large majority of companies care about information security, and the severity of any attack could harm the valuable assets of these companies. They don’t give their employees security awareness sessions, either. For these reasons, humans are the weakest link in the information security chain.

In this article we will talk about SSL protocol and SSL certificates, which will help webmasters make sure that users’ information travels safely through the Internet in a secure manner. Moreover we will talk about invalid SSL certificates which could lead to stealing users’ credentials or stealing sensitive information which could be used in further attacks.

SSL protocol is in widespread use in applications such as Web browsing, electronic mail, Internet faxing, instant messaging and voice-over-IP (VoIP).

Information Security Principles

As we know, the main practice of information security is to defend information from unauthorized access, disclosure, disruption, modification, recording or destruction. Moreover, the major role of the information security engineer is to find, track and manage risks of our asset, which could be a server, network or/and people. The impact of these risks could affect the confidentiality, integrity or availability of this asset, so these three (CIA triad) are the core principles of information security.

What is SSL?

SSL is the acronym for Secure Sockets Layer; it is a cryptographic protocol which is specially designed for providing secure channels for communication over the Internet. SSL usage is for assuring whom clients are talking with. In other words, SSL is used for verifying the identity of the remote server. For example, if you are talking to https://www.example.com and the SSL certificate for example.com is valid, it means that you are talking to the real server.

Why Use SSL?

As we mentioned earlier, Webmasters, Web application developers and administrators usually use SSL protocol for making sure that user information travels safely through the Internet in a secure manner. This helps prevent an evil-intentioned attacker or script kiddy from sniffing the network to steal confidential information like users’ credentials, which an attacker could use later for accessing the same application or using the username and password combination to try to figure out the credentials of the same user on any other application. The vast majority of users always use the same username and the same password combination as a credential for logging to other applications, for example the credentials that the user uses to login to Facebook will be the same credentials that the user uses to login to his Gmail account, or he may slightly change the password by appending some numbers or special characters to the password, which also will be an easy task to guess the password by using hybrid attack (appending numbers and special characters to the dictionary words).

SSL is a cryptographic protocol. SSL provides data confidentiality by creating a secure channel for communication over the Internet for transferring the data confidentially. Moreover, SSL provides data integrity because the SSL certificates must be signed by a third party called Certificate Authority, so the attacker can’t sign the fake certificate by itself, and if the attacker uses a certificate of another entity to fool the victim, the browser will warn the user that the website uses an invalid certificate (someone else’s certificate), which is a clear clue that someone is trying to attack him.

How SSL Protocol Works

SSL is initialized at layer 5 (the session layer) then works at layer 6 (the presentation layer) as the following:

  1. The session layer during a handshake using an asymmetric cipher in order to negotiate cipher settings and determine a shared key for that session.
  2. The presentation layer uses a symmetric cipher and the shared key to encrypt the rest of the communication.

Invalid SSL Certificate Reasons

There are many reasons for an SSL certificate to become invalid. Some of these reasons might be the following:

  • Revoked certificate:
    • Certificate or its signature is revoked.
    • Failure to check the revocation status.
  • Fake certificate:
    • The certificate is subscribed illegally.
  • Certificate chain is broken:
    • The chain consists of one self-signed certificate.
    • The chain does not end with a trusted root certificate.
    • The chain contains certificates which are not meant to sign other certificates.
    • Root or intermediate certificate has expired or its time has not come yet.
    • The chain was not built.
  • The domain specified in the certificate does not match the website to which connection is established.
  • Certificate time violation:
    • Action time has expired.
    • Action time has not come yet.
  • Certificate structure is broken:
    • The structure is damaged.
  • Signature checking error.

If you are surfing a website which usually uses a valid SSL certificate and the browser shows that the website uses an invalid SSL certificate, it’s highly recommended to not continue working with the website, because it may be a clue that someone is attacking you.

Why is it Dangerous to Use an Invalid SSL Certificate?

Nowadays some webmasters are using invalid SSL certificates to create a secure communication channel between the server and the application users. They think it’ll provide the same security posture as a valid SSL certificate, which is not the case, because using an invalid SSL certificate will put the application users in a huge risk, the same risk as sending users’ credentials through clear communication channels because any evil-intentioned attacker can sniff the credentials and session ID for the application users.

Demonstration for Exploiting an Invalid SSL Certificate

Now we are going to demonstrate how an attacker can exploit this vulnerability. We will use the Cain & Abel tool for exploiting it. According to the official website, Cain & Abel is a password recovery tool for Microsoft Operating Systems. It allows easy recovery of various kinds of passwords by sniffing the network, cracking encrypted passwords using Dictionary, Brute-Force and Cryptanalysis attacks, recording VoIP conversations, decoding scrambled passwords, recovering wireless network keys, revealing password boxes, uncovering cached passwords, and analyzing routing protocols.

The latest version is faster and contains a lot of new features like APR (ARP Poison Routing),

which enables sniffing on switched LANs and Man-in-the-Middle attacks. The sniffer in this

Want to learn more?? The InfoSec Institute CISSP Training course trains and prepares you to pass the premier security certification, the CISSP. Professionals that hold the CISSP have demonstrated that they have deep knowledge of all 10 Common Body of Knowledge Domains, and have the necessary skills to provide leadership in the creation and operational duties of enterprise wide information security programs.

InfoSec Institute's proprietary CISSP certification courseware materials are always up to date and synchronized with the latest ISC2 exam objectives. Our industry leading course curriculum combined with our award-winning CISSP training provided by expert instructors delivers the platform you need in order to pass the CISSP exam with flying colors. You will leave the InfoSec Institute CISSP Boot Camp with the knowledge and domain expertise to successfully pass the CISSP exam the first time you take it. Some benefits of the CISSP Boot Camp are:

  • Dual Certification - CISSP and ISSEP/ISSMP/ISSAP
  • We have cultivated a strong reputation for getting at the secrets of the CISSP certification exam
  • Our materials are always updated with the latest information on the exam objectives: This is NOT a Common Body of Knowledge review-it is intense, successful preparation for CISSP certification.
  • We focus on preparing you for the CISSP certification exam through drill sessions, review of the entire Common Body of Knowledge, and practical question and answer scenarios, all following a high-energy seminar approach.

version can also analyze encrypted protocols such as SSH-1 and HTTPS, and contains filters

to capture credentials from a wide range of authentication mechanisms. For more information, please visit the official website of Cain & Abel, mentioned in the references section at the end of this article.

An attacker will exploit this vulnerability using the following scenario:

  1. The attacker and the victim must be residing in the same physical network segment.
  2. The attacker will install and run Cain software.
  3. The attacker will perform ARP poisoning to sniff the network traffic between the victim and the gateway.
  4. The victim tries to access a web application which uses an invalid SSL certificate.
  5. Cain will send the victim an invalid SSL certificate which belongs to Cain.
  6. The browser will inform the victim that the SSL certificate is invalid.
  7. Once the user adds an exception for accepting this certificate, the attacker can capture the victim credentials and session identifiers and any other activities as a clear text.
  8. The attacker can use a network traffic analyzer tool such as Wireshark to filter the traffic searching for the victim’s application requests, and then the attacker can extract the cookies and referrer parameters from the request. In addition, Cain itself stores all HTTPS traffic as a text file format that has the whole conversation between the client and the server in a folder called HTTPS inside the Cain folder, seen in the screenshot below.

Conclusion

Most webmasters are using an invalid SSL certificate, which is a dangerous issue because it could lead to impersonating application users by stealing users’ credentials and session cookies information. To solve this issue, the SSL certificate must be signed by a valid certificate from a trusted CA like VeriSign.

References

http://en.wikipedia.org/wiki/Information_security#Basic_principles

http://en.wikipedia.org/wiki/Secure_Sockets_Layer

http://www.oxid.it

http://support.kaspersky.com/us/8466