diff --git a/rules/windows/privilege_escalation_rogue_windir_environment_var.toml b/rules/windows/privilege_escalation_rogue_windir_environment_var.toml new file mode 100644 index 000000000..ecef369cc --- /dev/null +++ b/rules/windows/privilege_escalation_rogue_windir_environment_var.toml @@ -0,0 +1,40 @@ +[metadata] +creation_date = "2020/11/26" +maturity = "production" +updated_date = "2020/11/26" + +[rule] +author = ["Elastic"] +description = """ +Identifies a privilege escalation attempt via a rogue Windows directory (Windir) environment variable. This is a known +primitive that is often combined with other vulnerabilities to elevate privileges. +""" +index = ["winlogbeat-*", "logs-endpoint.events.*"] +language = "eql" +license = "Elastic License" +name = "Privilege Escalation via Windir Environment Variable" +references = ["https://www.tiraniddo.dev/2017/05/exploiting-environment-variables-in.html"] +risk_score = 71 +rule_id = "d563aaba-2e72-462b-8658-3e5ea22db3a6" +severity = "high" +tags = ["Elastic", "Host", "Windows", "Threat Detection", "Privilege Escalation"] +type = "eql" + +query = ''' +registry where registry.path : ("HKEY_USERS\\*\\Environment\\windir", "HKEY_USERS\\*\\Environment\\systemroot") and + not registry.data.strings : ("C:\\windows", "%SystemRoot%") +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1034" +name = "Path Interception" +reference = "https://attack.mitre.org/techniques/T1034/" + + +[rule.threat.tactic] +id = "TA0004" +name = "Privilege Escalation" +reference = "https://attack.mitre.org/tactics/TA0004/"