Cross-source coverage
T1546.016 / ATT&CK
Event Triggered Execution: Installer Packages
15 rules across 2 sources.
From MITRE ATT&CK 19.2
Adversaries may establish persistence and elevate privileges by using an installer to trigger the execution of malicious content. Installer packages are OS specific and contain the resources an operating system needs to install applications on a system. Installer packages can include scripts that run prior to installation as well as after installation is complete. Installer scripts may inherit elevated permissions when executed. Developers often use these scripts to prepare the environment for installation, check requirements, download dependencies, and remove files after installation.
Using legitimate applications, adversaries have distributed applications with modified installer scripts to execute malicious content. When a user installs the application, they may be required to grant administrative permissions to allow the installation. At the end of the installation process of the legitimate application, content such as macOS postinstall scripts can be executed with the inherited elevated permissions. Adversaries can use these scripts to execute a malicious executable or install other malicious components (such as a Launch Daemon) with the elevated permissions.
Depending on the distribution, Linux versions of package installer scripts are sometimes called maintainer scripts or post installation scripts. These scripts can include preinst, postinst, prerm, postrm scripts and run as root when executed.
For Windows, the Microsoft Installer services uses .msi files to manage the installing, updating, and uninstalling of applications. These installation routines may also include instructions to perform additional actions that may be abused by adversaries.
- Tactics
- Privilege Escalation · Persistence
- Platforms
- Linux · macOS · Windows
- Telemetry
-
macos:unifiedlogauditd:SYSCALLWinEventLog:Sysmon
How MITRE says to detect it DET0330
Detection Strategy for T1546.016 - Event Triggered Execution via Installer Packages
macOS Analytic 0938
Correlation of package install event with execution of postinstall scripts containing unknown binaries or abnormal CLI usage. Look for `/usr/sbin/installer` execution followed by child processes originating from postinstall script.
macos:unifiedlogExecution of /usr/sbin/installer spawning child process from within /private/tmp or package contentsmacos:unifiedlogCreation or modification of postinstall scripts within .pkg or .mpkg contents
Linux Analytic 0939
Detection of maintainer scripts (e.g., postinst, preinst) being modified or executed during dpkg or rpm operations. Watch for script content that spawns additional processes or writes outside package scope.
auditd:SYSCALLExecution of dpkg or rpm followed by fork/execve from within postinst, prerm, etc.auditd:SYSCALLwrite
Windows Analytic 0940
Detection of msiexec.exe running installer packages that result in anomalous process creation. Look for unexpected binaries executed by msiexec or custom action DLLs in the temp directory.
WinEventLog:SysmonEventCode=1WinEventLog:SysmonEventCode=11
elastic/detection-rules
9 rules| Detection | Severity | Format |
|---|---|---|
| Suspicious File Creation via Pkg Install Script | High | Elastic TOML |
| Suspicious APT Package Manager Network Connection | Medium | Elastic TOML |
| Unusual DPKG Execution | Medium | Elastic TOML |
| Yum Package Manager Plugin File Creation | Medium | Elastic TOML |
| APT Package Manager Configuration File Creation | Low | Elastic TOML |
| DNF Package Manager Plugin File Creation | Low | Elastic TOML |
| DPKG Package Installed by Unusual Parent Process | Low | Elastic TOML |
| RPM Package Installed by Unusual Parent Process | Low | Elastic TOML |
| Suspicious APT Package Manager Execution | Low | Elastic TOML |
elastic/protections-artifacts
6 rules| Detection | Severity | Format |
|---|---|---|
| Egress Connection by a DNF Package Manager Descendant | Undefined | Elastic TOML |
| Egress Network Connection from Default DPKG Directory | Undefined | Elastic TOML |
| Egress Network Connection from RPM Package | Undefined | Elastic TOML |
| Initial Access Staging via Installer Package | Undefined | Elastic TOML |
| Unsigned or Untrusted Process Execution via Installer | Undefined | Elastic TOML |
| Untrusted or Unsigned Binary Executed via Launch Service | Undefined | Elastic TOML |