Detection: Detect Password Spray Attempts

Description

This analytic employs the 3-sigma approach to detect an unusual volume of failed authentication attempts from a single source. A password spray attack is a type of brute force attack where an attacker tries a few common passwords across many different accounts to avoid detection and account lockouts. 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.

 1
 2| tstats `security_content_summariesonly` dc(Authentication.user) AS unique_accounts values(Authentication.app) as app count(Authentication.user) as total_failures from datamodel=Authentication.Authentication where Authentication.action="failure" by Authentication.src, Authentication.action, Authentication.signature_id, sourcetype, _time  span=2m 
 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=5m count 
 6| table _time] 
 7| fillnull value=0 unique_accounts, unique_src ``` remove duplicate & empty time buckets``` 
 8| sort - total_failures 
 9| dedup _time ``` Create aggregation field & apply to all null events``` 
10| eval counter=src+"__"+sourcetype+"__"+signature_id 
11| eventstats values(counter) as fnscounter 
12| eval counter=coalesce(counter,fnscounter) 
13| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by counter 
14| eval upperBound=(comp_avg+comp_std*3) 
15| eval isOutlier=if(unique_accounts > 30 and unique_accounts >= upperBound, 1, 0) 
16| replace "::ffff:*" with * in src 
17| where isOutlier=1 
18| foreach * [ eval <<FIELD>> = if(<<FIELD>>="null",null(),<<FIELD>>)] 
19| table _time, src, action, app, unique_accounts, total_failures, sourcetype, signature_id 
20| `detect_password_spray_attempts_filter`

Data Source

Name Platform Sourcetype Source Supported App
Windows Event Log Security 4625 Windows icon Windows 'xmlwineventlog' 'XmlWinEventLog:Security' N/A

Macros Used

Name Value
security_content_summariesonly summariesonly=summariesonly_config allow_old_summaries=oldsummaries_config fillnull_value=fillnull_config``
detect_password_spray_attempts_filter search *
detect_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

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1110.003 Password Spraying Credential Access
T1110 Brute Force Credential Access
KillChainPhase.EXPLOITAITON
NistCategory.DE_CM
Cis18Value.CIS_10
APT28
APT29
APT33
Chimera
HEXANE
Lazarus Group
Leafminer
Silent Librarian
APT28
APT38
APT39
DarkVishnya
Dragonfly
FIN5
Fox Kitten
HEXANE
OilRig
Turla

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 Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event True
This configuration file applies to all detections of type TTP. These detections will use Risk Based Alerting and generate Notable Events.

Implementation

Ensure in-scope authentication data is CIM mapped and the src field is populated with the source device. Also ensure fill_nullvalue is set within the macro security_content_summariesonly.

Known False Positives

Unknown

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
Potential Password Spraying attack from $src$ targeting $unique_accounts$ unique accounts. 49 70 70
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset XmlWinEventLog:Security XmlWinEventLog
Integration ✅ Passing Dataset XmlWinEventLog:Security XmlWinEventLog

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: 1