Keyfactor Days 2027 – Participez à la conférence « Trust Security » à San Diego Inscrivez-vous dès maintenant !

Débat d'experts : Comprendre les implications des services de certification de l'Active Directory sur la sécurité de l'information. PKI

Ryan Sanders Ryan Sanders Sr. Director, Brand & Creative Strategy
promo banner for Keyfactor and SpecterOps live QA event

L'infrastructure à clé publique (PKI) est une technologie fondamentale pour la plupart des entreprises lorsqu'il s'agit de maintenir la sécurité. Mais c'est aussi une technologie qu'il est trop facile de déployer et d'exécuter en arrière-plan sans se préoccuper des mises à jour ou des améliorations permanentes.

So how do you make sure PKI continues to perform up to evolving standards? And what can go wrong if you don’t take this proactive approach?

That was the premise behind our conversation with Chris Hickman, Keyfactor’s Chief Security Officer, and Will Schroeder and Lee Christensen, technical architects at SpecterOps, an adversary-focused cybersecurity provider that helps defend against advanced attacks.

Most recently, Will and Lee brought light to this concern when they published a new whitepaper based on research they did about Microsoft Active Directory, including a wide gamut of common misconfigurations in Microsoft’s PKI implementation that can be exploited. Here are some of the highlights from our discussion.

Quelles sont les principales conclusions du rapport ?

Lee: Something that really stuck out to us with Active Directory Certificate Services is that it’s very ubiquitous in enterprise networks. But it’s also old and not very well understood. Overall, there’s not a lot of security considerations around it even though it’s used everywhere and is key to authentication and how the network is run. That makes it a ripe target for attackers.

Will: What’s interesting with this research is that, because Active Directory Certificate Services is so expansive and so integrated in Active Directory, it wasn’t just one flaw or one way to escalate. We broke it into a variety of ways that people could steal certificates or maliciously enroll certificates for the purposes of credential theft and machine persistence. We ended up codifying everything into credential theft, domain escalation and domain persistence, which are all very expansive and interesting all in their own right.

Lee: The domain escalation issue has also become very timely recently. At the end of July, there was a lot of news about a new type of NTLM relay attack called PetiPotam. The root vulnerability in that attack is Active Directory’s Certificate Services allowing an unprivileged user to escalate to domain admin rights over the Windows network.

Un autre point important est d'examiner comment un attaquant peut obtenir ou persister dans un réseau en utilisant les services de certificats Active Directory. Un bon exemple est celui de la connexion à un réseau Windows à l'aide de votre nom d'utilisateur et de votre mot de passe. Avec les services de certification Active Directory, vous pouvez vous connecter à l'aide d'un certificat totalement indépendant de votre mot de passe. Mais de nombreux défenseurs du réseau ne sont pas au courant de cette possibilité. Dans ce cas, même s'ils effacent la machine ou réinitialisent le mot de passe d'un utilisateur compromis, si le pirate possède le certificat de cet utilisateur ou de cet ordinateur, il peut toujours se connecter en tant qu'utilisateur ou accéder à cet ordinateur. Il s'agit là d'un angle mort majeur du point de vue de la détection et de la réponse aux incidents dont les défenseurs doivent être conscients.

Quel est l'impact sur ces vulnérabilités du fait que de nombreuses organisations ne se rendent pas nécessairement compte qu'elles utilisent des certificats à de nombreux endroits différents ?

Will: Certificates are everywhere, and if people don’t understand and grasp the security implications, it’s extremely easy to have one bit flipped in one certificate template that compromises the entire network. What we’ve seen is an overall lack of familiarity with Active Directory Certificate Services.

Lee: The other thing to note is that Active Directory Certificate Services came out in 2001, and it’s been chugging along over the years. Since it’s been in organizations for so long, it’s easy for a misconfiguration to happen or for things to be enabled that may cause an insecure configuration. It’s important for teams to do maintenance on it and see how things are looking.

Quels sont les risques liés à cette méconnaissance du programme ?

Chris: What we’ve seen is that people make configuration changes out of necessity. They find a knowledge article about how to do it, and it works; but they don’t fully understand the downstream implications, and these seemingly minor changes impact the trust you put in that infrastructure over time. It opens up a Pandora’s box of vulnerabilities.

Will: We like the term misconfiguration debt. Those small changes made by someone who’s just trying to do their job build up over time. We have a lot of empathy for system administrators, because it’s very easy to accidentally misconfigure these systems in a profound way.

Chris: From my experience, we have to put things in context. Active Directory Certificate Services is a CA. A PKI is an entire infrastructure that involves a CA and many different other things. It’s like having an engine, a steering wheel and four tires — that doesn’t necessarily make it a car. It’s how all those systems work together that give you the confidence to drive at speed.

Beaucoup de gens regardent les services de certification et disent que c'est un bon PKI comme un autre, alors qu'en fait, l'infrastructure complète n'est pas là pour en faire le bon système pour une organisation. Il ne dispose pas de toutes les fonctions de sécurité et de tous les contrôles compensatoires dont vous avez besoin pour reconnaître la dette technique que vous construisez et, plus important encore, la dette de risque qui la sous-tend.

Y a-t-il des tendances que vous observez et qui conduisent à des situations où les services de certificats Active Directory sont négligés ou mal configurés ?

Will: We often find there’s not enough cross-pollination between security teams and the other teams that manage Active Directory, which makes it easy to overlook these issues. Or if organizations have never led a PKI assessment, they might not know what the issues are. 

Lee: Surprisingly lots of vendor documentation has led to these vulnerabilities. Several products have suggested enabling subject alternative name (SAN) settings that can lead to a very insecure state of PKI. It’s complex, and even vendors don’t realize exactly what they need to do. 

Il est également très difficile dans les environnements Active Directory, et dans les grands réseaux en général, de comprendre les implications des changements. Que se passe-t-il si je modifie tel paramètre ou si j'ajoute un utilisateur à tel groupe ? Cela permettra-t-il à quelqu'un d'escalader ses privilèges ? Notre objectif est d'accroître cette visibilité. 

Chris: I agree visibility is a huge part of it. That’s one of the reasons why Keyfactor’s Command platform provides visibility into what certificates are deployed and why they’re deployed, so you can find those anomalies and apply policy consistently across every certificate that’s issued. That way you can catch vulnerabilities or misconfigurations before they become an issue. 

L'autre point que j'ajouterai est que lorsque vous mettez en œuvre quelque chose de gratuit, il est difficile d'expliquer aux dirigeants qu'il y a un coût associé à la gestion de sa complexité à long terme. La plupart des organisations ne sont tout simplement pas équipées pour s'occuper de ce que devient PKI à la fin de la journée.

Si l'on considère les points sur lesquels PKI peut se tromper, y a-t-il quelque chose que vous rencontrez souvent ?

Chris: The biggest mistakes are sometimes the easiest to make. In this case, that’s something like flipping a switch that allows you to put alternate names arbitrarily into certificates. Overall, the research really highlights some of the dangers based on the fact that Active Directory Certificate Services was configured 20 years ago and has not necessarily moved at the same speed or with the same security alacrity as some other products have.

Will: There was one particular misconfiguration that we cover in the report that we called escalation eight. The first seven are issues where people had to misconfigure things post-install. Escalation eight is something that’s stock that we wish Microsoft would fix.

Lee: In that case, there’s an additional server role that is often enabled with Active Directory Certificate Services that allows you to request a certificate using HTTP. 

Si cette option est activée, ce qui est souvent le cas, n'importe qui peut demander un certificat en utilisant le protocole HTTP. Le problème est que ce protocole utilise NTLM pour l'authentification par défaut. Il existe une attaque appelée relais NTLM qui permet aux attaquants d'usurper l'identité d'un utilisateur. Si Will essaie de se connecter à ma machine, je peux me faire passer pour lui, puis me connecter aux services de certification Active Directory et demander un certificat en son nom. Il existe également des outils tels que PetitPotam ou SpoolSample qui me permettent de contraindre un ordinateur arbitraire du réseau à se connecter à moi. Je peux ensuite me faire passer pour ce contrôleur de domaine en utilisant le relais NTLM et demander un certificat aux services de certification d'Active Directory à partir de ce point HTTP. Je peux obtenir ce certificat et me connecter en tant que contrôleur de domaine, ce qui me donne accès aux mots de passe des utilisateurs et à leurs hachages.

Elle peut être utilisée pour compromettre un réseau, en allant d'un privilège faible jusqu'à l'administrateur de la forêt. Il s'agit d'une vulnérabilité que nous voyons constamment dans les environnements.

Ce n'est pas seulement théorique. Vous avez réussi à trouver un compromis en utilisant cette méthodologie ?

Will: That’s right. Vendors and organizations are sometimes hesitant to go through the efforts to fix issues that are regarded as theoretical. This gets into the realm of releasing proof of concepts or offensive tooling, which we try to do ethically, but we found that change doesn’t really come about unless people can see that the attacks are real.

Lee: We’ve used all of the escalation scenarios we identified, and even all of the trade craft that we identified. This is actual stuff that bad guys can do in your network. In response, we came out with a defensive tool set so people can start getting their eyes on this stuff. One of those tools is PSPKIAudit, which can identify these issues with Active Directory Certificate Services. 

We also have a product called Bloodhound that has an open-source version and an enterprise version. We’re actively working to incorporate the detections of these vulnerabilities into that as well so people can get their eyes on it and can fix it in their environments.

Quelles sont vos recommandations aux architectes de PKI pour remédier à ces vulnérabilités ?

Will: Tools like PSPKIAudit will enumerate the misconfigurations we know about and then allow you to try to fix them, but keep in mind there’s no just “fix this one thing.” You have to understand what settings are there and why they’re being used so you don’t break existing functionality. 

En outre, il est important d'envisager les services de certificats du point de vue de la sécurité de la réponse instantanée, c'est-à-dire que si quelqu'un compromet un compte ou un système, avez-vous un moyen d'identifier les certificats émis par cet utilisateur ? C'est un problème auquel il est très difficile de répondre pour de nombreuses organisations, car la mise en œuvre des services de certificats Active Directory ne dispose pas de fonctions de gestion vraiment efficaces.

Chris: The other thing to note is that it’s really hard in PKI to go back once you establish trust. If you have certificates out there with arbitrary SANs and no way to find and revoke them, you could turn the configuration setting around, but that doesn’t necessarily remediate the issues. It’s difficult to put the horses back in the proverbial barn.

Vous souhaitez en savoir plus sur les vulnérabilités des services de certificats Active Directory et sur ce que votre organisation peut faire pour y remédier ? Cliquez ici pour regarder l'intégralité de la discussion avec Chris, Will et Lee.

S'abonner à La Source

Stay secure with Keyfactor's monthly newsletter, packed with expert insights and practical steps for quantum-readiness.

Lire la suite

Digital transformation concept. System engineering. Binary code. Programming.
PKI

Migrer vers Microsoft Azure ? Pourquoi un site PKI moderne est essentiel pour réussir

En savoir plus
CMMC Compliance Maturity Levels
Tendances de l'industrie

Conformité avec le CMMC : Ce qu'il faut savoir

En savoir plus
Hybrid and multi-cloud PKI
Cloud

L'avenir de PKI: Cloud et SaaS

En savoir plus