RGoogle Cloud playbook · Identity and access
Google account takeover
An attacker signs in as a Workspace or Cloud Identity user and may change 2-Step Verification, recovery details or mail forwarding to keep access. The session carries every Google Cloud role granted to that user. End the sessions and remove high-privilege roles first.
Look here
| Log | Search for |
|---|---|
Workspace Login audit in Cloud Logging (login.googleapis.com, organization level, present only if Workspace data sharing with Google Cloud is on; otherwise use the Admin console) | Every sign-in event for the user: gcloud logging read 'protoPayload.serviceName="login.googleapis.com" AND protoPayload.authenticationInfo.principalEmail="<user>"' --organization=<org-id> --freshness=30d |
| Workspace Login audit | Suspicious sign-ins and changes to sign-in settings. Compare callerIp with the user's normal locations, and treat google.login.LoginService.loginSuccess with is_suspicious true as a lead. Methods: google.login.LoginService.suspiciousLogin, google.login.LoginService.2svDisable, google.login.LoginService.2svEnroll, google.login.LoginService.passwordEdit, google.login.LoginService.recoveryEmailEdit, google.login.LoginService.recoveryPhoneEdit, google.login.LoginService.emailForwardingOutOfDomain |
| Admin console | The user's activity over the last 6 months under Reporting > Audit and investigation > User log events. OAuth Token log events show apps granted access in the window |
| Admin Activity audit log | Cloud changes made by the user, with principalEmail set to the user: SetIamPolicy, google.iam.admin.v1.CreateServiceAccountKey, google.iam.admin.v1.CreateServiceAccount |
| Security Command Center | Workspace threat findings: Initial Access: Suspicious Login Blocked Initial Access: Account Disabled Hijacked Persistence: Two Step Verification Disabled Persistence: Strong Authentication Disabled Persistence: SSO Settings Changed |
Contain
| # | Item |
|---|---|
| 1 | Reset the user's password in the Admin console |
| 2 | Reset the user's sign-in cookies under Directory > Users > user > Security > Sign-in cookies > Reset, or call the Directory API method users.signOut |
| 3 | Suspend the user if the attacker may still have access. Suspension also resets sign-in cookies |
| 4 | Revoke app passwords and connected application access in the user's Security panel |
| 5 | Remove security keys and passkeys the user did not register |
| 6 | Remove the user's high-privilege cloud bindings until the user is cleared: gcloud projects remove-iam-policy-binding <project> --member='user:<email>' --role=<role> --all |
Eradicate and recover
| # | Item |
|---|---|
| 1 | Revert recovery email, recovery phone and out-of-domain forwarding changes found in the Login audit |
| 2 | Revert single sign-on (SSO) profile or setting changes found in the Admin audit |
| 3 | Revoke third-party OAuth grants made during the window |
| 4 | Reverse keys, service accounts and bindings the user created in the window, following leaked service account keys |
| 5 | Enforce 2-Step Verification with security keys for administrators and users with cloud admin roles |
Watch out
- Resetting sign-in cookies does not sign the user out of apps such as Gmail and Google Drive for desktop. Revoke app passwords and OAuth access as well.
- Password reset, cookie reset and suspension leave Google Cloud CLI and API tokens the attacker already has working. Revoke the Google Cloud SDK and other connected-app grants for the user, and revoke any captured token at
https://oauth2.googleapis.com/revoke. Keep the user's IAM bindings removed until access tokens expire, up to 60 minutes.