ID | Technique | Tactic |
---|---|---|
T1110.003 | Password Spraying | Credential Access |
T1110 | Brute Force | Credential Access |
Detection: Detect Distributed Password Spray Attempts
Description
This analytic employs the 3-sigma approach to identify distributed password spray attacks. A distributed password spray attack is a type of brute force attack where the attacker attempts a few common passwords against many different accounts, connecting from multiple IP addresses to avoid detection. By utilizing the Authentication Data Model, this detection is effective for all CIM-mapped authentication events, providing comprehensive coverage and enhancing security against these attacks.
Search
1
2| tstats `security_content_summariesonly` dc(Authentication.user) AS unique_accounts dc(Authentication.src) as unique_src values(Authentication.app) as app values(Authentication.src) as src count(Authentication.user) as total_failures from datamodel=Authentication.Authentication where Authentication.action="failure" NOT Authentication.src IN ("-","unknown") Authentication.user_agent="*" by Authentication.signature_id, Authentication.user_agent, sourcetype, _time span=10m
3| `drop_dm_object_name("Authentication")` ```fill out time buckets for 0-count events during entire search length```
4| appendpipe [
5| timechart limit=0 span=10m count
6| table _time]
7| fillnull value=0 unique_accounts, unique_src ``` Create aggregation field & apply to all null events```
8| eval counter=sourcetype+"__"+signature_id
9| eventstats values(counter) as fnscounter
10| eval counter=coalesce(counter,fnscounter)
11| stats values(total_failures) as total_failures values(signature_id) as signature_id values(src) as src values(sourcetype) as sourcetype values(app) as app count by counter unique_accounts unique_src user_agent _time
12 ``` remove 0 count rows where counter has data```
13
14| sort - _time unique_accounts
15| dedup _time counter ``` 3-sigma detection logic ```
16| eventstats avg(unique_accounts) as comp_avg_user , stdev(unique_accounts) as comp_std_user avg(unique_src) as comp_avg_src , stdev(unique_src) as comp_std_src by counter user_agent
17| eval upperBoundUser=(comp_avg_user+comp_std_user*3), upperBoundsrc=(comp_avg_src+comp_std_src*3)
18| eval isOutlier=if((unique_accounts > 30 and unique_accounts >= upperBoundUser) and (unique_src > 30 and unique_src >= upperBoundsrc), 1, 0)
19| replace "::ffff:*" with * in src
20| where isOutlier=1
21| foreach *
22 [ eval <<FIELD>> = if(<<FIELD>>="null",null(),<<FIELD>>)]
23
24| mvexpand src
25| iplocation src
26| table _time, unique_src, unique_accounts, total_failures, sourcetype, signature_id, user_agent, src, Country
27| eval date_wday=strftime(_time,"%a"), date_hour=strftime(_time,"%H")
28| `detect_distributed_password_spray_attempts_filter`
Data Source
Name | Platform | Sourcetype | Source |
---|---|---|---|
Azure Active Directory Sign-in activity | Azure | 'azure:monitor:aad' |
'Azure AD' |
Macros Used
Name | Value |
---|---|
security_content_summariesonly | summariesonly= summariesonly_config allow_old_summaries= oldsummaries_config fillnull_value= fillnull_config`` |
detect_distributed_password_spray_attempts_filter | search * |
detect_distributed_password_spray_attempts_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
Setting | Value |
---|---|
Disabled | true |
Cron Schedule | 0 * * * * |
Earliest Time | -70m@m |
Latest Time | -10m@m |
Schedule Window | auto |
Creates Risk Event | False |
Implementation
Ensure that all relevant authentication data is mapped to the Common Information Model (CIM) and that the src field is populated with the source device information. Additionally, ensure that fill_nullvalue is set within the security_content_summariesonly macro to include authentication events from log sources that do not feature the signature_id field in the results.
Known False Positives
It is common to see a spike of legitimate failed authentication events on monday mornings.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
Distributed Password Spray Attempt Detected from $src$ | 49 | 70 | 70 |
References
Detection Testing
Test Type | Status | Dataset | Source | Sourcetype |
---|---|---|---|---|
Validation | ✅ Passing | N/A | N/A | N/A |
Unit | ✅ Passing | Dataset | azure:monitor:aad |
azure:monitor:aad |
Integration | ✅ Passing | Dataset | azure:monitor:aad |
azure:monitor:aad |
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: GitHub | Version: 2