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

Techniques

Sample rules

GCP Unusual Number of Failed Authentications From Ip

Description

The following analytic identifies one source IP failing to authenticate into the Google Workspace with multiple valid users. This behavior could represent an adversary performing a Password Spraying attack against a Google Workspace enviroment 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 GCP Multiple Users Failing To Authenticate From Ip

Detection logic

`gws_reports_login` event.type = login event.name = login_failure
| bucket span=5m _time 
| stats  dc(user_name) AS unique_accounts values(user_name) as tried_accounts values(authentication_method) AS authentication_method by _time, src 
| eventstats  avg(unique_accounts) as ip_avg , stdev(unique_accounts) as ip_std by _time 
| eval  upperBound=(ip_avg+ip_std*3) 
| eval  isOutlier=if(unique_accounts > 10 and unique_accounts >= upperBound, 1, 0) 
| where isOutlier =1
| `gcp_unusual_number_of_failed_authentications_from_ip_filter`