diff --git a/rules/windows/privilege_escalation_krbrelayup_service_creation.toml b/rules/windows/privilege_escalation_krbrelayup_service_creation.toml new file mode 100644 index 000000000..b2fbedc4d --- /dev/null +++ b/rules/windows/privilege_escalation_krbrelayup_service_creation.toml @@ -0,0 +1,76 @@ +[metadata] +creation_date = "2022/04/27" +maturity = "production" +updated_date = "2022/04/27" + +[rule] +author = ["Elastic"] +description = """ +Identifies a suspicious local successful logon event where the Logon Package is Kerberos, the remote address is set to +localhost, followed by a sevice creation from the same LogonId. This may indicate an attempt to leverage a Kerberos +relay attack variant that can be used to elevate privilege locally from a domain joined user to local System privileges. +""" +from = "now-9m" +index = ["winlogbeat-*", "logs-system.*"] +language = "eql" +license = "Elastic License v2" +name = "Service Creation via Local Kerberos Authentication" +references = [ + "https://github.com/Dec0ne/KrbRelayUp", + "https://googleprojectzero.blogspot.com/2021/10/using-kerberos-for-authentication-relay.html", + "https://github.com/cube0x0/KrbRelay", + "https://gist.github.com/tyranid/c24cfd1bd141d14d4925043ee7e03c82", +] +risk_score = 73 +rule_id = "e4e31051-ee01-4307-a6ee-b21b186958f4" +severity = "high" +tags = ["Elastic", "Host", "Windows", "Threat Detection", "Privilege Escalation", "Credential Access"] +type = "eql" + +query = ''' +sequence by host.id with maxspan=5m + [authentication where + + /* event 4624 need to be logged */ + event.action == "logged-in" and event.outcome == "success" and + + /* authenticate locally using relayed kerberos Ticket */ + winlog.event_data.AuthenticationPackageName :"Kerberos" and winlog.logon.type == "Network" and + cidrmatch(source.ip, "127.0.0.0/8", "::1") and source.port > 0] by winlog.event_data.TargetLogonId + + [any where + /* event 4697 need to be logged */ + event.action : "service-installed"] by winlog.event_data.SubjectLogonId +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1543" +name = "Create or Modify System Process" +reference = "https://attack.mitre.org/techniques/T1543/" +[[rule.threat.technique.subtechnique]] +id = "T1543.003" +name = "Windows Service" +reference = "https://attack.mitre.org/techniques/T1543/003/" + + + +[rule.threat.tactic] +id = "TA0004" +name = "Privilege Escalation" +reference = "https://attack.mitre.org/tactics/TA0004/" +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1558" +name = "Steal or Forge Kerberos Tickets" +reference = "https://attack.mitre.org/techniques/T1558/" + + +[rule.threat.tactic] +id = "TA0006" +name = "Credential Access" +reference = "https://attack.mitre.org/tactics/TA0006/" +