Detection rules › Elastic
UAC Bypass Attempt via CDSSync Scheduled Task Hijack
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.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth |
Rule body
[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"
Stages and Predicates
Stage 1: file
[file where file.path : "?:\\*\\system32\\npmproxy.dll" and
not file.path : ("?:\\Windows\\System32\\npmproxy.dll", "?:\\Windows\\SysWOW64\\npmproxy.dll")]
Stage 2: process
[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*")]
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
file.path | eq | ?:\Windows\System32\npmproxy.dll, ?:\Windows\SysWOW64\npmproxy.dll | excludes:file.path field:"file.path" value:"?:\Windows\System32\npmproxy.dll" field:"file.path" value:"?:\Windows\SysWOW64\npmproxy.dll" |
process.code_signature.subject_name | starts_with | Microsoft | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft" |
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.executable | eq | ?:\Windows\System32\rdrleakdiag.exe, C:\Windows\System32\WinSAT.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\System32\rdrleakdiag.exe" field:"process.executable" value:"C:\Windows\System32\WinSAT.exe" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard value:"?:\*\system32\npmproxy.dll" |
process.Ext.token.integrity_level_name | eq |
| field:"process.Ext.token.integrity_level_name" kind:eq value:"high" |
process.parent.name | wildcard |
| field:"parent_process_name" kind:wildcard value:"taskhostw.exe" |