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

Event ID 4878: Certificate Services restore started

Written by an AD CS certification authority when a restore of the CA from a backup starts. The event carries no data: no account, no backup location. Rare outside disaster recovery and CA migration.

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 4878 to its own Security log when a restore of the CA starts. Microsoft's restore command puts back the CA database, the CA certificate and private key, or both, from a backup folder; the end of the restore is 4879 (Certificate Services restore completed). Windows' event template for 4878 has no data fields: the event names no account, no backup and no restored part.

Microsoft's CA administration guidance requires a CA administrator to back up and restore a CA and asks for restores to be tested only on an isolated recovery system, so a restore on a production CA belongs to a recovery or a migration. The event needs the Audit Certification Services subcategory on the CA server and the "Back up and restore the CA database" 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 Back up and restore the CA database category in the CA's own audit filter: the Auditing tab of the CA's properties in the Certification Authority console, or bit value 2 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's audit filter category describes backup and restore commands sent to the CA database. Run one restore on a recovery system with the same settings to see which events your restore procedure writes.

Fields

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

The event carries no data fields: the event ID and its text are the whole record.

Volume and noise

Very low. Restores happen during disaster recovery, when a CA is moved to a new server, and in recovery tests, which Microsoft asks to run on an isolated system rather than on the production CA. Microsoft rates the event low.

Keeping it manageable

  • Keep every event: a restore on a production CA should match a recovery or a change record.
  • The event names no account: look at who was signed in to the CA server at the time (4624) and at the backups taken before it (4876, 4877), which give the account that made them.
  • After a restore, the CA database holds what the backup held. Check its content against your issuance records and the CA's earlier 4886 and 4887 events.

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>4878</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 />
</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

Why does event 4878 show no account?

Windows' template for the event has no data fields, so it records only that a restore started, on which CA and when. Look at the logons on the CA server around that time (4624) and at your change record.

Does a restore bring back the CA's private key?

It can. Microsoft's restore command restores the CA database, the CA certificate and private key, or both, depending on how it is run. The event does not say which.

Is a restore on a production CA normal?

Only as part of a recovery or a planned migration. Microsoft's CA administration guidance asks for restores to be tested on an isolated recovery system, not on the production CA.

References