AWS IAM Sensitive Operations via Lambda Execution Role
Detects successful IAM API calls that create or empower IAM users and roles, attach or embed policies, or wire roles to instance profiles when the caller is an assumed role session associated with AWS Lambda.…
Description
Detects successful IAM API calls that create or empower IAM users and roles, attach or embed policies, or wire roles to instance profiles when the caller is an assumed role session associated with AWS Lambda. Serverless execution roles are often over-permissioned; an adversary who can run or compromise function code can abuse these APIs for privilege escalation and persistence—for example creating users or roles, issuing keys, attaching managed or inline policies, or preparing EC2 instance profiles for lateral movement.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the 3 ATT&CK techniques it maps to.
- Log source category
- event_index
Known benign triggers
- Some organizations intentionally use Lambda functions to provision IAM principals, bootstrap accounts, or run identity automation (including roles and instance profiles). Confirm the function name in `user_identity.arn`, deployment pipelines, and change records. Exclude known automation roles or specific `session_context.session_issuer.arn` values after validation.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html | 2 |
| docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html | Only this detection cites it |
| hackingthe.cloud/aws/exploitation/iam_privilege_escalation/ | 7 |
From the source
- At source
- Open at source
- Upstream identifier
- a8f3c2e1-4d5b-4e6f-8a9b-0c1d2e3f4a5b
- Tagged by the source as
- Data Source: Amazon Web ServicesData Source: AWSData Source: AWS CloudTrailData Source: AWS IAMData Source: AWS LambdaDomain: CloudDomain: IdentityNoise: LowPerformance: NormalPlatform: AWSResources: Investigation GuideRule Type: Custom Query (KQL)Service: AWS IAMService: AWS LambdaTactic: PersistenceTactic: Privilege EscalationUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3