AWS Lambda Layer Added to Existing Function
Identifies when a Lambda layer is added to an existing AWS Lambda function. Lambda layers allow shared code, dependencies, or runtime modifications to be injected into a function’s execution environment. Adversaries…
Description
Identifies when a Lambda layer is added to an existing AWS Lambda function. Lambda layers allow shared code, dependencies, or runtime modifications to be injected into a function’s execution environment. Adversaries with the ability to update function configurations may add a malicious layer to establish persistence, run unauthorized code, or intercept data handled by the function. This activity should be reviewed to ensure the modification is expected and authorized.
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
- IaaSOffice SuiteSaaS
The rule states no platform. This is derived from the 2 ATT&CK techniques it maps to.
- Log source category
- event_index
Known benign triggers
- Lambda function owners or deployment pipelines may legitimately add or update layers as part of normal development and maintenance workflows. Confirm that the layer addition aligns with approved changes, expected CI/CD behavior, or routine dependency updates. Known automation roles or build systems can be excluded if they consistently perform authorized modifications.
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 |
|---|---|
| cloud.hacktricks.xyz/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-lambda-layers-persistence | Only this detection cites it |
| docs.aws.amazon.com/lambda/latest/api/API_PublishLayerVersion.html | Only this detection cites it |
| docs.aws.amazon.com/lambda/latest/api/API_UpdateFunctionConfiguration.html | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- 7d091a76-0737-11ef-8469-f661ea17fbcc
- Tagged by the source as
- Data Source: Amazon Web ServicesData Source: AWSData Source: AWS CloudTrailDomain: CloudNoise: MediumPerformance: NormalPlatform: AWSResources: Investigation GuideRule Type: Custom Query (KQL)Service: AWS LambdaTactic: Execution
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3