When it is written
A certification authority (CA) running Active Directory Certificate Services writes 4881 to its own Security log when Certificate Services stops, and 4880 (Certificate Services started) when it starts again. Microsoft documents that with the "Start and stop Active Directory Certificate Services" audit category the CA takes a cryptographic hash of its database at each start and stop; the event also carries a hash of the CA certificate, a hash of the CA public key and a private key usage count. It names no account. A stop asked for with the CA's shutdown command is preceded by 4875 (Certificate Services received a request to shut down).
The stop matters for what comes after it: Microsoft's procedures for the CA's registry settings, such as the audit filter (AuditFilter), the policy module flags (EditFlags) and the interface flags (InterfaceFlags), restart Certificate Services to apply them. The event needs the Audit Certification Services subcategory on the CA server and the "Start and stop Active Directory Certificate Services" category in the CA's own audit filter.
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| Computer | Audit | Note |
|---|---|---|
| Domain controllers | Success if needed and Failure if needed | Microsoft 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 servers | Success if needed and Failure if needed | Microsoft 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. |
| Workstations | Not logged | Microsoft says the AD CS role cannot be installed on a client operating system. |
auditpol /get /subcategory:"Certification Services"auditpol /set /subcategory:"Certification Services" /success:enable /failure:enableauditpol /get /subcategory:"{0CCE9221-69AE-11D9-BED3-505054503030}"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
Two settings must both be on, on every CA server:
- The Audit Certification Services subcategory, Success and Failure (Microsoft's PKI monitoring guide asks for both).
- The Start and stop Active Directory Certificate Services category in the CA's own audit filter: the Auditing tab of the CA's properties in the Certification Authority console, or bit value
1of the CA'sAuditFilterregistry value (all seven categories together are127). Microsoft's procedure restarts Certificate Services after the filter is changed. To read the current value on the CA:certutil -getreg CA\AuditFilter.
Microsoft cautions that this category hashes the CA database at every start and stop, which can delay a restart on a CA with a large database. Test the effect on a non-production CA first.
Fields
In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.
| Field | What it holds | Since |
|---|---|---|
Certificate Database HashCertificateDatabaseHashCertificate Services stopped. | Hash of the CA database when the service stopped (shown as Certificate Database Hash). Microsoft documents that the CA hashes its database at start and stop when the start and stop category is audited, but not the algorithm or the format. | v0 |
Private Key Usage CountPrivateKeyUsageCountCertificate Services stopped. | A count of uses of the CA private key, as its name says (shown as Private Key Usage Count). Microsoft does not document what the count covers or when it resets, so read it from your own CA's events before you rely on it. | v0 |
CA Certificate HashCACertificateHashCertificate Services stopped. | Hash of the CA's certificate (shown as CA Certificate Hash). Microsoft does not document the algorithm; the CA's own list of certificate thumbprints is the CaCertHash registry entry. | v0 |
CA Public Key HashCAPublicKeyHashCertificate Services stopped. | Hash of the CA's public key (shown as CA Public Key Hash). Microsoft does not document the algorithm or format. | v0 |
Values to know
CA Certificate Hash CACertificateHash
| Value | Meaning | Signal |
|---|---|---|
The same value as at earlier stops | The CA runs with the certificate it had | Expected |
A new value after a planned CA certificate renewal | The CA now signs with its renewed certificate | Expected |
A new value with no renewal on record | The CA certificate changed outside a planned renewalThe CA keeps the thumbprints of all its certificates in the CaCertHash registry entry. Check the new certificate against it and against your change record. | Worth knowing |
CA Public Key Hash CAPublicKeyHash
| Value | Meaning | Signal |
|---|---|---|
The same value as at earlier stops | The CA still uses the same key pair | Expected |
A new value | The CA now uses a new key pair, which only a renewal with a new key should bring | Worth knowing |
Volume and noise
Very low. The service stops for configuration changes, updates, server restarts and maintenance. Microsoft lists abnormal startup or shutdown events among the activity to monitor on a CA, and rates this event low. Microsoft also warns that on a CA with a large database the hash makes start and stop slow, and the CA's RPC interface is unavailable while it is computed.
Keeping it manageable
- Keep every event: there are few, and each restart is a moment when a registry change to the CA takes effect.
- Match each stop with the next start (4880) and with a change record or maintenance window. For a restart outside them, look for registry changes on the CA's configuration key just before it (4657, with registry auditing) and for changes made through the console (4885, 4891).
- Keep
CACertificateHashandCAPublicKeyHashfrom each stop: they should change only when the CA certificate is renewed (the public key only when the renewal also makes a new key). - If start and stop take too long on a large CA, Microsoft's guidance is to review the effect on a non-production CA and choose the audit categories of your approved baseline.
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>4881</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="CertificateDatabaseHash">3c9a51e07f24b86d1e0a5f93c2d84b7160e9a3f2</Data>
<Data Name="PrivateKeyUsageCount">18342</Data>
<Data Name="CACertificateHash">8e4f0d27a91c35b6e2f7c0d48a1b9e53f6c2d071</Data>
<Data Name="CAPublicKeyHash">b1d7e0c46a2f9853e1c07b4d92a6f3e5108c7d4a</Data>
</EventData>
</Event>Attacks this event reveals
No detection rule or detection logic in our library reads this event yet. It is documented here because it sits next to the events they read: it explains them, follows from them or is the trace a defender looks for around them (see Related events).
Frequently asked questions
Who stopped Certificate Services?
The event names no account. A stop asked for with the CA's shutdown command writes 4875 first. Otherwise look at who was signed in to the CA server at that time (4624) and at the change record.
Why does a CA restart matter for security monitoring?
Microsoft's procedures apply changes to the CA's registry settings, such as the audit filter and the policy module flags, by restarting Certificate Services. A restart outside maintenance is the moment to compare the CA's configuration with your baseline, and registry auditing of the CA's configuration key (event 4657) shows what changed before it.
Why does Certificate Services take so long to stop or start?
With the start and stop audit category on, the CA hashes its database at each start and stop. Microsoft warns that on a large database this can make start and stop very long, and that the CA's RPC interface is unavailable meanwhile.
References
- Audit Certification Services (Microsoft)
- Securing PKI: Appendix A: Events to Monitor (Microsoft)
- Securing PKI: Monitoring Public Key Infrastructure (Microsoft)
- Securing PKI: Appendix B: Certification Authority Audit Filter (Microsoft)
- Secure, delegate, and audit certification authority administration (Microsoft)
- Defender for Identity: certificates security posture assessments (Microsoft)
- Certificate Services may not start on a computer that is running Windows Server (CaCertHash, Microsoft)
- Certification Authority Renewal (Microsoft)