DSRM
SKELETON KEY
LSASS
EVENT 4794
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting DSRM Admin Logon and Skeleton Key Persistence

Both techniques are about the domain controller itself. One gives a back door through the recovery account, the other patches authentication in memory. Neither should be common on a DC.

Scroll

Two domain-controller persistence techniques are worth separate treatment. The Directory Services Restore Mode (DSRM) account is a local administrator on every DC; setting DsrmAdminLogonBehavior lets it log on while the DC is online. Skeleton Key patches LSASS so that a master password authenticates as any user alongside the real one. They are rare in the wild, high in impact, and detectable from changes only privileged administrators should ever make.

Signals at a Glance

SignalWhereATT&CK
DsrmAdminLogonBehavior set to 1 or 2 under HKLM\System\CurrentControlSet\Control\LsaSysmon 13, registry auditT1112
Attempt to set the DSRM administrator password (Event 4794)DC Security logT1098
Network or interactive logon as the local Administrator account on a DC4624 on DCsT1078.003
Non-system process accessing LSASS on a DCSysmon 10, EDRT1556.001
New kernel driver install on a DC (mimidrv-style) before LSASS tamperingSysmon 6, System 7045T1543.003
RC4 (0x17) authentication appearing for accounts that normally use AES4768/4769 encryption typesT1556.001

DSRM Abuse

By default the DSRM account can only be used when a DC is booted into Directory Services Restore Mode. Setting DsrmAdminLogonBehavior to 2 lets it authenticate on a running DC, which gives an attacker a local administrator credential that survives domain password resets. Two events matter: the registry change and the password set. The value is rarely touched in production, so any change is suspect:

title: DSRM Administrator Logon Behavior Changed
logsource:
  product: windows
  category: registry_set
detection:
  selection:
    TargetObject|endswith: '\Control\Lsa\DsrmAdminLogonBehavior'
  condition: selection
level: high
# tune/validate: should be near-zero on healthy DCs; alert on any value other than 0.

Event 4794 is generated when someone sets the DSRM password, normally with ntdsutil during DC recovery planning. Alert on it and require a change ticket. To verify state across the DC fleet, check the value directly and look for DSRM account logons:

# PowerShell: run on each DC
$v = (Get-ItemProperty 'HKLM:\System\CurrentControlSet\Control\Lsa' -ErrorAction SilentlyContinue).DsrmAdminLogonBehavior
"DsrmAdminLogonBehavior: " + $(if ($null -eq $v) { 'not set (default 0)' } else { $v })

Get-WinEvent -FilterHashtable @{ LogName = 'Security'; Id = 4794 } -MaxEvents 50 -ErrorAction SilentlyContinue |
  Select-Object TimeCreated, @{n='Message'; e={ $_.Message.Split("`n")[0] }}

Get-WinEvent -FilterHashtable @{ LogName = 'Security'; Id = 4624 } -MaxEvents 5000 -ErrorAction SilentlyContinue |
  Where-Object { $_.Properties[5].Value -eq 'Administrator' -and $_.Properties[6].Value -eq $env:COMPUTERNAME } |
  Select-Object TimeCreated
# tune/validate: confirm property indexes against your Windows version before relying on them.

Skeleton Key

Skeleton Key injects a patch into LSASS on a domain controller, so that a shared password is accepted for any account alongside the real one. It lives in memory only and is removed by a reboot, but it works only against RC4 authentication, which gives defenders two angles. Hunt the installation and the side effects:

Vetted sources

Use the SigmaHQ rules for LSASS access and DSRM registry changes, Elastic’s credential-access and DC-persistence detections, Splunk ESCU content, MITRE CAR analytics and Atomic Red Team tests for T1556.001. Microsoft’s Defender for Identity covers suspected Skeleton Key activity. Baseline your own environment, since security products legitimately access LSASS on DCs.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026