AWS Bedrock High-Frequency Single-Model Inference API Probing
Identifies an AWS principal performing a high volume of Amazon Bedrock inference API calls against a single model within a short window. Membership inference attacks require hundreds to thousands of statistically similar queries whose prompts and responses are intentionally content-benign, making guardrail- and content-based rules ineffective. This rule detects the high-frequency single-model probing pattern that precedes membership inference and related exfiltration via the inference API. It is a behavioral / volumetric precursor: it does not observe model confidence scores and a fixed call-count threshold only catches the loud variant, so paced, low-and-slow, or credential-distributed probing will evade it. Definitive membership inference detection requires ML anomaly analysis over per-entity inference-rate and response-distribution baselines.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/06/05"
3integration = ["aws"]
4maturity = "production"
5updated_date = "2026/07/09"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies an AWS principal performing a high volume of Amazon Bedrock inference API calls against a single model within
11a short window. Membership inference attacks require hundreds to thousands of statistically similar queries whose
12prompts and responses are intentionally content-benign, making guardrail- and content-based rules ineffective. This rule
13detects the high-frequency single-model probing pattern that precedes membership inference and related exfiltration via
14the inference API. It is a behavioral / volumetric precursor: it does not observe model confidence scores and a fixed
15call-count threshold only catches the loud variant, so paced, low-and-slow, or credential-distributed probing will evade
16it. Definitive membership inference detection requires ML anomaly analysis over per-entity inference-rate and
17response-distribution baselines.
18"""
19false_positives = [
20 """
21 Automated agents, chat applications, retrieval-augmented generation services, evaluation pipelines, and load tests
22 routinely generate high Bedrock inference volume against one model and will exceed any fixed threshold. Validate the
23 principal, user agent, source IP, and application context before treating the activity as malicious, and tune the
24 threshold to the deployment.
25 """,
26]
27from = "now-60m"
28interval = "10m"
29language = "esql"
30license = "Elastic License v2"
31name = "AWS Bedrock High-Frequency Single-Model Inference API Probing"
32note = """## Triage and analysis
33
34### Investigating AWS Bedrock High-Frequency Single-Model Inference API Probing
35
36Membership inference compares many samples against a model to infer whether specific records were present in training data. Because prompts and responses often appear benign, the actionable signal is frequently statistical: unusually high inference rates concentrated on one model from a single principal. AWS CloudTrail records the core Bedrock runtime operations (`InvokeModel`, `InvokeModelWithResponseStream`, `Converse`, `ConverseStream`) as management events, which are logged by default, so this probing phase is observable at the API layer even when Bedrock model invocation logging is disabled. CloudTrail does not capture the prompt body, so this rule is purely volumetric.
37
38This rule is tuned to the loud case. Treat it as corroborating signal alongside other Bedrock alerts, not as conclusive membership inference detection.
39
40#### Possible investigation steps
41
42- Identify the principal in `aws.cloudtrail.user_identity.arn` and the targeted model in the extracted `Esql.model_id`.
43- Determine whether the call volume exceeds the principal's historical baseline for the same model.
44- Review companion Bedrock invocation logs, if enabled, for short prompts, repeated inputs, or low-variance responses that may indicate membership testing.
45- Inspect `Esql.source_ip_values`, `Esql.user_agent_original_values`, and recent IAM activity for signs of compromised credentials or unexpected automation.
46- Correlate with bulk output-extraction or guardrail alerts that may indicate a broader inference abuse campaign.
47
48### Response and remediation
49
50- Apply Bedrock service quotas and IAM least privilege for inference APIs while investigating.
51- Enable model invocation logging for content-level review if not already configured.
52- If abuse is confirmed, rotate access keys or disable the compromised principal.
53"""
54references = [
55 "https://atlas.mitre.org/techniques/AML.T0024",
56 "https://atlas.mitre.org/techniques/AML.T0024.000",
57 "https://docs.aws.amazon.com/bedrock/latest/userguide/logging-using-cloudtrail.html",
58 "https://www.elastic.co/security-labs/elastic-advances-llm-security",
59]
60risk_score = 47
61rule_id = "56312ef5-656c-4bf7-ad9a-affed052b102"
62setup = """## Setup
63
64This rule requires AWS CloudTrail management events for Amazon Bedrock and ingestion via the AWS
65integration (`aws.cloudtrail` data stream). The core Bedrock runtime operations are logged as management
66events by default; no Bedrock model invocation logging is required.
67
68"""
69severity = "medium"
70tags = [
71 "Domain: Cloud",
72 "Domain: LLM",
73 "Data Source: AWS",
74 "Data Source: Amazon Web Services",
75 "Data Source: AWS CloudTrail",
76 "Use Case: Threat Detection",
77 "Tactic: Exfiltration",
78 "Mitre Atlas: T0024",
79 "Mitre Atlas: T0024.000",
80 "Resources: Investigation Guide",
81]
82timestamp_override = "event.ingested"
83type = "esql"
84
85query = '''
86FROM logs-aws.cloudtrail-*
87| WHERE event.provider == "bedrock.amazonaws.com"
88 AND event.action IN (
89 "InvokeModel",
90 "Converse",
91 "ConverseStream",
92 "InvokeModelWithResponseStream"
93 )
94 AND event.outcome == "success"
95 AND aws.cloudtrail.user_identity.arn IS NOT NULL
96 AND aws.cloudtrail.request_parameters IS NOT NULL
97| GROK aws.cloudtrail.request_parameters """modelId=(?<Esql.model_id>[^,}\]]+)"""
98| WHERE Esql.model_id IS NOT NULL
99| STATS
100 Esql.inference_call_count = COUNT(*),
101 Esql.timestamp_min = MIN(@timestamp),
102 Esql.timestamp_max = MAX(@timestamp),
103 Esql.event_ingested_min = MIN(event.ingested),
104 Esql.event_ingested_max = MAX(event.ingested),
105 Esql.event_action_values = VALUES(event.action),
106 Esql.source_ip_values = VALUES(source.ip),
107 Esql.source_as_organization_name_values =
108 VALUES(source.as.organization.name),
109 Esql.source_geo_country_iso_code_values =
110 VALUES(source.geo.country_iso_code),
111 Esql.source_geo_city_name_values =
112 VALUES(source.geo.city_name),
113 Esql.user_name_values = VALUES(user.name),
114 Esql.user_agent_original_values = VALUES(user_agent.original),
115 Esql.aws_cloudtrail_user_identity_type_values =
116 VALUES(aws.cloudtrail.user_identity.type),
117 Esql.aws_cloudtrail_user_identity_access_key_id_values =
118 VALUES(aws.cloudtrail.user_identity.access_key_id),
119 Esql.session_issuer_arn_values =
120 VALUES(aws.cloudtrail.user_identity.session_context.session_issuer.arn),
121 Esql.cloud_region_values = VALUES(cloud.region),
122 Esql.data_stream_namespace_values = VALUES(data_stream.namespace)
123 BY aws.cloudtrail.user_identity.arn,
124 cloud.account.id,
125 Esql.model_id
126| WHERE Esql.inference_call_count >= 500
127| KEEP
128 aws.cloudtrail.user_identity.arn,
129 cloud.account.id,
130 Esql.*
131| sort Esql.inference_call_count desc
132'''
133
134[rule.alert_suppression]
135group_by = ["aws.cloudtrail.user_identity.arn","cloud.account.id"]
136missing_fields_strategy = "suppress"
137[rule.alert_suppression.duration]
138unit = "m"
139value = 60
140
141[rule.investigation_fields]
142field_names = [
143"aws.cloudtrail.user_identity.arn",
144"cloud.account.id",
145"Esql.model_id",
146"Esql.inference_call_count",
147"Esql.user_agent_original_values",
148"Esql.source_ip_values",
149"Esql.user_name_values"
150]
Triage and analysis
Investigating AWS Bedrock High-Frequency Single-Model Inference API Probing
Membership inference compares many samples against a model to infer whether specific records were present in training data. Because prompts and responses often appear benign, the actionable signal is frequently statistical: unusually high inference rates concentrated on one model from a single principal. AWS CloudTrail records the core Bedrock runtime operations (InvokeModel, InvokeModelWithResponseStream, Converse, ConverseStream) as management events, which are logged by default, so this probing phase is observable at the API layer even when Bedrock model invocation logging is disabled. CloudTrail does not capture the prompt body, so this rule is purely volumetric.
This rule is tuned to the loud case. Treat it as corroborating signal alongside other Bedrock alerts, not as conclusive membership inference detection.
Possible investigation steps
- Identify the principal in
aws.cloudtrail.user_identity.arnand the targeted model in the extractedEsql.model_id. - Determine whether the call volume exceeds the principal's historical baseline for the same model.
- Review companion Bedrock invocation logs, if enabled, for short prompts, repeated inputs, or low-variance responses that may indicate membership testing.
- Inspect
Esql.source_ip_values,Esql.user_agent_original_values, and recent IAM activity for signs of compromised credentials or unexpected automation. - Correlate with bulk output-extraction or guardrail alerts that may indicate a broader inference abuse campaign.
Response and remediation
- Apply Bedrock service quotas and IAM least privilege for inference APIs while investigating.
- Enable model invocation logging for content-level review if not already configured.
- If abuse is confirmed, rotate access keys or disable the compromised principal.
References
Related rules
- AWS Bedrock API Key Phantom User Activity Outside Bedrock
- AWS Bedrock Third-Party or External Knowledge Base Associated to Agent
- AWS Bedrock Knowledge Base or RAG Data Source Tampering
- AWS Bedrock Agent Created by IAM User or Root
- AWS Bedrock Automated Reasoning Safety Policy Tampering