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/05/21"
 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]
36timestamp_override = "event.ingested"
37type = "eql"
38
39query = '''
40iam where event.action == "changed-computer-account" and user.id : ("S-1-5-21-*", "S-1-12-1-*") and
41
42    /* if DnsHostName value equal a DC DNS hostname then it's highly suspicious */
43    winlog.event_data.DnsHostName : "??*" and
44
45    /* exclude FPs where DnsHostName starts with the ComputerName that was changed */
46    not startswith~(winlog.event_data.DnsHostName, substring(winlog.event_data.TargetUserName, 0, length(winlog.event_data.TargetUserName) - 1))
47'''
48
49
50[[rule.threat]]
51framework = "MITRE ATT&CK"
52[[rule.threat.technique]]
53id = "T1068"
54name = "Exploitation for Privilege Escalation"
55reference = "https://attack.mitre.org/techniques/T1068/"
56
57[[rule.threat.technique]]
58id = "T1078"
59name = "Valid Accounts"
60reference = "https://attack.mitre.org/techniques/T1078/"
61[[rule.threat.technique.subtechnique]]
62id = "T1078.002"
63name = "Domain Accounts"
64reference = "https://attack.mitre.org/techniques/T1078/002/"
65
66
67
68[rule.threat.tactic]
69id = "TA0004"
70name = "Privilege Escalation"
71reference = "https://attack.mitre.org/tactics/TA0004/"

References

Related rules

to-top