Tools / Event IDs / Event ID 4794

Event ID 4794: dsrm administrator password set

What Event ID 4794 (dsrm administrator password set) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.

Log: Security · Severity: High · MITRE ATT&CK T1098 · Updated 2026-11-08

Event ID 4794 is logged on a domain controller when someone attempts to set the Directory Services Restore Mode (DSRM) administrator password. DSRM is the local administrator account every DC has for recovery when Active Directory is offline. It is rarely used, which makes it a good place for a backdoor: an attacker who knows the DSRM password, and has changed one registry value, can log on to the DC over the network with it even while AD is running.

The fields that matter

FieldWhat it tells you
Subject > Account NameWho ran the password change, usually through ntdsutil or setpassword.
Subject > Account Domain / Logon IDLinks to the logon session (4624) the change came from.
Additional Information > Caller WorkstationThe machine the request came from.
Additional Information > Status Code0x0 when the password was set successfully.

What is normal

DSRM password rotation during a planned maintenance window, when a new DC is promoted, or when a password vault or script rotates it on a schedule, using ntdsutil "set dsrm password", optionally with "sync from domain account".

When Event ID 4794 is suspicious

Common false positive: Scheduled DSRM password rotation by a privileged access management tool. Note its account and schedule so you can exclude exactly that.

Find Event ID 4794 with PowerShell

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4794; StartTime=(Get-Date).AddDays(-7)} -MaxEvents 50 |
  ForEach-Object {
    $d = [ordered]@{ Time = $_.TimeCreated; Computer = $_.MachineName }
    ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
    [pscustomobject]$d
  } | Format-List

Microsoft Sentinel (KQL)

SecurityEvent
| where TimeGenerated > ago(7d) and EventID == 4794
| project TimeGenerated, Computer, Account, Activity, EventData
| order by TimeGenerated desc

Related events

FAQ

Is Event ID 4794 always malicious?

No. Setting the DSRM password is normal maintenance. It becomes suspicious when nobody planned it, or when DsrmAdminLogonBehavior has been changed to 2 on the same DC.

How do I check whether a DC has the DSRM backdoor enabled?

Read DsrmAdminLogonBehavior under HKLM\System\CurrentControlSet\Control\Lsa. If it is missing or 0, the DSRM account only works in restore mode. A value of 2 lets it log on over the network at any time.

Which audit policy logs Event ID 4794?

Audit User Account Management, under Account Management in Advanced Audit Policy, on domain controllers.