relaying-ntlm-for-adcs-esc8
Was er macht
Dieses Tool ermöglicht es einem Angreifer, ein Computerzertifikat von einem Domain Controller zu erhalten. Mit diesem Zertifikat lässt sich anschließend die vollständige Kontrolle über das Netzwerk erlangen.
Wann du ihn nutzt
- ✓Bei einem Penetrationstest eines Firmennetzwerks.
- ✓Um zu prüfen, ob Abwehrmaßnahmen gegen Zertifikatsangriffe funktionieren.
- ✓In Trainingsübungen, um echte Angriffe zu simulieren.
Link zum Skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/relaying-ntlm-for-adcs-esc8/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Wie kann ich ein Domain-Controller-Zertifikat bekommen, um das Netzwerk zu übernehmen?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Das Tool bringt einen Domain Controller dazu, sich bei einem vom Angreifer kontrollierten Server zu authentifizieren. Diese Authentifizierung nutzt es dann, um ein Zertifikat für den Domain Controller anzufordern. So erhält der Angreifer letztlich vollen Zugriff.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Relaying NTLM for ADCS ESC8
Legal Notice: This skill is for authorized penetration testing, red-team engagements, and educational purposes only. Coercing authentication and relaying credentials against systems you do not own or lack explicit written authorization to test is illegal. Operate strictly within a signed rules-of-engagement; ESC8 coercion can affect production domain controllers.
Overview
ESC8 is one of the Active Directory Certificate Services (AD CS) escalation paths catalogued by SpecterOps in "Certified Pre-Owned." It abuses the AD CS HTTP web-enrollment endpoint (/certsrv/), which by default supports NTLM authentication and, critically, does not enforce HTTPS channel binding or Extended Protection for Authentication (EPA). Because NTLM over HTTP on that endpoint is unprotected, an attacker can coerce a privileged machine account (typically a domain controller) into authenticating to an attacker-controlled host, then relay that NTLM authentication to the CA's web-enrollment page and request a certificate as the coerced machine.
When the relayed victim is a domain controller, the attacker obtains a certificate for the DC's machine account (DC01$). That certificate can then be used for Kerberos PKINIT to request a TGT as the DC, recover the DC's NT hash, and ultimately perform DCSync — a full domain compromise. This maps to MITRE ATT&CK T1557.001 (Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay), extended here to NTLM relay against an HTTP enrollment service.
The standard toolchain is Impacket's ntlmrelayx.py (the relay engine, with --adcs mode), a coercion tool (PetitPotam, Coercer, printerbug.py/dementor), and Certipy for enumeration and for turning the captured certificate into a TGT / NT hash.
When to Use
- During an internal AD penetration test where AD CS with the HTTP Web Enrollment role is present and EPA is not enforced.
- When you have a foothold (even an unauthenticated network position with a coercion vector) and want a path to Domain Admin via certificate impersonation.
- When validating that the organization has mitigated ESC8 (EPA enabled, HTTP enrollment disabled, RPC/EFSRPC coercion patched).
- During purple-team exercises to test detection of coercion + relay + anomalous certificate enrollment.
Prerequisites
- A network position that can reach the CA web-enrollment endpoint and a coercion vector to the target DC.
- The CA hostname and an enrollable template that yields client-auth EKU (e.g.,
DomainController,Machine). - Tooling (install from official upstreams):
# Impacket (provides ntlmrelayx.py / impacket-ntlmrelayx)
pipx install impacket
# Certipy (AD CS enumeration + abuse)
pipx install certipy-ad
# Coercion tools
git clone https://github.com/topotam/PetitPotam.git
pipx install coercer # https://github.com/p0dalirius/Coercer
# printerbug.py ships with Impacket examples (MS-RPRN)
Objectives
- Enumerate AD CS to confirm an ESC8-vulnerable web-enrollment endpoint.
- Stand up
ntlmrelayxin--adcsmode targeting the CA enrollment URL. - Coerce a domain controller to authenticate to the relay (PetitPotam/Coercer/printerbug).
- Capture the base64 certificate issued for the DC machine account.
- Use Certipy to convert the certificate into a TGT and recover the DC NT hash.
- Validate domain compromise (DCSync) and document mitigations.
MITRE ATT&CK Mapping
| Technique ID | Name | Tactic | Relevance |
|---|---|---|---|
| T1557.001 | Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay | Credential Access / Collection | The core ESC8 primitive relays coerced NTLM authentication to the AD CS HTTP endpoint. |
| T1187 | Forced Authentication | Credential Access | PetitPotam/printerbug coerce the DC to authenticate to the attacker. |
| T1649 | Steal or Forge Authentication Certificates | Credential Access | The attack yields a certificate for the DC machine account used for PKINIT. |
| T1003.006 | OS Credential Dumping: DCSync | Credential Access | The recovered DC identity enables DCSync for full domain compromise. |
Workflow
1. Enumerate AD CS for ESC8
Use Certipy to find enabled, vulnerable templates and confirm a web-enrollment endpoint:
certipy find -u attacker@corp.local -p 'Password123!' -dc-ip 10.0.0.10 -vulnerable -enabled -stdout
…
Häufige Fragen
Was bedeutet „Coercion“ in diesem Zusammenhang?
Coercion bedeutet, einen Computer dazu zu bringen, sich mit einem Server zu verbinden, den du kontrollierst. Dabei werden seine Anmeldedaten übertragen.
Was ist „Relay“?
Relay bedeutet, die Authentifizierung, die du von einem Computer erhalten hast, für die Anmeldung bei einem anderen Dienst zu nutzen, als wärst du dieser Computer.
Warum ist das gefährlich?
Damit kann sich ein Angreifer als Domain Controller ausgeben. Das bedeutet in der Regel die volle Kontrolle über das gesamte Firmennetzwerk.
Details
Originalbeschreibung des Autors
Uses Impacket's ntlmrelayx.py with a coercion tool (PetitPotam, Coercer, printerbug) to relay NTLM authentication from a coerced domain controller into the AD CS HTTP web-enrollment endpoint (ESC8), obtaining a DC certificate usable via Certipy for PKINIT/DCSync. Use during internal AD penetration tests or purple-team exercises when AD CS Web Enrollment lacks Extended Protection for Authentication
Beliebtheit
- GitHub-Sterne
- 35k
- Platz im Ranking
- #8348
- Lizenz
- Apache-2.0
- Aktualisiert
- 31.8.2026
Kommentare
- …
Weitere Skills aus diesem Repository
abusing-dpapi-for-credential-access
35kGibt deinem KI-Agenten fertige Anweisungen für eine bestimmte Aufgabe, damit er sie besser und schneller erledigt.
abusing-shadow-credentials-for-privesc
35kBringt deinem KI-Agenten bei, klare und gut strukturierte Texte zu schreiben.
achieving-cmmc-level-2-compliance
35kHilft deinem Agenten, eine Umgebung für CMMC-Level-2-Konformität vorzubereiten. Setzt Sicherheitsanforderungen um und verwaltet nötige Dokumentation.
acquiring-disk-image-with-dd-and-dcfldd
35kHilft deinem Agenten, exakte Festplattenkopien zu erstellen. Wichtig, damit bei Ermittlungen keine Informationen verloren gehen oder verändert werden.
Ähnliche Skills
add-model-provider
394kLässt deinen Agenten einen neuen KI-Modellanbieter mit sicheren Befehlen an OpenClaw anbinden, API-Schlüssel nicht im Klartext speichern und einen Live-Test starten.
acp-router
394kHilft deinem Agenten, eine Aufgabe über OpenClaw an einen Coding-Assistenten wie Claude Code oder Cursor zu senden, damit die Arbeit in diesem Tool läuft.
browser-automation
394kBringt deinem Agenten bei, Webseiten Schritt für Schritt zu steuern, einschließlich Anmeldungen, Tabs und Wiederherstellung, wenn eine Seite nicht mehr reagiert.