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

Event ID 4870: Certificate Services revoked a certificate

Written by an AD CS certification authority when one of its certificates is revoked, with the serial number and the reason. The record of the revocations an incident response calls for, and of mass revocation, which Microsoft says to watch.

Log source
Windows Security log
Detection value
Context
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
Not read by our detection rules yet

When it is written

A certification authority (CA) running Active Directory Certificate Services writes 4870 to its own Security log when a certificate it issued is revoked through its administration interface, with the certificate's Serial Number and the revocation Reason. Revoking is a certificate manager task (the Issue and Manage Certificates permission). The account that revoked the certificate is in the event data, not in the message text.

Revocation takes effect for the systems that check the certificate once the CA publishes a certificate revocation list (CRL) that lists it: Microsoft documents that a revoked certificate appears in the CRLs published after its revocation date. A certificate revoked with the reason Certificate Hold can be reinstated later; with any other reason it cannot. The event needs the Audit Certification Services subcategory on the CA server and the "Revoke certificates and publish CRLs" category in the CA's own audit filter. A domain controller logs it only if it also holds the CA role.

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

Two settings must both be on, on every CA server:

  1. The Audit Certification Services subcategory, Success and Failure (Microsoft's PKI monitoring guide asks for both).
  2. The Revoke certificates and publish CRLs category in the CA's own audit filter: the Auditing tab of the CA's properties in the Certification Authority console, or bit value 8 of the CA's AuditFilter registry value (all seven categories together are 127). Microsoft's procedure restarts Certificate Services after the filter is changed. To read the current value on the CA: certutil -getreg CA\AuditFilter.

The same category covers the CRL events 4871 and 4872. Microsoft's CA administration guidance advises running one controlled revocation and CRL publication on a test CA and recording the events your CA writes before you build a collection rule.

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
Serial NumberCertificateSerialNumberCertificate Services revoked a certificate.Serial number of the revoked certificate, in hexadecimal (shown as Serial Number). Microsoft's revocation interface takes it as an even number of hexadecimal digits; Microsoft does not document how the event writes it. The same certificate appears in version 1 of 4887 and in 4768 when it is used to sign in.v0
ReasonRevocationReasonCertificate Services revoked a certificate.Reason for the revocation (shown as Reason). Microsoft documents reason codes 0 to 6 for the revocation interface (from unspecified to certificate hold) but not how the event writes them.v0
SubjectUserSidSID of the account that revoked the certificate. Not shown in the message text; read it from the event data (the XML or the Details tab). Event Viewer resolves it to a name.v0
SubjectUserNameName of the account that revoked the certificate. Not shown in the message text.v0
SubjectDomainNameDomain of that account, as a NetBIOS name. Not shown in the message text.v0
SubjectLogonIdLogon ID of the session that revoked the certificate, in hexadecimal. Matches the logon event (4624) of that session on the CA server, which gives the source address when the service that received the logon passed it to Windows; Microsoft notes that some logons carry no network details. Not shown in the message text.v0

Values to know

Reason RevocationReason

ValueMeaningSignal
0 (CRL_REASON_UNSPECIFIED), 3 (CRL_REASON_AFFILIATION_CHANGED), 4 (CRL_REASON_SUPERSEDED) or 5 (CRL_REASON_CESSATION_OF_OPERATION)Routine revocationMicrosoft documents the reason codes of the revocation interface, not how the event writes them. Check an event from your own CA.Expected
1 (CRL_REASON_KEY_COMPROMISE)The certificate's private key is known or suspected to be compromisedEach one should belong to an incident or a reported loss. Find the certificate's owner and its use since issuance.Worth knowing
2 (CRL_REASON_CA_COMPROMISE)The issuing CA is considered compromisedRare; part of a CA compromise response.Worth knowing
6 (CRL_REASON_CERTIFICATE_HOLD)Temporary revocationThe only reason that can be undone. Microsoft does not say whether reinstating the certificate writes 4870 again.Worth knowing

SubjectUserName

ValueMeaningSignal
A certificate manager named in your CA role assignmentPlanned revocationExpected
Any other account, or one account revoking many certificates in a short timeRevocation outside the usual processMicrosoft lists the revocation of a significant number of certificates in a short time among the CA activity to monitor.Worth knowing

Volume and noise

Low on most CAs: revocations follow staff leaving, certificates replaced or superseded, lost or compromised keys and the clean-up after an incident. Microsoft lists the revocation of a significant number of certificates in a short time among the CA activity to monitor, and includes 4870 in the focused monitoring baseline of its CA administration guidance. Microsoft's PKI event table rates the event low; Appendix L of its Active Directory monitoring guidance rates it medium.

Keeping it manageable

  • Keep every event: the volume is low, and revocations made during an incident are the evidence of what the response did.
  • Count revocations per account in a short window and compare the count with your baseline: Microsoft lists mass revocation among the CA activity to monitor.
  • Look up CertificateSerialNumber in the CA database, or in the SerialNumber field of version 1 of 4887, to see whose certificate was revoked and from which template. Bring both values to the same format (hexadecimal, no spaces) before you compare them.
  • Search the domain controllers' 4768 events for the same serial number (CertSerialNumber): a revoked certificate that is still used to sign in shows how long revocation takes to reach them.

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>4870</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="CertificateSerialNumber">5a00001027c4e1b9f2d6a8f9c300000000102f</Data>
    <Data Name="RevocationReason">1</Data>
    <Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1153</Data>
    <Data Name="SubjectUserName">certmgr-anna</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x5d2b81</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

Does event 4870 make the certificate unusable at once?

It records the revocation in the CA's database. Systems that check the certificate learn of it from the CA's next certificate revocation list (CRL), which lists certificates whose revocation date has passed when it is published. Until that CRL is out, the revocation is known only to the CA.

Can a revocation be undone?

Only when the reason was Certificate Hold (6); Microsoft documents that any other reason is final. Microsoft's event table lists a CertificationAuthority event in the Application log (55, the CA unrevoked a certificate) for that case; it does not say whether the Security log records it as well.

Which 4870 events should I look at?

Many revocations in a short time, which Microsoft lists among the CA activity to monitor; revocations by an account that is not one of your certificate managers; and key compromise revocations, each of which should belong to a known incident or reported loss.

How is revoking a certificate different from deleting its row (4896)?

Revocation tells every system that checks the certificate to stop trusting it. Deleting the row only removes the CA's own record of the certificate, which stays valid until it expires.

References