Sample rules
Windows Unusual Count Of Users Failed To Authenticate Using NTLM
- source: splunk
- technicques:
- T1110.003
- T1110
Description
The following analytic identifies a source endpoint failing to authenticate multiple valid users using the NTLM protocol, potentially indicating a Password Spraying attack. It leverages Event 4776 from Domain Controllers, calculating the standard deviation for each host and applying the 3-sigma rule to detect anomalies. This activity is significant as it may represent an adversary attempting to gain initial access or elevate privileges. If confirmed malicious, the attacker could compromise multiple accounts, leading to unauthorized access and potential lateral movement within the network.
Detection logic
`wineventlog_security` EventCode=4776 TargetUserName!=*$ Status=0xC000006A
| bucket span=2m _time
| stats dc(TargetUserName) AS unique_accounts values(TargetUserName) as tried_accounts by _time, Workstation
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by Workstation
| eval upperBound=(comp_avg+comp_std*3)
| eval isOutlier=if(unique_accounts > 10 and unique_accounts >= upperBound, 1, 0)
| search isOutlier=1
| `windows_unusual_count_of_users_failed_to_authenticate_using_ntlm_filter`
Windows Multiple Users Failed To Authenticate From Host Using NTLM
- source: splunk
- technicques:
- T1110.003
- T1110
Description
The following analytic identifies a single source endpoint failing to authenticate with 30 unique valid users using the NTLM protocol. It leverages EventCode 4776 from Domain Controller logs, focusing on error code 0xC000006A, which indicates a bad password. This behavior is significant as it may indicate a Password Spraying attack, where an adversary attempts to gain initial access or elevate privileges. If confirmed malicious, this activity could lead to unauthorized access to sensitive information or further compromise of the Active Directory environment.
Detection logic
`wineventlog_security` EventCode=4776 TargetUserName!=*$ Status=0xC000006A
| bucket span=5m _time
| stats dc(TargetUserName) AS unique_accounts values(TargetUserName) as tried_accounts by _time, Workstation
| where unique_accounts > 30
| `windows_multiple_users_failed_to_authenticate_from_host_using_ntlm_filter`
Windows Unusual Count Of Users Failed To Auth Using Kerberos
- source: splunk
- technicques:
- T1110.003
- T1110
Description
The following analytic identifies a source endpoint failing to authenticate multiple valid users using the Kerberos protocol, potentially indicating a Password Spraying attack. It leverages Event 4771, which is generated when the Key Distribution Center fails to issue a Kerberos Ticket Granting Ticket (TGT) due to a wrong password (failure code 0x18). This detection uses statistical analysis, specifically the 3-sigma rule, to identify unusual authentication failures. If confirmed malicious, this activity could allow an attacker to gain initial access or elevate privileges within an Active Directory environment.
Detection logic
`wineventlog_security` EventCode=4771 TargetUserName!="*$" Status=0x18
| bucket span=5m _time
| stats dc(TargetUserName) AS unique_accounts values(TargetUserName) as user by _time, IpAddress
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by IpAddress
| eval upperBound=(comp_avg+comp_std*3)
| eval isOutlier=if(unique_accounts > 10 and unique_accounts >= upperBound, 1, 0)
| search isOutlier=1
| `windows_unusual_count_of_users_failed_to_auth_using_kerberos_filter`
Windows Multiple Users Failed To Authenticate Using Kerberos
- source: splunk
- technicques:
- T1110.003
- T1110
Description
The following analytic identifies a single source endpoint failing to authenticate with 30 unique users using the Kerberos protocol. It leverages EventCode 4771 with Status 0x18, indicating wrong password attempts, and aggregates these events over a 5-minute window. This behavior is significant as it may indicate a Password Spraying attack, where an adversary attempts to gain initial access or elevate privileges in an Active Directory environment. If confirmed malicious, this activity could lead to unauthorized access, privilege escalation, and potential compromise of sensitive information.
Detection logic
`wineventlog_security` EventCode=4771 TargetUserName!="*$" Status=0x18
| bucket span=5m _time
| stats dc(TargetUserName) AS unique_accounts values(TargetUserName) as user by _time, IpAddress
| where unique_accounts > 30
| `windows_multiple_users_failed_to_authenticate_using_kerberos_filter`