MacOS Scripting Interpreter AppleScript

 Original Source: [Sigma source]
Title: MacOS Scripting Interpreter AppleScript
Status: test
Description:Detects execution of AppleScript of the macOS scripting language AppleScript.
References:
  -https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1059.002/T1059.002.md
  -https://redcanary.com/blog/applescript/
Author: Alejandro Ortuno, oscd.community
Date: 2020-10-21
modified:2026-05-21
Tags:
  • -'attack.execution'
  • -'attack.t1059.002'
Logsource:
  • category: process_creation
  • product: macos
Detection:
  selection:
    Image|endswith: '/osascript'
    CommandLine|contains:
      -' -e '
      -'.scpt'
      -'.js'

  filter_optional_opencode:
    ParentImage|endswith: 'opencode'
    CommandLine|contains|all:
      -'osascript'
      -' -e '
      -'set imageData to the clipboard'
      -'set fileRef'

  condition:selection and not 1 of filter_optional_*
Falsepositives:
  -Application installers might contain scripts as part of the installation process.
Level: medium