Skip to content
KitploitKITPLOIT
HerramientasBlog
Enviar
HerramientasBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

··Feeds·Contacto·Privacidad·© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
modifyCertTemplate — Modificación de plantillas de certificados de ADCS y enumeración de ACL | Kitploit
Herramientas/GitHubGitHub/fortalice/modifycerttemplate
Escalada de PrivilegiosAnálisis de VulnerabilidadesExplotaciónAuditoría de ConfiguraciónPruebas de PenetraciónAutenticación
GitHubfortalice/modifycerttemplate

modifyCertTemplate

Modificación de plantillas de certificados de ADCS y enumeración de ACL

Ver Repositorio
14513hace 3 añosRevisado por Kitploit

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →
Compartir

Propósito

Esta herramienta está diseñada para ayudar a un operador a modificar plantillas de certificados ADCS de modo que un estado vulnerable creado pueda aprovecharse para la escalada de privilegios (y luego restablecer la plantilla a su estado anterior). Está diseñada específicamente para un escenario donde se han comprometido los derechos WriteProperty sobre una plantilla, pero el operador no está seguro de a qué propiedades se aplica ese derecho. En este escenario, se puede consultar la ACL de la plantilla y la información de ACE aplicable se puede cotejar con los GUID de las propiedades para determinar las propiedades modificables.

Publicación de blog asociada Publicación de blog sobre la herramienta y el tema.

Uso

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

Ejemplos

Consultar una plantilla o valor de propiedad

Consultar una plantilla de certificado (todos los atributos)

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

Consultar un solo atributo de una plantilla de certificado

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

Consultar los valores brutos de todos los atributos de la plantilla

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

Consultar información de ACL

Consultar la ACL de una plantilla de certificado

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

Aunque no está relacionado con las plantillas de certificados, se puede consultar la ACL de cualquier objeto proporcionando su nombre distinguido

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

Modificar una plantilla

Agregar la marca ENROLLEE_SUPPLIES_SUBJECT a la propiedad msPKI-Certificate-Name-Flag de la plantilla

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

Actualizar el valor de un atributo de plantilla de certificado (propiedades que no son listas)

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

Agregar un EKU a la propiedad pKIExtendedKeyUsage

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

Actualizar el valor de un atributo con formato de lista (es decir, establecer explícitamente el valor 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 

Referencias, Créditos y Otros Proyectos para Revisar

  • PyWhisker
  • Certi
  • StandIn
Descargar herramienta