Skip to content
WETNav

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.

Worst caseHigh

Switches

/i<value>

Installs a package. The value can be a local path or a URL.

Medium
/q

Quiet install with no user interface (/qn, /qb). Hides the install from the user.

Medium
/x<value>

Uninstalls a package.

Low
/y<value>

Calls DllRegisterServer in a given DLL.

High
/z<value>

Calls DllUnRegisterServer in a given DLL.

High
/a<value>

Administrative install that extracts files to a path.

Low

Command 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 regexmsiexec(\.exe)?\s+.*\/q[nb]?\b.*\/i\s+https?:\/\/|msiexec(\.exe)?\s+.*\/i\s+https?:\/\/.*\/q

    T1218.007

  • 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 regexmsiexec(\.exe)?\s+.*\/(y|z)\s+\S+\.dll

    T1218.007

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.

  • High
    HTML 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)

  • High
    Potential 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

  • High
    Potential MsiExec Masquerading

    Detects the execution of msiexec.exe from an uncommon directory

    T1036.005by Florian Roth (Nextron Systems)

  • High
    Script Event Consumer Spawning Process

    Detects a suspicious child process of Script Event Consumer (scrcons.exe).

    T1047by Sittikorn S

  • High
    Suspicious 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

  • High
    Suspicious 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)

  • High
    Suspicious 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

  • High
    Suspicious 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)

  • High
    Suspicious 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

  • High
    Suspicious WmiPrvSE Child Process

    Detects suspicious and uncommon child processes of WmiPrvSE

    T1047T1204.002T1218.010by Vadim Khrykov (ThreatIntel), Cyb3rEng, Florian Roth (Nextron Systems)

  • High
    System 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)

  • Medium
    Always 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

  • Medium
    DllUnregisterServer Function Call Via Msiexec.EXE

    Detects MsiExec loading a DLL and calling its DllUnregisterServer function

    T1218.007by frack113

  • Medium
    Msiexec 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

  • Medium
    Potentially 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)

  • Medium
    Suspicious 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

  • Medium
    Suspicious 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.