heroui logo

Suspicious File Creation via Pkg Install Script

Elastic Detection Rules

View Source
Summary
This detection rule, authored by Elastic, aims to identify malicious activities where installer packages execute pre- or post-install scripts that copy files to suspicious locations in the file system. The rule originates from the observation that such behavior is atypical and may indicate an attempt by threat actors to establish persistence mechanisms or prepare environments for malware deployment. The detection logic leverages EQL (Event Query Language) to monitor processes on macOS devices, particularly focusing on scripts associated with installer packages, and file operations that move or copy executables or scripts into potentially malicious directories. The rule gives a detailed approach for investigation, which includes reviewing process arguments, file paths, and analyzing package signatures to ascertain whether the software in question is legitimate or malicious. Additionally, response recommendations are provided in case of malicious findings, including termination of suspicious processes and removal of harmful files.
Categories
  • Endpoint
  • macOS
Data Sources
  • Process
  • File
ATT&CK Techniques
  • T1546
  • T1546.016
Created: 2026-01-30