Skip to content
Every technique
T1059.002No distinct observable

AppleScript

ExecutionmacOS

Where this stands

A reviewer read the telemetry and concluded there is nothing here to detect that a sibling technique does not already cover.

The single analytic AN1164 offers exactly one Sigma logsource, {product: macos, service: unifiedlog}, and that logsource has no field vocabulary to write against. Not in the brief, which gives the prose note 'process: spawn, exec' and no field names anywhere. Not in lib/sigma, which contains no macOS mapping at all — scripts/mitre/logsource.mjs passes macOS channels straight through as {product: macos, service: } with the note 'macOS log', so nothing downstream knows what a field on that source is called. And not in Sigma's own taxonomy, where macOS process events are modelled as {category: process_creation, product: macos} with Image/CommandLine/ParentImage rather than as a unifiedlog service. […]

Covered instead by T1059, T1548.004.

What the technique is

Adversaries may abuse AppleScript for execution. AppleScript is a macOS scripting language designed to control applications and parts of the OS via inter-application messages called AppleEvents. These AppleEvent messages can be sent independently or easily scripted with AppleScript. These events can locate open windows, send keystrokes, and interact with almost any open application locally or remotely. Scripts can be run from the command-line via osascript /path/to/script or osascript -e "script here". Aside from the command line, scripts can be executed in numerous ways including Mail rules, Calendar.app alarms, and Automator workflows. AppleScripts can also be executed as plain text shell scripts by adding #!/usr/bin/osascript to the start of the script file. AppleScripts do not need to call osascript to execute. However, they may be executed from within mach-O binaries by using the macOS Native APIs NSAppleScript or OSAScript, both of which execute code independent of the /usr/bin/osascript command line utility. Adversaries may abuse AppleScript to execute various behaviors, such as interacting with an open SSH connection, moving to remote machines, and even presenting users with fake dialog boxes. These events cannot start applications remotely (they can start them locally), but they can interact with applications if they're already running remotely. […]

Read it on attack.mitre.org

What MITRE says you would watch

  • AN1164

    Detects AppleScript execution via 'osascript', NSAppleScript/OSAScript APIs, and abnormal application control events across user sessions. Focuses on causal chains such as osascript spawning child processes, script-induced keystrokes, or API-backed dialog spoofing.

Technique names and descriptions © MITRE ATT&CK®, CC BY 4.0. Not endorsed by MITRE.