Domain Controllers as Lateral Movement Hubs
Concept
Section titled βConceptβA Domain Controller (DC) is the operational core of an Active Directory environment. It hosts ntds.dit, the Kerberos KDC, enterprise DNS, SYSVOL and NETLOGON shares, and enforces Group Policy Objects (GPOs).
When an adversary compromises a DC (via DCSync, Tier 0 credential theft, or vulnerabilities such as Zerologon or NoPac), they transform it from a directory repository into an enterprise lateral movement hub:
- Universal Network Reachability: DCs have permitted firewall paths to every workstation, server, and appliance across the enterprise (SMB 445, WMI/RPC 135, WinRM 5985/5986, DNS 53).
- Universal Security Authority: The DC computer account (
DC$) and administrative identities possess authority to authenticate and manage all domain members. - Native Mass Distribution Mechanisms: Centralized management capabilities (GPOs, startup scripts, SYSVOL replication, multi-node WMI) allow simultaneous code execution across the fleet.
Why It Matters in DFIR
Section titled βWhy It Matters in DFIRβRecognizing that a DC operated as a pivot changes the investigative scope:
- Triage Misdirection: Threat responders often focus on inbound DC attacks and overlook outbound propagation. A DC compromised at 02:00 UTC might be used at 04:00 UTC to execute a PowerShell deployment script pushing ransomware to 500 servers. Investigators must audit outbound DC connections.
- Weaponization of
SYSVOLandNETLOGON: Threat actors place malicious payloads directly in replicated shares. Because endpoints periodically pull fromSYSVOLto process GPOs, payloads are downloaded under legitimate administrative processes. - Host Execution Signatures: Outbound pivot tools executed on the DC (
PsExec,Invoke-TheHash, custom WMI scripts) generate distinct outbound network sockets and process command lines.
How It Works
Section titled βHow It WorksβTopology of a Weaponized Domain Controller Hub
Section titled βTopology of a Weaponized Domain Controller Hubβ βββββββββββββββββββββββββββββββββββ β Domain Controller (DC) β β (Compromised by Attacker) β ββββββββββββββββββ¬βββββββββββββββββ β βββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ β 1. SMB / RPC (Port 445/135) β 2. SYSVOL / GPO β 3. WinRM (Port 5985) βΌ βΌ βΌβββββββββββββββββββββββββββ βββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ Database Server β β Fleet Endpoints β β Web Jump Server ββ (PsExec / wmiexec) β β (Malicious GPO Startup) β β (Invoke-Command) ββββββββββββββββββββββββββββ βββββββββββββββββββββββββββ βββββββββββββββββββββββββββ- Direct Push via SMB/RPC: The attacker launches a script from the DC connecting across port 445 to all discovered subnet IPs using
Domain Adminscredentials. - Passive Pull via GPO / SYSVOL: The attacker creates or modifies a GPO linked to the domain root. Workstations fetch the updated policy during periodic background refreshes (every 90 minutes) and execute the payload.
- PowerShell Remoting (WinRM): The attacker runs
Invoke-Command -ComputerName (Get-ADComputer -Filter *) -ScriptBlock { ... }directly from the DC console.
What Is Possible
Section titled βWhat Is Possibleβ- Fleet-Wide Deployment in Minutes: Because firewall rules permit traffic from DCs to endpoints, internal micro-segmentation rarely obstructs outbound DC connections.
- Leveraging Living-off-the-Land Binaries (LOLBins): Attackers employ native binaries (
psexec.exe,wmic.exe,powershell.exe) already present on the DC, blending in with legitimate systems administration. - Hijacking Concurrent Administrative Sessions: If other engineers are logged into the DC via RDP or console, an attacker can dump their LSASS tokens or inject into their sessions.
What Is Not Possible
Section titled βWhat Is Not Possibleβ- Concealing Outbound Network Sockets: Host firewalls, active socket tables (
netstat), and Sysmon/EDR telemetry capture outbound network connections to ports 445, 135, or 5985. - Targeting Powered-Down Hosts Directly: Real-time push scripts fail against offline machines, generating diagnostic network timeout errors.
- Modifying SYSVOL Without DFSR Replication: Any file placed in
SYSVOLautomatically replicates to all other domain controllers across the forest via Distributed File System Replication.
Common DFIR Confusions
Section titled βCommon DFIR Confusionsβ| Frequent Confusion | Verifiable Forensic Reality |
|---|---|
| βDomain Controllers never initiate connections to client workstations.β | In standard operations, DCs act as servers receiving inbound traffic. Massive outbound connections from a DC to client ports 445 or 5985 represent a critical anomaly. |
| βBecause the DC is encrypted, it was the first machine hit.β | Threat actors typically encrypt the DC last, preserving its infrastructure functionality until all endpoints have received the payload. |
| βAuditing the DC reveals all actions taken on target endpoints.β | The DC does not capture client-side local process executions. Validating execution requires endpoint-level triage. |
Concrete Forensic Example
Section titled βConcrete Forensic ExampleβDuring a major LockBit incident response:
- 1,200 workstations are encrypted within a 45-minute window.
- Reviewing
DC01security and Sysmon logs reveals:- 03:12 UTC: PowerShell execution under
CORP\da_admin. - Sysmon Event 1:
powershell.exe -ExecutionPolicy Bypass -File C:\ProgramData\deploy.ps1. - The script enumerated domain computers and looped through them invoking
wmic /node:<IP> process call create "C:\Windows\Temp\locker.exe".
- 03:12 UTC: PowerShell execution under
- 03:58 UTC: Following the loop completion, local encryption was triggered on
DC01. - DFIR Synthesis: The domain controller operated as an automated deployment server prior to its own detonation.
Key Forensic Artefacts
Section titled βKey Forensic Artefactsβ- Domain Controller Event Logs:
- Sysmon Event ID 3 (Network Connection): Outbound connections from the DC where
DestinationPort: 445or5985targets internal clients. - Sysmon Event ID 1 / Event 4688: Execution of deployment scripts,
wmic.exe,psexec.exe. - Event ID 4624 (Logon Type 2 / 10): Initial interactive or RDP session established on the DC.
- Sysmon Event ID 3 (Network Connection): Outbound connections from the DC where
- Target Endpoint Security Logs:
- Event ID 4624 (Logon Type 3): Network logon where
IpAddressmatches the DC IP address! - Event ID 7045: Service installation originating from the DC IP.
- Event ID 4624 (Logon Type 3): Network logon where
Investigation Methods
Section titled βInvestigation Methodsβ- Audit Outbound DC Network Connections: Inspect perimeter and internal firewall logs for anomalous traffic bursts originating from the DC toward client subnets.
- Inspect Shared Folders (
SYSVOL/NETLOGON): Audit timestamps and hashes of.bat,.ps1, and.exefiles in\\domain\SYSVOL\domain\scripts. - Hunt for Outbound LOLBin Executions: Filter DC process logs for parent processes spawning network tools targeting multiple remote hosts.
Investigative Tooling
Section titled βInvestigative Toolingβ- Chainsaw / Hayabusa: Detection rules for mass lateral movement and LOLBins executed from domain controllers.
- PowerShell / Get-WinEvent:
Terminal window # Identify Type 3 logons received from a DC IP addressGet-WinEvent -FilterHashtable @{LogName='Security'; ID=4624} |Where-Object { $_.Properties[7].Value -eq 3 -and $_.Properties[18].Value -eq '10.0.1.10' } | # DC IPSelect-Object TimeCreated, @{N='User';E={$_.Properties[5].Value}}, @{N='Workstation';E={$_.Properties[11].Value}}
Key Takeaways
Section titled βKey Takeawaysβ- Domain controllers are frequently weaponized as lateral movement hubs.
- Outbound connections from DCs to client SMB/WMI/WinRM ports are a critical forensic anomaly.
- Attackers exploit
SYSVOLand GPOs to automate code execution enterprise-wide.
References & Further Reading
Section titled βReferences & Further Readingβ- Microsoft Learn: Securing Domain Controllers Against Attack
- Card 07 β Windows Groups and Nested Group Membership
- Card 24 β Lateral Movement Across Active Directory Domains: Methods, Paths, and Constraints
- Card 26 β DCSync: Mechanics, Prerequisites, and Forensic Artefacts
- Card 31 β Group Policy Objects (GPO) as Lateral Movement and Persistence Vectors