Application Removed from Blocklist in Google Workspace

Google Workspace administrators may be aware of malicious applications within the Google marketplace and block these applications for user security purposes. An adversary, with administrative privileges, may remove this application from the explicit block list to allow distribution of the application amongst users. This may also indicate the unauthorized use of an application that had been previously blocked before by a user with admin privileges.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2022/08/25"
  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 administrators may be aware of malicious applications within the Google marketplace and block these
 13applications for user security purposes. An adversary, with administrative privileges, may remove this application from
 14the explicit block list to allow distribution of the application amongst users. This may also indicate the unauthorized
 15use of an application that had been previously blocked before by a user with admin privileges.
 16"""
 17false_positives = [
 18    """
 19    Applications can be added and removed from blocklists by Google Workspace administrators. Verify that the
 20    configuration change was expected. Exceptions can be added to this rule to filter expected behavior.
 21    """,
 22]
 23from = "now-130m"
 24index = ["filebeat-*", "logs-google_workspace*"]
 25interval = "10m"
 26language = "kuery"
 27license = "Elastic License v2"
 28name = "Application Removed from Blocklist in Google Workspace"
 29note = """## Triage and analysis
 30
 31### Investigating Application Removed from Blocklist in Google Workspace
 32
 33Google Workspace Marketplace is an online store for free and paid web applications that work with Google Workspace services and third-party software. Listed applications are based on Google APIs or Google Apps Script and created by both Google and third-party developers.
 34
 35Marketplace applications require access to specific Google Workspace resources. Individual users with the appropriate permissions can install applications in their Google Workspace domain. Administrators have additional permissions that allow them to install applications for an entire Google Workspace domain. Consent screens typically display permissions and privileges the user needs to install an application. As a result, malicious Marketplace applications may require more permissions than necessary or have malicious intent.
 36
 37Google clearly states that they are not responsible for any Marketplace product that originates from a source that isn't Google.
 38
 39This rule identifies a Marketplace blocklist update that consists of a Google Workspace account with administrative privileges manually removing a previously blocked application.
 40
 41#### Possible investigation steps
 42
 43- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.
 44- This rule relies on data from `google_workspace.admin`, thus indicating the associated user has administrative privileges to the Marketplace.
 45- With access to the Google Workspace admin console, visit the `Security > Investigation` tool with filters for the user email and event is `Assign Role` or `Update Role` to determine if new cloud roles were recently updated.
 46- After identifying the involved user account, review other potentially related events within the last 48 hours.
 47- Re-assess the permissions and reviews of the Marketplace applications to determine if they violate organizational policies or introduce unexpected risks.
 48- With access to the Google Workspace admin console, determine if the application was installed domain-wide or individually by visiting `Apps > Google Workspace Marketplace Apps`.
 49
 50### False positive analysis
 51
 52- Google Workspace administrators might intentionally remove an application from the blocklist due to a re-assessment or a domain-wide required need for the application.
 53- Identify the user account associated with this action and assess their administrative privileges with Google Workspace Marketplace.
 54- Contact the user to verify that they intentionally removed the application from the blocklist and their reasoning.
 55
 56### Response and remediation
 57
 58- Initiate the incident response process based on the outcome of the triage.
 59- Disable or limit the account during the investigation and response.
 60- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
 61    - Identify the account role in the cloud environment.
 62    - Assess the criticality of affected services and servers.
 63    - Work with your IT team to identify and minimize the impact on users.
 64    - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
 65    - Identify any regulatory or legal ramifications related to this activity.
 66- 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.
 67- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
 68- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.
 69- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
 70- 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).
 71
 72## Setup
 73
 74The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
 75
 76### Important Information Regarding Google Workspace Event Lag Times
 77- 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.
 78- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.
 79- 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.
 80- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).
 81- See the following references for further information:
 82  - https://support.google.com/a/answer/7061566
 83  - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html"""
 84references = ["https://support.google.com/a/answer/6328701?hl=en#"]
 85risk_score = 47
 86rule_id = "495e5f2e-2480-11ed-bea8-f661ea17fbce"
 87severity = "medium"
 88tags = [
 89    "Domain: Cloud",
 90    "Data Source: Google Workspace",
 91    "Use Case: Configuration Audit",
 92    "Resources: Investigation Guide",
 93    "Tactic: Defense Evasion"
 94]
 95timestamp_override = "event.ingested"
 96type = "query"
 97
 98query = '''
 99event.dataset:"google_workspace.admin" and event.category:"iam" and event.type:"change"  and
100  event.action:"CHANGE_APPLICATION_SETTING" and
101  google_workspace.admin.application.name:"Google Workspace Marketplace" and
102  google_workspace.admin.old_value: *allowed*false* and google_workspace.admin.new_value: *allowed*true*
103'''
104
105
106[[rule.threat]]
107framework = "MITRE ATT&CK"
108[[rule.threat.technique]]
109id = "T1562"
110name = "Impair Defenses"
111reference = "https://attack.mitre.org/techniques/T1562/"
112[[rule.threat.technique.subtechnique]]
113id = "T1562.001"
114name = "Disable or Modify Tools"
115reference = "https://attack.mitre.org/techniques/T1562/001/"
116
117
118
119[rule.threat.tactic]
120id = "TA0005"
121name = "Defense Evasion"
122reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Application Removed from Blocklist in Google Workspace

Google Workspace Marketplace is an online store for free and paid web applications that work with Google Workspace services and third-party software. Listed applications are based on Google APIs or Google Apps Script and created by both Google and third-party developers.

Marketplace applications require access to specific Google Workspace resources. Individual users with the appropriate permissions can install applications in their Google Workspace domain. Administrators have additional permissions that allow them to install applications for an entire Google Workspace domain. Consent screens typically display permissions and privileges the user needs to install an application. As a result, malicious Marketplace applications may require more permissions than necessary or have malicious intent.

Google clearly states that they are not responsible for any Marketplace product that originates from a source that isn't Google.

This rule identifies a Marketplace blocklist update that consists of a Google Workspace account with administrative privileges manually removing a previously blocked application.

Possible investigation steps

  • Identify the associated user accounts by reviewing user.name or user.email fields in the alert.
  • This rule relies on data from google_workspace.admin, thus indicating the associated user has administrative privileges to the Marketplace.
  • With access to the Google Workspace admin console, visit the Security > Investigation tool with filters for the user email and event is Assign Role or Update Role to determine if new cloud roles were recently updated.
  • After identifying the involved user account, review other potentially related events within the last 48 hours.
  • Re-assess the permissions and reviews of the Marketplace applications to determine if they violate organizational policies or introduce unexpected risks.
  • With access to the Google Workspace admin console, determine if the application was installed domain-wide or individually by visiting Apps > Google Workspace Marketplace Apps.

False positive analysis

  • Google Workspace administrators might intentionally remove an application from the blocklist due to a re-assessment or a domain-wide required need for the application.
  • Identify the user account associated with this action and assess their administrative privileges with Google Workspace Marketplace.
  • Contact the user to verify that they intentionally removed the application from the blocklist and their reasoning.

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