MSIExec Spawning Discovery Commands
Detection of msiexec.exe spawning discovery commands indicating potential reconnaissance activity by attackers for system information gathering and lateral movement.
This detection focuses on identifying suspicious behavior where msiexec.exe, a legitimate Windows utility for installing, uninstalling, and configuring software, is used to spawn multiple discovery commands. This activity is often associated with attackers attempting to gather system information, enumerate the network, and identify potential targets for lateral movement. The technique is typically observed post-compromise, after initial access has been achieved through other means. This behavior matters to defenders as it is a key indicator of malicious activity and potential privilege escalation or data exfiltration attempts. The detection leverages Endpoint Detection and Response (EDR) data, specifically process creation events, to identify instances where msiexec.exe is the parent process of common discovery tools.
Attack Chain
- An attacker gains initial access to the system through a vulnerability, phishing, or other means.
- The attacker leverages
msiexec.exeto execute discovery commands. msiexec.exespawns processes such asipconfig.exe,net.exe,systeminfo.exe, orwmic.exeto gather network configuration, user information, and system details.- The attacker uses commands within
cmd.exeorpowershell.exeto execute the discovery commands. For example,cmd.exe /c ipconfig /allorpowershell.exe Get-NetIPConfiguration. - The attacker filters the output of these commands to identify valuable information such as domain names, user accounts, and system architecture.
- The attacker uses the gathered information to identify potential targets for lateral movement and privilege escalation.
- The attacker attempts to move laterally to other systems using stolen credentials or exploits.
Impact
Successful exploitation of this technique can lead to a comprehensive understanding of the compromised environment. Attackers can leverage gathered information to escalate privileges, move laterally to other systems, and ultimately exfiltrate sensitive data or deploy ransomware. The impact could range from a single compromised workstation to a complete network breach, depending on the scope of the attacker’s activity.
Recommendation
- Enable process monitoring and command-line logging on all endpoints to capture the necessary data for detection.
- Deploy the Sigma rule
MSIExec Spawning Discovery Commandsto your SIEM and tune it to your environment. - Investigate any instances of
msiexec.exespawning multiple discovery commands, as this behavior is unusual in normal system operations. - Implement least privilege principles to limit the impact of compromised accounts and prevent lateral movement.
Detection coverage 2
MSIExec Spawning Discovery Commands
mediumDetects MSIExec spawning discovery commands.
MSIExec Spawning Discovery Tools via PowerShell
mediumDetects MSIExec using PowerShell to execute discovery tools.
Detection queries are kept inside the platform. Get full rules →