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