135 - DCOM

Distributed Component Object Modelarrow-up-right (DCOM) is a Microsoft technology that allows software components to communicate across different computers on a network. It extends the Component Object Model (COM) to support remote communication. DCOM runs on top of the RPC protocol over TCP/IP. It first connects over port 135, then switches to dynamically assigned high ports (typically 49152–65535) for further communication.

DCOM objects are identified and configured through the Windows registry. Each object is linked to several key identifiers:

  • CLSID (Class Identifier) is a unique GUID that points to the object’s implementation.

  • ProgID (Programmatic Identifier) is an optional, user-friendly name for the object.

  • AppID (Application Identifier) defines configuration settings such as authentication and remote access permissions for one or more COM objects.

To use DCOM for lateral movement, the attacker must have the required permissions. This usually includes local or network access and membership in groups such as Distributed COM Users or Administrators. These permissions can be configured through the DCOM Configuration tool (dcomcnfg), Group Policy, or the Windows registry.

Enumeration

$ nmap -p135,49152-65535 10.129.229.244 -A

Lateral Movement

Windows

MMC20.Application

circle-exclamation

The MMC20.Application object allows remote interaction with Microsoft Management Console (MMC). This enables attackers to execute commands and perform administrative tasks through its GUI components.

# Create an instance of the MMC20.Application object on SVR02 (pivot host)
$mmc = [activator]::CreateInstance([type]::GetTypeFromProgID("MMC20.Application","172.10.10.25"));
circle-info

The ExecuteShellCommandarrow-up-right function comes from the Document.ActiveView property. The WindowState parameter specifies whether a window is minimized, maximized, or restored.

ShellWindows & ShellBrowserWindow

ShellWindowsarrow-up-right and ShellBrowserWindow objects allow remote interaction with Windows Explorer sessions. ShellWindows can enumerate and control open Explorer windows, enabling file access and command execution, while ShellBrowserWindow provides more specific control over Explorer browser windows and file operations.

Because these objects do not have a ProgID, we must use their CLSID to create them remotely.

Linux

circle-info

If the TCP port 445 is unavailable, use -no-output → it won’t try to retrieve the output via the ADMIN$ share.

The dcomexec.pyarrow-up-right script provides RCE on Windows systems using DCOM. It works similarly to WMI-based tools but uses different DCOM endpoints. It communicates over TCP port 445 and retrieves output through the ADMIN$ share. This tool supports objects such as MMC20.Application, ShellWindows, and ShellBrowserWindow.

Last updated