Detection rules › Elastic
Execution of Hidden File from the Shared Directory
Detects the rename or modification of a hidden executable file within the /Users/Shared directory. This is a consistent technique seen utilized by DPRK actors in several separate and recent campaigns. The /Users/Shared directory is where hidden payloads have been staged.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule body
[rule]
description = """
Detects the rename or modification of a hidden executable file within the /Users/Shared directory. This is a consistent
technique seen utilized by DPRK actors in several separate and recent campaigns. The /Users/Shared directory is where
hidden payloads have been staged.
"""
id = "e89d9e7d-54b8-4bda-9b00-fd669c15b18f"
license = "Elastic License v2"
name = "Execution of Hidden File from the Shared Directory"
os_list = ["macos"]
version = "1.0.6"
query = '''
any where
(
(event.category == "file" and event.action != "deletion" and file.Ext.header_bytes like~ ("cffaedfe*", "cafebabe*") and
file.path like "/Users/Shared/*" and file.name like~ ".*" ) or
(event.category == "process" and event.action == "exec" and process.executable like "/Users/Shared/*" and
(process.code_signature.trusted == false or process.code_signature.exists == false) and process.name like~ ".*")
)
'''
min_endpoint_version = "8.8.0"
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 = "T1564"
name = "Hide Artifacts"
reference = "https://attack.mitre.org/techniques/T1564/"
[[threat.technique.subtechnique]]
id = "T1564.001"
name = "Hidden Files and Directories"
reference = "https://attack.mitre.org/techniques/T1564/001/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.8.0"
Stages and Predicates
Stage 1: any
any where
(
(event.category == "file" and event.action != "deletion" and file.Ext.header_bytes like~ ("cffaedfe*", "cafebabe*") and
file.path like "/Users/Shared/*" and file.name like~ ".*" ) or
(event.category == "process" and event.action == "exec" and process.executable like "/Users/Shared/*" and
(process.code_signature.trusted == false or process.code_signature.exists == false) and process.name like~ ".*")
)
Indicators
These rows show field, operator, and value matches.