Detection rules › Elastic
User TCC DB Access by Unsigned or Untrusted Process
Detects the attempt to access or open the users TCC database by an unsigned or untrusted binary. This activity may indicate the presence of a malicious payload attempting to bypass TCC or gain awareness of system permissions in place.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Discovery |
Telemetry coverage
| Platform | Record / event type |
|---|---|
| macOS | ESF event open (NOTIFY): Fires after the kernel grants a process access to open a file. |
Rule body
[rule]
description = """
Detects the attempt to access or open the users TCC database by an unsigned or untrusted binary. This activity may
indicate the presence of a malicious payload attempting to bypass TCC or gain awareness of system permissions in place.
"""
id = "a9bec1de-bc5f-4e0f-a80e-569f5b920ef6"
license = "Elastic License v2"
name = "User TCC DB Access by Unsigned or Untrusted Process"
os_list = ["macos"]
reference = [
"https://www.sentinelone.com/blog/session-cookies-keychains-ssh-keys-and-more-7-kinds-of-data-malware-steals-from-macos-users/",
]
version = "1.0.13"
query = '''
file where event.action == "open" and process.executable != null and
file.path like~ "/Users/*/Library/Application Support/com.apple.TCC/TCC.db" and
(process.code_signature.trusted == false or process.code_signature.exists == false) and
not Effective_process.executable in ("/Applications/Vorta.app/Contents/MacOS/vorta-darwin",
"/Applications/CleanMyMac X.app/Contents/MacOS/CleanMyMac X",
"/Applications/CleanMyMac X.app/Contents/Library/LoginItems/CleanMyMac X HealthMonitor.app/Contents/MacOS/CleanMyMac X HealthMonitor") and
not process.code_signature.signing_id like~ "rg-*"
'''
min_endpoint_version = "8.10.2"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1106"
name = "Native API"
reference = "https://attack.mitre.org/techniques/T1106/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1069"
name = "Permission Groups Discovery"
reference = "https://attack.mitre.org/techniques/T1069/"
[[threat.technique]]
id = "T1082"
name = "System Information Discovery"
reference = "https://attack.mitre.org/techniques/T1082/"
[threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
[internal]
min_endpoint_version = "8.10.2"
Stages and Predicates
Stage 1: file
file where event.action == "open" and process.executable != null and
file.path like~ "/Users/*/Library/Application Support/com.apple.TCC/TCC.db" and
(process.code_signature.trusted == false or process.code_signature.exists == false) and
not Effective_process.executable in ("/Applications/Vorta.app/Contents/MacOS/vorta-darwin",
"/Applications/CleanMyMac X.app/Contents/MacOS/CleanMyMac X",
"/Applications/CleanMyMac X.app/Contents/Library/LoginItems/CleanMyMac X HealthMonitor.app/Contents/MacOS/CleanMyMac X HealthMonitor") and
not process.code_signature.signing_id like~ "rg-*"
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Effective_process.executable | in | /Applications/CleanMyMac X.app/Contents/Library/LoginItems/CleanMyMac X HealthMonitor.app/Contents/MacOS/CleanMyMac X HealthMonitor, /Applications/CleanMyMac X.app/Contents/MacOS/CleanMyMac X, /Applications/Vorta.app/Contents/MacOS/vorta-darwin | excludes:Effective_process.executable field:"Effective_process.executable" value:"/Applications/CleanMyMac X.app/Contents/Library/LoginItems/CleanMyMac X HealthMonitor.app/Contents/MacOS/CleanMyMac X HealthMonitor" field:"Effective_process.executable" value:"/Applications/CleanMyMac X.app/Contents/MacOS/CleanMyMac X" field:"Effective_process.executable" value:"/Applications/Vorta.app/Contents/MacOS/vorta-darwin" |
process.code_signature.signing_id | starts_with | rg- | excludes:process.code_signature.signing_id field:"process.code_signature.signing_id" value:"rg-" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"open" |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard value:"/Users/*/Library/Application Support/com.apple.TCC/TCC.db" |
process.code_signature.exists | eq |
| field:"process.code_signature.exists" kind:eq value:"false" |
process.code_signature.trusted | eq |
| field:"process.code_signature.trusted" kind:eq value:"false" |
process.executable | is_not_null | field:"Image" kind:is_not_null |