Skip to content

Commit 19ff825

Browse files
Samirbousw0rk3r
andauthored
[New rule] Remote Computer Account DnsHostName Update (elastic#1962)
* [New rule] Remote Computer Account DnsHostName Update Identifies remote update to a computer account DnsHostName attribute, if the new value is set a valid domain controller DNS hostname and the subject computer name is not a domain controller then it's high likely a preparation step to exploit CVE-2022-26923 in an attempt to elevate privileges from a standard domain user to domain admin privileges : * added MS ref url * Update rules/windows/privilege_escalation_suspicious_dnshostname_update.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/privilege_escalation_suspicious_dnshostname_update.toml Co-authored-by: Jonhnathan <[email protected]> Co-authored-by: Jonhnathan <[email protected]>
1 parent 5f447a6 commit 19ff825

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

detection_rules/etc/non-ecs-schema.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"TargetSid": "keyword",
4040
"PrivilegeList": "keyword",
4141
"AuthenticationPackageName" : "keyword",
42-
"TargetUserSid" : "keyword"
42+
"TargetUserSid" : "keyword",
43+
"DnsHostName" : "keyword"
4344
}
4445
},
4546
"winlog.logon.type": "keyword",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
[metadata]
2+
creation_date = "2022/05/11"
3+
maturity = "production"
4+
updated_date = "2022/05/11"
5+
6+
[rule]
7+
author = ["Elastic"]
8+
description = """
9+
Identifies the remote update to a computer account's DnsHostName attribute. If the new value set is a valid domain
10+
controller DNS hostname and the subject computer name is not a domain controller, then it's highly likely a preparation
11+
step to exploit CVE-2022-26923 in an attempt to elevate privileges from a standard domain user to domain admin privileges.
12+
"""
13+
from = "now-9m"
14+
index = ["winlogbeat-*", "logs-system.*"]
15+
language = "eql"
16+
license = "Elastic License v2"
17+
name = "Remote Computer Account DnsHostName Update"
18+
references = [
19+
"https://research.ifcr.dk/certifried-active-directory-domain-privilege-escalation-cve-2022-26923-9e098fe298f4",
20+
"https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2022-26923",
21+
]
22+
risk_score = 73
23+
rule_id = "6bed021a-0afb-461c-acbe-ffdb9574d3f3"
24+
severity = "high"
25+
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Privilege Escalation", "Active Directory"]
26+
type = "eql"
27+
28+
query = '''
29+
sequence by host.id with maxspan=5m
30+
31+
[authentication where event.action == "logged-in" and
32+
winlog.logon.type == "Network" and event.outcome == "success" and
33+
not user.name == "ANONYMOUS LOGON" and not winlog.event_data.SubjectUserName : "*$" and
34+
not user.domain == "NT AUTHORITY" and source.ip != "127.0.0.1" and source.ip !="::1"] by winlog.event_data.TargetLogonId
35+
36+
[iam where event.action == "changed-computer-account" and
37+
38+
/* if DnsHostName value equal a DC DNS hostname then it's highly suspicious */
39+
winlog.event_data.DnsHostName : "??*"] by winlog.event_data.SubjectLogonId
40+
'''
41+
42+
43+
[[rule.threat]]
44+
framework = "MITRE ATT&CK"
45+
[[rule.threat.technique]]
46+
id = "T1068"
47+
name = "Exploitation for Privilege Escalation"
48+
reference = "https://attack.mitre.org/techniques/T1068/"
49+
50+
[[rule.threat.technique]]
51+
id = "T1078"
52+
name = "Valid Accounts"
53+
reference = "https://attack.mitre.org/techniques/T1078/"
54+
[[rule.threat.technique.subtechnique]]
55+
id = "T1078.002"
56+
name = "Domain Accounts"
57+
reference = "https://attack.mitre.org/techniques/T1078/002/"
58+
59+
60+
61+
[rule.threat.tactic]
62+
id = "TA0004"
63+
name = "Privilege Escalation"
64+
reference = "https://attack.mitre.org/tactics/TA0004/"
65+

0 commit comments

Comments
 (0)