Suppose that my certificate authority issues private certificates using the same chain for all of their customers. Does this mean that a malicious actor who happens to be another one of their customers can easily perform an MiTM without a certificate error by issuing their own cert with the same FQDN?
The CA in question allows private certificate issuance for any unrecognized TLD (as in, any TLD that is not on this list) without any domain validation required. Makes sense since the domains aren't publicly routable, so they can't do DNS TXT records or the HTTP well-known method.
Consider this scenario:
- Alice requests a private certificate for
super-secure-nginx-server.internal
- CA issues the private certificate with the following chain:
ae8569d94f4ab1c464ad9b7cfd7840b0e39daf66
(root)477df10752e5acdb45936824e4be360251ddb0fc
(intermediate)abcdefg1234560
(leaf -CN: super-secure-nginx-server.internal
)
- Alice installs the leaf and intermediate certificate on her server
- Alice pushes the root certificate to the certificate store on all computers and smartphones in the organization for users to access the internal sites without certificate error
- Mallory, a customer of the same CA with malicious intent, requests a private certificate for
super-secure-nginx-server.internal
. - CA issues a private certificate with the following chain:
ae8569d94f4ab1c464ad9b7cfd7840b0e39daf66
(root)477df10752e5acdb45936824e4be360251ddb0fc
(intermediate)7654321abcdefg
(leaf -CN: super-secure-nginx-server.internal
)
- Mallory installs the leaf and intermediate certificate on an intercepting proxy server
- Mallory performs monster-in-the-middle attack on Alice (or any person in her organization) using whatever means (DNS cache poisoning, etc.)
- Alice accesses
super-secure-nginx-server.internal
and assumes the connection is secure since there is no certificate error. She is unaware that the connection is actually to Mallory's server. There is no certificate error since the FQDN is correct and the root is already trusted by the browser/OS.
In this scenario, the only way that Alice would know that something is off would be inspecting the certificate and having some out-of-band knowledge that the legitimate server's certificate is abcdefg1234560
rather than 7654321abcdefg
.
Is my understanding of this issue correct? Surely the CAs have thought about this?
In this case, isn't it better to use a completely internal CA like Active Directory Certificate Services or step-ca rather than having a paid CA issue these certs?
It doesn't make sense for the CA to prevent Mallory from requesting such a certificate either, as her organization might also legitimately have a server with the FQDN super-secure-nginx-server.internal
.
Update: Checked with the CA and they kindly referred me to a line that I missed in the documentation saying that it only works for domains of unrecognized TLDs that are not in use by another customer issuing certificates. Looks like the internal domain suffixes that my organization has been using aren't also in use by another customer, so that's why we never ran into any issues.