Remote Computer Account DnsHostName Update

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.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2022/05/11"
 3integration = ["system", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/07/21"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies the remote update to a computer account's DnsHostName attribute. If the new value set is a valid domain
13controller DNS hostname and the subject computer name is not a domain controller, then it's highly likely a preparation
14step to exploit CVE-2022-26923 in an attempt to elevate privileges from a standard domain user to domain admin
15privileges.
16"""
17from = "now-9m"
18index = ["winlogbeat-*", "logs-system.*", "logs-windows.*"]
19language = "eql"
20license = "Elastic License v2"
21name = "Remote Computer Account DnsHostName Update"
22references = [
23    "https://research.ifcr.dk/certifried-active-directory-domain-privilege-escalation-cve-2022-26923-9e098fe298f4",
24    "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2022-26923",
25]
26risk_score = 73
27rule_id = "6bed021a-0afb-461c-acbe-ffdb9574d3f3"
28severity = "high"
29tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Privilege Escalation", "Use Case: Active Directory Monitoring", "Data Source: Active Directory", "Use Case: Vulnerability"]
30timestamp_override = "event.ingested"
31type = "eql"
32
33query = '''
34iam where event.action == "changed-computer-account" and user.id : ("S-1-5-21-*", "S-1-12-1-*") and
35
36    /* if DnsHostName value equal a DC DNS hostname then it's highly suspicious */
37    winlog.event_data.DnsHostName : "??*" and
38
39    /* exclude FPs where DnsHostName starts with the ComputerName that was changed */
40    not startswith~(winlog.event_data.DnsHostName, substring(winlog.event_data.TargetUserName, 0, length(winlog.event_data.TargetUserName) - 1))
41'''
42
43
44[[rule.threat]]
45framework = "MITRE ATT&CK"
46[[rule.threat.technique]]
47id = "T1068"
48name = "Exploitation for Privilege Escalation"
49reference = "https://attack.mitre.org/techniques/T1068/"
50
51[[rule.threat.technique]]
52id = "T1078"
53name = "Valid Accounts"
54reference = "https://attack.mitre.org/techniques/T1078/"
55[[rule.threat.technique.subtechnique]]
56id = "T1078.002"
57name = "Domain Accounts"
58reference = "https://attack.mitre.org/techniques/T1078/002/"
59
60
61
62[rule.threat.tactic]
63id = "TA0004"
64name = "Privilege Escalation"
65reference = "https://attack.mitre.org/tactics/TA0004/"

References

Related rules

to-top