Online communication and data sharing practices rely heavily on digital certificates to encrypt data as well as authenticate systems and people. There have been many discussions about the cracks starting to develop in the certificate-based Public Key Infrastructure (PKI) on the web. Let's consider how the certs are typically used and misused to prepare for exploring ways in which the certificate ecosystem can be strengthened.
How Digital Certificates are Used
Digital certificates are integral to cryptographic systems that are based on public/private key pairs, usually in the context of a PKI scheme. Wikipedia explains that a certificate binds a public key to an identity. Microsoft details the role that a Certificate Authority (CA) plays in a PKI scenario:
"The certification authority validates your information and then issues your digital certificate. The digital certificate contains information about who the certificate was issued to, as well as the certifying authority that issued it. Additionally, some certifying authorities may themselves be certified by a hierarchy of one or more certifying authorities, and this information is also part of the certificate."
HTTPS communications are safeguarded by SSL/TLS certificates, which help authenticate the server and sometimes the client, as well as encrypt the traffic exchanged between them. Digital certificates also play a critical role in signing software, which helps determine the source and authenticity of the program when deciding whether to trust it. Certificates could also be used as the basis for securing VPN and Wi-Fi connections.
Misusing Digital Certificates
In the recent years, the PKI environment within which digital certificates are created, maintained and used began showing its weaknesses. We've witnessed several ways in which the certs have been misused in attacks on individuals, enterprises and government organizations:
- Stolen code-signing certificates and the associated private keys were used to sign malicious software. For instance, a breach at the security firm Bit9 allowed attackers to steal one of the company’s certs and use it to distribute malware. An apparently-stolen cert was used to sign a malicious Java applet. An attack on the browser company Opera allowed the intruder to access a code-signing cert and use it to sign malware. Code-signing certs stolen from Adobe were used to sign malicious software. It's not uncommon for malware to be programmed to capture victims’ code-signing and other certificates, which will ensure that we'll see more incidents of stolen certificates being misused.
- CAs issued weak or improper certificates, which were later used in attacks. For example, DigiCert mistakenly sold a certificate to a company that didn’t actually exist; the cert was used to sign a malicious executable. Another CA named Digicert Sdn (no relation to DigiCert), issued certs with weak "512-bit RSA keys and missing certificate extensions," according to its parent company Entrust. Later, two of the certs "were used to sign malware used in a spear phishing attack against another Asian certificate authority." In another blunder, a CA named TURKTRUST mistakenly issued certs that have led to the impersonation of Google's servers.
- Man-in-the-middle (MITM) attacks abused certificates to intercept SSL/TLS traffic. Software rarely complains when a server's SSL/TLS certificate has been signed by a trusted, but unexpected CA. For example, one person noticed that when connecting to Gmail via IMAP/SSL from a hotel, the server’s certificate was signed by an entity other than Google. A similar technique was allegedly used by Nokia, presumably for legitimate purposes, to decrypt phones’ HTTPS activities. There are probably many MITM instances where the traffic was captured illegitimately; unfortunately, such situations are often hard to detect.
- Malware installed illegitimate certificates, configuring infected systems to trust them. For instance, a malicious Browser Helper Object (BHO) installed a fake Verisign cert as a Trusted Root Certificate Authority after infecting the system to eliminate security warnings. In another example, spyware acted as a local proxy for SSL/TLS traffic and installed a rogue certificate to conceal this behavior. Installing a fake root CA certificate on the compromised system can also assist with phishing scams, because they allow the attacker to set up a fake domain that uses SSL/TLS and passes certificate validation steps.
These were just some examples of real-world incidents where digital certificates were misused. In a follow-up post, I discuss the initiatives aimed at strengthening the PKI ecosystem within which the certificates are issued, validated and utilized.