macOS: Detect Axios malicious npm execution chain using osascript, curl download, and cleanup

Flags macOS command-line patterns showing osascript execution plus npm package download and staged file cleanup.

FreeReviewedSigma · High · v5
Product
macos
Category
process_creation
Author
Swachchhanda Shrawan Poudel (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2026-04-01
Updated
2026-07-31

ATT&CK techniques

Initial Access → C2
  1. Recon

  2. Resource Dev

  3. Persistence

  4. Priv Esc

  5. Defense Evasion

  6. Cred Access

  7. Discovery

  8. Lateral Movement

  9. Collection

  10. Exfiltration

  11. Impact

What it detects

This rule flags a specific macOS process execution sequence that includes AppleScript execution (via osascript), a curl-based payload download from packages.npm.org, subsequent permission modification and execution, and removal of a referenced temporary path. Attackers can use a compromised npm dependency to trigger this local execution chain to stage and run further tooling. It relies on process creation telemetry and matches on command-line substrings referencing osascript usage, the npm download URL pattern, and the cleanup of a hardcoded /tmp path.

Related detections9 linkedT1105 — drag to rearrange
Linux process chain for Axios NPM compromise: curl download with nohup and python3
Malicious Remote Script Piped Directly to a Shell (via process_creation)
HamsaUpdate Linux Payload Download via Wget Piped to Bash (via process_creation)
Malicious Curl to Shell Dropper from Paste Site via Command Line
Malicious kagent RAT Delivery via HuggingFace Space Download (via process_creation)
Suspicious Remote Script Execution via curl Piped to bash with nohup on macOS (via process_creation)
Suspicious Botnet Payload Drop to Hidden Xdiag Temp Path
Suspicious Network Download Spawned by Node.js During Package Install
Malicious Remote Payload Piped to Shell via wget on PAN-OS
macOS: Detect Axios malicious npm execution chain using osascript, curl download, and cleanup
Pivot detection · T1105 · 9 related

Changelog

v5
  1. v5
    Candidate ingested via manual entry.2026-07-31
  2. v4
    Candidate ingested via manual entry.2026-07-31
  3. v3
    Candidate ingested via manual entry.2026-07-31
  4. v2
    Candidate ingested via manual entry.2026-07-31
  5. v1
    No changelog recorded for this version.2026-07-30

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