AWS Lambda Function Policy Updated to Allow Public Invocation | Elastic Security [8.19] | Elastic

AWS Lambda Function Policy Updated to Allow Public Invocation

edit

IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

AWS Lambda Function Policy Updated to Allow Public Invocation

Identifies when an AWS Lambda function policy is updated to allow public invocation. This rule detects use of the AddPermission API where the Principal is set to "*", enabling any AWS account to invoke the function. Adversaries may abuse this configuration to establish persistence, create a covert execution path, or operate a function as an unauthenticated backdoor. Public invocation is rarely required outside very specific workloads and should be considered high-risk when performed unexpectedly.

Rule type: eql

Rule indices:

Severity: medium

Risk score: 47

Runs every: 5m

Searches indices from: now-6m ( Date Math format, see also [Additional look-back time](/content/guide/en/security/8.19/rules-ui-create.html#rule-schedule "Set the rule’s schedule"/index.html))

Maximum alerts per execution: 100

References:

Tags:

Version: 8

Rule authors:

Rule license: Elastic License v2

Investigation guide

Triage and analysis

Investigating AWS Lambda Function Policy Updated to Allow Public Invocation

AWS Lambda policies control who can invoke a function. When the Principal is set to *, the function becomes publicly invokable by any AWS account. Adversaries may modify Lambda permissions to create a stealthy execution backdoor or to maintain persistence inside an AWS environment. This activity is uncommon in most production environments and should receive careful scrutiny when detected.

Possible investigation steps

Identify the actor - Identify the actor who made the change by reviewing aws.cloudtrail.user_identity.arn and access key ID. Determine whether this principal typically administers Lambda functions.

Review request details - Review request details in aws.cloudtrail.request_parameters to understand the exact permission added: - Confirm that the Principal is set to "*". - Note the Action (lambda:InvokeFunction) and any SourceArn restrictions (sometimes present, often missing in malicious cases).

Analyze source context - Check the source of the request using source.ip, geo information, and user agent. Unexpected networks, automation tools, or CLI usage may indicate credential compromise.

Correlate timing and related events - Evaluate timing and sequence by correlating @timestamp with other events. Look for surrounding actions such as: - Creation or update of Lambda function code. - Publishing new Lambda layers. - Changes to roles attached to the function.

Assess function sensitivity and impact - Assess the function’s role and data sensitivity. Determine whether public invocation could: - Enable unmonitored code execution, - Trigger access to internal resources via the function’s IAM role, - Be chained with persistence or privilege escalation behavior.

Validate operational intent - Validate the operational context. Confirm with the function owner whether the permission change was intentional, part of a deployment, or unexpected.

False positive analysis

Response and remediation

Additional information

Rule query

info where data_stream.dataset == "aws.cloudtrail"
    and event.provider == "lambda.amazonaws.com"
    and event.outcome == "success"
    and event.action : "AddPermission*"
    and stringContains(aws.cloudtrail.request_parameters, "lambda:InvokeFunction")
    and stringContains(aws.cloudtrail.request_parameters, "principal=\\*")

Framework: MITRE ATT&CKTM

« AWS Lambda Function Policy Updated to Allow Cross-Account InvocationAWS Lambda Function URL Created with Public Access »

On this page

Most Popular

Video

Get Started with Elasticsearch

Video

Intro to Kibana

Video

ELK for Logs & Metrics

Was this helpful?Feedback

LikeDislike

Thank you for your feedback.

a18132920325.cdn.optimizely.com

a18132920325.cdn.optimizely.com is blocked

This page has been blocked by an extension

ERR_BLOCKED_BY_CLIENT

Reload

This page has been blocked by an extension