macOS JXA In-Memory Execution via osascript JavaScript eval and NSData URL loading

Detects osascript-launched in-memory JXA JavaScript execution patterns using eval and URL-based data loading.

FreeReviewedSigma · High · v2
Product
macos
Category
process_creation
Author
Sohan G (D4rkCiph3r) (SigmaHQ), DRL 1.1
Published
2023-01-31
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 flags macOS process executions where the command line includes osascript with inline JavaScript evaluation, alongside logic that loads content into NSData from a URL. This pattern is significant because it supports in-memory execution workflows that can avoid writing a persistent script file. The detection relies on process creation telemetry with the full command line, looking for specific osascript flags and string indicators for JavaScript evaluation and URL-based NSData loading.

Related detections9 linkedT1059.007 — drag to rearrange
Suspicious npm Postinstall Node Execution From Fixtures Path (BeaverTail OtterCookie)
Suspicious Script Host Execution of Decoy-Named JavaScript Dropper (PS1Bot)
Malicious Emmenhtal JavaScript Loader Spawning Encoded PowerShell
Suspicious Script Host Spawning PowerShell With Bypass And Hidden Execution
Suspicious Osascript Requesting Administrator Privileges (via process_creation)
Possible React2Shell CVE-2025-55182 Prototype Pollution Exploitation
Suspicious Node.js Script Execution from AppData Roaming
Possible Reflected XSS via cPanel cpanelwebcall Endpoint CVE-2023-29489
SocGholish Fake Browser Update Script Execution (via process_creation)
macOS JXA In-Memory Execution via osascript JavaScript eval and NSData URL loading
Pivot detection · T1059.007 · 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.