3 ms·
There's a larger risk that if someone breaches a system with a wildcard cert, then you can end up with them being able to impersonate _every_ part of your domai
by qmarchi 2y ago
There's a larger risk that if someone breaches a system with a wildcard cert, then you can end up with them being able to impersonate _every_ part of your domain, not just the one application.
- politelemon 2y agoIt's the opposite - there is a risk, but not a larger risk. Environment traversal is easier through a certificate transparency log, there is almost zero work to do. Through a wildcard compromise, the environment is not immediately visible. It's much safer to do wildcard for certs for internal use.
- ixfo 2y agoEnvironment visibility is easy to get. If you pwn a box which has foo.internal, you can now impersonate foo.internal. If you pwn a box which has *.internal, you can now impersonate super-secret.internal and everything else, and now you're a DNS change away from MITM across an entire estate. Security by obscurity while making the actual security of endpoints weaker is not an argument in favour of wildcards...
- eru 2y agoCan't you have a limited wildcard? Something like *.for-testing-only.company.com?
- kevincox 2y agoYes, but then you are putting more information into the publically logged certificate. So it is a tradeoff between scope of certificate and data leak. I guess you can use a pattern like {human name}.{random}.internal but then you lose memoribility.
- 8organicbits 2y agoI've considered building tools to manage decoy certificates, like it would register mail.example.com if you didn't have a mail server, but I couldn't justify polluting the cert transparency logs.
- lacerrr 2y agoMade up problem, that approach is fine.
- qwertox 2y agoI issue a wildcard cert for *.something.example.com. All subdomains which are meant for public consumption are at the first level, like www.example.com or blog.example.com, and the ones I use internally (or even privately accessible on the internet, like xmpp.something.example.com) are not up for discovery, as no public records exist. Everything at *.something.example.com, if it is supposed to be privately accessible on the internet, is resolved by a custom DNS server which does not respond to `ANY`-requests and logs every request. You'd need to know which subdomains exist. something.example.com has an `NS`-record entry with the domain name which points to the IP of that custom DNS server (ns.example.com). The intranet also has a custom DNS server which then serves the IPs of the subdomains which are only meant for internal consumption.
- brewmarche 2y agoThis is the DNS setup I’d have in mind as well. Regarding the certificates, if you don’t want to set up stuff on clients manually, the only drawback is the use of a wildcard certificate (which when compromised can be used to hijack everything under something.example.com). An intermediate CA with name constraints (can only sign certificates with names under something.example.com) sounds like a better solution if you deem the wildcard certificate too risky. Not sure which CA can issue it (letsencrypt is probably out) and how well supported it is
- qwertox 2y agoI'm "ok" with that risk. It's less risky than other solutions, and there's also the issue that hijacked.something.example.com needs to be resolved by the internal DNS server. All of this would most likely need to be an inside job with some relatively big criminal energy. At that level you'd probably also have other attack vectors which you could consider.
- Helmut10001 2y agoThis is also my thinking.. if someone compromises your VM that is responsible for retrieving wildcard certs from let's encrypt, then you're probably busted anyway. Such a machine would usually sit at the center of infrastructure, with limited need to be connected to from other machines.