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/10/15"
 6min_stack_version = "8.14.0"
 7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
 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 = [
30    "Domain: Endpoint",
31    "OS: Windows",
32    "Use Case: Threat Detection",
33    "Tactic: Privilege Escalation",
34    "Use Case: Active Directory Monitoring",
35    "Data Source: Active Directory",
36    "Use Case: Vulnerability",
37    "Data Source: System",
38]
39timestamp_override = "event.ingested"
40type = "eql"
41
42query = '''
43iam where event.action == "changed-computer-account" and user.id : ("S-1-5-21-*", "S-1-12-1-*") and
44
45    /* if DnsHostName value equal a DC DNS hostname then it's highly suspicious */
46    winlog.event_data.DnsHostName : "??*" and
47
48    /* exclude FPs where DnsHostName starts with the ComputerName that was changed */
49    not startswith~(winlog.event_data.DnsHostName, substring(winlog.event_data.TargetUserName, 0, length(winlog.event_data.TargetUserName) - 1))
50'''
51
52
53[[rule.threat]]
54framework = "MITRE ATT&CK"
55[[rule.threat.technique]]
56id = "T1068"
57name = "Exploitation for Privilege Escalation"
58reference = "https://attack.mitre.org/techniques/T1068/"
59
60[[rule.threat.technique]]
61id = "T1078"
62name = "Valid Accounts"
63reference = "https://attack.mitre.org/techniques/T1078/"
64[[rule.threat.technique.subtechnique]]
65id = "T1078.002"
66name = "Domain Accounts"
67reference = "https://attack.mitre.org/techniques/T1078/002/"
68
69
70
71[rule.threat.tactic]
72id = "TA0004"
73name = "Privilege Escalation"
74reference = "https://attack.mitre.org/tactics/TA0004/"

References

Related rules

to-top