Execution · Windows · LOLBAS
msiexec.exe
Windows Installer
Installs and manages MSI packages. Trusted and signed, it can install a package from a URL and can load a DLL, so it is used to deliver and run payloads.
Legitimate use
Installs, repairs and removes Windows Installer packages.
Switches
Installs a package. The value can be a local path or a URL.
MediumQuiet install with no user interface (/qn, /qb). Hides the install from the user.
MediumUninstalls a package.
LowCalls DllRegisterServer in a given DLL.
HighCalls DllUnRegisterServer in a given DLL.
HighAdministrative install that extracts files to a path.
LowCommand lines to worry about
- High
Silent install from a URL
msiexec installs a package from the web with no interface. The MSI can run custom actions. Check the URL and any dropped files.
Detection regex
msiexec(\.exe)?\s+.*\/q[nb]?\b.*\/i\s+https?:\/\/|msiexec(\.exe)?\s+.*\/i\s+https?:\/\/.*\/q - High
DLL registration through msiexec
msiexec is used only to call a DLL export, not to install anything. This is proxy execution of a DLL.
Detection regex
msiexec(\.exe)?\s+.*\/(y|z)\s+\S+\.dll
Where it is recorded
- Security4688Process creation with the full command line, when command-line auditing is enabled.
- Sysmon1Process creation with command line, hashes and parent process.
- Sysmon3Network connection when the package is pulled from a URL.
- Application1033MsiInstaller records an install completed, with the product and package.
Community detections
17 SigmaHQ rules for msiexec.exe. The explainer checks every pasted command line against all of them.
- HighHTML Help HH.EXE Suspicious Child Process
Detects a suspicious child process of a Microsoft HTML Help (HH.exe)
T1047T1059.001T1059.003T1059.005by Maxim Pavlunin, Nasreddine Bencherchali (Nextron Systems)
- HighPotential Defense Evasion Via Rename Of Highly Relevant Binaries
Detects the execution of a renamed binary often used by attackers or malware leveraging new Sysmon OriginalFileName datapoint.
T1036.003by Matthew Green - @mgreen27, Florian Roth (Nextron Systems), frack113
- HighPotential MsiExec Masquerading
Detects the execution of msiexec.exe from an uncommon directory
T1036.005by Florian Roth (Nextron Systems)
- HighScript Event Consumer Spawning Process
Detects a suspicious child process of Script Event Consumer (scrcons.exe).
T1047by Sittikorn S
- HighSuspicious Microsoft Office Child Process
Detects a suspicious process spawning from one of the Microsoft Office suite products (Word, Excel, PowerPoint, Publisher, Visio, etc.)
T1047T1204.002T1218.010by Florian Roth (Nextron Systems), Markus Neis, FPT.EagleEye Team, Vadim Khrykov, Cyb3rEng, Michael Haag, Christopher Peacock @securepeacock, @scythe_io
- HighSuspicious Microsoft OneNote Child Process
Detects suspicious child processes of the Microsoft OneNote application. This may indicate an attempt to execute malicious embedded objects from a .one file.
T1566T1566.001by Tim Rauch (Nextron Systems), Nasreddine Bencherchali (Nextron Systems), Elastic (idea)
- HighSuspicious Outlook Child Process
Detects a suspicious process spawning from an Outlook process.
T1204.002by Michael Haag, Florian Roth (Nextron Systems), Markus Neis, Elastic, FPT.EagleEye Team
- HighSuspicious Serv-U Process Pattern
Detects a suspicious process pattern which could be a sign of an exploited Serv-U service
T1555by Florian Roth (Nextron Systems)
- HighSuspicious ShellExec_RunDLL Call Via Ordinal
Detects suspicious call to the "ShellExec_RunDLL" exported function of SHELL32.DLL through the ordinal number to launch other commands. Adversary might only use the ordinal number in order to bypass existing detection that alert on usage of ShellExec_RunDLL on CommandLine.
T1218.011by Swachchhanda Shrawan Poudel
- HighSuspicious WmiPrvSE Child Process
Detects suspicious and uncommon child processes of WmiPrvSE
T1047T1204.002T1218.010by Vadim Khrykov (ThreatIntel), Cyb3rEng, Florian Roth (Nextron Systems)
- HighSystem File Execution Location Anomaly
Detects the execution of a Windows system binary that is usually located in the system folder from an uncommon location.
T1036by Florian Roth (Nextron Systems), Patrick Bareiss, Anton Kutepov, oscd.community, Nasreddine Bencherchali (Nextron Systems)
- MediumAlways Install Elevated Windows Installer
Detects Windows Installer service (msiexec.exe) trying to install MSI packages with SYSTEM privilege
T1548.002by Teymur Kheirkhabarov (idea), Mangatas Tondang (rule), oscd.community
- MediumDllUnregisterServer Function Call Via Msiexec.EXE
Detects MsiExec loading a DLL and calling its DllUnregisterServer function
T1218.007by frack113
- MediumMsiexec Quiet Installation
Adversaries may abuse msiexec.exe to proxy execution of malicious payloads. Msiexec.exe is the command-line utility for the Windows Installer and is thus commonly associated with executing installation packages (.msi)
T1218.007by frack113
- MediumPotentially Suspicious Execution Of PDQDeployRunner
Detects suspicious execution of "PDQDeployRunner" which is part of the PDQDeploy service stack that is responsible for executing commands and packages on a remote machines
by Nasreddine Bencherchali (Nextron Systems)
- MediumSuspicious Msiexec Execute Arbitrary DLL
Adversaries may abuse msiexec.exe to proxy execution of malicious payloads. Msiexec.exe is the command-line utility for the Windows Installer and is thus commonly associated with executing installation packages (.msi)
T1218.007by frack113
- MediumSuspicious Msiexec Quiet Install From Remote Location
Detects usage of Msiexec.exe to install packages hosted remotely quietly
T1218.007by Nasreddine Bencherchali (Nextron Systems)
Rules from SigmaHQ (rules/windows/process_creation), Detection Rule License (DRL) 1.1. Each rule links to its source and credits its authors.