-
Notifications
You must be signed in to change notification settings - Fork 612
[Rule Tunings] AWS Lambda Rules #5451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
#### AWS Lambda Layer Added to Existing Function This rule was missing alerts for the `UpdateFunctionConfiguration` action due to a missing wildcard. - added missing wildcard to query - reduced execution window - updated description, FP and IG sections - added highlighted fields #### AWS Lambda Function Policy Updated to Allow Public Invocation - changed this query to use EQL instead of KQL to optimize wildcard usage - uses `event.type` as `event_category_override` - reduced execution window - updated description, FP and IG sections - added highlighted fields
Rule: Tuning - GuidelinesThese guidelines serve as a reminder set of considerations when tuning an existing rule. Documentation and Context
Rule Metadata Checks
Testing and Validation
|
| and event.outcome == "success" | ||
| and event.action : "AddPermission*" | ||
| and stringContains(aws.cloudtrail.request_parameters, "lambda:InvokeFunction") | ||
| and stringContains(aws.cloudtrail.request_parameters, "principal=\\*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this tested in match on princioal=* ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I tested to capture that, I have the screenshot of the working query in the issue description. If you run it in our test stack it'll capture that event from yesterday.
Mikaayenson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo, otherwise lgtm
rules/integrations/aws/persistence_lambda_backdoor_invoke_function_for_any_principal.toml
Outdated
Show resolved
Hide resolved
…tion_for_any_principal.toml Co-authored-by: Mika Ayenson, PhD <[email protected]>
Pull Request
Issue link(s):
Summary - What I changed
AWS Lambda Layer Added to Existing Function
This rule was missing alerts for the
UpdateFunctionConfigurationaction due to a missing wildcard.missing vs included UpdateFunctionConfiguration actions
Expected Alert for PublishLayerVersion* action
AWS Lambda Function Policy Updated to Allow Public Invocation
event.typeasevent_category_overrideWorking EQL query
Expected Alert
How To Test
Plenty of data in our stack for running query against
Set of scripts for testing : Lambda