macOS: Process execution of osacompile by applet/osascript child processes

Flags macOS applet or osascript processes launching command lines that contain osacompile.

FreeReviewedSigma · Medium · v2
Product
macos
Category
process_creation
Author
Sohan G (D4rkCiph3r), Red Canary (Idea) (SigmaHQ), DRL 1.1
Published
2023-04-03
Updated
2026-07-31
title: "macOS: Process execution of osacompile by applet/osascript child processes"
id: a0c77cf5-1871-4534-a9d5-d6ecb2e2424d
status: test
description: This rule flags macOS process executions where a child process with a parent image ending in /applet or /osascript contains “osacompile” in its command line. Executing osacompile can indicate compilation or deployment of AppleScript-based components from script or applet contexts, which attackers may use to establish or modify functionality. It relies on process creation telemetry, specifically parent process image paths and the spawned process command line.
references:
  - https://redcanary.com/blog/mac-application-bundles/
  - https://github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_suspicious_applet_behaviour.yml
author: Sohan G (D4rkCiph3r), Red Canary (Idea), Huntrule Team
date: 2023-04-03
tags:
  - attack.execution
  - attack.t1059.002
logsource:
  category: process_creation
  product: macos
detection:
  selection:
    ParentImage|endswith:
      - /applet
      - /osascript
    CommandLine|contains: osacompile
  condition: selection
falsepositives:
  - Unknown
level: medium
license: DRL-1.1
related:
  - id: a753a6af-3126-426d-8bd0-26ebbcb92254
    type: derived