Google Workspace Admin Role Assigned to a User
Assigning the administrative role to a user will grant them access to the Google Admin console and grant them administrator privileges which allow them to access and manage various resources and applications. An adversary may create a new administrator account for persistence or apply the admin role to an existing user to carry out further intrusion efforts. Users with super-admin privileges can bypass single-sign on if enabled in Google Workspace.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/11/17"
3integration = ["google_workspace"]
4maturity = "production"
5updated_date = "2024/09/23"
6
7[rule]
8author = ["Elastic"]
9description = """
10Assigning the administrative role to a user will grant them access to the Google Admin console and grant them
11administrator privileges which allow them to access and manage various resources and applications. An adversary may
12create a new administrator account for persistence or apply the admin role to an existing user to carry out further
13intrusion efforts. Users with super-admin privileges can bypass single-sign on if enabled in Google Workspace.
14"""
15false_positives = [
16 """
17 Google Workspace admin role assignments may be modified by system administrators. Verify that the configuration
18 change was expected. Exceptions can be added to this rule to filter expected behavior.
19 """,
20]
21from = "now-130m"
22index = ["filebeat-*", "logs-google_workspace*"]
23interval = "10m"
24language = "kuery"
25license = "Elastic License v2"
26name = "Google Workspace Admin Role Assigned to a User"
27note = """## Triage and analysis
28
29### Investigating Google Workspace Admin Role Assigned to a User
30
31Google Workspace roles allow administrators to assign specific permissions to users or groups. These assignments should follow the principle of least privilege (PoLP). Admin roles in Google Workspace grant users access to the Google Admin console, where more domain-wide settings are accessible. Google Workspace contains prebuilt administrator roles for performing business functions related to users, groups, and services. Custom administrator roles can be created when prebuilt roles are not sufficient.
32
33Administrator roles assigned to users will grant them additional permissions and privileges within the Google Workspace domain. Administrative roles also give users access to the admin console, where domain-wide settings can be adjusted. Threat actors might rely on these new privileges to advance their intrusion efforts and laterally move throughout the organization. Users with unexpected administrative privileges may also cause operational dysfunction if unfamiliar settings are adjusted without warning.
34
35This rule identifies when a Google Workspace administrative role is assigned to a user.
36
37#### Possible investigation steps
38
39- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.
40 - The `user.target.email` field contains the user who received the admin role.
41- Identify the role given to the user by reviewing the `google_workspace.admin.role.name` field in the alert.
42- After identifying the involved user, verify their administrative privileges are scoped properly.
43- To identify other users with this role, search the alert for `event.action: ASSIGN_ROLE`.
44 - Add `google_workspace.admin.role.name` with the role added as an additional filter.
45 - Adjust the relative time accordingly to identify all users that were assigned this admin role.
46- Identify if the user account was recently created by searching for `event.action: CREATE_USER`.
47 - Add `user.email` with the target user account that recently received this new admin role.
48- After identifying the involved user, create a filter with their `user.name` or `user.target.email`. Review the last 48 hours of their activity for anything that may indicate a compromise.
49
50### False positive analysis
51
52- After identifying user account that added the admin role, verify the action was intentional.
53- Verify that the target user who was assigned the admin role should have administrative privileges in Google Workspace.
54- Review organizational units or groups the target user might have been added to and ensure the admin role permissions align.
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 = [
85 "https://support.google.com/a/answer/172176?hl=en",
86 "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-one",
87 "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-two"
88]
89risk_score = 73
90rule_id = "68994a6c-c7ba-4e82-b476-26a26877adf6"
91severity = "high"
92tags = [
93 "Domain: Cloud",
94 "Data Source: Google Workspace",
95 "Use Case: Identity and Access Audit",
96 "Tactic: Persistence",
97 "Resources: Investigation Guide",
98]
99timestamp_override = "event.ingested"
100type = "query"
101
102query = '''
103event.dataset:"google_workspace.admin" and event.category:"iam" and event.action:"ASSIGN_ROLE"
104 and google_workspace.event.type:"DELEGATED_ADMIN_SETTINGS" and google_workspace.admin.role.name : *_ADMIN_ROLE
105'''
106
107
108[[rule.threat]]
109framework = "MITRE ATT&CK"
110[[rule.threat.technique]]
111id = "T1098"
112name = "Account Manipulation"
113reference = "https://attack.mitre.org/techniques/T1098/"
114[[rule.threat.technique.subtechnique]]
115id = "T1098.003"
116name = "Additional Cloud Roles"
117reference = "https://attack.mitre.org/techniques/T1098/003/"
118
119
120
121[rule.threat.tactic]
122id = "TA0003"
123name = "Persistence"
124reference = "https://attack.mitre.org/tactics/TA0003/"
Triage and analysis
Investigating Google Workspace Admin Role Assigned to a User
Google Workspace roles allow administrators to assign specific permissions to users or groups. These assignments should follow the principle of least privilege (PoLP). Admin roles in Google Workspace grant users access to the Google Admin console, where more domain-wide settings are accessible. Google Workspace contains prebuilt administrator roles for performing business functions related to users, groups, and services. Custom administrator roles can be created when prebuilt roles are not sufficient.
Administrator roles assigned to users will grant them additional permissions and privileges within the Google Workspace domain. Administrative roles also give users access to the admin console, where domain-wide settings can be adjusted. Threat actors might rely on these new privileges to advance their intrusion efforts and laterally move throughout the organization. Users with unexpected administrative privileges may also cause operational dysfunction if unfamiliar settings are adjusted without warning.
This rule identifies when a Google Workspace administrative role is assigned to a user.
Possible investigation steps
- Identify the associated user accounts by reviewing
user.name
oruser.email
fields in the alert.- The
user.target.email
field contains the user who received the admin role.
- The
- Identify the role given to the user by reviewing the
google_workspace.admin.role.name
field in the alert. - After identifying the involved user, verify their administrative privileges are scoped properly.
- To identify other users with this role, search the alert for
event.action: ASSIGN_ROLE
.- Add
google_workspace.admin.role.name
with the role added as an additional filter. - Adjust the relative time accordingly to identify all users that were assigned this admin role.
- Add
- Identify if the user account was recently created by searching for
event.action: CREATE_USER
.- Add
user.email
with the target user account that recently received this new admin role.
- Add
- After identifying the involved user, create a filter with their
user.name
oruser.target.email
. Review the last 48 hours of their activity for anything that may indicate a compromise.
False positive analysis
- After identifying user account that added the admin role, verify the action was intentional.
- Verify that the target user who was assigned the admin role should have administrative privileges in Google Workspace.
- Review organizational units or groups the target user might have been added to and ensure the admin role permissions align.
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
- Google Workspace API Access Granted via Domain-Wide Delegation
- Google Workspace Custom Admin Role Created
- Google Workspace Password Policy Modified
- Google Workspace Role Modified
- MFA Disabled for Google Workspace Organization