heroui logo

JXA In-memory Execution Via OSAScript

Sigma Rules

View Source
Summary
This rule is designed to detect potentially malicious execution of JavaScript for Automation (JXA) using the OSAScript tool on macOS. JXA is commonly used for automating tasks on macOS but can also be abused by adversaries to execute arbitrary code in memory. The detection logic looks for specific command-line patterns related to OSAScript, including the use of the '-e' flag, 'eval', and commands that retrieve data from URLs using 'NSData.dataWithContentsOfURL'. It also checks for JavaScript files and execution contexts typically associated with scripts. By monitoring processes for these command-line arguments, organizations can mitigate risks associated with unauthorized or malicious use of JXA scripts.
Categories
  • macOS
  • Endpoint
Data Sources
  • Process
Created: 2023-01-31