Suspicious File Quarantine Removal via Find


Description

Detects when the Find command is executed with the exec option in order to execute the Xattr command for removal of the file quarantine bit.

Query · eql

sequence with maxspan=3s
[process where event.type == "start" and event.action == "exec" and process.name == "find" and 
  process.args in~ ("-exec", "-execdir") and 
  process.args like~ "*com.apple.quarantine*"] by process.parent.entity_id
[file where event.action == "extended_attributes_delete" and 
  process.executable like "/usr/bin/xattr"] by Effective_process.entity_id
Raw source Suspicious File Quarantine Removal via Find · Elastic TOML
Esc
Published by elastic/protections-artifacts ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[rule]
description = """
Detects when the Find command is executed with the exec option in order to execute the Xattr command for removal of the
file quarantine bit.
"""
id = "c43102bc-f307-48a4-bfc5-a02444b3fed2"
license = "Elastic License v2"
name = "Suspicious File Quarantine Removal via Find"
os_list = ["macos"]
version = "1.0.4"

query = '''
sequence with maxspan=3s
[process where event.type == "start" and event.action == "exec" and process.name == "find" and 
  process.args in~ ("-exec", "-execdir") and 
  process.args like~ "*com.apple.quarantine*"] by process.parent.entity_id
[file where event.action == "extended_attributes_delete" and 
  process.executable like "/usr/bin/xattr"] by Effective_process.entity_id
'''

min_endpoint_version = "8.11.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "Effective_process.entity_id"
state = 1

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1553"
name = "Subvert Trust Controls"
reference = "https://attack.mitre.org/techniques/T1553/"
[[threat.technique.subtechnique]]
id = "T1553.001"
name = "Gatekeeper Bypass"
reference = "https://attack.mitre.org/techniques/T1553/001/"



[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.11.0"

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.