exploiting-adcs-with-certipy
Ce qu’il fait
Cet outil aide à repérer et à exploiter des failles de sécurité dans un système appelé Active Directory Certificate Services (AD CS). Il permet à des attaquants disposant d'un accès limité à un système de devenir administrateurs à part entière.
Quand l’utiliser
- ✓Lors de tests de sécurité autorisés sur des réseaux d'entreprise.
- ✓Lorsque vous disposez d'un accès limité et souhaitez devenir administrateur.
- ✓Pour vérifier que les paramètres de sécurité des certificats sont corrects.
Lien du skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-adcs-with-certipy/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Repère les failles de sécurité dans AD CS et explique-moi comment devenir administrateur.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'outil recherche des erreurs de configuration dans AD CS qui permettent de créer de faux certificats. Grâce à ces certificats, il est possible de se faire passer pour des utilisateurs à privilèges élevés, comme des administrateurs, sans avoir besoin de leur mot de passe.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Exploiting AD CS with Certipy
Legal Notice: This skill is for authorized security testing and educational purposes only. Active Directory Certificate Services attacks can result in full domain compromise. Run these techniques only against systems you own or have explicit written authorization to test. Unauthorized use is illegal under computer fraud statutes.
Overview
Active Directory Certificate Services (AD CS) is Microsoft's public-key infrastructure role used to issue certificates for authentication, encryption, and signing inside a Windows domain. SpecterOps researchers Will Schroeder and Lee Christensen documented a family of privilege-escalation primitives in their 2021 whitepaper Certified Pre-Owned, naming them ESC1 through ESC8. The community has since extended the catalog through ESC16. Because a certificate that maps to a privileged principal can be used for PKINIT Kerberos authentication, an attacker who obtains such a certificate can authenticate as a Domain Admin or Domain Controller without ever knowing the password — and the certificate remains valid even after a password reset.
Certipy (package certipy-ad, maintained by Oliver Lyak / ly4k) is the de-facto offensive toolkit for AD CS. It is a pure-Python tool that enumerates certificate authorities and templates over LDAP/RPC, requests and forges certificates, performs PKINIT/Schannel authentication, runs Shadow Credentials attacks, and relays coerced NTLM authentication into AD CS HTTP and RPC enrollment endpoints. Certipy supports detection and exploitation across the full ESC1-ESC16 range, making it the primary tool for AD CS assessment. Source: ly4k/Certipy and SpecterOps "Certified Pre-Owned".
When to Use
- During internal penetration tests and red-team engagements where AD CS is in scope
- When a low-privileged domain foothold needs a path to Domain Admin / Domain Controller
- To validate that certificate template ACLs and CA configuration are hardened
- When testing detection coverage for certificate-based privilege escalation
- During purple-team exercises to generate ESC1/ESC8 telemetry for blue-team tuning
Prerequisites
- Authorized engagement scope that explicitly includes AD CS exploitation
- A foothold: valid domain credentials (password, NT hash, or Kerberos ticket) for any low-privileged user
- Network reachability to a Domain Controller (LDAP/389, LDAPS/636) and the CA host
- Python 3.10+ (Certipy 5.x requires Python 3.12+) and a Linux attack host
- Install Certipy:
# Recommended isolated install pipx install certipy-ad # Or with pip pip install certipy-ad # Verify certipy --version - For ESC8 relay you also need a coercion tool (Coercer/PetitPotam) and reachable victim machine accounts
Objectives
- Enumerate every CA, template, and enrollment endpoint in the forest
- Identify which ESC1-ESC16 misconfigurations are exploitable from the current principal
- Request a certificate impersonating a privileged target (ESC1 SAN abuse)
- Relay coerced authentication into AD CS web enrollment to obtain a DC certificate (ESC8)
- Authenticate with a forged/issued certificate to recover a TGT and NT hash
- Document each finding with evidence and remediation guidance
MITRE ATT&CK Mapping
| ID | Technique | Application in this skill |
|---|---|---|
| T1649 | Steal or Forge Authentication Certificates | Requesting, forging, and abusing AD CS certificates (ESC1-ESC16) to authenticate as privileged principals |
Workflow
Step 1: Enumerate AD CS with certipy find
Collect CA and template configuration and flag vulnerable templates. find runs LDAP and RPC queries and produces JSON, a BloodHound-compatible ZIP, and a human-readable text report.
# Full enumeration, only enabled templates, hide built-in admin ACEs
certipy find \
-u 'attacker@corp.local' -p 'Passw0rd!' \
-dc-ip 10.0.0.100 -text -enabled -hide-admins
# Output only templates Certipy considers vulnerable
certipy find \
-u 'attacker@corp.local' -p 'Passw0rd!' \
-dc-ip 10.0.0.100 -vulnerable -stdout
# Authenticate with an NT hash instead of a password
certipy find -u 'attacker@corp.local' -hashes ':fc525c9683e8fe067095ba2ddc971889' \
-dc-ip 10.0.0.100 -vulnerable -stdout
…
Questions fréquentes
Qu'est-ce qu'Active Directory Certificate Services (AD CS) ?
C'est un service Microsoft qui délivre des certificats numériques pour l'authentification et la sécurité au sein des réseaux Windows.
Que sont les failles ESC1 à ESC16 ?
Ce sont des types précis d'erreurs de configuration dans AD CS qui peuvent être exploités pour obtenir des privilèges supérieurs.
Ai-je besoin d'une autorisation pour utiliser cet outil ?
Oui, cet outil doit être utilisé uniquement dans le cadre de tests de sécurité autorisés, avec une autorisation écrite explicite.
Détails
Description originale de l’auteur
Use Certipy to enumerate AD CS certificate authorities and templates over LDAP/RPC, then exploit ESC1-ESC16 misconfigurations - SAN abuse, NTLM relay to web enrollment (ESC8), Shadow Credentials, golden certificate forgery, and PKINIT/Schannel auth. Use during authorized penetration tests to escalate a domain foothold to Domain Admin, or to validate that certificate template ACLs and CA hardening
Popularité
- Étoiles GitHub
- 35k
- Position au classement
- #7899
- Licence
- Apache-2.0
- Mis à jour
- 31/08/2026
Commentaires
- …
Autres skills de ce dépôt
abusing-dpapi-for-credential-access
35kFournit à votre agent IA des instructions prêtes à l'emploi pour une tâche précise, afin qu'il la réalise mieux et plus vite.
abusing-shadow-credentials-for-privesc
35kApprend à votre agent IA à écrire des textes clairs et bien structurés.
achieving-cmmc-level-2-compliance
35kAide votre agent à préparer un environnement conforme à la certification CMMC niveau 2. Il met en œuvre les exigences de sécurité et gère la documentation nécessaire.
acquiring-disk-image-with-dd-and-dcfldd
35kAide votre agent à créer des copies exactes de disques durs. Utile pour garantir qu'aucune information n'est perdue ou modifiée lors d'enquêtes.
Skills similaires
reverse-engineer-anything
422kAide votre agent à analyser les applications et paquets livrés, pour expliquer leurs fonctions, comparer des versions ou guider une reconstruction, avec REA.
1password
394kAide votre agent à configurer l'interface en ligne de commande de 1Password, à se connecter, et à lire ou injecter des secrets sans afficher leurs valeurs dans le chat.
healthcheck
394kAide votre agent à auditer l'ordinateur ou le serveur qui fait tourner OpenClaw pour détecter des risques de sécurité, comme SSH, le pare-feu, les mises à jour et les sauvegardes, puis à proposer des corrections sûres.