kevmap

TechniquesT1059.002 › AN1164

AN1164 Analytic 1164

macOS · attack.mitre.org · ATT&CK Enterprise v19.2

<p>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.</p>
Detects
T1059.002 AppleScript
Part of
DET0414 Detection of AppleScript-Based Execution on macOS

Log sources and channels

Exactly as MITRE states them in x_mitre_log_source_references. Where a channel is vague, it is vague in the source; kevmap does not tidy it.

Log sourceChannelData component
macos:unifiedlogprocess: spawn, execDC0032 Process Creation

Mutable elements

Parameters MITRE marks as environment-specific. These are the knobs you are expected to tune; they are why an analytic is not a rule.

FieldDescription
ScriptInvocationParentIdentify rare or suspicious parent processes launching AppleScript (e.g., Safari, Mail, msedge).
TimeWindowFlag AppleScript execution during user-inactive hours, especially for automation frameworks.
AppleEventActionTypeFilter AppleEvent-based automation involving UI interaction, keystrokes, or remote control.
TargetApplicationSetScope AppleScript use toward security-sensitive apps (e.g., Terminal, ssh, Keychain Access).
ExecutionPathRegexRestrict to unusual paths like /tmp/, ~/Library/, or embedded in Automator workflows.