macOS AppleScript Execution via osascript with -e, .scpt, or .js

Flags osascript usage on macOS with -e and script indicators consistent with executing AppleScript.

FreeReviewedSigma · Medium · v2
Product
macos
Category
process_creation
Author
Alejandro Ortuno, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-21
Updated
2026-07-31

ATT&CK techniques

Execution
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Persistence

  5. Priv Esc

  6. Defense Evasion

  7. Cred Access

  8. Discovery

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule identifies process executions where osascript is launched with an -e argument and references to AppleScript script files or JavaScript components (via .scpt or .js). Attackers can use AppleScript execution to automate actions and run code through macOS scripting interfaces. It relies on macOS process creation telemetry capturing the executed image path and command-line arguments.

Related detections9 linkedT1059.002 — drag to rearrange
Suspicious Osascript Requesting Administrator Privileges (via process_creation)
Malicious Remote Script Piped to a Shell on macOS (via process_creation)
AppleScript do-shell-script Abuse via Osascript (via process_creation)
Suspicious AppleScript Payload Execution via osascript (macOS)
Suspicious AppleScript Execution Spawning a Shell via Osascript
Suspicious osascript Execution of Encoded AppleScript on macOS (via process_creation)
Suspicious Credential Prompt Phishing via osascript (via process_creation)
Malicious ClickFix Stager Piping curl Output to osascript
Suspicious Shell Execution Referencing Mounted DMG Volume via Terminal (macOS)
macOS AppleScript Execution via osascript with -e, .scpt, or .js
Pivot detection · T1059.002 · 9 related

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. 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.