Detection rules › Elastic

Disk Image Download and Mount via Hdiutil

Time window
20s
Sequence by
Effective_process.entity_id, process.parent.entity_id
Source
github.com/elastic/protections-artifacts

Detects when Curl or NsCurl is used to download a disk image file (.dmg) followed immediately by mounting that disk image using the native Hdiutil binary within a short timespan. Threat actors leverage disk images to deliver additional payload stages and evade security defenses during initial infection chains.

MITRE ATT&CK coverage

Telemetry coverage

Rule body

[rule]
description = """
Detects when Curl or NsCurl is used to download a disk image file (.dmg) followed immediately by mounting that disk
image using the native Hdiutil binary within a short timespan. Threat actors leverage disk images to deliver additional
payload stages and evade security defenses during initial infection chains.
"""
id = "8eeb017a-0a3f-4e8f-9166-5a695204afb6"
license = "Elastic License v2"
name = "Disk Image Download and Mount via Hdiutil"
os_list = ["macos"]
reference = [
    "https://pberba.github.io/security/2025/11/11/macos-infection-vector-applescript-bypass-gatekeeper/",
]
version = "1.0.1"

query = '''
sequence with maxspan=20s
[file where event.action in ("modification", "creation") and process.name in ("curl", "nscurl") and
  file.extension == "dmg"] by Effective_process.entity_id
[process where event.type == "start" and event.action == "exec" and process.name == "hdiutil" and
  process.args == "mount"] by process.parent.entity_id
'''

min_endpoint_version = "8.16.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "Effective_process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"

[[threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.002"
name = "Malicious File"
reference = "https://attack.mitre.org/techniques/T1204/002/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"


[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1105"
name = "Ingress Tool Transfer"
reference = "https://attack.mitre.org/techniques/T1105/"


[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"

[internal]
min_endpoint_version = "8.16.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 20s, correlated by Effective_process.entity_id, process.parent.entity_id.

Stage 1: file

[file where event.action in ("modification", "creation") and process.name in ("curl", "nscurl") and
  file.extension == "dmg"] by Effective_process.entity_id

Stage 2: process

[process where event.type == "start" and event.action == "exec" and process.name == "hdiutil" and
  process.args == "mount"] by process.parent.entity_id

Indicators

These rows show field, operator, and value matches.