GCP Vertex AI Caller Activity From High Number of Countries
Detects Vertex AI authenticated caller activity for the same client.user.email from at least three countries and three source IPs within a four-hour interval. That pattern can indicate stolen user or service-account credentials reused from multiple regions, including VPN or cloud egress and return trips where first and last locations are close.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/10/05"
3integration = ["gcp_vertexai"]
4maturity = "production"
5min_stack_comments = "Requires GCP Vertex AI auditlogs enriched with source.geo fields."
6min_stack_version = "9.4.0"
7updated_date = "2026/10/06"
8
9[rule]
10author = ["Elastic"]
11description = """
12Detects Vertex AI authenticated caller activity for the same client.user.email from at least three countries and three
13source IPs within a four-hour interval. That pattern can indicate stolen user or service-account credentials reused
14from multiple regions, including VPN or cloud egress and return trips where first and last locations are close.
15"""
16false_positives = [
17 """
18 Shared service accounts used by multi-region CI, build agents, or dual-homed VPN/cloud egress can span several
19 countries. Prefer per-region identities, or exclude known automation principals.
20 """,
21 """
22 VPN or proxy egress that geo-resolves through hubs far from the caller's physical location. Corroborate with ASN
23 and user-agent diversity before rotating credentials.
24 """,
25]
26from = "now-4h"
27interval = "15m"
28language = "esql"
29license = "Elastic License v2"
30name = "GCP Vertex AI Caller Activity From High Number of Countries"
31note = """## Triage and analysis
32
33### Investigating GCP Vertex AI Caller Activity From High Number of Countries
34
35Successful Vertex AI GenerateContent / CountTokens audit activity for the same
36`client.user.email` spans at least three countries and three source IPs inside four hours.
37That pattern can indicate leaked or stolen credentials reused from VPN or cloud egress in
38multiple regions, including return trips where the first and last locations are close.
39
40Escalate when countries differ, user agents diverge (SDK vs curl/browser), privileged methods
41appear on the distant IPs, or IAM key activity precedes the burst. Close as a false positive for
42documented multi-region automation with consistent corporate tooling.
43
44#### Possible investigation steps
45
46- Use `Esql.source_geo_country_name_values`, `Esql.source_geo_region_name_values`, `Esql.source_ip_values`, and
47 `Esql.user_agent_original_values` to map the geographic and client spread.
48- Use `Esql.event_action_values` and `Esql.event_count` to see what the caller did.
49- Contact the owner of `client.user.email` (or the owning team for a service account) to confirm
50 whether VPN or multi-region automation is expected.
51- Pivot to `logs-gcp_vertexai.prompt_response_logs-*` in the same window for prompt abuse,
52 refusals, or token volume after the distant events.
53- Check GCP IAM / audit logs for key creation, key download, or role grants near the first
54 distant country.
55
56### False positive analysis
57
58- Multi-region CI and dual-homed VPN/cloud egress are the main FPs — require ASN/UA
59 corroboration and known-principal allowlists before rotating credentials.
60- Shared org-wide service accounts used from many regions by design. Split those identities
61 per region or exclude them.
62
63### Response and remediation
64
65- On suspected compromise: disable or rotate the caller's keys/tokens, revoke active sessions,
66 hunt concurrent sessions from the listed IPs, and review IAM bindings after the distant events.
67- Prefer region-scoped service accounts for automation so legitimate multi-region traffic does
68 not share one email principal.
69"""
70references = [
71 "https://www.elastic.co/docs/reference/integrations/gcp_vertexai",
72]
73risk_score = 99
74rule_id = "b29f8041-5da1-40e4-aeee-607422074b29"
75setup = """## Setup
76
77Requires GCP Vertex AI `auditlogs` with `source.ip`, `source.geo.location`, `source.geo.country_name`,
78`client.user.email`, and preferably `user_agent.original`.
79"""
80severity = "critical"
81tags = [
82 "Domain: GenAI",
83 "Domain: Cloud",
84 "Data Source: GCP Vertex AI",
85 "Data Source: GCP",
86 "Data Source: Google Cloud Platform",
87 "Platform: GCP",
88 "Service: GCP Vertex AI",
89 "Use Case: Threat Detection",
90 "Tactic: Credential Access",
91 "Tactic: Initial Access",
92 "Threat: Impossible Travel",
93 "Threat: LLMjacking",
94 "Threat: Unauthorized AI Usage",
95 "Mitre Atlas: AML.T0012",
96 "Mitre Atlas: AML.T0091",
97 "Mitre Atlas: AML.T0091.000",
98 "Resources: Investigation Guide",
99 "Rule Type: ES|QL",
100]
101timestamp_override = "event.ingested"
102type = "esql"
103
104query = '''
105from logs-gcp_vertexai.auditlogs-*
106| where
107 data_stream.dataset == "gcp_vertexai.auditlogs" and
108 client.user.email is not null and
109 source.ip is not null and
110 source.geo.location is not null and
111 source.geo.country_name is not null and
112 (
113 event.action like "*PredictionService.GenerateContent*" or
114 event.action like "*PredictionService.StreamGenerateContent*" or
115 event.action like "*PredictionService.CountTokens*"
116 )
117| stats
118 Esql.country_count = count_distinct(source.geo.country_name),
119 Esql.source_ip_count = count_distinct(source.ip),
120 Esql.user_agent_count = count_distinct(user_agent.original),
121 Esql.event_count = count(*),
122 Esql.event_action_values = values(event.action),
123 Esql.source_ip_values = values(source.ip),
124 Esql.source_geo_country_name_values = values(source.geo.country_name),
125 Esql.source_geo_region_name_values = values(source.geo.region_name),
126 Esql.source_geo_city_name_values = values(source.geo.city_name),
127 Esql.source_as_organization_name_values = values(source.as.organization.name),
128 Esql.user_agent_original_values = values(user_agent.original),
129 Esql.timestamp_first_seen = min(@timestamp),
130 Esql.timestamp_last_seen = max(@timestamp)
131 by
132 client.user.email
133| where Esql.country_count >= 3 and Esql.source_ip_count >= 3
134| eval source.ip = MV_FIRST(Esql.source_ip_values)
135| keep
136 client.user.email,
137 source.ip,
138 Esql.country_count,
139 Esql.source_ip_count,
140 Esql.user_agent_count,
141 Esql.event_count,
142 Esql.event_action_values,
143 Esql.source_ip_values,
144 Esql.source_geo_country_name_values,
145 Esql.source_geo_region_name_values,
146 Esql.source_geo_city_name_values,
147 Esql.source_as_organization_name_values,
148 Esql.user_agent_original_values,
149 Esql.timestamp_first_seen,
150 Esql.timestamp_last_seen
151'''
152
153
154[[rule.threat]]
155framework = "MITRE ATT&CK"
156[[rule.threat.technique]]
157id = "T1528"
158name = "Steal Application Access Token"
159reference = "https://attack.mitre.org/techniques/T1528/"
160
161
162[rule.threat.tactic]
163id = "TA0006"
164name = "Credential Access"
165reference = "https://attack.mitre.org/tactics/TA0006/"
166[[rule.threat]]
167framework = "MITRE ATT&CK"
168[[rule.threat.technique]]
169id = "T1078"
170name = "Valid Accounts"
171reference = "https://attack.mitre.org/techniques/T1078/"
172[[rule.threat.technique.subtechnique]]
173id = "T1078.004"
174name = "Cloud Accounts"
175reference = "https://attack.mitre.org/techniques/T1078/004/"
176
177
178
179[rule.threat.tactic]
180id = "TA0001"
181name = "Initial Access"
182reference = "https://attack.mitre.org/tactics/TA0001/"
183[[rule.threat_mappings]]
184framework = "MITRE ATLAS"
185version = "2026.08"
186[[rule.threat_mappings.threat]]
187framework = "MITRE ATLAS"
188[[rule.threat_mappings.threat.technique]]
189id = "AML.T0012"
190name = "Valid Accounts"
191reference = "https://atlas.mitre.org/techniques/AML.T0012/"
192
193
194[rule.threat_mappings.threat.tactic]
195id = "AML.TA0004"
196name = "Initial Access"
197reference = "https://atlas.mitre.org/tactics/AML.TA0004/"
198[[rule.threat_mappings.threat]]
199framework = "MITRE ATLAS"
200[[rule.threat_mappings.threat.technique]]
201id = "AML.T0091"
202name = "Use Alternate Authentication Material"
203reference = "https://atlas.mitre.org/techniques/AML.T0091/"
204[[rule.threat_mappings.threat.technique.subtechnique]]
205id = "AML.T0091.000"
206name = "Application Access Token"
207reference = "https://atlas.mitre.org/techniques/AML.T0091.000/"
208
209
210
211[rule.threat_mappings.threat.tactic]
212id = "AML.TA0015"
213name = "Lateral Movement"
214reference = "https://atlas.mitre.org/tactics/AML.TA0015/"
215
216[rule.investigation_fields]
217field_names = [
218 "client.user.email",
219 "source.ip",
220 "Esql.country_count",
221 "Esql.source_ip_count",
222 "Esql.user_agent_count",
223 "Esql.event_count",
224 "Esql.event_action_values",
225 "Esql.source_ip_values",
226 "Esql.source_geo_country_name_values",
227 "Esql.source_geo_region_name_values",
228 "Esql.source_geo_city_name_values",
229 "Esql.source_as_organization_name_values",
230 "Esql.user_agent_original_values",
231 "Esql.timestamp_first_seen",
232 "Esql.timestamp_last_seen",
233]
234
235[rule.alert_suppression]
236group_by = ["client.user.email"]
237missing_fields_strategy = "suppress"
238
239[rule.alert_suppression.duration]
240unit = "h"
241value = 4
Triage and analysis
Investigating GCP Vertex AI Caller Activity From High Number of Countries
Successful Vertex AI GenerateContent / CountTokens audit activity for the same
client.user.email spans at least three countries and three source IPs inside four hours.
That pattern can indicate leaked or stolen credentials reused from VPN or cloud egress in
multiple regions, including return trips where the first and last locations are close.
Escalate when countries differ, user agents diverge (SDK vs curl/browser), privileged methods appear on the distant IPs, or IAM key activity precedes the burst. Close as a false positive for documented multi-region automation with consistent corporate tooling.
Possible investigation steps
- Use
Esql.source_geo_country_name_values,Esql.source_geo_region_name_values,Esql.source_ip_values, andEsql.user_agent_original_valuesto map the geographic and client spread. - Use
Esql.event_action_valuesandEsql.event_countto see what the caller did. - Contact the owner of
client.user.email(or the owning team for a service account) to confirm whether VPN or multi-region automation is expected. - Pivot to
logs-gcp_vertexai.prompt_response_logs-*in the same window for prompt abuse, refusals, or token volume after the distant events. - Check GCP IAM / audit logs for key creation, key download, or role grants near the first distant country.
False positive analysis
- Multi-region CI and dual-homed VPN/cloud egress are the main FPs — require ASN/UA corroboration and known-principal allowlists before rotating credentials.
- Shared org-wide service accounts used from many regions by design. Split those identities per region or exclude them.
Response and remediation
- On suspected compromise: disable or rotate the caller's keys/tokens, revoke active sessions, hunt concurrent sessions from the listed IPs, and review IAM bindings after the distant events.
- Prefer region-scoped service accounts for automation so legitimate multi-region traffic does not share one email principal.
References
Related rules
- GCP Vertex AI Caller Impossible Travel
- GCP Vertex AI High GenerateContent Volume From Single IP
- GCP Vertex AI Publisher Model Config Modified
- First Time GCP Vertex AI Agent Engine Sandbox Code Execution by User and Source ASN
- Microsoft Foundry Subscription Key Impossible Travel