Windows Unusual NTLM Authentication Users By Source
Description
The following analytic detects when an unusual number of NTLM authentications is attempted by the same source. This activity generally results when an attacker attempts to brute force, password spray, or otherwise authenticate to a domain joined Windows device using an NTLM based process/attack. This same activity may also generate a large number of EventID 4776 events in as well.
- Type: Anomaly
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2024-03-16
- Author: Steven Dick
- ID: 80fcc4d4-fd90-488e-b55a-4e7190ae6ce2
Annotations
ATT&CK
Kill Chain Phase
- Exploitation
NIST
- DE.AE
CIS20
- CIS 10
CVE
Search
1
2
3
4
5
6
7
8
9
10
11
12
`ntlm_audit` EventCode = 8004 SChannelName=* WorkstationName=*
| eval src = replace(WorkstationName,"\\\\","") ```CIM alignment, remove leading \\ from some auth attempts ```
| eval dest = SChannelName, user = UserName ``` CIM alignment```
| where SChannelName!=src ``` Remove NTLM auths to self, improves accuracy for certain applications ```
| `windows_unusual_ntlm_authentication_users_by_source_filter`
| stats count min(_time) as firstTime max(_time) as lastTime dc(eval(upper(user))) as unique_count by src
| eventstats avg(unique_count) as unique_avg , stdev(unique_count) as unique_std
| eval upperBound_unique=(1+unique_avg+unique_std*3) ``` adjust formula for sensitivity```
| eval isOutlier=CASE(unique_count > upperBound_unique, 1, true(), 0)
| where isOutlier==1
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
Macros
The SPL above uses the following Macros:
windows_unusual_ntlm_authentication_users_by_source_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Required fields
List of fields required to use this analytic.
- _time
- EventCode
- DomainName
- Security
- WorkstationName
How To Implement
The following analytic requires that NTLM Operational logs to be imported from the environment Domain Controllers. This requires configuration of specific auditing settings, see Microsoft references for further guidance. This analytic is specific to EventID 8004~8006.
Known False Positives
Vulnerability scanners, print servers, and applications that deal with non-domain joined authentications. Recommend adjusting the upperBound_unique eval for tailoring the correlation to your environment, running with a 24hr search window will smooth out some statistical noise.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
25.0 | 25 | 100 | The device [$src$] attempted $count$ NTLM authentications using $unique_count$ user accounts. |
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.
Reference
- https://attack.mitre.org/techniques/T1110/003/
- https://techcommunity.microsoft.com/t5/ask-the-directory-services-team/ntlm-blocking-and-you-application-analysis-and-auditing/ba-p/397191
- https://techcommunity.microsoft.com/t5/microsoft-defender-for-identity/enriched-ntlm-authentication-data-using-windows-event-8004/m-p/871827
- https://www.varonis.com/blog/investigate-ntlm-brute-force
- https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nrpc/4d1235e3-2c96-4e9f-a147-3cb338a0d09f
Test Dataset
Replay any dataset to Splunk Enterprise by using our replay.py
tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
source | version: 1