PIVTR-D
RGoogle Cloud playbook · Compute and containers

Vertex AI abused

An attacker with a stolen service account key, user token or API key calls Gemini and other models through Agent Platform, formerly Vertex AI (aiplatform.googleapis.com), and your project pays. Some also widen the allowed models, deploy models, or read prompts your applications log to BigQuery. Save the audit entries and cut off model access first.

Look here

LogSearch for
Data Access audit log for aiplatform.googleapis.com (only if enabled)Model calls by principalEmail and callerIp: gcloud logging read 'protoPayload.serviceName="aiplatform.googleapis.com" AND logName:"cloudaudit.googleapis.com%2Fdata_access"' --project=<project> --freshness=30d
Admin Activity audit log for aiplatform.googleapis.comEndpoint, model, tuning and agent changes: gcloud logging read 'protoPayload.serviceName="aiplatform.googleapis.com" AND logName:"cloudaudit.googleapis.com%2Factivity"' --project=<project> --freshness=30d
Admin Activity audit log for apikeys.googleapis.comKeys created, changed or restored, and key strings read. The last method is a Data Access entry and appears only if enabled: google.api.apikeys.v2.ApiKeys.CreateKey, google.api.apikeys.v2.ApiKeys.UpdateKey, google.api.apikeys.v2.ApiKeys.UndeleteKey, google.api.apikeys.v2.ApiKeys.GetKeyString
API keysKeys with no API target, or targeting aiplatform.googleapis.com or generativelanguage.googleapis.com: gcloud services api-keys list --project=<project> --format=json
API keysThe project that owns a leaked key string: gcloud services api-keys lookup <key-string>
Organization policyWhich models are allowed. By default all models are allowed: gcloud org-policies describe vertexai.allowedModels --project=<project> --effective
Request-response logging (only if configured)The BigQuery table named in the endpoint's logging settings. BigQuery Data Access logs, on by default, show who read it: gcloud ai endpoints describe <endpoint> --region=<region>
Cloud Billing reportsAgent Platform (Vertex AI) SKUs by project and day, compared with the first Data Access entry
Security Command CenterAI threat findings. Event Threat Detection needs the Premium or Enterprise tier: Persistence: New AI API Method, Persistence: New Geography for AI Service Initial Access: Dormant Service Account Activity in AI Service Persistence: Sensitive AI Permission Added to Custom Role

Contain

#Item
1Contain a service account key or user identity with the service account key or Google account playbook
2Copy the window's audit entries to a bucket before you change anything: gcloud logging copy _Default storage.googleapis.com/<bucket> --location=global --log-filter='<filter>' --project=<project>
3Save the API key list as evidence: gcloud services api-keys list --project=<project> --format=json
4Write a deny policy file that blocks model calls for everyone outside the response team. It names principalSet://goog/public:all in deniedPrincipals, responders and the project's service agents in exceptionPrincipals, and this permission in deniedPermissions: aiplatform.googleapis.com/endpoints.predict
5Attach the deny policy to the project: gcloud iam policies create <policy-id> --attachment-point=cloudresourcemanager.googleapis.com/projects/<project-id> --kind=denypolicies --policy-file=<file>
6Test the deny policy with a model call from an identity outside the exceptions, and confirm it is refused
7Allow only the models production uses. The policy file lists vertexai.allowedModels values in the form publishers/google/models/<model>:predict: gcloud org-policies set-policy <file>
8Remove IAM bindings the attacker added with gcloud projects remove-iam-policy-binding
9Undeploy models the attacker deployed: gcloud ai endpoints undeploy-model <endpoint> --region=<region> --deployed-model-id=<id>
10Delete a leaked API key destructive. gcloud services api-keys undelete restores it within 30 days: gcloud services api-keys delete <key-id>
11If calls continue, disable the API for the project destructive, stops every workload using it: gcloud services disable aiplatform.googleapis.com --project=<project>

Eradicate and recover

#Item
1Restore endpoints, models, agents and custom roles from source control, using Admin Activity entries as the change list
2Restrict each replacement API key to one service and known addresses: gcloud services api-keys update <key-id> --api-target=service=aiplatform.googleapis.com --allowed-ips=<cidr>
3Stop API keys from being bound to service accounts. Enforce this constraint: constraints/iam.managed.disableServiceAccountApiKeyCreation
4Enable ADMIN_READ, DATA_READ and DATA_WRITE Data Access audit logs for aiplatform.googleapis.com and apikeys.googleapis.com in the organization auditConfigs
5Log requests and responses to a table only AI owners can read: gcloud ai endpoints update <endpoint> --region=<region> --request-response-logging-table=<bq-table-uri> --request-response-logging-rate=1.0
6Add a budget with alerts on each AI project
7Remove the deny policy once credentials are clean
8Review prompts and responses the attacker could read for the notification decision
Watch out
  • Endpoint, model and tuning job changes land in Admin Activity audit logs, which are always on. Model calls such as predict, rawPredict, generateContent, streamGenerateContent and countTokens appear only in Data Access audit logs of type DATA_READ, which are off by default. An empty Data Access result can mean the logs were never enabled.
  • Request-response logging writes full prompts and responses to BigQuery. Those tables can contain personal data and secrets.
  • Cost reaches Cloud Billing with a delay, and a new budget can take several hours to send its first alert. An alerts-only budget does not cap usage, so use the audit logs to time the abuse.
  • A deny policy usually takes effect within 2 minutes and can take 7 minutes or more. aiplatform.googleapis.com/endpoints.predict is on the list of permissions deny policies support, and the test call in step 6 shows whether it stops the calls you see.

Google Cloud documentation: Security Command Center AI threat findings, AI Protection overview; services with audit logs; Manage API keys; API Keys audit logging; Cloud Billing budgets; IAM deny policies and supported permissions; organization policy constraints; gcloud reference for ai endpoints, services api-keys, services disable, iam policies, org-policies and logging copy. Checked September 2026. Re-checked October 2026: Gemini Enterprise Agent Platform release notes (Vertex AI renamed Agent Platform on April 22, 2026); AI threat finding names; Permissions supported in deny policies; Deny access to resources; gcloud reference for ai endpoints update, services api-keys update and logging copy. Checked November 2026: Agent Platform audit logging information (page last updated November 9, 2026) for the Admin Activity and Data Access split.

Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.