Podcast
Root Causes 104: 21 PKI Pitfalls to Avoid
Hosted by
Jason Soroko
Fellow
Original broadcast date
July 6, 2020
Our hosts often discuss the idea of errors in PKI implementations and the potential negative consequences for organizations. In this episode they categorize twenty-one PKI pitfalls to avoid according to five main categories of error: certificate problems, deployment problems, systemic security problems, governance problems, and visibility problems. Join us for a crisp description of these twenty-one pitfalls so you can be on the lookout for them.
Podcast transcript
Lightly edited for flow and brevity.
TCTim CallanSo, we have a real interesting topic today. Twenty-one – we didn't think it would be this many – but 21 PKI pitfalls to avoid.
TCTim CallanAnd you know what? We say this a lot. We say, "hey, don’t make rookie mistakes." Don't make it be PKI amateur hour, but a listener pointed out to me that we don't explain what those mistakes are. So, we are like, hey, let's do that. So, you and I made a list. As I said, it is 21 items long. Don't freak out listeners. A lot of them are related to each other and then we broke them into five main categories. So, what if we list off the categories first so people have a roadmap for where we are going and then we'll jump into it.
TCTim CallanAlright. So, the first category is certificate problems, which is problems with the actual certificates you issue. The second one is deployment problems. Problems with the way that you deploy those certificates. The third one is security problems. Problems with the overall security of the system. Fourth is governance problems. Problems with how you set your rules and compliance and things. Lastly, we have visibility problems. Problems where you can't see and understand what's going on and how that gets you in trouble. So, with that, certificate problems. Number one, weak keys.
TCTim CallanYeah.
TCTim CallanDo you think is there a sense of somebody deliberately trying to choose smaller keys because they think that there is a performance requirement to do so or there's a performance benefit to do so?
TCTim CallanSure. Sure. That's a great way to that. Alright. So, number two of certificate problems. Certificates where the term is too long. Certificates that basically are sticking around longer than really, they should be.
TCTim CallanRight.
TCTim CallanOr double it just to be safe. Make it a 30-year cert. Right. Exactly.
TCTim CallanWell public trust is of course regulated. What's happened in the world of public trust is there's been this push/pull dynamic about the length of certificates. So, if you go all the way back to the beginning, they were one-month – SSL certs were one-year long. They were all just one year. That's all there was and then people started to say well what about a longer cert and how about two years, three years and they got up to the point where you could like a ten-year SSL cert, which I think definitely is excessive and that's a lot of what the CA/Browser Forum has done is it's provided a venue for the industry to work on standards like that and what we've seen is the acceptable duration of certs has gotten shorter and shorter and shorter and shorter. It's down to one year now for us to sell coming up in just a couple months and could get shorter still. And, so, that's an important part of this whole thing obviously. In the case of public certs, you're capped. You can only buy what's allowed but you could also imagine the same questions occurring for your private TLS certs. So if I'm running these certs in my own system I might ask myself, well gee, do I really feel ok issuing a five-year certificate when in the public world they've brought it down to much, much, much less than that.
TCTim CallanAnd of course, one of the consequences of that is crypto agility which is a theme we hit over and repeatedly and with that let's move onto the next one, which is outdated cryptographic algorithms and a great example of that would be SHA-1.
TCTim CallanRight.
TCTim CallanYeah. If I don't know enough to answer that question maybe I should learn a little more or get someone onto the project who does, right? Number four for certificate problems – stapling.
TCTim CallanYeah.
TCTim CallanYeah. And stapling obviously, there are people who do it and it has its proponents, but it leaves you in a very severe crypto agility deficit. Right? And if you need to respond quickly to events it really hurts your ability to do that. So, it's definitely – is it an always no-no? Maybe not but it certainly is a dangerous practice, and you have to know what you are doing.
TCTim CallanOk. So, moving on. Deployment problems. The first three of these are going to be very similar to each other, so I'll start with the first one. Reuse of the same certificate across multiple servers, devices, etc. So we see this all the time.
TCTim CallanRight.
TCTim CallanYeah. Agreed. Absolutely. And why do people do it? Well, I think number one is they just want to save some money and number two is I think they want to save some effort. It's easier. You can be more intellectually lazy and get away with it.
TCTim CallanYeah. And course, as I just said, the key is if you can get away with it. The problem with that practice, of course, is that if one cert is bad, they all are bad. And with that let's return to number six on the list, which is overextension of the use of wildcards. So, we know wildcards are very useful for being able to handle multiple domains on a single server on a single cluster. We do see people trying to just paint their entire install with one wildcard. Right?
TCTim CallanRight. And that's the same thing as using the same cert. It's sort of an anything fails; everything fails kind of scenario. You've got the same thing with overuse of the wildcard. So real anecdote, we all remember we've done podcasts in the past where we talked about revocation and forced revocation and the rules revocation and malware and things like that. So as a standard practice we get reports of phishing sites and we confirm that they are really phishing sites and if they are, we revoke the cert because that's against our CPS. And it's against our EULA right? And so, at one time in the past we got a report of a phishing site. We checked it out. Yep, indeed, it's a phishing site. We revoked the cert and then next thing you know somebody is complaining to us on Twitter and they are some hosters. It's not like one of the big names you know but it's some hosting company and they say, "Hey Sectigo, you just took down 300 customers or something of mine." And the response to that is why are you sticking 300 of your customers who control their own content and who put up their own content who know nothing about each other on the same wildcard? Cause as soon as you do that if one of them needs to be revoked or if one of them has a problem, they all go down. It's an inaccessible fragile system.
TCTim CallanAlright. So, then the same thing, overuse of multi-domain certificates. You basically do the same thing, but you use the SAN field to stuff too much in your certificates and you find yourself in the exact same situation.
TCTim CallanAnd then you say, is that really safe. Right? Number eight. Failure to automate certificate renewal. We talked about this gee, like 50% of our episodes.
TCTim CallanExactly. To learn more, listen to just about any episode of this podcast.
TCTim CallanNumber nine. Maintaining – what do I want to say? Unnecessary private CAs. Unnecessary redundant private CAs. So how this goes is somebody thinks they need a CA and they stand up a CA and then at another time another individual at a different place in the organization thinks they need a CA and they stand up a CA instead of using the CA the company already has and you wind up with different private CAs sitting out there and they all need to maintain and they all need to be monitored and the same machines don't necessarily have trust to the same CAs if the root didn't get installed and it just makes things more fragile and it adds work for no good reason.
TCTim CallanRight. Yeah.
TCTim CallanI love it Jay. So maybe it's not maintaining the right CAs to reflect your organizational needs, right?
TCTim CallanCool. And then ten is very similar to nine. Unnecessarily maintaining Microsoft CA. So once upon a time Microsoft CA was kind of the only game in town in a private CA and didn't matter because it worked for all your Windows machines and as you and I have talked it is a rare enterprise now that can get all their private CA needs handled with Microsoft CA and yet we see people then thinking ok, I'm gonna have two. I'm gonna have a Microsoft CA for the Windows stack and I'm gonna have a private CA for everything else and under those circumstances it may be that that Windows CA, that Microsoft CA is not necessary and that you could just be using one for your full set of machines.
TCTim CallanYeah. And moving away also is very practical. So, the other reason you might be maintaining an unnecessary Microsoft CA is because you did earlier. Right? It's been around. It's entrenched and we do this with clients all the time. Like you really ought to be able to pull that stuff off and stick it on your private CA and it's not that big of a deal and it certainly isn't a technical barrier.
Alright. Security problems. So don't worry, there's only two of these. We are up to number 11. Number 11, not properly protecting your private keys.
Alright. Security problems. So don't worry, there's only two of these. We are up to number 11. Number 11, not properly protecting your private keys.
TCTim CallanYeah.
TCTim CallanCool. Number 12 – failure to apply patches and respond to zero days. So one of the problems of running your own CA, your own PKI is that you are not necessarily fully focused on responding to things in real time as they need to be responded to. You know, people have day jobs. People have vacations. People have things like that and as a result there can be gaps. There can be a lag or there could be things that just plain get missed and that itself can introduce vulnerabilities.
TCTim CallanRight. And that you do patch your stuff and you know what you need to patch. Find out what patches you need and get them.
Alright. Governance problems. Number 13. So just at a high level, number 13 is lack of governance at all. Lack of a policy. So, it's the Wild West. People just get to do whatever they want and there's no rules and there's no guidance.
Alright. Governance problems. Number 13. So just at a high level, number 13 is lack of governance at all. Lack of a policy. So, it's the Wild West. People just get to do whatever they want and there's no rules and there's no guidance.
TCTim CallanSure. Great example.
TCTim CallanIt doesn't even know it exists. And also, and I would say this is still true today, Jay. Certainly, it's been true in the years leading up to now is in the world of IoT. No governance. No real rules. Right? An individual product team just kind of makes a choice and nobody knows what choice they are making. There are no guidelines on what choice to make and there's no consistency. Other people might make a different choice and that's just how it gets done.
TCTim CallanYeah. They just do something, and they don't necessarily even report on what they did. They might not document it, etc.
Alright. So, number 14 – Certificate practices or shall I say CPS problems. So, there are a variety of ways that your CPS can be bad.
Alright. So, number 14 – Certificate practices or shall I say CPS problems. So, there are a variety of ways that your CPS can be bad.
TCTim CallanIt probably is, right. We could rattle a few off. It's writing it badly. It's just taking somebody else's CPS and universally replacing the name and crossing your fingers in hope. Yeah.
TCTim CallanThere you go. I love it. I love it. Number 15 – Failure to do revocation checking.
TCTim CallanYes.
TCTim CallanYeah.
TCTim CallanYeah, but unless it's a mighty short certificate life span like a couple of hours you talked about earlier, probably still there are scenarios where you need to be able to revoke a cert. What really matters is that you need to be able to revoke a cert.
Alright, number 16. Sixteen and 17 I'm gonna go together cause they're flips of the same thing. Which is, choosing public certs when private would serve you better or choose private certs when public would serve you better. So thoughts on that Jason?
Alright, number 16. Sixteen and 17 I'm gonna go together cause they're flips of the same thing. Which is, choosing public certs when private would serve you better or choose private certs when public would serve you better. So thoughts on that Jason?
TCTim CallanYeah. And the private certs give you more control and more flexibility and more visibility in that scenario, so you are better off. And yet on the opposite, right, you could imagine if your walled garden isn't fully walled, isn't as walled as you think it is and you want to give access to other parties or you want to be part of a larger ecosystem where attempting to do what you just went down might get you in a situation where other people have accessibility problems or where there are compatibility problems with other systems and in that scenario you might just say go full on public and you won't have that problem.
TCTim CallanRight. Cause there is no way they are all gonna get it right. Absolutely zero chance of all of them getting it right.
TCTim CallanSo that's a good thing to think about. Right? And people don't really think about that that deeply. They just kind of pick something and maybe later it hurts them.
Alright. Visibility problems. We are up to number 18. We are almost there, folks. Don’t despair.
Eighteen – allowing rogue certificates to operate in your environment without taking them under management.
Alright. Visibility problems. We are up to number 18. We are almost there, folks. Don’t despair.
Eighteen – allowing rogue certificates to operate in your environment without taking them under management.
TCTim CallanGo.
TCTim CallanRight.
TCTim CallanRight.
TCTim CallanCorrect. And so, what are your responses to that? I think it's two things. Number one is this is where CAA can be really useful. Like in the world of SSL certs, which is a big part of this, you put CAA in place. You put some parameters around what can be done and when some yay-hoo just tries to go out and buy a cert and stick it on then maybe they can't. Right. And then they will say hey I can't get this cert issued and it'll send them to you, and you know what they are doing.
The second one that's more universal and helpful in this regard is certificate discovery. You go out. You crawl your network. You find the certs. Now you know what they are. Now you don't get surprised by expirations or certificate problems like we had in the first one or lack of automated renewal like we had in the second section. Like all that stuff gets easier and more addressable once you know what those things are.
The second one that's more universal and helpful in this regard is certificate discovery. You go out. You crawl your network. You find the certs. Now you know what they are. Now you don't get surprised by expirations or certificate problems like we had in the first one or lack of automated renewal like we had in the second section. Like all that stuff gets easier and more addressable once you know what those things are.
TCTim CallanGot it. Number 19. This will be really quick; is same thing but for a CA. So allowing rogue CAs to operate in your environment. And I think we touched on that. So there's the certs – where people issue certs or buy certs and stick them up and there's the CAs where people stick up an entire CA, like in the DevOps scenario. And any other case allowing those to operate on their own without governance is fraught with risk.
TCTim CallanRight. And should be sandboxed and all that.
TCTim CallanAlright. Number 20 – Future use case planning. You already touched on this one, Jay, which is we see a lot of people kind of making the decision that's gonna get them through the end of the day rather than saying what is my business going to look like in a year or in five years and making the decisions that will enable that.
TCTim CallanAnd granted, you can't, you know, who is it who said predictions are hard especially when they are about the future. That was Yogi Berra, I think. So granted you can't know everything that's going to happen, but you can at least think it through and at least account for the likely outcomes.
TCTim CallanAnd then number 21 is staying current on cryptography, which of course becomes very important now that we are looking at the coming advent of quantum safe, post quantum cryptography. So, to be able to say I know what's happening with crypto, I know what's needed and I'm prepared to adjust as it needs to adjust is very important and people who aren't doing that it's gonna be a lot of jeopardy if you are not doing that.
TCTim CallanAlright. Well, that's it, folks. A super-fast 21 PKI pitfalls to avoid. We have gone into depth on some of these in the past. We will go into depth on more of these in the future. But there's your nice handy list for you. So, Jason?
TCTim CallanThanks. Thank you, listeners. This has been Root Causes.