Detection rules › Splunk

GCP Unusual Number of Failed Authentications From Ip

Status
production
Severity
low
Group by
_time, src
Author
Bhavin Patel, Splunk
Source
github.com/splunk/security_content

The following analytic identifies a single source IP failing to authenticate into Google Workspace with multiple valid users, potentially indicating a Password Spraying attack. It uses Google Workspace login failure events and calculates the standard deviation for source IPs, applying the 3-sigma rule to detect unusual failed authentication attempts. This activity is significant as it may signal an adversary attempting to gain initial access or elevate privileges. If confirmed malicious, this could lead to unauthorized access, data breaches, or further exploitation within the environment.

MITRE ATT&CK coverage

Rules detecting the same action

Other rules on this platform that filter on the same API call or operation.

Rule body splunk

name: GCP Unusual Number of Failed Authentications From Ip
id: bd8097ed-958a-4873-87d9-44f2b4d85705
version: 11
creation_date: '2022-09-26'
modification_date: '2026-05-13'
author: Bhavin Patel, Splunk
status: production
type: Anomaly
description: The following analytic identifies a single source IP failing to authenticate into Google Workspace with multiple valid users, potentially indicating a Password Spraying attack. It uses Google Workspace login failure events and calculates the standard deviation for source IPs, applying the 3-sigma rule to detect unusual failed authentication attempts. This activity is significant as it may signal an adversary attempting to gain initial access or elevate privileges. If confirmed malicious, this could lead to unauthorized access, data breaches, or further exploitation within the environment.
data_source:
    - Google Workspace
search: |-
    `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`
how_to_implement: You must install the latest version of Splunk Add-on for Google Workspace from Splunkbase (https://splunkbase.splunk.com/app/5556) which allows Splunk administrators to collect Google Workspace event data in Splunk using Google Workspace APIs. We would also recommend tuning the detection by adjusting the window `span` and `unique_accounts` threshold values according to your environment. Specifically, this analytic leverages the User log events.
known_false_positives: No known false positives for this detection. Please review this alert
references:
    - https://cloud.google.com/blog/products/identity-security/how-google-cloud-can-help-stop-credential-stuffing-attacks
    - https://www.slideshare.net/dafthack/ok-google-how-do-i-red-team-gsuite
    - https://attack.mitre.org/techniques/T1110/003/
    - https://www.blackhillsinfosec.com/wp-content/uploads/2020/05/Breaching-the-Cloud-Perimeter-Slides.pdf
drilldown_searches:
    - name: View the detection results for - "$tried_accounts$"
      search: '%original_detection_search% | search  tried_accounts = "$tried_accounts$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$tried_accounts$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$tried_accounts$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
      earliest_offset: 7d
      latest_offset: "0"
intermediate_findings:
    entities:
        - field: tried_accounts
          type: user
          score: 20
          message: 'Unusual number of failed console login attempts (Count: $unique_accounts$) against users from IP Address - $src$'
threat_objects:
    - field: src
      type: ip_address
analytic_story:
    - GCP Account Takeover
asset_type: Google Cloud Platform tenant
mitre_attack_id:
    - T1110.003
    - T1110.004
    - T1586.003
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: cloud
security_domain: threat
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.003/gcp_gws_multiple_login_failure/gws_login.json
          source: gws_login
          sourcetype: gws:reports:login
      test_type: unit

Stages and Predicates

Stage 1: search

`gws_reports_login` event.type = login event.name = login_failure

Stage 2: bucket

| bucket span=5m _time

Stage 3: stats

| stats  dc(user_name) AS unique_accounts values(user_name) as tried_accounts values(authentication_method) AS authentication_method
    BY _time, src

Stage 4: eventstats

| eventstats  avg(unique_accounts) as ip_avg , stdev(unique_accounts) as ip_std
    BY _time

Stage 5: eval

| eval  upperBound=(ip_avg+ip_std*3)

Stage 6: eval

| eval  isOutlier=if(unique_accounts > 10 and unique_accounts >= upperBound, 1, 0)
isOutlier =
ifunique_accounts > 10 AND unique_accounts >= upperBound1
else0

Stage 7: where

| where isOutlier =1

Stage 8: search

| `gcp_unusual_number_of_failed_authentications_from_ip_filter`

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
event.nameeq
  • login_failure
event.typeeq
  • login
isOutliereq
  • 1
sourcetypeeq
  • gws:reports:login