Detection rules › Elastic
Suspicious Archive Creation via Ditto
Detects the use of the Ditto utility on macOS to create a compressed archive. The AMOS stealer has used this lesser known method for creating an archive containing the collected data for exfiltration via C2.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Collection |
Telemetry coverage
Rule body
[rule]
description = """
Detects the use of the Ditto utility on macOS to create a compressed archive. The AMOS stealer has used this lesser
known method for creating an archive containing the collected data for exfiltration via C2.
"""
id = "9aec8065-72d1-4e34-bac9-22ae1213dd41"
license = "Elastic License v2"
name = "Suspicious Archive Creation via Ditto"
os_list = ["macos"]
reference = [
"https://moonlock.com/atomic-macos-stealer",
"https://medium.com/@dineshdevadoss04/breaking-down-atomic-macos-stealer-amos-8cd5eea56024",
]
version = "1.0.9"
query = '''
process where event.type == "start" and event.action == "exec" and process.name == "ditto" and
process.args in~ ("-c", "-k", "--sequesterRsrc", "--keepParent") and
process.args like ("/Users/*", "/private/tmp/*", "/tmp/*", "/var/folders/*") and
process.args like~ "*.zip*" and
(process.parent.code_signature.exists == false or process.parent.code_signature.trusted == false) and
not process.parent.executable like ("/opt/homebrew/*", "/usr/local/Cellar/*", "/usr/local/Homebrew/*") and
not process.Ext.effective_parent.executable like ("/Library/Intune/Microsoft Intune Agent.app/Contents/MacOS/IntuneMdmDaemon",
"/opt/homebrew/*",
"/Applications/Ghostty.app/Contents/MacOS/ghostty")
'''
min_endpoint_version = "8.11.1"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1074"
name = "Data Staged"
reference = "https://attack.mitre.org/techniques/T1074/"
[[threat.technique.subtechnique]]
id = "T1074.001"
name = "Local Data Staging"
reference = "https://attack.mitre.org/techniques/T1074/001/"
[threat.tactic]
id = "TA0009"
name = "Collection"
reference = "https://attack.mitre.org/tactics/TA0009/"
[internal]
min_endpoint_version = "8.11.1"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and process.name == "ditto" and
process.args in~ ("-c", "-k", "--sequesterRsrc", "--keepParent") and
process.args like ("/Users/*", "/private/tmp/*", "/tmp/*", "/var/folders/*") and
process.args like~ "*.zip*" and
(process.parent.code_signature.exists == false or process.parent.code_signature.trusted == false) and
not process.parent.executable like ("/opt/homebrew/*", "/usr/local/Cellar/*", "/usr/local/Homebrew/*") and
not process.Ext.effective_parent.executable like ("/Library/Intune/Microsoft Intune Agent.app/Contents/MacOS/IntuneMdmDaemon",
"/opt/homebrew/*",
"/Applications/Ghostty.app/Contents/MacOS/ghostty")
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.Ext.effective_parent.executable | wildcard | /Library/Intune/Microsoft Intune Agent.app/Contents/MacOS/IntuneMdmDaemon, /opt/homebrew/*, /Applications/Ghostty.app/Contents/MacOS/ghostty | excludes:process.Ext.effective_parent.executable field:"process.Ext.effective_parent.executable" value:"/Library/Intune/Microsoft Intune Agent.app/Contents/MacOS/IntuneMdmDaemon" field:"process.Ext.effective_parent.executable" value:"/opt/homebrew/*" field:"process.Ext.effective_parent.executable" value:"/Applications/Ghostty.app/Contents/MacOS/ghostty" |
process.parent.executable | starts_with | /opt/homebrew/, /usr/local/Cellar/, /usr/local/Homebrew/ | excludes:process.parent.executable field:"process.parent.executable" value:"/opt/homebrew/" field:"process.parent.executable" value:"/usr/local/Cellar/" field:"process.parent.executable" value:"/usr/local/Homebrew/" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"exec" |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | in |
| field:"process.args" kind:in |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.name | eq |
| field:"process_name" kind:eq value:"ditto" |
process.parent.code_signature.exists | eq |
| field:"process.parent.code_signature.exists" kind:eq value:"false" |
process.parent.code_signature.trusted | eq |
| field:"process.parent.code_signature.trusted" kind:eq value:"false" |