heroui logo

Shell Evaluated Curl Downloaded Content

Elastic Detection Rules

View Source
Summary
Detects macOS shell processes that download code with curl and immediately execute it via eval, either directly or through a variable assignment. The rule inspects start events for common shells (bash, dash, sh, zsh, ksh) invoked with -c and a command line that performs a curl-based download whose output is evaluated (patterns include =$(curl... ) eval, eval$(curl...), =`curl... eval..., or eval`curl...). It excludes certain trusted launchers and parent processes and focuses on in-memory execution that avoids writing the payload to disk. MITRE ATT&CK mappings include T1059.004 Unix Shell (execution) and T1105 Ingress Tool Transfer (command and control). It targets macOS endpoint telemetry and is commonly used by loaders, adware, and infostealer stagers to retrieve and run the next stage. Triaging steps include analyzing the URL, parent process, domain reputation, and cross-host activity; false positives include legitimate admin or patch scripts, developer tooling, or vendor-signed MDM agents; remediation involves isolating the host, terminating the shell, removing launch items (LaunchAgents/LaunchDaemons), blocking the remote domain or IP, and rotating credentials if credential or data access occurred.
Categories
  • Endpoint
  • macOS
Data Sources
  • Process
ATT&CK Techniques
  • T1059
  • T1059.004
  • T1105
Created: 2026-11-09