What are the possible defense measures that can be applied to a simple PKI (no intermediate CAs, etc.) used to authenticate clients and servers over TLS on an internal network only?
Certificates issued to clients/servers will have to appropriate TLS Authentication extended key usage set.
Since the CA will be trusted on all devices, I want to make sure that even if the our CA's private key is compromised, the attacker wouldn't be able to create certificates for Internet web sites, or to create trusted signed binaries. In other words, I try to minimize the vulnerabilities that are opened up by the authentication scheme.
Is this possible using X.509 constraints?
So far I've thought of setting the pathLenConstraint
to 0, and using the nameConstraints
so only certificates issued to private IP addresses should be accepted.
It seems that these measures prevent a lot of misuse, but they still allow the attacker to issue a certificate for e.g. google.com, then—using MITM—impersonate the DNS server and reply with an internal IP address (pathLenConstraint
✓, nameConstraints
✓, intended usage ✘). This scenario would even work with nameConstraints
set to the local DNS suffix, since most clients just send another query with the suffix included, if the response is "not found."
Not to mention that I've found no way to prevent a CA (using X.509 constraints) to ever issue certificates used for code signing or timestamping.
Is there any option that I've missed?