
AWS Bedrock AgentCore Runtime Command Accesses Instance Metadata Credentials
Elastic Detection Rules
View SourceSummary
Detects attempts by Amazon Bedrock AgentCore Runtime to access IAM execution-role credentials via the microVM metadata service (MMDS) or to emit a temporary credential payload in runtime output. The InvokeAgentRuntimeCommand API runs shell commands as root inside Runtime/Harness microVMs, bypassing agent, model, tools, and guardrails. A caller with permission to invoke this API can read the attached execution role's credentials from MMDS and reuse them outside AgentCore. The rule flags events in the Bedrock runtime logs where a command line references MMDS endpoints or token endpoints (169.254.169.254, fd00:ec2::254, latest/api/token, latest/meta-data/iam, security-credentials, x-aws-ec2-metadata-token) or messages containing AccessKeyId, SecretAccessKey, and a Token/SessionToken. It maps to MITRE ATT&CK T1552 (Unsecured Credentials) with T1552.005 (Cloud Instance Metadata API) and to MITRE ATLAS AML.T0098 (AI Agent Tool Credential Harvesting) under AML.TA0013 (Credential Access). The detection uses the aws.bedrock_agentcore.runtime_logs dataset and requires Bedrock AgentCore integration 1.5.0+ with CloudWatch runtime logs; CloudTrail data events are recommended for caller attribution. False positives include authorized security testing or diagnostics; triage should confirm caller identity and intent. Remediation includes revoking active sessions, restricting bedrock-agentcore:InvokeAgentRuntimeCommand, narrowing iam:PassRole, reducing execution role permissions, and enabling CloudTrail for AgentCore Runtime resources.
Categories
- Cloud
Data Sources
- Process
- Command
- Instance
ATT&CK Techniques
- T0098
- T1552
- T1552.005
Created: 2026-11-25