I seem to be missing one fundamental point regarding Certificates and hoping someone can set me straight. It is constantly described that a certificate can be used for authentication and to ensure the server you think you are talking too is the server that you are talking too. I understand the principal of verifying the certificate, intermediate certificate etc and that is all fine. My question however is this.
If i want to pretend to be google.com, what is stopping me from the doing the following:
Log on to google.com, negotiate a HTTPS session and store a copy of the certificate provided from Google.com (this will be a genuine certificate).
Intercept or redirect a request from a users computer to my server pretending to be google.com. (DNS spoof etc)
When the user then wants to negotiate the secure connection with my spoofed server forward the genuine certificate from google that I acquired in step 1.
The certificate I have sent the client is genuine, it will check out and can be verified although I am not the real server.
Unless the client challenges me in some way such as, here is a random number, encrypt using your private key and return to me, I cannot understand how we are verifying the server is who they say they are as the certificate is freely available to anyone who requests it.
I understand if anything is encrypted using the public key from this certificate I will not have the private key to decrypt it but from what I can gather in steps 1-4 above the client will think I am the real server.
I also know that I will not be able to set up a full TLS session as I cannot decrypt data encrypted with the public key from the certificate.
In simple terms is this statement correct:
Providing the certificate alone only proves the Public key provided on the certificate belongs to Google as opposed to the server I am communicating with is Google
I have searched and searched for an answer to this but cannot find it.
Thanks,