1. Resources
  2. Detection sources
  3. Event ID 4900

Event ID 4900: Certificate Services template security was updated

Written by an AD CS enterprise CA when the permissions of a certificate template it has loaded changed and someone then enrolls for it, with the old and the new security descriptor. Logged at that enrollment, not at the change.

Log source
Windows Security log
Detection value
Supporting
Volume
Low (estimate)
Last updated
Audit subcategory
Audit Certification Services (Object Access, Success and Failure)
Logged on
Certification authority servers only
Event versions
0
Detects
1 attack (1 rule)
MITRE ATT&CK
1 technique in 1 tactic
Threat groups
2 groups that MITRE ATT&CK records using these techniques
Fields the rules read
The event ID and the provider only

When it is written

A certificate template's security descriptor decides who may enroll for it, edit it or own it. Microsoft documents that an enterprise certification authority (CA) writes 4900 to its own Security log when the security permissions of a template it has loaded were changed and an enrollment for that template then occurs. The event is therefore written at the first enrollment after the change, not when the permissions are edited, and a change reverted before anyone enrolls leaves no 4900. It carries the template's name, version, schema version, OID and distinguished name, the domain controller the CA read it from, the template content, and the security descriptor before and after the change.

The event names no account: the permission change itself is a directory change, which domain controllers record as 5136 (attribute nTSecurityDescriptor) when the Certificate Templates container has a matching auditing entry. A change of the template's settings writes 4899 instead.

How to turn it on

Advanced audit policy subcategory Audit Certification Services, Success and Failure. Set it in a Group Policy object linked to the computers that write the event:

Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Object Access > Audit Certification Services
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccess if needed and Failure if neededMicrosoft marks every column "IF" (the same in its general and stronger baselines). Enable the subcategory when the server has the Active Directory Certificate Services role installed and you need to monitor AD CS events.
Member serversSuccess if needed and Failure if neededMicrosoft marks every column "IF" (the same in its general and stronger baselines). Enable the subcategory when the server has the Active Directory Certificate Services role installed and you need to monitor AD CS events.
WorkstationsNot loggedMicrosoft says the AD CS role cannot be installed on a client operating system.
Check the current setting
auditpol /get /subcategory:"Certification Services"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Certification Services" /success:enable /failure:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9221-69AE-11D9-BED3-505054503030}"
Based on vendor documentation.

Run the commands in an elevated prompt on a computer that writes the event. Subcategory settings take effect only when the security option Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings is enabled (the default), and a Group Policy object that sets advanced audit policy replaces local changes at its next refresh. Microsoft's advanced audit policy reference

Three settings must all be on, on every enterprise CA server:

  1. The Audit Certification Services subcategory, Success and Failure (Microsoft's PKI monitoring guide asks for both).
  2. The Change CA security settings category in the CA's own audit filter: the Auditing tab of the CA's properties in the Certification Authority console, or bit value 16 of the CA's AuditFilter registry value (all seven categories together are 127). Microsoft's event table names this category; its monitoring guide calls it "Change CA settings" in the same place.
  3. The policy module flag EDITF_AUDITCERTTEMPLATELOAD, which Microsoft's monitoring guide sets with certutil -setreg policy\EditFlags +EDITF_AUDITCERTTEMPLATELOAD. Restart Certificate Services afterwards, as for the audit filter.

The same settings produce 4898 (the CA loaded a template) and 4899 (template updated).

Fields

In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.

FieldWhat it holdsSince
TemplateInternalNameInternal name of the template (the cn of the template object), shown before the version in the message.v0
TemplateVersionVersion of the template, shown after "v" in the message. A template object keeps its major version in the revision attribute and its minor version in msPKI-Template-Minor-Revision.v0
TemplateSchemaVersionSchema version of the template (msPKI-Template-Schema-Version), shown after "Schema V" in the message.v0
TemplateOIDObject identifier of the template (msPKI-Cert-Template-OID).v0
TemplateDSObjectFQDNDistinguished name of the template object in the configuration partition, below CN=Certificate Templates,CN=Public Key Services,CN=Services. Use it to find the 5136 events of the change.v0
Old Template ContentOldTemplateContentTemplate Change InformationThe template's attributes as the CA had loaded them before (shown as Old Template Content).v0
New Template ContentNewTemplateContentTemplate Change InformationThe template's attributes as text (shown as New Template Content). Microsoft does not document the layout.v0
Old Security DescriptorOldSecurityDescriptorTemplate Change InformationThe template's security descriptor as the CA had loaded it before the change (shown as Old Security Descriptor). Compare it with NewSecurityDescriptor to see which rights were added or removed.v0
New Security DescriptorNewSecurityDescriptorTemplate Change InformationThe template's security descriptor after the change (shown as New Security Descriptor). Microsoft does not document the format; check an event from your own CA before you parse it.v0
Domain ControllerDCDNSNameAdditional InformationDNS name of the domain controller the CA read the template from (shown as Domain Controller).v0

Values to know

New Security Descriptor NewSecurityDescriptor

ValueMeaningSignal
Enroll (the Certificate-Enrollment right, 0e10c968-78fb-11d2-90d4-00c04f79dc55) for Domain Users, Domain Computers or Authenticated UsersEveryone in the domain can request certificates from the templateDangerous on a template whose certificates authenticate, above all one that lets the enrollee supply the subject. Microsoft's PKI guide lists changes to enrollment permissions among the scenarios to monitor.Attack signal
Write property, write DACL, write owner or full control for a non-administratorThe principal can rewrite the template itselfMicrosoft's PKI guide lists changes to write access on a template among the scenarios to monitor.Attack signal
Enroll for a specific group with a business reasonPlanned delegation of enrollmentExpected

TemplateInternalName

ValueMeaningSignal
A template whose certificates authenticate (user, smart card logon, domain controller) or act for others (enrollment agent)Changes here affect sign-in or enrollment on behalf of othersReview these first.Attack signal
Other templatesServer, encryption or signing templatesWorth knowing

Volume and noise

Low. One event per template whose permissions changed, at the first enrollment after the change. PKI administrators granting enrollment to a new group or tidying up old entries are the usual source. Microsoft rates the event medium.

Keeping it manageable

  • Keep every event: the volume is low and the rule matches on the event ID alone.
  • Compare OldSecurityDescriptor with NewSecurityDescriptor and raise the priority for an Enroll right given to a broad group (Domain Users, Domain Computers, Authenticated Users) on a template whose certificates authenticate, and for write, owner or full control rights given to anyone outside the PKI administrators.
  • Match each event with the 5136 events for the same template object (TemplateDSObjectFQDN) on the domain controllers, which give the account and the time of the change.

Sample event

Version 0, with made-up values.

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-a5ba-3e3b0328c30d}" />
    <EventID>4900</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2026-11-18T09:30:12.4567890Z" />
    <EventRecordID>1048576</EventRecordID>
    <Correlation />
    <Execution ProcessID="712" ThreadID="2408" />
    <Channel>Security</Channel>
    <Computer>CA01.corp.example.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="TemplateInternalName">CorpWebServer</Data>
    <Data Name="TemplateVersion">100.5</Data>
    <Data Name="TemplateSchemaVersion">2</Data>
    <Data Name="TemplateOID">1.3.6.1.4.1.311.21.8.4718251.2013977.12519542.9831145.8806221.240.1846272.6034531</Data>
    <Data Name="TemplateDSObjectFQDN">CN=CorpWebServer,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=corp,DC=example,DC=com</Data>
    <Data Name="DCDNSName">DC01.corp.example.com</Data>
    <Data Name="NewTemplateContent">pKIExpirationPeriod = 2 Years
pKIExtendedKeyUsage = 1.3.6.1.5.5.7.3.1 Server Authentication
msPKI-Certificate-Name-Flag = 0x1
msPKI-Template-Minor-Revision = 5</Data>
    <Data Name="NewSecurityDescriptor">O:S-1-5-21-1004336348-1177238915-682003330-519G:S-1-5-21-1004336348-1177238915-682003330-519D:PAI(OA;;CR;0e10c968-78fb-11d2-90d4-00c04f79dc55;;S-1-5-21-1004336348-1177238915-682003330-1170)(A;;CCDCLCSWRPWPDTLOSDRCWDWO;;;S-1-5-21-1004336348-1177238915-682003330-512)(A;;CCDCLCSWRPWPDTLOSDRCWDWO;;;S-1-5-21-1004336348-1177238915-682003330-519)(A;;LCRPLORC;;;AU)</Data>
    <Data Name="OldTemplateContent">pKIExpirationPeriod = 2 Years
pKIExtendedKeyUsage = 1.3.6.1.5.5.7.3.1 Server Authentication
msPKI-Certificate-Name-Flag = 0x1
msPKI-Template-Minor-Revision = 5</Data>
    <Data Name="OldSecurityDescriptor">O:S-1-5-21-1004336348-1177238915-682003330-519G:S-1-5-21-1004336348-1177238915-682003330-519D:PAI(A;;CCDCLCSWRPWPDTLOSDRCWDWO;;;S-1-5-21-1004336348-1177238915-682003330-512)(A;;CCDCLCSWRPWPDTLOSDRCWDWO;;;S-1-5-21-1004336348-1177238915-682003330-519)(A;;LCRPLORC;;;AU)</Data>
  </EventData>
</Event>

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

Why is event 4900 written after the permissions were changed, not at the time?

Microsoft documents that the CA writes it when the security permissions of a template it has loaded changed and an enrollment for the template then occurs. It marks the first use of the changed template on that CA, and a change reverted before anyone enrolls produces no 4900.

Which permission changes in 4900 matter most?

An Enroll right for a broad group on a template whose certificates authenticate, and any write, owner or full control right for a principal outside the PKI administrators, which lets that principal reconfigure the template. Microsoft's PKI guide lists both enrollment and write permissions on templates among the scenarios to monitor.

Does 4900 show who changed the permissions?

No. The event has no account fields. The domain controllers record the change of the template object's nTSecurityDescriptor as 5136 with the account, provided the Certificate Templates container has an auditing entry.

References