{"id":"7794fa3c-edea-4cff-bec7-267dd4770fd7","title":"Clipboard Access Via OSAScript","description":"Detects access to clipboard content via osascript, which may be used for data collection but also occurs in legitimate clipboard utilities and automation scripts","author":"Sohan G (D4rkCiph3r)","status":"test","level":"medium","date":"2023-01-31","modified":"2026-05-22","tags":["attack.collection","attack.execution","attack.t1115","attack.t1059.002"],"technique_ids":["T1059.002","T1115"],"logsource":{"product":"macos","category":"process_creation"},"falsepositives":["Legitimate clipboard utilities and automation scripts that read or write clipboard content","Developer tools and IDEs that use osascript for clipboard integration"],"references":["https://www.sentinelone.com/blog/how-offensive-actors-use-applescript-for-attacking-macos/"],"source_path":"rules/macos/process_creation/proc_creation_macos_clipboard_access_via_osascript.yml","source_sha256":"418ee9e4d68b47801350ce63e5b41d6e7fa808849c332ade4ecf2ce67b07a00f","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/macos/process_creation/proc_creation_macos_clipboard_access_via_osascript.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Clipboard Access Via OSAScript\nid: 7794fa3c-edea-4cff-bec7-267dd4770fd7\nrelated:\n    - id: 1bc2e6c5-0885-472b-bed6-be5ea8eace55\n      type: derived\nstatus: test\ndescription: Detects access to clipboard content via osascript, which may be used for data collection but also occurs in legitimate clipboard utilities and automation scripts\nreferences:\n    - https://www.sentinelone.com/blog/how-offensive-actors-use-applescript-for-attacking-macos/\nauthor: Sohan G (D4rkCiph3r)\ndate: 2023-01-31\nmodified: 2026-05-22\ntags:\n    - attack.collection\n    - attack.execution\n    - attack.t1115\n    - attack.t1059.002\nlogsource:\n    product: macos\n    category: process_creation\ndetection:\n    selection:\n        Image|endswith: '/osascript'\n        CommandLine|contains|all:\n            - ' -e '\n            - 'clipboard'\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    - Legitimate clipboard utilities and automation scripts that read or write clipboard content\n    - Developer tools and IDEs that use osascript for clipboard integration\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/"},{"key":"enterprise/T1115","id":"T1115","name":"Clipboard Data","page":"techniques/enterprise/T1115/"}],"data_path":"data/detection-rules/7794fa3c-edea-4cff-bec7-267dd4770fd7.json","kind":"sigma"}
