I understand that a signed certificate is a server public key signed by the private key of a certificate authority. As a result, a client allegedly rest assured that the signed public key is for the desired server. Really? How does the client get the public key of the certificate authority? Can't the attacker just sign his own public key and spoof the CA by providing the client with the wrong public key to decrypt the certificate? I'm assuming, of course, that the attacker has control of the network, including DNS.

My guess is that the CA's public key has to be a preshared key or else you're vulnerable. In my browser I see a list of certificate authorities like verisign and digicert. If these are preshared (say at windows/browser install), what happens if that store is ever updated or compromised (say by a virus, official looking request to install a new one, or an unscrupulous network admin). Could you then steal whatever you wanted? Answer goes to clear, concise explanation that shows how this really works and addresses these either real or perceived vulnerabilities.

2 Answers 2


How does the client get the public key of the certificate authority?

The certificate store is created at (OS/Application) install time, and updated as part of normal secured (OS/Application) updates. Firefox is notable as an application that uses it's own cert store. Because root certificates are pulled from a local store rather than over the network, they are immune to MITM attacks.

what happens if that store is ever updated or compromised

If a bogus root certificate is added to the cert store, then its owner can forge certificates for arbitrary destinations (e.g., your-bank.com) and intercept your communication. In a corporate environment, that's called SSL Interception and it may be performed legitimately, with your administrator installing the necessary certificate. Yes, (an attacker | your employer) can use this to view and modify your web sessions.

If an attacker manages to do that, you're in trouble, but then, if they have the access and privileges to do that, you're in pretty big trouble already - your PC is already compromised enough to be keylogged.

It's possible to detect this sort of MITM by reviewing the certificate used in a session; in Chrome, this can be done by right-clicking on the lock icon and selecting "Certificate". However, that's a manual process, and hard to do at scale.

  • 1
    Either the legit owner of the intercept key (FSVO legit) or anyone else who gets hold of it -- google Superfish. Aug 22, 2019 at 4:15
  • This feels significant due to the subtlety. CAs are mysterious entities to most people and you said root certificates are sometimes installed legitimately. A trusted person or even users themselves may install a legitimate looking certificate. I'd think it easier to hide this than something more direct like a key logger. Aug 27, 2019 at 19:51

An attacker with enough privileges to put their own root CA in your browser could just steal your information directly, so that "attack" in particular isn't worth worrying about. But yes, if they managed to do that, then your browser would trust their certificates.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .