diff --git a/detection_rules/etc/non-ecs-schema.json b/detection_rules/etc/non-ecs-schema.json index daf6dcdd5..447f3634c 100644 --- a/detection_rules/etc/non-ecs-schema.json +++ b/detection_rules/etc/non-ecs-schema.json @@ -39,7 +39,8 @@ "TargetSid": "keyword", "PrivilegeList": "keyword", "AuthenticationPackageName" : "keyword", - "TargetUserSid" : "keyword" + "TargetUserSid" : "keyword", + "DnsHostName" : "keyword" } }, "winlog.logon.type": "keyword", diff --git a/rules/windows/privilege_escalation_suspicious_dnshostname_update.toml b/rules/windows/privilege_escalation_suspicious_dnshostname_update.toml new file mode 100644 index 000000000..e773941b6 --- /dev/null +++ b/rules/windows/privilege_escalation_suspicious_dnshostname_update.toml @@ -0,0 +1,65 @@ +[metadata] +creation_date = "2022/05/11" +maturity = "production" +updated_date = "2022/05/11" + +[rule] +author = ["Elastic"] +description = """ +Identifies the remote update to a computer account's DnsHostName attribute. If the new value set is a valid domain +controller DNS hostname and the subject computer name is not a domain controller, then it's highly likely a preparation +step to exploit CVE-2022-26923 in an attempt to elevate privileges from a standard domain user to domain admin privileges. +""" +from = "now-9m" +index = ["winlogbeat-*", "logs-system.*"] +language = "eql" +license = "Elastic License v2" +name = "Remote Computer Account DnsHostName Update" +references = [ + "https://research.ifcr.dk/certifried-active-directory-domain-privilege-escalation-cve-2022-26923-9e098fe298f4", + "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2022-26923", +] +risk_score = 73 +rule_id = "6bed021a-0afb-461c-acbe-ffdb9574d3f3" +severity = "high" +tags = ["Elastic", "Host", "Windows", "Threat Detection", "Privilege Escalation", "Active Directory"] +type = "eql" + +query = ''' +sequence by host.id with maxspan=5m + + [authentication where event.action == "logged-in" and + winlog.logon.type == "Network" and event.outcome == "success" and + not user.name == "ANONYMOUS LOGON" and not winlog.event_data.SubjectUserName : "*$" and + not user.domain == "NT AUTHORITY" and source.ip != "127.0.0.1" and source.ip !="::1"] by winlog.event_data.TargetLogonId + + [iam where event.action == "changed-computer-account" and + + /* if DnsHostName value equal a DC DNS hostname then it's highly suspicious */ + winlog.event_data.DnsHostName : "??*"] by winlog.event_data.SubjectLogonId +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1068" +name = "Exploitation for Privilege Escalation" +reference = "https://attack.mitre.org/techniques/T1068/" + +[[rule.threat.technique]] +id = "T1078" +name = "Valid Accounts" +reference = "https://attack.mitre.org/techniques/T1078/" +[[rule.threat.technique.subtechnique]] +id = "T1078.002" +name = "Domain Accounts" +reference = "https://attack.mitre.org/techniques/T1078/002/" + + + +[rule.threat.tactic] +id = "TA0004" +name = "Privilege Escalation" +reference = "https://attack.mitre.org/tactics/TA0004/" +