Google Workspace 2SV Policy Disabled

Google Workspace admins may setup 2-step verification (2SV) to add an extra layer of security to user accounts by asking users to verify their identity when they use login credentials. Admins have the ability to enforce 2SV from the admin console as well as the methods acceptable for verification and enrollment period. 2SV requires enablement on admin accounts prior to it being enabled for users within organization units. Adversaries may disable 2SV to lower the security requirements to access a valid account.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2022/08/26"
  3integration = ["google_workspace"]
  4maturity = "production"
  5min_stack_comments = "Breaking changes for Google Workspace integration."
  6min_stack_version = "8.4.0"
  7updated_date = "2023/06/22"
  8
  9[rule]
 10author = ["Elastic"]
 11description = """
 12Google Workspace admins may setup 2-step verification (2SV) to add an extra layer of security to user accounts by asking
 13users to verify their identity when they use login credentials. Admins have the ability to enforce 2SV from the admin
 14console as well as the methods acceptable for verification and enrollment period. 2SV requires enablement on admin
 15accounts prior to it being enabled for users within organization units. Adversaries may disable 2SV to lower the
 16security requirements to access a valid account.
 17"""
 18false_positives = [
 19    """
 20    Administrators may remove 2-step verification (2SV) temporarily for testing or during maintenance. If 2SV was
 21    previously enabled, it is not common to disable this policy for extended periods of time.
 22    """,
 23]
 24from = "now-130m"
 25index = ["filebeat-*", "logs-google_workspace*"]
 26interval = "10m"
 27language = "kuery"
 28license = "Elastic License v2"
 29name = "Google Workspace 2SV Policy Disabled"
 30note = """## Triage and analysis
 31
 32### Investigating Google Workspace 2SV Policy Disabled
 33
 34Google Workspace administrators manage password policies to enforce password requirements for an organization's compliance needs. Administrators have the capability to set restrictions on password length, reset frequencies, reuse capability, expiration, and much more. Google Workspace also allows multi-factor authentication (MFA) and 2-step verification (2SV) for authentication. 2SV allows users to verify their identity using security keys, Google prompt, authentication codes, text messages, and more.
 35
 362SV adds an extra authentication layer for Google Workspace users to verify their identity. If 2SV or MFA aren't implemented, users only authenticate with their user name and password credentials. This authentication method has often been compromised and can be susceptible to credential access techniques when weak password policies are used.
 37
 38This rule detects when a 2SV policy is disabled in Google Workspace.
 39
 40#### Possible investigation steps
 41
 42- Identify the associated user account(s) by reviewing `user.name` or `source.user.email` in the alert.
 43- Identify what password setting was created or adjusted by reviewing `google_workspace.admin.setting.name`.
 44- Review if a password setting was enabled or disabled by reviewing `google_workspace.admin.new_value` and `google_workspace.admin.old_value`.
 45- After identifying the involved user account, verify administrative privileges are scoped properly.
 46- Filter `event.dataset` for `google_workspace.login` and aggregate by `user.name`, `event.action`.
 47  - The `google_workspace.login.challenge_method` field can be used to identify the challenge method that was used for failed and successful logins.
 48
 49### False positive analysis
 50
 51- After finding the user account that updated the password policy, verify whether the action was intentional.
 52- Verify whether the user should have Google Workspace administrative privileges that allow them to modify password policies.
 53- Review organizational units or groups the role may have been added to and ensure its privileges are properly aligned.
 54
 55### Response and remediation
 56
 57- Initiate the incident response process based on the outcome of the triage.
 58- Disable or limit the account during the investigation and response.
 59- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
 60    - Identify the account role in the cloud environment.
 61    - Assess the criticality of affected services and servers.
 62    - Work with your IT team to identify and minimize the impact on users.
 63    - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
 64    - Identify any regulatory or legal ramifications related to this activity.
 65- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.
 66- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
 67- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.
 68- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
 69- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
 70
 71## Setup
 72
 73The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
 74
 75### Important Information Regarding Google Workspace Event Lag Times
 76- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.
 77- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.
 78- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.
 79- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).
 80- See the following references for further information:
 81  - https://support.google.com/a/answer/7061566
 82  - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html"""
 83references = ["https://support.google.com/a/answer/9176657?hl=en"]
 84risk_score = 47
 85rule_id = "5e161522-2545-11ed-ac47-f661ea17fbce"
 86severity = "medium"
 87tags = [
 88    "Domain: Cloud",
 89    "Data Source: Google Workspace",
 90    "Use Case: Configuration Audit",
 91    "Tactic: Persistence",
 92    "Resources: Investigation Guide"
 93]
 94timestamp_override = "event.ingested"
 95type = "query"
 96
 97query = '''
 98event.dataset:"google_workspace.login" and event.action:"2sv_disable"
 99'''
100
101
102[[rule.threat]]
103framework = "MITRE ATT&CK"
104[[rule.threat.technique]]
105id = "T1556"
106name = "Modify Authentication Process"
107reference = "https://attack.mitre.org/techniques/T1556/"
108
109
110[rule.threat.tactic]
111id = "TA0003"
112name = "Persistence"
113reference = "https://attack.mitre.org/tactics/TA0003/"

Triage and analysis

Investigating Google Workspace 2SV Policy Disabled

Google Workspace administrators manage password policies to enforce password requirements for an organization's compliance needs. Administrators have the capability to set restrictions on password length, reset frequencies, reuse capability, expiration, and much more. Google Workspace also allows multi-factor authentication (MFA) and 2-step verification (2SV) for authentication. 2SV allows users to verify their identity using security keys, Google prompt, authentication codes, text messages, and more.

2SV adds an extra authentication layer for Google Workspace users to verify their identity. If 2SV or MFA aren't implemented, users only authenticate with their user name and password credentials. This authentication method has often been compromised and can be susceptible to credential access techniques when weak password policies are used.

This rule detects when a 2SV policy is disabled in Google Workspace.

Possible investigation steps

  • Identify the associated user account(s) by reviewing user.name or source.user.email in the alert.
  • Identify what password setting was created or adjusted by reviewing google_workspace.admin.setting.name.
  • Review if a password setting was enabled or disabled by reviewing google_workspace.admin.new_value and google_workspace.admin.old_value.
  • After identifying the involved user account, verify administrative privileges are scoped properly.
  • Filter event.dataset for google_workspace.login and aggregate by user.name, event.action.
    • The google_workspace.login.challenge_method field can be used to identify the challenge method that was used for failed and successful logins.

False positive analysis

  • After finding the user account that updated the password policy, verify whether the action was intentional.
  • Verify whether the user should have Google Workspace administrative privileges that allow them to modify password policies.
  • Review organizational units or groups the role may have been added to and ensure its privileges are properly aligned.

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Disable or limit the account during the investigation and response.
  • Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
    • Identify the account role in the cloud environment.
    • Assess the criticality of affected services and servers.
    • Work with your IT team to identify and minimize the impact on users.
    • Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
    • Identify any regulatory or legal ramifications related to this activity.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.
  • Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
  • Implement security best practices outlined by Google.
  • Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

Setup

The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.

Important Information Regarding Google Workspace Event Lag Times

  • As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.
  • This rule is configured to run every 10 minutes with a lookback time of 130 minutes.
  • To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.
  • By default, var.interval is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).
  • See the following references for further information:

References

Related rules

to-top