Detect Rogue Domain Controller in IBM QRadar
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.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1207 Rogue Domain Controller
- Canonical reference
- https://attack.mitre.org/techniques/T1207/
QRadar Detection Query
SELECT
DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') AS EventTime,
LOGSOURCENAME(logsourceid) AS LogSource,
username,
sourceip,
"EventID",
CASE
WHEN "EventID" = '1' THEN 'MimikatzDCShadow'
WHEN "EventID" = '5137' THEN 'RogueDCObjectCreated'
WHEN "EventID" IN ('4928','4929') THEN 'ReplicationSourceChange'
WHEN "EventID" = '4742' THEN 'DCLikeSPNAdded'
ELSE 'DCShadowIndicator'
END AS DetectionBranch,
CASE
WHEN "EventID" = '1' THEN 'Mimikatz DCShadow command-line arguments detected on endpoint'
WHEN "EventID" = '5137' THEN 'nTDSDSA object created in AD Configuration partition - possible rogue DC registration'
WHEN "EventID" = '4928' THEN 'AD replica source naming context established - verify this is a legitimate DC'
WHEN "EventID" = '4929' THEN 'AD replica source naming context removed - verify expected decommission'
WHEN "EventID" = '4742' THEN 'Computer account modified with Global Catalog or DRSUapi SPN'
ELSE 'DCShadow indicator'
END AS AlertReason,
payload
FROM events
WHERE
(
(
"EventID" = '1'
AND (
payload ILIKE '%lsadump::dcshadow%'
OR payload ILIKE '%dcshadow /push%'
OR payload ILIKE '%dcshadow /start%'
OR payload ILIKE '%dcshadow /domain%'
OR payload ILIKE '%dcshadow /object%'
OR payload ILIKE '%dcshadow /attribute%'
)
)
OR (
"EventID" = '5137'
AND (payload ILIKE '%nTDSDSA%' OR payload ILIKE '%NTDS Settings%')
)
OR "EventID" IN ('4928', '4929')
OR (
"EventID" = '4742'
AND (
payload ILIKE '%GC/%'
OR payload ILIKE '%E3514235-4B06-11D1-AB04-00C04FC2DCD2%'
)
)
)
LAST 24 HOURS
ORDER BY starttime DESC IBM QRadar AQL query detecting DCShadow / Rogue Domain Controller (T1207) attacks across four branches using Windows Security Event Log and Sysmon data: Sysmon Event 1 with Mimikatz DCShadow command-line arguments, Security Event 5137 for nTDSDSA AD object creation, Security Events 4928/4929 for AD replication source context changes, and Security Event 4742 for computer account modification with DC-like SPNs.
Data Sources
Required Tables
False Positives & Tuning
- DC promotion and demotion via Server Manager or Install-ADDSDomainController PowerShell cmdlet generates Events 4928, 4929, and 5137 during normal ADDS role installation — cross-reference with CMDB and approved change records for planned promotions before triaging
- AD forest or domain consolidation projects using ADMT or Quest tools that perform replication-like object transfers between domains, triggering unexpected 5137 and 4742 events during inter-forest migrations
- Security scanning and AD enumeration tools such as PingCastle or ADRecon querying the Configuration partition may generate object access events — these should not create nTDSDSA objects but can produce 5137 events if schema modifications occur during scanning
Other platforms for T1207
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.
- 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.
- 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.
- 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.
- 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.
References (10)
- https://attack.mitre.org/techniques/T1207/
- https://www.dcshadow.com/
- https://adsecurity.org/?page_id=1821
- https://github.com/shellster/DCSYNCMonitor
- https://adds-security.blogspot.fr/2018/02/detecter-dcshadow-impossible.html
- https://msdn.microsoft.com/en-us/library/ms677626.aspx
- https://github.com/gentilkiwi/mimikatz/wiki/module-~-lsadump
- https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/component-updates/directory-services-component-updates
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceprocessevents-table
- https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5137
Unlock Pro Content
Get the full detection package for T1207 including response playbook, investigation guide, and atomic red team tests.