How the attack works
With 2-Step Verification, Google asks a user who signs in with a password for a second step: a security key, a Google prompt on the phone, a code from an authenticator app, a code by text message or phone call, or a backup code. An attacker who has phished, guessed or bought the password reaches that step and fails it. Some keep triggering Google prompts and codes until the user approves a prompt or reads out a code to make it stop, which MITRE ATT&CK describes as multi-factor authentication request generation. Where users sign in through an identity provider, Google can still present its own challenges after the identity provider has authenticated the user.
The Login audit log records an unsuccessful attempt as login_failure. Its parameter login_challenge_method lists the challenges of the attempt, with values such as google_prompt, google_authenticator, idv_preregistered_phone, security_key and backup_code. Organizations that share Workspace data with Google Cloud receive the event in Cloud Audit Logs at organization level as a Data Access entry of login.googleapis.com (google.login.LoginService.loginFailure). One rule on this page matches a failed attempt that lists a second-step method, and a threshold rule counts them per account. Google describes the event only as an unsuccessful login attempt, so the entry shows that the attempt reached a second step, not which step failed.
What an attacker needs
- The user's password, from phishing, guessing, reuse or a breach.
- A second-step method on the account that the user can be pushed into approving or reading out, such as a Google prompt or a code sent by text message or phone call.
Impact
A failed attempt gains nothing by itself, but it shows that someone else has the password. If the user approves a prompt or hands over a code, the attacker holds a full session as the user, in Workspace and in Google Cloud, that has passed 2-Step Verification.
Detection rules
Repeated 2-Step Verification Failures for One Account in Google Workspace
Counts, per account (principalEmail), the unsuccessful sign-in attempts that reached a 2-Step Verification challenge (login_failure with a second-step value in login_challenge_method). Five or more for one account within 30 minutes are more than a mistyped code and fit someone who has the password and keeps triggering prompts or codes until the user approves one or hands one over. The source of each attempt is in requestMetadata.callerIp. The count and the window are starting points to tune. The entries reach Cloud Audit Logs as Data Access entries of login.googleapis.com at organization level only when Google Workspace data sharing with Google Cloud is enabled.
Fires when one protoPayload.authenticationInfo.principalEmail has at least 5 matching events within 30 minutes.
title: Sign-In Failed After Reaching a 2-Step Verification Challenge in Google Workspace (Repeated Failures Base Event)
id: a4c1f4e6-8ba6-4ead-b3b3-a0d074ef1312
name: workspace_sign_in_failed_at_second_step
status: experimental
description: >-
Base event of the threshold rule in this file. A Login audit entry for an
unsuccessful login attempt (login_failure) whose event parameters contain
one of the documented second-step values of login_challenge_method, as it
arrives in Cloud Audit Logs under login.googleapis.com.
logsource:
product: gcp
service: gcp.audit
detection:
selection:
protoPayload.serviceName: login.googleapis.com
protoPayload.methodName: google.login.LoginService.loginFailure
selection_second_step:
protoPayload.metadata.event|contains:
- google_prompt
- device_prompt
- google_authenticator
- idv_preregistered_phone
- security_key
- offline_otp
- backup_code
condition: selection and selection_second_step
level: low
---
title: Repeated 2-Step Verification Failures for One Account in Google Workspace
id: 29ca0c32-0702-4789-ba81-671dbe39ee12
status: experimental
description: >-
Counts, per account (principalEmail), the unsuccessful sign-in attempts
that reached a 2-Step Verification challenge (login_failure with a
second-step value in login_challenge_method). Five or more for one account
within 30 minutes are more than a mistyped code and fit someone who has the
password and keeps triggering prompts or codes until the user approves one
or hands one over. The source of each attempt is in
requestMetadata.callerIp. The count and the window are starting points to
tune. The entries reach Cloud Audit Logs as Data Access entries of
login.googleapis.com at organization level only when Google Workspace
data sharing with Google Cloud is enabled.
references:
- https://docs.cloud.google.com/logging/docs/audit/gsuite-audit-logging
- https://developers.google.com/workspace/admin/reports/v1/appendix/activity/login
- https://attack.mitre.org/techniques/T1621/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1621
correlation:
type: event_count
rules:
- workspace_sign_in_failed_at_second_step
group-by:
- protoPayload.authenticationInfo.principalEmail
timespan: 30m
condition:
gte: 5
falsepositives:
- A user whose phone has no signal or whose authenticator app has the wrong time, and who keeps retrying. The attempts then come from the user's own address. Confirm with the user before resetting anything.
- The values of 5 failures and 30 minutes are starting points, not tested limits. Use a lower count for administrators and accounts with IAM roles in Google Cloud.
level: medium
False positives
- A user whose phone has no signal or whose authenticator app has the wrong time, and who keeps retrying. The attempts then come from the user's own address. Confirm with the user before resetting anything.
- The values of 5 failures and 30 minutes are starting points, not tested limits. Use a lower count for administrators and accounts with IAM roles in Google Cloud.
Sign-In Failed After Reaching a 2-Step Verification Challenge in Google Workspace
Detects a Login audit entry for an unsuccessful login attempt (login_failure) whose challenge methods (login_challenge_method) include a second-step method: google_prompt, device_prompt, google_authenticator, idv_preregistered_phone, security_key, offline_otp or backup_code. Google describes 2-Step Verification as signing in with a password and a second step, so the attempt got as far as the second step, which usually means that whoever made it had the password. Google describes the event only as an unsuccessful login attempt, so the entry does not say which step failed. The rule finds the methods by searching the serialized event parameters for their values. The entries reach Cloud Audit Logs as Data Access entries of login.googleapis.com at organization level only when Google Workspace data sharing with Google Cloud is enabled, and reach the SIEM only when the organization-level Data Access logs are routed to it.
title: Sign-In Failed After Reaching a 2-Step Verification Challenge in Google Workspace
id: 6d5bdbf5-ed51-435c-a3aa-f5f2ac786102
status: experimental
description: >-
Detects a Login audit entry for an unsuccessful login attempt
(login_failure) whose challenge methods (login_challenge_method) include a
second-step method: google_prompt, device_prompt, google_authenticator,
idv_preregistered_phone, security_key, offline_otp or backup_code. Google
describes 2-Step Verification as signing in with a password and a second
step, so the attempt got as far as the second step, which usually means
that whoever made it had the password. Google describes the event only as
an unsuccessful login attempt, so the entry does not say which step
failed. The rule finds the methods by searching the serialized event
parameters for their values. The entries reach Cloud Audit Logs as Data
Access entries of login.googleapis.com at organization level only when
Google Workspace data sharing with Google Cloud is enabled, and reach the
SIEM only when the organization-level Data Access logs are routed to it.
references:
- https://docs.cloud.google.com/logging/docs/audit/gsuite-audit-logging
- https://developers.google.com/workspace/admin/reports/v1/appendix/activity/login
- https://support.google.com/accounts/answer/185839
- https://attack.mitre.org/techniques/T1621/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1621
logsource:
product: gcp
service: gcp.audit
detection:
selection:
protoPayload.serviceName: login.googleapis.com
protoPayload.methodName: google.login.LoginService.loginFailure
selection_second_step:
protoPayload.metadata.event|contains:
- google_prompt
- device_prompt
- google_authenticator
- idv_preregistered_phone
- security_key
- offline_otp
- backup_code
condition: selection and selection_second_step
falsepositives:
- Users who mistype a code, miss or decline their own Google prompt, or sign in with a security key that is not registered to the account. A single failure from the user's usual address is common. Ask the user, and give priority to failures from unfamiliar addresses and to accounts with admin roles or IAM roles in Google Cloud.
level: low
False positives
- Users who mistype a code, miss or decline their own Google prompt, or sign in with a security key that is not registered to the account. A single failure from the user's usual address is common. Ask the user, and give priority to failures from unfamiliar addresses and to accounts with admin roles or IAM roles in Google Cloud.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Failed second steps followed by a successful sign-in for the same account
Failed second steps are an attempt. A successful sign-in for the same account soon after, from an address that produced failures or that the user has not used before, is the moment the attack worked: the user approved a prompt or the attacker obtained a code.
- Two or more matches of the single-event rule on this page for one
authenticationInfo.principalEmailwithin 60 minutes. Keep theirrequestMetadata.callerIpvalues. - Within 30 minutes of the last failure, a
google.login.LoginService.loginSuccessentry oflogin.googleapis.comfor the same account. - Raise it with high priority when the
callerIpof the success is one of the failing addresses, or is not among the addresses the account signed in from in the past 30 days.
Eventsgoogle.login.LoginService.loginFailuregoogle.login.LoginService.loginSuccess
LimitsA user who misses a prompt and completes the next one matches, which is why the address matters. An attacker whose first prompt is approved, or who signs in later than the window, is not seen. The 60 minutes, 30 minutes and 30 days are starting points.
Triage
- Ask the user, through a second channel, whether they were signing in at that time. A second step the user did not start means the password is known to someone else.
- Read requestMetadata.callerIp and compare it with the user's usual addresses. An address that failed for other accounts as well points to a wider campaign.
- Read login_challenge_method in the event parameters in protoPayload.metadata to see which methods the attempt reached.
- Search for a google.login.LoginService.loginSuccess entry for the same account after the failures, and for suspicious login events that Google raised for it.
Response
Once the attack is confirmed:
- Reset the user's password at once, even if every attempt failed. The attempts stop only when the password the attacker holds no longer works.
- If a sign-in succeeded after the failures, reset the sign-in cookies of the account and review its 2-Step Verification methods, backup codes, recovery details and mail forwarding for changes the user did not make.
- Review what the account did since the first failure, in Workspace and in Google Cloud, and undo what the owner did not do.
- Look for the same source address in failed sign-ins of other accounts, and handle each of them the same way.
- Move the account to security keys or passkeys if it is privileged or keeps being targeted.
Mitigation
- Move users, administrators first, to security keys or passkeys, which cannot be approved or read out by mistake. For organizational units that hold administrators, allow security keys only in the 2-Step Verification settings.
- Teach users that an unexpected Google prompt or code means someone else has their password, and that the right answer is to decline it and change the password.
- Share Workspace data with Google Cloud and route the organization-level Data Access log that carries the Login audit events to the SIEM.
Frequently asked questions
Does a failed second step mean that the attacker knew the password?
Most likely, but the entry does not prove it. Google describes 2-Step Verification as signing in with a password and a second step, so an attempt that lists a second-step method in `login_challenge_method` got as far as that step. Google describes `login_failure` only as an unsuccessful login attempt, and a user who mistypes a code or misses a prompt writes the same entry. That is why the first triage step is to ask the user.
Which challenge methods do the rules treat as a second step?
`google_prompt`, `device_prompt`, `google_authenticator`, `idv_preregistered_phone`, `security_key`, `offline_otp` and `backup_code`, all values Google documents for `login_challenge_method`. `passkey` is left out, because a passkey can replace the password and Google states that it then bypasses the second step. The rules search the serialized event parameters for these values.
Do these rules see an attack in which the user approves the first prompt?
No. An approved prompt is a successful sign-in, which Google records as `login_success`, not `login_failure`. That case shows only through what follows, such as a sign-in from an address the user never used or a change to the account's security settings soon after. The Detection logic section covers the case where failures come before the success.
Which log has to reach the SIEM for these rules to work?
The Login audit log. With Google Workspace data sharing enabled it arrives in Cloud Audit Logs at organization level as Data Access entries of `login.googleapis.com`. A SIEM that receives only the organization's Admin Activity logs has none of the sign-in events.
References
- MITRE ATT&CK T1621: Multi-Factor Authentication Request Generation
- Audit logs for Google Workspace (Cloud Audit Logs, with an example Login audit entry)
- Configure audit logs for Google Workspace
- Login audit events (login_failure, login_success, login_challenge_method)
- Turn on 2-Step Verification (Google Account Help)
- Deploy 2-Step Verification
- Protect Google Workspace accounts with security challenges