Skip to content

Commit 8df5125

Browse files
authored
Merge branch 'main' into docs_windows_audit
2 parents ec14987 + 8b74ba7 commit 8df5125

File tree

34 files changed

+87
-86
lines changed

34 files changed

+87
-86
lines changed

rules/windows/credential_access_bruteforce_admin_account.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/08/29"
33
integration = ["system", "windows"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/11/14"
66

77
[transform]
88
[[transform.osquery]]
@@ -107,7 +107,8 @@ type = "eql"
107107

108108
query = '''
109109
sequence by winlog.computer_name, source.ip with maxspan=10s
110-
[authentication where event.action == "logon-failed" and winlog.logon.type : "Network" and
110+
[authentication where host.os.type == "windows" and
111+
event.action == "logon-failed" and winlog.logon.type : "Network" and
111112
source.ip != null and source.ip != "127.0.0.1" and source.ip != "::1" and user.name : "*admin*" and
112113
113114
/* noisy failure status codes often associated to authentication misconfiguration */

rules/windows/credential_access_bruteforce_multiple_logon_failure_followed_by_success.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/08/29"
33
integration = ["system", "windows"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/11/14"
66

77
[transform]
88
[[transform.osquery]]
@@ -111,7 +111,7 @@ type = "eql"
111111

112112
query = '''
113113
sequence by winlog.computer_name, source.ip with maxspan=5s
114-
[authentication where event.action == "logon-failed" and
114+
[authentication where host.os.type == "windows" and event.action == "logon-failed" and
115115
/* event 4625 need to be logged */
116116
winlog.logon.type : "Network" and user.id != null and
117117
source.ip != null and source.ip != "127.0.0.1" and source.ip != "::1" and
@@ -120,7 +120,7 @@ sequence by winlog.computer_name, source.ip with maxspan=5s
120120
121121
/* noisy failure status codes often associated to authentication misconfiguration */
122122
not winlog.event_data.Status : ("0xC000015B", "0XC000005E", "0XC0000133", "0XC0000192")] with runs=5
123-
[authentication where event.action == "logged-in" and
123+
[authentication where host.os.type == "windows" and event.action == "logged-in" and
124124
/* event 4624 need to be logged */
125125
winlog.logon.type : "Network" and
126126
source.ip != null and source.ip != "127.0.0.1" and source.ip != "::1" and

rules/windows/credential_access_bruteforce_multiple_logon_failure_same_srcip.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/08/29"
33
integration = ["system", "windows"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/11/14"
66

77
[transform]
88
[[transform.osquery]]
@@ -121,7 +121,7 @@ type = "eql"
121121

122122
query = '''
123123
sequence by winlog.computer_name, source.ip with maxspan=10s
124-
[authentication where event.action == "logon-failed" and
124+
[authentication where host.os.type == "windows" and event.action == "logon-failed" and
125125
/* event 4625 need to be logged */
126126
winlog.logon.type : "Network" and
127127
source.ip != null and source.ip != "127.0.0.1" and source.ip != "::1" and

rules/windows/credential_access_dcsync_newterm_subjectuser.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2022/12/19"
33
integration = ["windows", "system"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/11/14"
66

77
[rule]
88
author = ["Elastic"]
@@ -95,11 +95,12 @@ timestamp_override = "event.ingested"
9595
type = "new_terms"
9696

9797
query = '''
98-
event.code:"4662" and winlog.event_data.Properties:(
99-
*DS-Replication-Get-Changes* or *DS-Replication-Get-Changes-All* or
100-
*DS-Replication-Get-Changes-In-Filtered-Set* or *1131f6ad-9c07-11d1-f79f-00c04fc2dcd2* or
101-
*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2* or *89e95b76-444d-4c62-991a-0facbeda640c*) and
102-
not winlog.event_data.SubjectUserName:(*$ or MSOL_*)
98+
event.code:"4662" and host.os.type:"windows" and
99+
winlog.event_data.Properties:(
100+
*DS-Replication-Get-Changes* or *DS-Replication-Get-Changes-All* or
101+
*DS-Replication-Get-Changes-In-Filtered-Set* or *1131f6ad-9c07-11d1-f79f-00c04fc2dcd2* or
102+
*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2* or *89e95b76-444d-4c62-991a-0facbeda640c*) and
103+
not winlog.event_data.SubjectUserName:(*$ or MSOL_*)
103104
'''
104105

105106

rules/windows/credential_access_dcsync_user_backdoor.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/07/10"
33
integration = ["system", "windows"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/11/14"
66

77
[rule]
88
author = ["Elastic"]
@@ -92,7 +92,7 @@ timestamp_override = "event.ingested"
9292
type = "query"
9393

9494
query = '''
95-
event.code:"5136" and
95+
event.code:"5136" and host.os.type:"windows" and
9696
winlog.event_data.AttributeLDAPDisplayName:"nTSecurityDescriptor" and
9797
winlog.event_data.AttributeValue : (
9898
(

rules/windows/credential_access_kerberos_coerce.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/06/14"
33
integration = ["system", "windows"]
44
maturity = "production"
5-
updated_date = "2025/06/14"
5+
updated_date = "2025/11/14"
66

77
[rule]
88
author = ["Elastic"]
@@ -93,8 +93,11 @@ timestamp_override = "event.ingested"
9393
type = "query"
9494

9595
query = '''
96-
(event.code:4662 and winlog.event_data.AdditionalInfo: *UWhRC*BAAAA*MicrosoftDNS*) or
97-
(event.code:5137 and winlog.event_data.ObjectDN: *UWhRC*BAAAA*MicrosoftDNS*)
96+
host.os.type:"windows" and
97+
(
98+
(event.code:4662 and winlog.event_data.AdditionalInfo: *UWhRC*BAAAA*MicrosoftDNS*) or
99+
(event.code:5137 and winlog.event_data.ObjectDN: *UWhRC*BAAAA*MicrosoftDNS*)
100+
)
98101
'''
99102

100103

rules/windows/credential_access_ldap_attributes.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2022/11/09"
33
integration = ["system", "windows"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/11/14"
66

77
[rule]
88
author = ["Elastic"]
@@ -89,7 +89,7 @@ timestamp_override = "event.ingested"
8989
type = "eql"
9090

9191
query = '''
92-
any where event.code == "4662" and
92+
any where host.os.type == "windows" and event.code == "4662" and
9393
9494
not winlog.event_data.SubjectUserSid : "S-1-5-18" and
9595

rules/windows/credential_access_machine_account_smb_relay.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/06/16"
33
integration = ["system", "windows"]
44
maturity = "production"
5-
updated_date = "2025/06/16"
5+
updated_date = "2025/11/14"
66

77
[rule]
88
author = ["Elastic"]
@@ -69,7 +69,7 @@ timestamp_override = "event.ingested"
6969
type = "eql"
7070

7171
query = '''
72-
file where event.code == "5145" and endswith(user.name, "$") and
72+
file where host.os.type == "windows" and event.code == "5145" and endswith(user.name, "$") and
7373
7474
/* compare computername with user.name and make sure they match */
7575
startswith~(winlog.computer_name, substring(user.name, 0, -1)) and

rules/windows/credential_access_saved_creds_vault_winlog.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2022/08/30"
33
integration = ["system", "windows"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/11/14"
66

77
[rule]
88
author = ["Elastic"]
@@ -73,12 +73,12 @@ sequence by winlog.computer_name, winlog.process.pid with maxspan=1s
7373
7474
/* 2 consecutive vault reads from same pid for web creds */
7575
76-
[any where event.code : "5382" and
76+
[any where host.os.type == "windows" and event.code == "5382" and
7777
(winlog.event_data.SchemaFriendlyName : "Windows Web Password Credential" and winlog.event_data.Resource : "http*") and
7878
not winlog.event_data.SubjectLogonId : "0x3e7" and
7979
not winlog.event_data.Resource : "http://localhost/"]
8080
81-
[any where event.code : "5382" and
81+
[any where host.os.type == "windows" and event.code == "5382" and
8282
(winlog.event_data.SchemaFriendlyName : "Windows Web Password Credential" and winlog.event_data.Resource : "http*") and
8383
not winlog.event_data.SubjectLogonId : "0x3e7" and
8484
not winlog.event_data.Resource : "http://localhost/"]

rules/windows/credential_access_seenabledelegationprivilege_assigned_to_user.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2022/01/27"
33
integration = ["system", "windows"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/11/14"
66

77
[rule]
88
author = ["Elastic"]
@@ -90,7 +90,7 @@ timestamp_override = "event.ingested"
9090
type = "query"
9191

9292
query = '''
93-
event.code:4704 and winlog.event_data.PrivilegeList:"SeEnableDelegationPrivilege"
93+
event.code:4704 and host.os.type:"windows" and winlog.event_data.PrivilegeList:"SeEnableDelegationPrivilege"
9494
'''
9595

9696

0 commit comments

Comments
 (0)