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/09/18"
  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    "Noise: Medium",
 82    "Performance: Fast",
 83    "Profile: Recommended",
 84    "Threat: Unauthorized AI Usage",
 85    "Threat: LLMjacking",
 86    "Rule Type: ES|QL",
 87    "Platform: AWS",
 88    "Domain: GenAI",
 89    "Service: AWS Bedrock",
 90]
 91timestamp_override = "event.ingested"
 92type = "esql"
 93
 94query = '''
 95FROM logs-aws.cloudtrail-*
 96| WHERE event.provider == "bedrock.amazonaws.com"
 97    AND event.action IN (
 98      "InvokeModel",
 99      "Converse",
100      "ConverseStream",
101      "InvokeModelWithResponseStream"
102    )
103    AND event.outcome == "success"
104    AND aws.cloudtrail.user_identity.arn IS NOT NULL
105    AND aws.cloudtrail.request_parameters IS NOT NULL
106| GROK aws.cloudtrail.request_parameters """modelId=(?<Esql.model_id>[^,}\]]+)"""
107| WHERE Esql.model_id IS NOT NULL
108| STATS
109    Esql.inference_call_count = COUNT(*),
110    Esql.timestamp_min = MIN(@timestamp),
111    Esql.timestamp_max = MAX(@timestamp),
112    Esql.event_ingested_min = MIN(event.ingested),
113    Esql.event_ingested_max = MAX(event.ingested),
114    Esql.event_action_values = VALUES(event.action),
115    Esql.source_ip_values = VALUES(source.ip),
116    Esql.source_as_organization_name_values =
117      VALUES(source.as.organization.name),
118    Esql.source_geo_country_iso_code_values =
119      VALUES(source.geo.country_iso_code),
120    Esql.source_geo_city_name_values =
121      VALUES(source.geo.city_name),
122    Esql.user_name_values = VALUES(user.name),
123    Esql.user_agent_original_values = VALUES(user_agent.original),
124    Esql.aws_cloudtrail_user_identity_type_values =
125      VALUES(aws.cloudtrail.user_identity.type),
126    Esql.aws_cloudtrail_user_identity_access_key_id_values =
127      VALUES(aws.cloudtrail.user_identity.access_key_id),
128    Esql.session_issuer_arn_values =
129      VALUES(aws.cloudtrail.user_identity.session_context.session_issuer.arn),
130    Esql.cloud_region_values = VALUES(cloud.region),
131    Esql.data_stream_namespace_values = VALUES(data_stream.namespace)
132  BY aws.cloudtrail.user_identity.arn,
133     cloud.account.id,
134     Esql.model_id
135| WHERE Esql.inference_call_count >= 500
136| KEEP
137    aws.cloudtrail.user_identity.arn,
138    cloud.account.id,
139    Esql.*
140| sort Esql.inference_call_count desc
141'''
142
143[rule.alert_suppression]
144group_by = ["aws.cloudtrail.user_identity.arn","cloud.account.id"]
145missing_fields_strategy = "suppress"
146[rule.alert_suppression.duration]
147unit = "m"
148value = 60
149  
150[rule.investigation_fields]
151field_names = [
152"aws.cloudtrail.user_identity.arn", 
153"cloud.account.id", 
154"Esql.model_id", 
155"Esql.inference_call_count",
156"Esql.user_agent_original_values",
157"Esql.source_ip_values",
158"Esql.user_name_values"
159]

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.arn and the targeted model in the extracted Esql.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

to-top