Detection rules › Elastic
Suspicious Stop of TCCD via Launchctl
Detects the abnormal stop of the TCC daemon via the launchctl system binary. This activity can indicate an attempt to restart the TCC daemon following an exploit and may indicate a threat actors attempt to bypass security controls, escalate privileges, evade defenses.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Rule body
[rule]
description = """
Detects the abnormal stop of the TCC daemon via the launchctl system binary. This activity can indicate an attempt to
restart the TCC daemon following an exploit and may indicate a threat actors attempt to bypass security controls,
escalate privileges, evade defenses.
"""
id = "ffda6af2-fa65-4ef6-88a4-318b396844fe"
license = "Elastic License v2"
name = "Suspicious Stop of TCCD via Launchctl"
os_list = ["macos"]
version = "1.0.15"
query = '''
process where event.type == "start" and
(
(
process.name == "launchctl" and
process.args like~ "stop" and
process.args like~ "com.apple.tccd"
) or
(
(process.name in ("sh", "zsh", "bash", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and
process.args == "-c" and
process.args like~ "*com.apple.tccd"
)
) and not
process.parent.executable in ("/sbin/launchd",
"/usr/local/jamf/bin/jamf",
"/usr/bin/sudo") and not
process.Ext.effective_parent.executable in ("/System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal",
"/usr/local/jamf/bin/jamf",
"/Applications/iTerm.app/Contents/MacOS/iTerm2")
'''
min_endpoint_version = "8.5.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 = "T1553"
name = "Subvert Trust Controls"
reference = "https://attack.mitre.org/techniques/T1553/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.5.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and
(
(
process.name == "launchctl" and
process.args like~ "stop" and
process.args like~ "com.apple.tccd"
) or
(
(process.name in ("sh", "zsh", "bash", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and
process.args == "-c" and
process.args like~ "*com.apple.tccd"
)
) and not
process.parent.executable in ("/sbin/launchd",
"/usr/local/jamf/bin/jamf",
"/usr/bin/sudo") and not
process.Ext.effective_parent.executable in ("/System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal",
"/usr/local/jamf/bin/jamf",
"/Applications/iTerm.app/Contents/MacOS/iTerm2")
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.Ext.effective_parent.executable | in | /Applications/iTerm.app/Contents/MacOS/iTerm2, /System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal, /usr/local/jamf/bin/jamf | excludes:process.Ext.effective_parent.executable field:"process.Ext.effective_parent.executable" value:"/Applications/iTerm.app/Contents/MacOS/iTerm2" field:"process.Ext.effective_parent.executable" value:"/System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal" field:"process.Ext.effective_parent.executable" value:"/usr/local/jamf/bin/jamf" |
process.parent.executable | in | /sbin/launchd, /usr/bin/sudo, /usr/local/jamf/bin/jamf | excludes:process.parent.executable field:"process.parent.executable" value:"/sbin/launchd" field:"process.parent.executable" value:"/usr/bin/sudo" field:"process.parent.executable" value:"/usr/local/jamf/bin/jamf" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | eq |
| field:"process.args" kind:eq value:"-c" |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.name | eq |
| field:"process_name" kind:eq value:"launchctl" |
process.name | in |
| field:"process_name" kind:in |
process.name | wildcard |
| field:"process_name" kind:wildcard value:"tclsh*" |