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

Event ID 4896: One or more rows have been deleted from the certificate database

Written by an AD CS certification authority when rows are deleted from its database of requests, certificates and CRLs. Planned cleanup removes expired records in bulk; a single deleted row can erase the trace of one certificate.

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
4 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 certification authority (CA) keeps every request, issued and revoked certificate and CRL in its database. It writes 4896 to its own Security log when rows are deleted from that database through its administration interface, with the table, the filter that chose the rows and the number of rows deleted. Microsoft's interface deletes either one row by its ID, or every row of a table older than a date: certificates or CRLs that expired before it, or pending and denied requests last changed before it. The account that deleted the rows is in the event data, not in the message text.

Deleting a certificate's row removes the CA's record of it but does not make the certificate invalid: it stays usable until it expires or is revoked. The event needs the Audit Certification Services subcategory on the CA server and the "Issue and manage certificate requests" 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
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 Issue and manage certificate requests category in the CA's own audit filter: the Auditing tab of the CA's properties in the Certification Authority console, or bit value 4 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.

Microsoft notes that the audit filter alone does not make Windows write the event, and the subcategory alone does not either.

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
Table IDTableIdOne or more rows have been deleted from the certificate database.Table the rows were deleted from (shown as Table ID). The CA's database interface names four tables, requests and certificates, extensions, attributes, and CRLs. Microsoft does not document how the event writes the table.v0
FilterOne or more rows have been deleted from the certificate database.What chose the rows (shown as Filter). Microsoft's interface takes either one row ID or a date, and with a date a flag that says whether it is an expiration date (certificates and CRLs) or a last-changed date (pending and denied requests). Microsoft does not document how the event writes it.v0
Rows DeletedRowsDeletedOne or more rows have been deleted from the certificate database.Number of rows deleted (shown as Rows Deleted).v0
SubjectUserSidSID of the account that deleted the rows. 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 deleted the rows. 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 deleted the rows, 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

Table ID TableId

ValueMeaningSignal
CVRC_TABLE_REQCERTRequests and certificates (pending, denied, issued and revoked)The table that holds the record of each issued certificate. Microsoft documents the table names of the interface, not the numbers the event writes.Attack signal
CVRC_TABLE_CRLCertificate revocation listsRemoving expired CRLs is ordinary cleanup.Noise
CVRC_TABLE_EXTENSIONS or CVRC_TABLE_ATTRIBUTESExtensions or attributes of requestsWorth knowing

Filter

ValueMeaningSignal
A dateEvery row of the table older than the dateBulk cleanup of expired certificates or CRLs, or of old pending and denied requests.Expected
A single row IDOne request or certificateDeletes the CA's record of one certificate. Find out which certificate the ID was, from backups or earlier 4886 and 4887 events.Attack signal

Rows Deleted RowsDeleted

ValueMeaningSignal
1One rowTogether with a row ID as filter, the form that hides one certificate.Attack signal
ManyBulk cleanupConfirm it with the change record rather than excluding it.Expected

Volume and noise

Very low. CA databases are cleaned up from time to time to remove expired certificates and old failed or pending requests, which deletes many rows in one operation with a date as filter. Microsoft rates the event high and notes that it may indicate an attacker covering their tracks after issuing certificates.

Keeping it manageable

  • Keep every event: the volume is very low and the rule matches on the event ID alone.
  • Separate bulk cleanup by date (expected, with a change record) from the deletion of a single row by its ID, which is the form that hides one certificate.
  • Before a planned cleanup, export or archive the request and certificate records, so that a later investigation can still see what the deleted rows held.

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>4896</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="TableId">0</Data>
    <Data Name="Filter">4135</Data>
    <Data Name="RowsDeleted">1</Data>
    <Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1150</Data>
    <Data Name="SubjectUserName">pkiadmin</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x4c19e2</Data>
  </EventData>
</Event>

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

Does deleting a certificate's row from the CA database revoke the certificate?

No. The certificate stays valid until it expires or is revoked. Deleting its row only removes the CA's record of it, which is why Microsoft rates event 4896 high and links it to an attacker covering their tracks after issuing certificates.

How do I find out which certificate was deleted?

If the filter is a single row ID in the table of requests and certificates, each row there is one request, so look for 4886 and 4887 with that Request ID in your collected logs, or for the row in a backup of the CA database taken before the deletion.

Is every 4896 suspicious?

No. Planned cleanup removes expired certificates, expired CRLs and old pending or denied requests in bulk, with a date as filter. Confirm each one with a change record; a single row deleted by its ID needs an explanation.

References