T1021.003: Distributed Component Object Model
Adversaries may use Valid Accounts to interact with remote machines by taking advantage of Distributed Component Object Model (DCOM). The adversary may then perform actions as the logged-on user.
The Windows Component Object Model (COM) is a component of the native Windows application programming interface (API) that enables interaction between software objects, or executable code that implements one or more interfaces. Through COM, a client object can call methods of server objects, which are typically Dynamic Link Libraries (DLL) or executables (EXE). Distributed COM (DCOM) is transparent middleware that extends the functionality of COM beyond a local computer using remote procedure call (RPC) technology.
Permissions to interact with local and remote server COM objects are specified by access control lists (ACL) in the Registry. By default, only Administrators may remotely activate and launch COM objects through DCOM.
Through DCOM, adversaries operating in the context of an appropriately privileged user can remotely obtain arbitrary and even direct shellcode execution through Office applications as well as other Windows objects that contain insecure methods. DCOM can also execute macros in existing documents and may also invoke Dynamic Data Exchange (DDE) execution directly through a COM created instance of a Microsoft Office application, bypassing the need for a malicious document. DCOM can be used as a method of remotely interacting with Windows Management Instrumentation.
Positive Technologies products that cover the technique
MaxPatrol SIEM knowledge base
remote_work: PT-CR-1937: SMB_RPC_Internet_Connection: Network interaction with an internet source via SMB or RPC that can be used by attackers to get initial access mitre_attck_lateral_movement: PT-CR-2025: DCOM_Excel_Abuse: The Excel DCOM component was used to start processes mitre_attck_lateral_movement: PT-CR-1095: LiquidSnake_WMI_EventFilter: The remote use of the LiquidSnake utility to perform malicious actions with WMI subscriptions and execute code is detected mitre_attck_lateral_movement: PT-CR-220: Client_Side_Execution_Via_DCOM: Detected using DCOM for remote code execution
Detection
ID | DS0029 | Data source and component | Network Traffic: Network Connection Creation | Description | Monitor for newly constructed network connections that may use Valid Accounts to interact with remote machines using Distributed Component Object Model (DCOM). The adversary may then perform actions as the logged-on user. Monitor for any influxes or abnormal increases in DCOM related Distributed Computing Environment/Remote Procedure Call (DCE/RPC) traffic (typically over port 135). Note: Network Analysis frameworks such as Zeek can be used to capture, decode, and alert on RPC network flows. Traffic to the RPC Endpoint Mapper will always have the destination port of 135. Assuming success, RPC traffic will continue to the endpoint. The endpoint and the client both bind to dynamically assigned ports (on Windows, this is typically greater than 49152). The traffic between the client and endpoint can be detected by looking at traffic to 135 followed by traffic where the source and destination ports are at least 49152. |
---|
ID | DS0011 | Data source and component | Module: Module Load | Description | Monitor for COM objects loading DLLs and other modules not typically associated with the application. Note: Sysmon Event ID 7 (Image loaded) can be used to monitor for suspicious DLLs loaded by the DCOM Server Process Launcher which runs inside of svchost.exe. This is a particularly noisy event and can generate a large volume of data, so we recommend baselining and filtering out any known benign svchost.exe module loads that occur as part of its typical operation. |
---|
ID | DS0009 | Data source and component | Process: Process Creation | Description | Monitor for newly executed processes associated with DCOM activity, especially those invoked by a user different than the one currently logged on. Enumeration of COM objects, via Query Registry or PowerShell, may also precede malicious use. The Microsoft Management Console (mmc.exe) can be by used by threat actors used to spawn arbitrary processes through DCOM. The typical process tree for this method looks like: svchost.exe —> mmc.exe —> .exe. Accordingly, look for process creation events of mmc.exe in conjunction with the -Embedding command-line argument, along with suspicious child processes that can be used for malicious purposes, such as cmd.exe, reg.exe, etc. Similar to the Microsoft Management Console, Excel can also be used to execute processes through DCOM. In this case, the typical process tree looks like: svchost.exe —> excel.exe —> .exe. Look for process creation events of excel.exe in conjunction with the /automation -Embedding command-line argument, along with suspicious child processes that can be used for malicious purposes, such as cmd.exe, reg.exe, etc. |
---|
Mitigation
ID | M1042 | Name | Disable or Remove Feature or Program | Description | Consider disabling DCOM through Dcomcnfg.exe. |
---|
ID | M1048 | Name | Application Isolation and Sandboxing | Description | Ensure all COM alerts and Protected View are enabled. |
---|
ID | M1026 | Name | Privileged Account Management | Description | Modify Registry settings (directly or using Dcomcnfg.exe) in Modify Registry settings (directly or using Dcomcnfg.exe) in |
---|
ID | M1030 | Name | Network Segmentation | Description | Enable Windows firewall, which prevents DCOM instantiation by default. |
---|