{"id":"1bc2e6c5-0885-472b-bed6-be5ea8eace55","title":"MacOS Scripting Interpreter AppleScript","description":"Detects execution of AppleScript of the macOS scripting language AppleScript.","author":"Alejandro Ortuno, oscd.community","status":"test","level":"medium","date":"2020-10-21","modified":"2026-05-21","tags":["attack.execution","attack.t1059.002"],"technique_ids":["T1059.002"],"logsource":{"category":"process_creation","product":"macos"},"falsepositives":["Application installers might contain scripts as part of the installation process."],"references":["https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1059.002/T1059.002.md","https://redcanary.com/blog/applescript/"],"source_path":"rules/macos/process_creation/proc_creation_macos_applescript.yml","source_sha256":"cb6355cb3e000bf95aa78c841b8bc6a2e5eaf27d6ffd2f17a9a51c1c330d3750","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/macos/process_creation/proc_creation_macos_applescript.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: MacOS Scripting Interpreter AppleScript\nid: 1bc2e6c5-0885-472b-bed6-be5ea8eace55\nstatus: test\ndescription: Detects execution of AppleScript of the macOS scripting language AppleScript.\nreferences:\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1059.002/T1059.002.md\n    - https://redcanary.com/blog/applescript/\nauthor: Alejandro Ortuno, oscd.community\ndate: 2020-10-21\nmodified: 2026-05-21\ntags:\n    - attack.execution\n    - attack.t1059.002\nlogsource:\n    category: process_creation\n    product: macos\ndetection:\n    selection:\n        Image|endswith: '/osascript'\n        CommandLine|contains:\n            - ' -e '\n            - '.scpt'\n            - '.js'\n    filter_optional_opencode:\n        # OpenCode uses osascript to handle copying text from the TUI on MacOS devices. See https://github.com/anomalyco/opencode/blob/ca723f1cbc6fc4244ae57e61e9de8c4e37380ed4/packages/opencode/src/cli/cmd/tui/util/clipboard.ts#L65 for reference.\n        ParentImage|endswith: 'opencode'\n        CommandLine|contains|all:\n            - 'osascript'\n            - ' -e '\n            - 'set imageData to the clipboard'\n            - 'set fileRef'\n    condition: selection and not 1 of filter_optional_*\nfalsepositives:\n    - Application installers might contain scripts as part of the installation process.\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1059.002","id":"T1059.002","name":"AppleScript","page":"techniques/enterprise/T1059.002/"}],"data_path":"data/detection-rules/1bc2e6c5-0885-472b-bed6-be5ea8eace55.json","kind":"sigma"}
