Skip to content

Commit

Permalink
[New rule] Remote Computer Account DnsHostName Update (elastic#1962)
Browse files Browse the repository at this point in the history
* [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]>
  • Loading branch information
Samirbous and w0rk3r authored May 11, 2022
1 parent 5f447a6 commit 19ff825
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
3 changes: 2 additions & 1 deletion detection_rules/etc/non-ecs-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"TargetSid": "keyword",
"PrivilegeList": "keyword",
"AuthenticationPackageName" : "keyword",
"TargetUserSid" : "keyword"
"TargetUserSid" : "keyword",
"DnsHostName" : "keyword"
}
},
"winlog.logon.type": "keyword",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[metadata]
creation_date = "2022/05/11"
maturity = "production"
updated_date = "2022/05/11"

[rule]
author = ["Elastic"]
description = """
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.
"""
from = "now-9m"
index = ["winlogbeat-*", "logs-system.*"]
language = "eql"
license = "Elastic License v2"
name = "Remote Computer Account DnsHostName Update"
references = [
"https://research.ifcr.dk/certifried-active-directory-domain-privilege-escalation-cve-2022-26923-9e098fe298f4",
"https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2022-26923",
]
risk_score = 73
rule_id = "6bed021a-0afb-461c-acbe-ffdb9574d3f3"
severity = "high"
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Privilege Escalation", "Active Directory"]
type = "eql"

query = '''
sequence by host.id with maxspan=5m
[authentication where event.action == "logged-in" and
winlog.logon.type == "Network" and event.outcome == "success" and
not user.name == "ANONYMOUS LOGON" and not winlog.event_data.SubjectUserName : "*$" and
not user.domain == "NT AUTHORITY" and source.ip != "127.0.0.1" and source.ip !="::1"] by winlog.event_data.TargetLogonId
[iam where event.action == "changed-computer-account" and
/* if DnsHostName value equal a DC DNS hostname then it's highly suspicious */
winlog.event_data.DnsHostName : "??*"] by winlog.event_data.SubjectLogonId
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1068"
name = "Exploitation for Privilege Escalation"
reference = "https://attack.mitre.org/techniques/T1068/"

[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"
[[rule.threat.technique.subtechnique]]
id = "T1078.002"
name = "Domain Accounts"
reference = "https://attack.mitre.org/techniques/T1078/002/"



[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"

0 comments on commit 19ff825

Please sign in to comment.