ES|QLHunting query: tune before alertingCloud AI abuse: Azure OpenAI, Vertex AI, self-hosted
Vertex AI inference from a principal not seen in the previous two weeks
Stolen Google Cloud credentials are checked against Vertex AI by the same key-checking tools used for Bedrock and Azure (Sysdig). Vertex AI records GenerateContent, StreamGenerateContent, Predict and RawPredict as Data Access (DATA_READ) audit logs, which are off by default. This ES|QL hunt finds principals whose first inference call in the last 14 days happened within the last day.
- Log source
- Google Cloud audit logs via the Elastic GCP integration (logs-gcp.audit-*), Data Access logs enabled for aiplatform.googleapis.com
- Techniques
- AML.T0040 AI Model Inference API Access · AML.T0012 Valid Accounts · LLM10 Unbounded Consumption · AML.T0034 Cost Harvesting
- MITRE ATT&CK
- T1078.004Cloud AccountsT1496.004Cloud Service Hijacking
- Reviewed
- 2026-11-10
Query
FROM logs-gcp.audit-*
| WHERE @timestamp > NOW() - 14 days
AND event.action LIKE "*PredictionService.*"
AND (event.action LIKE "*GenerateContent" OR event.action LIKE "*Predict")
| STATS first_seen = MIN(@timestamp), last_seen = MAX(@timestamp), calls = COUNT(*),
source_ips = COUNT_DISTINCT(source.ip), resources = COUNT_DISTINCT(gcp.audit.resource_name)
BY client.user.email
| WHERE first_seen > NOW() - 1 day
| SORT calls DESC Expected false positives
- New service accounts for applications that just started using Vertex AI
- Users trying Vertex AI Studio for the first time
Sources
- Google Cloud docs: Vertex AI audit logging
- Sysdig: LLMjacking — stolen cloud credentials used in new AI attack (May 2024)
- Elastic rule: Vertex AI inference by caller from new ASN
Reviewed against vendor documentation, not tested in your environment. Defensive use only.