T1546.016 Elastic Security · Elastic

Detect Installer Packages in Elastic Security

Adversaries may establish persistence and elevate privileges by using an installer package to execute malicious content. Installer packages are setup utilities for applications bundled with an installer utility and can be distributed through legitimate channels. Malicious code can be embedded within installer packages to create backdoors and establish persistence. Installer utilities such as msiexec.exe (Windows MSI), macOS pkgutil, and Linux dpkg/rpm allow adversaries to run pre-install and post-install scripts. These scripts can execute arbitrary code with elevated privileges during the installation process. Additionally, malicious code within the installer can establish persistence by deploying backdoors as scheduled tasks, services, or startup items.

MITRE ATT&CK

Tactic
Privilege Escalation Persistence
Technique
T1546 Event Triggered Execution
Sub-technique
T1546.016 Installer Packages
Canonical reference
https://attack.mitre.org/techniques/T1546/016/

Elastic Detection Query

Elastic Security (Elastic)
eql
process where event.type == "start"
  and process.parent.name : ("msiexec.exe", "installer", "pkgutil", "dpkg", "rpm", "yum", "apt-get", "apt", "chocolatey", "winget")
  and (
    process.name : ("powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "certutil.exe", "bitsadmin.exe", "bash", "sh", "python3", "python")
    or process.command_line : ("*Invoke-WebRequest*", "*DownloadString*", "*Net.WebClient*", "*-EncodedCommand*", "*certutil*urlcache*", "*bitsadmin*transfer*", "*curl*http*", "*wget*http*")
  )
high severity high confidence

Detects installer package processes (msiexec.exe, dpkg, rpm, pkgutil, apt, chocolatey, winget) spawning script interpreters or processes with suspicious download-cradle command-line arguments consistent with T1546.016 Installer Package Persistence. Covers Windows MSI custom actions, Linux package maintainer scripts, and macOS .pkg post-install phases.

Data Sources

Elastic Endpoint SecurityWinlogbeat (Sysmon + Windows Security)Auditd on LinuxmacOS Endpoint Security Framework via Elastic Agent

Required Tables

logs-endpoint.events.process-*winlogbeat-*logs-system.security-*

False Positives & Tuning

  • Legitimate enterprise software installers (Visual Studio, Office 365, SQL Server, Adobe Creative Cloud) using PowerShell in MSI custom actions for post-install license activation or environment configuration
  • SCCM or Intune managed deployments running PowerShell or cmd.exe scripts as part of application install sequences pushed to endpoints
  • Chocolatey, winget, or Homebrew package installs that invoke PowerShell, bash, or python for dependency resolution, PATH setup, or environment variable registration
Download portable Sigma rule (.yml)

Other platforms for T1546.016


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1MSI Custom Action Spawning PowerShell

    Expected signal: Process creation for msiexec.exe. Subsequent process creation for powershell.exe. The parent-child relationship (msiexec -> powershell) combined with the powershell command line arguments is the detection trigger.

  2. Test 2Package Manager Post-Install Script with Network Call

    Expected signal: Process creation for pip install. Child process for python executing setup.py post-install hook. Child process for curl with the callback URL. The pip->python->curl chain is the detection signal.

  3. Test 3MSI Silent Installation with Custom Action Tracking

    Expected signal: Process creation for msiexec.exe or cmd.exe spawned from installer context. File creation for custom_action_test.txt. Windows Installer Application event log entries for custom action execution.

Unlock Pro Content

Get the full detection package for T1546.016 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections