Detection rules › Elastic

Sensitive File Copy via Ditto

Source
github.com/elastic/protections-artifacts

Detects ditto binary copying sensitive files like keychains, browser data, and shell history. This technique is used by malware for credential harvesting and data collection.

MITRE ATT&CK coverage

TacticTechniques
Collection

Telemetry coverage

Rule body

[rule]
description = """
Detects ditto binary copying sensitive files like keychains, browser data, and shell history. This technique is used by
malware for credential harvesting and data collection.
"""
id = "b1cf09db-d619-49f8-96cf-ff82abaac79f"
license = "Elastic License v2"
name = "Sensitive File Copy via Ditto"
os_list = ["macos"]
reference = [
    "https://www.sentinelone.com/labs/macos-nimdoor-dprk-threat-actors-target-web3-and-crypto-platforms-with-nim-based-malware/",
]
version = "1.0.3"

query = '''
process where event.type == "start" and event.action == "exec" and process.name == "ditto" and 
 process.args_count == 3 and process.args like~ ("/Users/*/Library/Application Support/Google/Chrome/Default/*",
                                                 "/Library/Keychains/System.keychain", 
                                                 "/Users/*/Library/Keychains/login.keychain-db", 
                                                 "/Users/*/.zsh_history", 
                                                 "/Users/*/.bash_history")
'''

min_endpoint_version = "8.11.1"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1005"
name = "Data from Local System"
reference = "https://attack.mitre.org/techniques/T1005/"


[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_count == 3 and process.args like~ ("/Users/*/Library/Application Support/Google/Chrome/Default/*",
                                                 "/Library/Keychains/System.keychain", 
                                                 "/Users/*/Library/Keychains/login.keychain-db", 
                                                 "/Users/*/.zsh_history", 
                                                 "/Users/*/.bash_history")

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • exec
field:"EventType" kind:eq value:"exec"
event.typeeq
  • start
field:"event.type" kind:eq value:"start"
process.argswildcard
  • /Library/Keychains/System.keychain
  • /Users/*/.bash_history
  • /Users/*/.zsh_history
  • /Users/*/Library/Application Support/Google/Chrome/Default/*
  • /Users/*/Library/Keychains/login.keychain-db
field:"process.args" kind:wildcard
process.args_counteq
  • 3 transforms: number
field:"process.args_count" kind:eq value:"3"
process.nameeq
  • ditto
field:"process_name" kind:eq value:"ditto"