macOS: In-Memory Download and Compile via curl and osacompile in a Single Command

Alerts when macOS processes include both curl and osacompile, consistent with downloading and compiling payloads.

FreeReviewedSigma · Medium · v2
Product
macos
Category
process_creation
Author
Sohan G (D4rkCiph3r), Red Canary (idea) (SigmaHQ), DRL 1.1
Published
2023-08-22
Updated
2026-07-31
title: "macOS: In-Memory Download and Compile via curl and osacompile in a Single Command"
id: 87320a26-9737-4f67-a4aa-98b8f113bea8
status: test
description: This rule flags process creation on macOS where the command line contains both curl and osacompile, indicating a potential in-memory workflow that downloads and compiles payloads. Attackers may use this pattern to quickly assemble and execute malicious code without writing obvious artifacts to disk. The detection relies on process creation telemetry with command-line fields capturing both utilities in the same invocation.
references:
  - https://redcanary.com/blog/mac-application-bundles/
  - https://github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_susp_in_memory_download_and_compile.yml
author: Sohan G (D4rkCiph3r), Red Canary (idea), Huntrule Team
date: 2023-08-22
tags:
  - attack.command-and-control
  - attack.execution
  - attack.t1059.007
  - attack.t1105
logsource:
  category: process_creation
  product: macos
detection:
  selection:
    CommandLine|contains|all:
      - osacompile
      - curl
  condition: selection
falsepositives:
  - Unknown
level: medium
license: DRL-1.1
related:
  - id: 13db8d2e-7723-4c2c-93c1-a4d36994f7ef
    type: derived