[rule]
description = """
Identifies attempts to bypass User Account Control (UAC) via CDSSync scheduled task hijack by modifying the system root
environment variable leading to loading a malicious npmproxy.dll module. Attackers may attempt to bypass UAC to
stealthily execute code with elevated permissions.
"""
id = "d8b7a157-c98f-42bd-8aac-7d1e4fcd53f4"
license = "Elastic License v2"
name = "UAC Bypass Attempt via CDSSync Scheduled Task Hijack"
os_list = ["windows"]
reference = ["https://github.com/AzAgarampur/byeintegrity5-uac"]
version = "1.0.34"
query = '''
sequence with maxspan=60s
[file where file.path : "?:\\*\\system32\\npmproxy.dll" and
not file.path : ("?:\\Windows\\System32\\npmproxy.dll", "?:\\Windows\\SysWOW64\\npmproxy.dll")]
[process where event.action == "start" and
process.parent.name : "taskhostw.exe" and process.Ext.token.integrity_level_name == "high" and
not (process.executable : ("?:\\Windows\\System32\\rdrleakdiag.exe", "C:\\Windows\\System32\\WinSAT.exe") and
process.code_signature.trusted == true and process.code_signature.subject_name : "Microsoft*")]
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1548"
name = "Abuse Elevation Control Mechanism"
reference = "https://attack.mitre.org/techniques/T1548/"
[[threat.technique.subtechnique]]
id = "T1548.002"
name = "Bypass User Account Control"
reference = "https://attack.mitre.org/techniques/T1548/002/"
[threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"
[[threat.technique.subtechnique]]
id = "T1574.001"
name = "DLL"
reference = "https://attack.mitre.org/techniques/T1574/001/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.0"