Suspicious macOS Privilege Escalation Piping Password to sudo

PremiumReviewedSigma · Medium · v1
Product
macos
Category
process_creation
Author
HuntRule
Published
2026-06-13
Updated
2026-08-28

ATT&CK techniques

Execution → Defense Evasion
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Persistence

  5. Cred Access

  6. Discovery

  7. Lateral Movement

  8. Collection

  9. C2

  10. Exfiltration

  11. Impact

What it detects

This rule detects a stored password being piped into sudo with the stdin flag, the non-interactive privilege escalation used by the AMOS stealer after harvesting a user password. Reading a captured password from a hidden file and feeding it to sudo grants root without a prompt. This scripted sudo pattern is characteristic of macOS stealer malware.

Related detections9 linkedT1059.004 — drag to rearrange
Malicious Shell Payload Piped from curl to zsh
Possible Bitbucket Pre-Auth RCE via git archive exec Null-Byte Injection (CVE-2022-36804) (via webserver)
Malicious TeamTNT Docker Gatling Gun Initialization Script (via process_creation)
Suspicious Shell Spawned by PostgreSQL Server Process (via process_creation)
Malicious Remote Script Piped Directly to a Shell (via process_creation)
HamsaUpdate Linux Payload Download via Wget Piped to Bash (via process_creation)
Suspicious Remote Script Execution via Wget or Curl Piped to Shell (via process_creation)
Malicious Bash Dev-TCP Reverse Shell via Shell (via process_creation)
Obfuscated Base64-Decoded Payload Piped to a Shell (via process_creation)
Suspicious macOS Privilege Escalation Piping Password to sudo
Pivot detection · T1059.004 · 9 related

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.