Techniques › T1059.004 › AN1082
AN1082 Analytic 1082
macOS · attack.mitre.org · ATT&CK Enterprise v19.2
<p>Identifies use of sh/bash/zsh in suspicious context, such as user scripts launched from non-standard apps (e.g., Preview.app), embedded in LaunchDaemons, or executed outside Terminal.app. Looks for misuse in Automator, LaunchAgents, or NSAppleScript-executed shell.</p>
- Detects
- T1059.004 Unix Shell
- Part of
- DET0384 Behavioral Detection of Unix Shell Execution
Log sources and channels
Exactly as MITRE states them in x_mitre_log_source_references. Where a channel is vague, it is vague in the source; kevmap does not tidy it.
| Log source | Channel | Data component |
|---|---|---|
| macos:unifiedlog | log stream --predicate 'eventMessage contains "exec"' | DC0032 Process Creation |
| macos:osquery | launchd + process_events | DC0064 Command Execution |
| macos:syslog | system.log, asl.log | DC0029 Script Execution |
Mutable elements
Parameters MITRE marks as environment-specific. These are the knobs you are expected to tune; they are why an analytic is not a rule.
| Field | Description |
|---|---|
ScriptLocation | Execution from /Users/Shared, ~/Library/LaunchAgents, /tmp. |
ParentProcess | Shells spawned from Preview, Safari, or AppleScript. |
UserRole | Detection thresholds may differ for admin vs standard users. |
KEV CVEs whose mapped technique this analytic detects
| CVE | Vendor / product | State |
|---|---|---|
| CVE-2014-6271 | GNU Bourne-Again Shell (Bash) | Mapped |
| CVE-2014-7169 | GNU Bourne-Again Shell (Bash) | Mapped |
| CVE-2016-10033 | PHP PHPMailer | Mapped |
| CVE-2019-0708 | Microsoft Remote Desktop Services | Mapped |
| CVE-2021-36380 | Sunhillo SureLine | Mapped |
| CVE-2022-20699 | Cisco Small Business RV160, RV260, RV340, and RV345 Series Routers | Mapped |
| CVE-2022-20700 | Cisco Small Business RV160, RV260, RV340, and RV345 Series Routers | Mapped |
| CVE-2023-38831 | RARLAB WinRAR | Mapped |
| CVE-2023-39780 | ASUS RT-AX55 Routers | Mapped |
| CVE-2023-44221 | SonicWall SMA100 Appliances | Mapped |
| CVE-2023-46604 | Apache ActiveMQ | Mapped |
| CVE-2024-24919 | Check Point Quantum Security Gateways | Mapped |
| CVE-2024-27443 | Synacor Zimbra Collaboration Suite (ZCS) | Mapped |
| CVE-2025-25257 | Fortinet FortiWeb | Mapped |