Abuse of RemCom for Lateral Movement and Remote Execution
RemCom is an open-source tool functionally similar to PsExec, frequently abused by threat actors to perform lateral movement and remote command execution within Windows environments.
RemCom is an open-source remote administration tool that functions similarly to the well-known PsExec utility. It is designed to allow administrators to execute commands on remote Windows systems; however, it is frequently abused by threat actors for lateral movement and remote command execution within compromised networks. The utility operates by creating and starting a Windows service on the target host to execute the attacker's payload. Monitoring for the execution of 'remcom.exe' or files identifying as such in their metadata is essential for detecting unauthorized remote access. Defenders should pay particular attention to command-line arguments that include authentication parameters, such as '/user:' and '/pwd:', which are indicative of its remote operational mode. Because the tool mimics legitimate administrative behavior, detection efforts must be tuned to account for authorized usage patterns within the specific environment.
Attack Chain
- The attacker gains initial access to a primary host within the network.
- The attacker identifies a target system for lateral movement.
- The attacker copies the 'remcom.exe' binary to the target system or executes it from a network share.
- RemCom creates a Windows service on the target host (typically named 'RemComSvc') to facilitate remote execution.
- The attacker executes the binary with specific command-line arguments, including '/user:' and '/pwd:' to provide administrative credentials.
- The target Windows service launches the specified command or payload under the provided security context.
- The attacker gains remote command execution and continues to pivot throughout the network or achieve their final objective, such as credential theft or data exfiltration.
Impact
Successful abuse of RemCom allows an attacker to achieve remote code execution on target hosts, facilitating lateral movement and full compromise of systems within a Windows domain. This technique has been associated with sophisticated intrusion campaigns where attackers leverage administrative tools to blend in with legitimate network traffic while moving toward their final objectives.
Recommendation
- Deploy the provided Sigma rule to detect the execution of RemCom via command-line arguments and file metadata.
- Ingest Sysmon Event ID 1 (Process Creation) and Windows Security Event ID 4688 to ensure full visibility into process parent-child relationships and command-line strings.
- Normalize process execution logs using the Splunk CIM 'Processes' data model to ensure detection consistency.
- Tune detections to filter out legitimate administrative usage of remote execution tools within your environment.
Immediate actions
Deploy Sigma rule and enable command-line logging
Threat Hunt
Search for remcom.exe execution in historic logs
Data: Process creation logs
Mitigations
Restrict the use of remote administration tools to authorized management subnets
T1569.002
Detection coverage 1
Detect RemCom Execution
mediumDetects the execution of RemCom.exe via process name or original filename with command-line arguments indicative of remote service usage.
Detection queries are available on the platform. Get full rules →