T1207

Rogue Domain Controller

Defense Evasion Last updated:

Adversaries may register a rogue Domain Controller to enable manipulation of Active Directory data. DCShadow is a method of manipulating Active Directory (AD) data, including objects and schemas, by registering (or reusing an inactive registration) and simulating the behavior of a DC. Once registered, a rogue DC may inject and replicate changes into AD infrastructure for any domain object, including credentials, group memberships, and SID history. Registering a rogue DC involves creating new server and nTDSDSA objects in the Configuration partition of the AD schema, which requires Administrator privileges (Domain or local DC) or the KRBTGT hash. This technique bypasses most SIEM sensors since changes are pushed directly via AD replication without touching standard audit paths. Mimikatz implements DCShadow via the lsadump::dcshadow module, requiring two concurrent sessions: one running as SYSTEM to register the rogue DC and stage changes, and one running as a domain admin to trigger the replication push.

What is T1207 Rogue Domain Controller?

Rogue Domain Controller (T1207) maps to the Defense Evasion tactic — the adversary is trying to avoid being detected in MITRE ATT&CK.

This page provides production-ready detection logic for Rogue Domain Controller, covering the data sources and telemetry it touches: Process: Process Creation, Active Directory: Active Directory Object Creation, Active Directory: Active Directory Object Modification, User Account: User Account Modification, Microsoft Defender for Endpoint, Windows Security Event Log (Domain Controllers). The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1207 Rogue Domain Controller
Canonical reference
https://attack.mitre.org/techniques/T1207/
Microsoft Sentinel / Defender
kusto
// Detect DCShadow / Rogue Domain Controller attacks via four parallel detection branches
// Branch 1: Mimikatz DCShadow command-line arguments (MDE process telemetry)
let MimikatzDCShadow = DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any ("lsadump::dcshadow", "dcshadow /push", "dcshadow /start", "dcshadow /domain", "dcshadow /object", "dcshadow /attribute")
    or (FileName =~ "mimikatz.exe" and ProcessCommandLine has "dcshadow")
| extend DetectionBranch = "MimikatzDCShadow",
         AlertReason = "Mimikatz DCShadow command-line arguments detected on endpoint"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionBranch, AlertReason;
// Branch 2: Rogue DC registration — nTDSDSA object created in AD Configuration partition
// Requires: Security Events connector collecting from Domain Controllers
let RogueDCRegistration = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 5137
| where EventData has "nTDSDSA" or EventData has "NTDS Settings"
| extend DetectionBranch = "RogueDCObjectCreated",
         AlertReason = "nTDSDSA object created in AD Configuration partition — possible rogue DC registration"
| project TimeGenerated as Timestamp, Computer as DeviceName, SubjectUserName as AccountName,
         tostring(EventData), DetectionBranch, AlertReason;
// Branch 3: Unexpected AD replication source established or removed on Domain Controllers
let ReplicationSourceChange = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID in (4928, 4929)
| extend DetectionBranch = "ReplicationSourceChange",
         AlertReason = iff(EventID == 4928,
             "AD replica source naming context established — verify this is a legitimate DC",
             "AD replica source naming context removed — verify expected decommission")
| project TimeGenerated as Timestamp, Computer as DeviceName, SubjectUserName as AccountName,
         tostring(EventData), DetectionBranch, AlertReason;
// Branch 4: Computer account gaining DC-specific SPNs (rogue DC SPN registration)
let DCLikeSPNAdded = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 4742
| where EventData has "GC/" or EventData has "E3514235-4B06-11D1-AB04-00C04FC2DCD2"
| extend DetectionBranch = "DCLikeSPNAdded",
         AlertReason = "Computer account modified with Global Catalog or DRSUapi SPN — possible rogue DC SPN registration"
| project TimeGenerated as Timestamp, Computer as DeviceName, SubjectUserName as AccountName,
         tostring(EventData), DetectionBranch, AlertReason;
union MimikatzDCShadow, RogueDCRegistration, ReplicationSourceChange, DCLikeSPNAdded
| sort by Timestamp desc

Detects DCShadow rogue domain controller attacks via four parallel branches: (1) Mimikatz DCShadow command-line arguments in MDE DeviceProcessEvents; (2) nTDSDSA directory service object creation (Security Event 5137) indicating rogue DC registration in the AD Configuration partition; (3) unexpected replication source establishment or removal (Security Events 4928/4929) on domain controllers; and (4) computer account modifications adding Global Catalog or DRSUapi SPNs (Security Event 4742) indicative of rogue DC SPN registration. Branches 2-4 require Windows Security Event log collection from Domain Controllers in Microsoft Sentinel.

critical severity medium confidence

Data Sources

Process: Process Creation Active Directory: Active Directory Object Creation Active Directory: Active Directory Object Modification User Account: User Account Modification Microsoft Defender for Endpoint Windows Security Event Log (Domain Controllers)

Required Tables

DeviceProcessEvents SecurityEvent

False Positives

  • Legitimate Domain Controller promotion (dcpromo or Add-WindowsFeature AD-Domain-Services) creates nTDSDSA objects in the Configuration partition — always correlate with approved change management tickets
  • Read-Only Domain Controller (RODC) deployment and RODC password replication policy changes generate replication source events that resemble DCShadow indicators
  • AD migration tools such as Active Directory Migration Tool (ADMT) or Quest Migration Manager that temporarily register replication partners during inter-forest or inter-domain migrations
  • Disaster recovery scenarios involving authoritative AD restore or DC rebuild from backup may produce replication source changes and SPNs resembling rogue DC activity
  • Security researchers and red teams validating DCShadow detection capabilities in authorized lab environments — verify against approved penetration testing schedules

Sigma rule & cross-platform mapping

The detection logic for Rogue Domain Controller (T1207) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: process_creation
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Enumerate Existing DC Registrations (Baseline / Forensic Recon)

    Expected signal: Sysmon Event ID 1: powershell.exe process creation with LDAP query arguments. No directory service modification events (read-only). PowerShell ScriptBlock Log Event ID 4104 capturing the LDAP filter targeting nTDSDSA objectClass. No network connections beyond standard LDAP to port 389.

  2. Test 2DCShadow Stage Phase — Register Rogue DC (Mimikatz SYSTEM Session)

    Expected signal: Sysmon Event ID 1: mimikatz.exe process creation under NT AUTHORITY\SYSTEM context, CommandLine containing lsadump::dcshadow. Windows Security Event ID 5137 on Domain Controllers: new nTDSDSA object created under CN=Sites in the Configuration partition. Windows Security Event ID 4742: computer account of the attacking machine modified with GC/ and DRSUapi SPNs added. Sysmon Event ID 3: RPC connections from mimikatz.exe to DC on port 135 and dynamic RPC ports.

  3. Test 3DCShadow Push Phase — Trigger Replication (Mimikatz Domain Admin Session)

    Expected signal: Sysmon Event ID 1: mimikatz.exe process creation with lsadump::dcshadow /push argument. Windows Security Event ID 4928 on receiving Domain Controllers: replica source naming context established, showing the rogue DC as the source. Windows Security Event ID 5136 on DCs: attribute modification on the target AD object (description attribute). Sysmon Event ID 3: outbound RPC connections to legitimate DC IP addresses on dynamic ports.

  4. Test 4Validate Replication Topology for Rogue DC Partners

    Expected signal: Sysmon Event ID 1: repadmin.exe process creation (multiple instances for each flag). No AD modification events (read-only diagnostic). The /showconn output lists all inbound and outbound replication connections — any connection referencing an unexpected computer name or GUID identifies a rogue DC that has successfully registered in the replication topology.


Response Playbook

Triage

  1. Identify the source host — is it a known Domain Controller? Run: Get-ADDomainController -Filter * | Select-Object Name,IPv4Address,IsGlobalCatalog to enumerate all legitimate DCs. Any DCShadow indicator originating from a non-DC machine is immediately high-priority
  2. For Branch 1 (Mimikatz process): examine the full process tree — what spawned Mimikatz, and is there a SECOND concurrent Mimikatz process on the same host? DCShadow requires two simultaneous sessions (SYSTEM and Domain Admin); finding both is the operational signature of an active attack
  3. For Branch 2 (Event 5137 / nTDSDSA created): parse EventData to identify the new object's parent container and subject user. Run: Get-ADObject -Filter {objectClass -eq 'nTDSDSA'} -SearchBase (Get-ADRootDSE).configurationNamingContext -Properties whenCreated | Sort-Object whenCreated -Descending | Select-Object DistinguishedName,whenCreated — any entry without a corresponding DC promotion change ticket is suspicious
  4. For Branch 3 (Events 4928/4929): extract the source computer from EventData and cross-reference against the legitimate DC list. An unknown or workstation-class machine appearing as a replication source is a definitive indicator — correlate with the timestamp of the nTDSDSA creation event
  5. For Branch 4 (Event 4742 / DC-like SPNs): identify which computer account was modified and which SPNs were added. GC/ (Global Catalog), E3514235-4B06-11D1-AB04-00C04FC2DCD2/* (DRSUapi), and DrsRpc SPNs should never appear on workstations or member servers
  6. Check AD replication health immediately across all DCs: repadmin /showrepl * and repadmin /replsummary — unexpected replication partners or recent replication events from non-DC machine GUIDs are critical forensic indicators

Containment

  1. If rogue DC registration is confirmed: force-remove the nTDSDSA object from the AD Configuration partition before the attacker executes the push — Run: Remove-ADObject -Identity 'CN=NTDS Settings,CN=<RogueDC>,CN=Servers,CN=<Site>,CN=Sites,CN=Configuration,DC=<domain>' -Recursive -Confirm:$false
  2. Isolate the compromised host (the machine acting as the rogue DC) from the network via EDR isolation or VLAN reassignment to prevent RPC connectivity to legitimate DCs required for the /push operation
  3. If the push has already executed: reset the KRBTGT account password TWICE in succession (with a 10-hour interval between resets to allow replication across all DCs). Each reset: Set-ADAccountPassword -Identity KRBTGT -Reset -NewPassword (ConvertTo-SecureString -AsPlainText -Force '<randompassword>') — this invalidates all existing Kerberos tickets
  4. Force replication from known-good DCs to overwrite any malicious attribute changes: run repadmin /syncall /AdeP on each legitimate DC to synchronize the clean state across the domain
  5. Revoke all active sessions for any domain admin account that may have been used for the DCShadow push trigger: Revoke-ADUser sessions via domain controllers and reset the account password immediately
  6. If SID History injection is suspected alongside DCShadow: enumerate accounts with unexpected SID history using Get-ADUser -Filter * -Properties SIDHistory | Where-Object {$_.SIDHistory -ne $null} — remove unauthorized entries with Set-ADUser -Identity <user> -Remove @{SIDHistory='<SID>'}

Evidence Collection

  1. AD replication metadata: repadmin /showmeta <object_DN> — the attributeOriginatingDSA field identifies which DC last modified each attribute; any GUID not belonging to a known legitimate DC identifies DCShadow-modified attributes
  2. Windows Security Event ID 5137 from Domain Controllers (Directory Service log): captures object creation with objectClass, distinguishedName, and subject user — the definitive log evidence of rogue DC registration
  3. Windows Security Event ID 4928/4929 from Domain Controllers (Security log): replication partner establishment and removal with source DC name, directory partition, and timestamp
  4. AD Configuration partition export before remediation: ldifde -f config_export_%computername%.ldf -d CN=Configuration,DC=<domain> — preserves the full configuration partition state for forensic analysis
  5. Memory dump of the Mimikatz process (if still running): procdump.exe -ma <PID> C:\Evidence\mimikatz_<timestamp>.dmp — may contain staged attribute values and target object details
  6. Network packet capture: MS-DRSR (DRSUAPI) RPC traffic bears UUID E3514235-4B06-11D1-AB04-00C04FC2DCD2 — capture traffic between the rogue DC source IP and legitimate DCs on TCP 135 (RPC endpoint mapper) and dynamic ports 49152-65535
  7. Prefetch files on the attacker's machine: C:\Windows\Prefetch\MIMIKATZ.EXE-*.pf — provides execution timestamps and loaded module list
  8. Windows System Event Log and NTDS operational log on DCs: Event ID 1 from source NTDS in System log, and Microsoft-Windows-ActiveDirectory_DomainService/Operational for replication diagnostic events

Escalation Criteria

  • ! Any confirmed nTDSDSA object creation from a non-DC machine — treat as critical AD compromise requiring immediate CISO notification and incident response activation
  • ! Mimikatz with DCShadow arguments detected on a Domain Controller or a known domain admin workstation — assume credential compromise and full AD manipulation capability
  • ! Evidence of SID History injection alongside DCShadow (Security Event 4765: SID History added to an account) — an attacker may have silently granted themselves hidden domain admin privileges
  • ! Any modification to KRBTGT, privileged account attributes (adminCount=1, memberOf Domain Admins), or ACLs without corresponding change tickets — DCShadow may have silently elevated accounts or created persistence
  • ! Multiple Domain Controllers showing Event 4928 with the same unknown replication source within a short window — confirms the push phase successfully replicated malicious changes to production infrastructure
  • ! The rogue DC nTDSDSA object persists in AD after the attacking host goes offline — indicates the attacker completed the push and the change is now committed to the AD database

Investigation Guide

Forensic Artifacts

  • > Active Directory Configuration partition: CN=Sites,CN=Configuration,DC=<domain> — rogue server and nTDSDSA objects created by DCShadow persist in AD even after the attacking process terminates; enumerate with: Get-ADObject -Filter {objectClass -eq 'nTDSDSA'} -SearchBase (Get-ADRootDSE).configurationNamingContext -Properties *
  • > AD replication metadata per-attribute: repadmin /showobjmeta <DC> <object_DN> — the attributeOriginatingDSA field will reference an unknown DC GUID for DCShadow-modified attributes; cross-reference GUIDs against known legitimate DC invocationIDs
  • > Windows Security Event ID 5137 in Directory Service event log on Domain Controllers — object creation record with objectClass, distinguishedName, and the subject user who performed the registration
  • > Windows Security Event ID 5136 on Domain Controllers — attribute modification records for each value changed via the DCShadow push, including attributeLDAPDisplayName and attributeValue
  • > Network artifacts: MS-DRSR RPC UUID E3514235-4B06-11D1-AB04-00C04FC2DCD2 in packet captures; traffic will originate from a non-DC IP address initiating RPC connections to legitimate DC addresses
  • > SPN registration in LDAP: computer objects with servicePrincipalName values matching 'GC/*', 'E3514235-4B06-11D1-AB04-00C04FC2DCD2/*', or 'DrsRpc/*' on non-DC machines — query: ldapsearch -LLL '(servicePrincipalName=GC/*)' dn servicePrincipalName
  • > Prefetch files on attacker machine: C:\Windows\Prefetch\MIMIKATZ.EXE-*.pf provides execution timestamps and lists loaded DLLs including samlib.dll and lsaext.dll
  • > Registry on compromised host: HKLM\SYSTEM\CurrentControlSet\Services\NTDS may contain attacker-created entries if the rogue DC was configured for persistence beyond the attack session

Tuning Guidance

DCShadow detection requires a layered approach as no single signal is definitive and the technique is specifically designed to bypass logging. Start by establishing an authoritative baseline of all legitimate Domain Controller objects: Get-ADDomainController -Filter * | Select-Object Name,ComputerObjectDN,InvocationId. Alert on ANY new nTDSDSA object creation (Event 5137) that does not correspond to an approved DC promotion change ticket — this should be near-zero in a stable environment and is your highest-fidelity signal. For Events 4928/4929 tuning, build an explicit allowlist of all known replication partner pairs (every DC-to-DC combination across all sites) and alert on any replication source outside this set. For process-based detection (Branch 1), Mimikatz is frequently renamed by attackers — in addition to filename matching, consider YARA scanning on binary signatures and look for the dcshadow keyword in any command line argument regardless of parent process name. The dual-process requirement of DCShadow (SYSTEM + domain admin sessions on the same machine within minutes) is a uniquely strong behavioral hunt signal: look for overlapping elevated Mimikatz processes on the same host using a 10-minute correlation window. Consider deploying a canary nTDSDSA object (a fake DC registration that should never appear in real replication) monitored via Event 5136 — any modification of this canary object indicates DCShadow reconnaissance. Enable full Directory Service audit logging via Group Policy: Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy > DS Access > Audit Directory Service Changes = Success. Finally, deploy DCSYNCMonitor (github.com/shellster/DCSYNCMonitor) as a dedicated replication anomaly detector on all Domain Controllers.


Hunting Queries

Hunt for computer accounts recently gaining Domain Controller-specific SPNs (Global Catalog GC/, DRSUapi UUID E3514235-4B06-11D1-AB04-00C04FC2DCD2, or DrsRpc). These SPNs should only exist on legitimate domain controllers. A workstation or member server acquiring these SPNs is the primary AD indicator of a DCShadow rogue DC registration. This query uses Security Event 4742 (computer account changed) and filters for DC-exclusive SPN patterns that should never appear on non-DC objects.

Hunting — KQL
kql
// Hunt for computer accounts with DC-specific SPNs that should not appear on non-DC machines
SecurityEvent
| where TimeGenerated > ago(7d)
| where EventID == 4742
| where EventData has_any ("GC/", "E3514235-4B06-11D1-AB04-00C04FC2DCD2", "DrsRpc", "ldap/")
| extend TargetComputer = tostring(parse_xml(EventData).EventData.Data[0]),
         SubjectUser = strcat(SubjectUserName, "@", SubjectDomainName)
| project TimeGenerated, Computer, SubjectUser, TargetComputer, tostring(EventData)
| join kind=leftanti (
    SecurityEvent
    | where TimeGenerated > ago(30d)
    | where EventID == 4741
    | project Computer
    | distinct Computer
) on Computer
| sort by TimeGenerated desc
Hunting — SPL
spl
index=wineventlog sourcetype="WinEventLog:Security" EventCode=4742
  (Message="*GC/*" OR Message="*E3514235-4B06-11D1-AB04-00C04FC2DCD2*" OR Message="*DrsRpc*")
| rex field=Message "Account Name:\s+(?P<TargetComputer>[^\r\n]+)"
| rex field=Message "Subject:\s+.*?Account Name:\s+(?P<SubjectUser>[^\r\n]+)"
| eval SPNType=case(
    match(Message, "GC/"), "GlobalCatalog",
    match(Message, "E3514235"), "DRSUapi",
    match(Message, "DrsRpc"), "DrsRpc",
    true(), "Other_DC_SPN")
| table _time, host, SubjectUser, TargetComputer, SPNType, Message
| sort - _time

Hunt for bursts of AD object modifications (Events 5136 directory attribute modification, 5137 object creation) within 5-minute windows. DCShadow attacks frequently push multiple attribute changes simultaneously during the /push phase. A high volume of DS object modifications in a short window — especially a mix of both creates (5137) and modifications (5136) — warrants immediate investigation. This pattern is distinct from the main detection which focuses on process and SPN indicators.

Hunting — KQL
kql
// Hunt for bursts of AD object modifications within short windows — DCShadow push signature
SecurityEvent
| where TimeGenerated > ago(7d)
| where EventID in (5136, 5137)
| summarize ModificationCount = count(),
            UniqueObjects = dcount(tostring(parse_xml(EventData).ObjectDN)),
            EventTypes = make_set(EventID),
            Operators = make_set(SubjectUserName)
            by bin(TimeGenerated, 5m), Computer
| where ModificationCount > 15
| extend ContainsBothCreateAndModify = array_length(EventTypes) > 1
| sort by ModificationCount desc
Hunting — SPL
spl
index=wineventlog sourcetype="WinEventLog:Security" (EventCode=5136 OR EventCode=5137)
| bin _time span=5m
| stats count as ModificationCount,
        dc(ObjectDN) as UniqueObjects,
        values(EventCode) as EventTypes,
        values(SubjectUserName) as Operators
        by _time, host
| where ModificationCount > 15
| eval HasBothCreateAndModify=if(mvcount(EventTypes) > 1, "yes", "no")
| sort - ModificationCount

Hunt for SYSTEM-context network connections to RPC ports (135 and dynamic range 49152-65535) that are temporally correlated with Mimikatz/DCShadow process execution on the same host within a 30-minute window. DCShadow's push phase requires the rogue DC to initiate MS-DRSR RPC connections to legitimate DCs. This temporal correlation between Mimikatz execution and SYSTEM-level RPC traffic is a strong behavioral indicator of an active DCShadow push operation, distinct from the process command-line indicators in the primary detection.

Hunting — KQL
kql
// Hunt for SYSTEM-context RPC connections temporally correlated with Mimikatz DCShadow execution
let MimikatzEvents = DeviceProcessEvents
| where Timestamp > ago(7d)
| where ProcessCommandLine has_any ("lsadump::dcshadow", "dcshadow")
| project DeviceName, MimikatzTime = Timestamp, MimikatzCmdLine = ProcessCommandLine;
DeviceNetworkEvents
| where Timestamp > ago(7d)
| where InitiatingProcessAccountSid == "S-1-5-18"  // NT AUTHORITY\SYSTEM
| where RemotePort == 135 or (RemotePort >= 49152 and RemotePort <= 65535)
| join kind=inner MimikatzEvents on DeviceName
| where abs(datetime_diff('minute', Timestamp, MimikatzTime)) < 30
| project Timestamp, DeviceName, RemoteIP, RemotePort,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         MimikatzCmdLine, MimikatzTime
| sort by Timestamp desc
Hunting — SPL
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=3
  User="NT AUTHORITY\\SYSTEM"
  (DestinationPort=135 OR (DestinationPort>=49152 AND DestinationPort<=65535))
| eval NetworkTime=_time
| join type=inner host [
    search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
      (CommandLine="*lsadump::dcshadow*" OR CommandLine="*dcshadow*")
    | eval MimikatzTime=_time
    | table host, MimikatzTime, CommandLine
]
| eval TimeDeltaMinutes=abs(NetworkTime - MimikatzTime) / 60
| where TimeDeltaMinutes < 30
| table _time, host, DestinationIp, DestinationPort, Image, CommandLine, TimeDeltaMinutes
| sort - _time

Atomic Red Team Tests

Test 1 Enumerate Existing DC Registrations (Baseline / Forensic Recon)
windows

Queries the AD Configuration partition to enumerate all nTDSDSA objects representing NTDS installations on each Domain Controller. This read-only step establishes a baseline of legitimate DC registrations. In a post-attack forensic context, any nTDSDSA object without a corresponding known DC indicates a DCShadow registration that was not cleaned up. Safe to run in any environment — no modifications made.

Command

powershell
powershell.exe -Command "$ConfigNC = (Get-ADRootDSE).configurationNamingContext; Get-ADObject -SearchBase \"CN=Sites,$ConfigNC\" -Filter {objectClass -eq 'nTDSDSA'} -Properties whenCreated,whenChanged,dNSHostName | Select-Object DistinguishedName,whenCreated,whenChanged,dNSHostName | Format-Table -AutoSize"

Expected Telemetry

Sysmon Event ID 1: powershell.exe process creation with LDAP query arguments. No directory service modification events (read-only). PowerShell ScriptBlock Log Event ID 4104 capturing the LDAP filter targeting nTDSDSA objectClass. No network connections beyond standard LDAP to port 389.

Expected Detection

This read-only command does NOT trigger the primary detection rules. Use it to validate your legitimate DC baseline and identify any pre-existing rogue nTDSDSA objects. The output should list only known DCs — any unexpected entry warrants immediate investigation using repadmin /showrepl.

Test 2 DCShadow Stage Phase — Register Rogue DC (Mimikatz SYSTEM Session)
windows

Simulates the first of two required DCShadow Mimikatz sessions: the SYSTEM-privileged process that registers the rogue DC in the AD Configuration partition and stages an attribute change on a test computer object. This test modifies only the benign 'description' attribute of a pre-created test object. Requires executing Mimikatz as SYSTEM (e.g., via PsExec -s or a SYSTEM-context shell). The push will not succeed without the second trigger session, but the registration events and process telemetry still fire.

Command

powershell
PsExec.exe -s -i cmd.exe /c "mimikatz.exe \"lsadump::dcshadow /object:CN=TestMachine,CN=Computers,DC=lab,DC=local /attribute:description /value:DCShadowTestArtifact\" exit"

Cleanup

powershell
powershell.exe -Command "Set-ADComputer -Identity TestMachine -Description ''"

Expected Telemetry

Sysmon Event ID 1: mimikatz.exe process creation under NT AUTHORITY\SYSTEM context, CommandLine containing lsadump::dcshadow. Windows Security Event ID 5137 on Domain Controllers: new nTDSDSA object created under CN=Sites in the Configuration partition. Windows Security Event ID 4742: computer account of the attacking machine modified with GC/ and DRSUapi SPNs added. Sysmon Event ID 3: RPC connections from mimikatz.exe to DC on port 135 and dynamic RPC ports.

Expected Detection

Branch 1 (Mimikatz DCShadow process) fires immediately on lsadump::dcshadow command-line. Branch 2 (Event 5137) fires on the DC when the nTDSDSA object is created. Branch 4 (Event 4742) fires when DC-specific SPNs are registered on the attacking computer account. KQL: DetectionBranch == 'MimikatzDCShadow'. SPL: DetectionBranch='MimikatzDCShadow'.

Test 3 DCShadow Push Phase — Trigger Replication (Mimikatz Domain Admin Session)
windows

Simulates the second required DCShadow Mimikatz session: the domain admin-privileged process that triggers the rogue DC to push its staged changes into legitimate DC replication. This must run concurrently with an active SYSTEM-context staging session (Atomic Test 2). Requires domain administrator credentials. The /push command initiates the MS-DRSR RPC connection from the rogue DC to legitimate DCs.

Command

powershell
mimikatz.exe "lsadump::dcshadow /push" exit

Cleanup

powershell
powershell.exe -Command "$ConfigNC = (Get-ADRootDSE).configurationNamingContext; $rogueObjects = Get-ADObject -SearchBase \"CN=Sites,$ConfigNC\" -Filter {objectClass -eq 'nTDSDSA'} -Properties * | Where-Object { (Get-ADDomainController -Filter {Name -eq $_.Name}) -eq $null }; foreach ($obj in $rogueObjects) { Remove-ADObject -Identity $obj.DistinguishedName -Recursive -Confirm:$false }"

Expected Telemetry

Sysmon Event ID 1: mimikatz.exe process creation with lsadump::dcshadow /push argument. Windows Security Event ID 4928 on receiving Domain Controllers: replica source naming context established, showing the rogue DC as the source. Windows Security Event ID 5136 on DCs: attribute modification on the target AD object (description attribute). Sysmon Event ID 3: outbound RPC connections to legitimate DC IP addresses on dynamic ports.

Expected Detection

Branch 1 (Mimikatz /push command line) fires on process creation. Branch 3 (Event 4928) fires on the receiving DC as the replication source is established. KQL: DetectionBranch == 'ReplicationSourceChange'. SPL: DetectionBranch='ReplicationSourceChange'. The staged attribute change (description) will be committed to the target object in AD after successful push.

Test 4 Validate Replication Topology for Rogue DC Partners
windows

Uses built-in Windows AD replication diagnostic tools to detect unexpected replication partners — the primary forensic response action after a suspected DCShadow attack. Exports replication topology to CSV and displays a summary. Any machine appearing as a replication partner that is not in the known DC list indicates a DCShadow registration that successfully registered or persisted. Safe to run in any domain-joined environment.

Command

powershell
repadmin /showrepl * /csv > C:\Temp\repadmin_repl_%COMPUTERNAME%.csv & repadmin /replsummary & repadmin /showconn

Cleanup

powershell
del C:\Temp\repadmin_repl_%COMPUTERNAME%.csv

Expected Telemetry

Sysmon Event ID 1: repadmin.exe process creation (multiple instances for each flag). No AD modification events (read-only diagnostic). The /showconn output lists all inbound and outbound replication connections — any connection referencing an unexpected computer name or GUID identifies a rogue DC that has successfully registered in the replication topology.

Expected Detection

This read-only forensic command does NOT trigger the primary detection rules. Analyze the CSV output: any row where 'Source DSA' does not match a known DC hostname or site is a DCShadow artifact. Use repadmin /showobjmeta on affected objects to confirm which attributes were modified by the rogue DC.

Related Detections