Recently, the government of Kazakhstan temporarily forced citizens to install a Certificate Authority (CA) that allowed the state to decrypt all content and communications in a man-in-the-middle attack.
The certificate even allowed the government to alter data and trick users into running and downloading viruses and spyware. The initiative by the Kazakhstani government may have failed for now, but the threat is real.
Certificate authorities explained
A certificate authority verifies that a website is what it says it is when encrypting data between its servers and you. The CA will sign the website’s encryption certificate, which is presented to the user every time a website is opened.
Browser and operating system vendors can’t possibly validate ownership of all websites on their own, so they delegate that to a number of trusted CAs. All CAs must have processes and checks in place to ensure certificates are only issued to the rightful owner of a domain.
For example, when visiting your bank’s website, you want to be sure you’re really using your bank’s website and not an imposter. So your browser will check that the certificate presented by the website is issued by a trusted CA, thereby forming a “chain of trust” providing proof that you’re really using the correct site.
In the past, there have been several cases in which browser and OS vendors have taken the rights away from CAs because they proved to be incompetent or malicious in how they issued certificates. If the certificate authority signs requests for others, such as nation states or hackers, the system does not work.
Your computer comes with a set of certificate authorities pre-installed, while Firefox uses its own list, vetted by its own experts. Kazakhstan has been trying to get its malicious certificate authority included in Firefox, but Mozilla politely declined. The CA is not included in any other major browser, but it is possible to add any CA manually. Browser developers are aware of this loophole, with some proposing to permanently block malicious CAs and make it impossible for users to install them or bypass restrictions.
A fake certificate authority
By creating its own certificate authority and giving itself the ability to impersonate any site it wants, the Kazakhstani government is attempting to sidestep this important chain of trust.
As long as it controls the data stream, it is able to present any server as “legitimate” and use it to phish your credentials. For example, the valid certificate of twitter.com proves that you really are connected to Twitter and that it is safe to enter your username and password. However, if your computer trusts a fake CA, somebody else might direct your connection to their own server while posing as Twitter.
What is an HTTPS certificate?
Hypertext Transfer Protocol Secure (HTTPS) is a protocol used to encrypt websites. When you navigate to a website that supports HTTPS (by now the majority of all sites), an encrypted channel is set up between your device and the website’s server, making sure nobody in-between is able to read your passwords or sensitive information. This security measure is often indicated with a lock in the browser’s address bar.
To verify that your computer is connected to a real bank website and not a clone, the HTTPS certificate is signed by a CA. When you navigate to the site, the server will present an electronic signature showing that the authority has verified that it belongs to the website you are trying to visit.
Since HTTPS is very reliable when not subverted, a vast majority of websites and applications rely solely on the security provided by HTTPS in order to keep data safe in transit.
Encryption works
Encryption as simple as HTTPS can have a profound effect on online security and privacy, which is why authoritarian regimes are prone to attack it.
Especially in states with unreliable legal systems and a lack of accountability to power, we cannot trust governments with access to our private data. As countless examples have shown, private information (such as credit card information and private messages) will trickle down into the hands of regional departments, then individual officers and eventually into organized crime, where it threatens the stability of society.
Comments
Good post.
Some VPN providers require users to install their root ca in order to realise some functions. I think of It as suspicious. Would you advice to decline such ca installations.?
Hi Kelly. The VPN’s CA certificate helps the VPN software verify which servers belong to the VPN provider. It makes it impossible for your computer to connect to a ‘fake’ VPN server. On your phone, this is typically installed through a ‘profile’, while on a computer, the certificate would be part of the VPN software and doesn’t need to be installed separately. If you want, you can connect to the VPN with a open-source client and provide it with the CA certificate yourself. You can find instructions for example here.