OpenParable
Skip to content
← Back to skills

T1218.007_msiexec

DevOps & Security

Adversaries may abuse msiexec.exe to proxy execution of malicious payloads.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/CyberStrikeus/CyberStrike/blob/HEAD/.cyberstrike/skill/mitre_attack/TA0005_defense-evasion/T1218.007_msiexec/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/t1218-007-msiexec, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

T1218.007 Msiexec

Sub-technique of: T1218

High-Level Description

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). The Msiexec.exe binary may also be digitally signed by Microsoft.

Adversaries may abuse msiexec.exe to launch local or network accessible MSI files. Msiexec.exe can also execute DLLs. Since it may be signed and native on Windows systems, msiexec.exe can be used to bypass application control solutions that do not account for its potential abuse. Msiexec.exe execution may also be elevated to SYSTEM privileges if the AlwaysInstallElevated policy is enabled.

Kill Chain Phase

  • Defense Evasion (TA0005)

Platforms: Windows

What to Check

  • Identify if Msiexec technique is applicable to target environment
  • Check Windows systems for indicators of Msiexec
  • Verify mitigations are bypassed or absent (2 known mitigations)
  • Assess detection coverage (1 detection strategies)

How to Test

Atomic Red Team Tests

The following tests are from Atomic Red Team and provide actionable ways to test this technique:

Atomic Test 1: Msiexec.exe - Execute Local MSI file with embedded JScript

Executes an MSI containing embedded JScript code using msiexec.exe

Supported Platforms: windows

#{msi_exe} /q /#{action} "#{msi_payload}"

Dependencies:

  • The MSI file must exist on disk at specified location (#{msi_payload})

Atomic Test 2: Msiexec.exe - Execute Local MSI file with embedded VBScript

Executes an MSI containing embedded VBScript code using msiexec.exe

Supported Platforms: windows

#{msi_exe} /q /#{action} "#{msi_payload}"

Dependencies:

  • The MSI file must exist on disk at specified location (#{msi_payload})

Atomic Test 3: Msiexec.exe - Execute Local MSI file with an embedded DLL

Executes an MSI containing an embedded DLL using msiexec.exe

Supported Platforms: windows

#{msi_exe} /q /#{action} "#{msi_payload}"

Dependencies:

  • The MSI file must exist on disk at specified location (#{msi_payload})

Atomic Test 4: Msiexec.exe - Execute Local MSI file with an embedded EXE

Executes an MSI containing an embedded EXE using msiexec.exe

Supported Platforms: windows

#{msi_exe} /q /#{action} "#{msi_payload}"

Dependencies:

  • The MSI file must exist on disk at specified location (#{msi_payload})

Atomic Test 5: WMI Win32_Product Class - Execute Local MSI file with embedded JScript

Executes an MSI containing embedded JScript code using the WMI Win32_Product class

Supported Platforms: windows

Invoke-CimMethod -ClassName Win32_Product -MethodName #{action} -Arguments @{ PackageLocation = '#{msi_payload}' }

Dependencies:

  • The MSI file must exist on disk at specified location (#{msi_payload})

Manual Testing

If Atomic Red Team tests are not applicable, manually verify the technique by:

  1. Identify Attack Surface: Determine if the target environment is susceptible to Msiexec by examining the target platforms (Windows).

  2. Assess Existing Defenses: Review whether mitigations for T1218.007 are in place. If defenses are absent or misconfigured, this technique may be exploitable.

  3. Execute Test: Use tools and methods described in the MITRE ATT&CK page and external references below.

Remediation Guide

M1042 Disable or Remove Feature or Program

Consider disabling the AlwaysInstallElevated policy to prevent elevated execution of Windows Installer packages.

M1026 Privileged Account Management

Restrict execution of Msiexec.exe to privileged accounts or groups that need to use it to lessen the opportunities for malicious usage.

Detection

Detection of Msiexec Abuse for Local, Network, and DLL Execution

Risk Assessment

FindingSeverityImpact
Msiexec technique applicableHighDefense Evasion

CWE Categories

CWE IDTitle
CWE-693Protection Mechanism Failure

References