[New Rule] AWS Lambda Function Invoked Cross-Account#6299
Merged
Conversation
Contributor
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new AWS detection rule to identify cross-account AWS Lambda function invocations using CloudTrail Lambda data events, highlighting scenarios where the invoking principal’s account differs from the function owner’s account.
Changes:
- Introduces a new ES|QL rule that parses the caller account from
aws.cloudtrail.user_identity.arnand the function owner account fromaws.cloudtrail.request_parameters. - Aggregates matching invocations and enriches the alert with invocation count and source IPs.
- Adds an investigation guide and setup instructions emphasizing the need to enable Lambda data event logging.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
imays11
reviewed
Jun 22, 2026
imays11
reviewed
Jun 22, 2026
imays11
approved these changes
Jun 22, 2026
terrancedejesus
approved these changes
Jun 25, 2026
…_account.toml Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
…_account.toml Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Issue link(s):
Summary - What I changed
Add detection of an AWS Lambda function invoked by a principal whose AWS account differs from the account that owns the function (a cross-account invocation). The caller's account is parsed from the invoking principal's ARN and compared to
the function account. Adversaries who have been granted invoke permission on a function from an external account, or who
operate from a separate attacker-controlled account, can use cross-account invocation to execute functions or retrieve the data they return. This is the data-plane counterpart to detecting the cross-account grant itself, and relies on AWS Lambda data event logging, which is not enabled by default.
How To Test
Query & data can be assessed in TRADE stack and other telemetry stacks.
Checklist
bug,enhancement,schema,maintenance,Rule: New,Rule: Deprecation,Rule: Tuning,Hunt: New, orHunt: Tuningso guidelines can be generatedmeta:rapid-mergelabel if planning to merge within 24 hoursContributor checklist