LoFP LoFP / no known false postives for this detection. please review this alert.

Sample rules

GCP Multiple Users Failing To Authenticate From Ip

Description

The following analytic identifies one source Ip failing to authenticate into the Google Workspace user accounts with more than 20 unique valid users within 5 minutes. These user accounts may have other privileges with respect to access to other sensitive resources in the Google Cloud Platform. This behavior could represent an adversary performing a Password Spraying attack against an Google Workspace environment to obtain initial access or elevate privileges.

Detection logic

`gws_reports_login` event.type = login event.name = login_failure 
| bucket span=5m _time 
| stats count dc(user) AS unique_accounts values(user) as tried_accounts values(authentication_method) AS authentication_method earliest(_time) as firstTime latest(_time) as lastTime by _time event.name src app id.applicationName 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
|  where unique_accounts > 20 
| `gcp_multiple_users_failing_to_authenticate_from_ip_filter`

AWS Multiple Users Failing To Authenticate From Ip

Description

The following analytic identifies one source Ip failing to authenticate into the AWS Console with 30 unique valid users within 10 minutes. This behavior could represent an adversary performing a Password Spraying attack against an AWS environment tenant to obtain initial access or elevate privileges.

Detection logic

`cloudtrail` eventName=ConsoleLogin action=failure 
| bucket span=10m _time 
| stats  dc(user_name) AS unique_accounts values(user_name) as tried_accounts by _time, src_ip 
|`aws_unusual_number_of_failed_authentications_from_ip_filter`

AWS Unusual Number of Failed Authentications From Ip

Description

The following analytic identifies one source IP failing to authenticate into the AWS Console with multiple valid users. This behavior could represent an adversary performing a Password Spraying attack against an AWS environment to obtain initial access or elevate privileges. The detection calculates the standard deviation for source IP and leverages the 3-sigma statistical rule to identify an unusual number of failed authentication attempts. To customize this analytic, users can try different combinations of the bucket span time and the calculation of the upperBound field. This logic can be used for real time security monitoring as well as threat hunting exercises. While looking for anomalies using statistical methods like the standard deviation can have benefits, we also recommend using threshold-based detections to complement coverage. A similar analytic following the threshold model is AWS Multiple Users Failing To Authenticate From Ip.

Detection logic

`cloudtrail` eventName=ConsoleLogin action=failure 
| bucket span=10m _time 
| stats  dc(_raw) AS distinct_attempts values(user_name) as tried_accounts by _time, src_ip 
| eventstats  avg(distinct_attempts) as avg_attempts , stdev(distinct_attempts) as ip_std by _time 
| eval  upperBound=(avg_attempts+ip_std*3) 
| eval  isOutlier=if(distinct_attempts > 10 and distinct_attempts >= upperBound, 1, 0) 
| where isOutlier = 1 
|`aws_unusual_number_of_failed_authentications_from_ip_filter`