Podiumsdiskussion: Verständnis der Auswirkungen von Active Directory-Zertifikatsdiensten auf PKI
Die Public Key Infrastructure (PKI) ist für die meisten Unternehmen eine grundlegende Technologie, wenn es um die Aufrechterhaltung der Sicherheit geht. Aber es ist auch eine Technologie, die nur allzu leicht eingesetzt und im Hintergrund ausgeführt wird, ohne dass man sich Gedanken über Updates oder laufende Verbesserungen macht.
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.
Was sind einige Ihrer wichtigsten Erkenntnisse aus dem Bericht?
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.
Ein weiterer wichtiger Punkt ist die Frage, wie sich ein Angreifer mithilfe von Active Directory-Zertifikatsdiensten Zugang zu einem Netzwerk verschaffen oder darin verbleiben kann. Ein gutes Beispiel hierfür ist die Anmeldung in einem Windows-Netzwerk mit Ihrem Benutzernamen und Kennwort. Mit den Active Directory-Zertifikatsdiensten können Sie sich nun mit einem Zertifikat anmelden, das von Ihrem Kennwort völlig unabhängig ist. Aber viele Netzwerkschützer wissen das nicht. In diesem Fall kann sich der Angreifer, selbst wenn er den Computer löscht oder das Kennwort eines kompromittierten Benutzers zurücksetzt, immer noch als dieser Benutzer anmelden oder auf den Computer zugreifen, wenn er über das Zertifikat dieses Benutzers oder dieses Computers verfügt. Dies ist ein großer blinder Fleck auf der Seite der Erkennung und der Reaktion auf Vorfälle, dessen sich die Verteidiger bewusst sein müssen.
Wie wirkt sich die Tatsache, dass viele Unternehmen nicht unbedingt wissen, dass sie Zertifikate an so vielen verschiedenen Stellen verwenden, auf diese Schwachstellen aus?
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.
Welche Risiken sind mit der mangelnden Vertrautheit mit dem Programm verbunden?
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.
Viele Leute sehen sich die Zertifikatsdienste an und sagen, dass sie so gut wie jede andere PKI sind, obwohl die gesamte Infrastruktur nicht vorhanden ist, um sie zum richtigen System für eine Organisation zu machen. Es verfügt nicht über alle Sicherheitsfunktionen und kompensierenden Kontrollen, die man braucht, um die technischen Schulden zu erkennen, die man aufbaut, und, was noch wichtiger ist, die Risikoschulden, die dahinter stehen.
Gibt es Trends, die Sie beobachten, die zu solchen Situationen führen, in denen Active Directory-Zertifikatsdienste übersehen oder falsch konfiguriert werden?
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.
Außerdem ist es in Active Directory-Umgebungen und großen Netzwerken im Allgemeinen sehr schwierig, die Auswirkungen von Änderungen zu verstehen. Was passiert, wenn ich diese eine Einstellung ändere oder einen Benutzer zu dieser einen Gruppe hinzufüge? Wird das jemandem erlauben, seine Privilegien zu erweitern? Unser Ziel ist es, diese Transparenz zu erhöhen.
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.
Ein weiterer Punkt, den ich hinzufügen möchte, ist, dass es schwierig ist, den Führungskräften zu erklären, dass die langfristige Verwaltung der Komplexität mit Kosten verbunden ist, wenn man etwas kostenlos implementiert. Die meisten Organisationen sind einfach nicht in der Lage, sich um das zu kümmern, was PKI am Ende des Tages wird.
Gibt es etwas, was bei einer PKI schief gehen kann und was Ihnen häufig begegnet?
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.
Wenn dies aktiviert ist, was häufig der Fall ist, kann jeder ein Zertifikat über das HTTP-Protokoll anfordern. Das Problem dabei ist, dass es standardmäßig NTLM für die Authentifizierung verwendet. Es gibt einen Angriff namens NTLM-Relay, der es Angreifern ermöglicht, sich als Benutzer auszugeben. Wenn Will versucht, eine Verbindung zu meinem Rechner herzustellen, kann ich mich als Will ausgeben und dann eine Verbindung zu den Active Directory-Zertifikatsdiensten herstellen und ein Zertifikat als er anfordern. Oder es gibt Tools wie PetitPotam oder SpoolSample, mit denen ich einen beliebigen Computer im Netzwerk dazu zwingen kann, eine Verbindung zu mir herzustellen. Dann kann ich mich mit Hilfe von NTLM-Relay als dieser Domänencontroller ausgeben und von diesem HTTP-Eingangspunkt aus ein Zertifikat von Active Directory Certificate Services anfordern. Ich kann dieses Zertifikat erhalten und mich dann als Domänencontroller anmelden, wodurch ich Zugriff auf die Kennwörter der Benutzer und ihre Hashes erhalte.
Dies kann dazu genutzt werden, ein Netzwerk zu kompromittieren, indem man von niedrigen Privilegien bis hin zum Waldadministrator vorstößt. Es ist eine Schwachstelle, die wir immer wieder in Umgebungen sehen.
Das ist nicht nur theoretisch. Konnten Sie mit dieser Methode einen Kompromiss erzielen?
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.
Welche Empfehlungen haben Sie für PKI-Architekten, um diese Schwachstellen zu beheben?
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.
Das heißt, wenn jemand ein Konto oder ein System kompromittiert, können Sie dann feststellen, welche Zertifikate von diesem Benutzer ausgestellt wurden? Das ist für viele Unternehmen ein sehr schwer zu lösendes Problem, da die Implementierung der Active Directory-Zertifikatsdienste keine wirklich guten Verwaltungsfunktionen bietet.
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.
Möchten Sie mehr über die Schwachstellen in Active Directory-Zertifikatsdiensten erfahren und was Ihr Unternehmen dagegen tun kann? Klicken Sie hier, um sich die vollständige Podiumsdiskussion mit Chris, Will und Lee anzusehen.
Die Quelle abonnieren
Stay secure with Keyfactor's monthly newsletter, packed with expert insights and practical steps for quantum-readiness.