Security event 4794
An attempt was made to set the Directory Services Restore Mode administrator password
Channel: Security. Category: User Account Management.
What it records
Generated only on domain controllers, every time the Directory Services Restore Mode (DSRM) administrator password is changed. Captured as a Success or Failure event depending on the outcome. It records the Subject who made the change, their Logon ID, and the Caller Workstation the request came from.
Why it matters
The DSRM administrator is a local SAM-based account stored outside Active Directory, so it isn't subject to domain password policy, Group Policy, or normal AD credential resets: a well-known persistence backdoor on domain controllers, since an attacker who sets a known DSRM password retains an AD-independent, effectively local-admin credential on every DC where they do it. Microsoft's own guidance is to always monitor and alert on every occurrence of this event.
What triggers it
Legitimately: a rare, deliberate administrative action, setting or resetting the DSRM password with ntdsutil, typically during DC build-out or ahead of a planned AD restore. Because it's so infrequent in normal operations, essentially any 4794 outside a known, documented change window warrants investigation.
Fields that carry the answer
| Field | What it tells you |
|---|---|
| Account Name (Subject) | Who requested the DSRM password change: a change by an unexpected account, or on a DC with no planned maintenance, is the primary red flag. |
| Logon ID | Correlates the change back to the specific logon session (via the matching 4624) that performed it. |
| Caller Workstation | The computer the request originated from, which matches the DC's own name if the change was made locally at the console, differs if pushed from elsewhere. |
In practice
On DC01, Account Name CORP\dadmin sets the DSRM administrator password via ntdsutil, with Caller Workstation DC01 and Status 0x0 (success). The same event appearing on a domain controller with no scheduled AD restore or rebuild in progress, especially one triggered remotely rather than from the DC's own console, is the classic signature of an attacker planting a DSRM-based backdoor credential.
Sample record
Log Name: Security Source: Microsoft-Windows-Security-Auditing Event ID: 4794 Task Category: User Account Management Level: Information Keywords: Audit Success User: N/A Computer: DC01.corp.example.local Description: An attempt was made to set the Directory Services Restore Mode administrator password. Subject: Security ID: CORP\dadmin Account Name: dadmin Account Domain: CORP Logon ID: 0x36F67 Additional Information: Caller Workstation: DC01 Status Code: 0x0
ATT&CK techniques
- T1098: Account Manipulation
Sources
Paste a record into Event XML or open a log in EVTX Reader.