CmdID / Techniques / T1059
T1059.002 Command and Scripting Interpreter: AppleScript
Adversaries may abuse AppleScript for execution. MITRE ATT&CK
9 Sigma rules T1059.002 on attack.mitre.org
Part of
T1059Command and Scripting Interpreter
Sigma rules tagged with it
highAtomic MacOS Stealer - FileGrabber ActivityJason Phang Vern - Onn, Robbin Ooi Zhen Heng (Gen Digital) · macOS
mediumOsacompile Execution By Potentially Suspicious Applet/OsascriptSohan G (D4rkCiph3r), Red Canary (Idea) · macOS
Command lines CmdID reads as it
Run multiple AppleScript commands on the page for osascript
osascript -e 'say "Hello"' -e 'say "world"'IdentifyRun a compiled (*.scpt), bundled (*.scptd), or plaintext (*.applescript) AppleScript file on the page for osascript
osascript path/to/apple.scptIdentifyGet the bundle identifier of an application (useful for open -b) on the page for osascript
osascript -e 'id of app "Application"'IdentifyRun a JavaScript command on the page for osascript
osascript -l JavaScript -e "console.log('Hello world');"IdentifyAn example is here when CmdID’s reading of it names T1059.002: a Sigma rule it trips is tagged with it, or its abuse is documented as it.