-
Notifications
You must be signed in to change notification settings - Fork 603
[Tuning] AWS Access Token Used from Multiple Addresses #5055
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
Conversation
Tuning was triggered by a community member - fixes wildcard and `Pulumi` typos to exclude common IaC tools - adds exclusion for ``source.as.organization.name` == "AMAZON-02" and aws.cloudtrail.event_category == "Data"` to exclude the noisy multi-IP traffic coming from Amazon-02 networks performing high-throughput data-plane operations. I didn't exclude this network completely because this network can also indicate user-triggered events that are worth keeping in the alert. - added additional high noise service providers that may be more indicative of console browsing - added a field for pairing source.ip & network - 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
|
rules/integrations/aws/initial_access_iam_session_token_used_from_multiple_addresses.toml
Outdated
Show resolved
Hide resolved
…rom_multiple_addresses.toml
rules/integrations/aws/initial_access_iam_session_token_used_from_multiple_addresses.toml
Outdated
Show resolved
Hide resolved
…rom_multiple_addresses.toml
) | ||
and `source.as.organization.name` != "AMAZON-AES" | ||
and not (( | ||
`source.as.organization.name` == "AMAZON-02" and aws.cloudtrail.event_category == "Data")) |
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.
Just making sure: are these backticks supported in ES|QL pipeline?
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 and they used to be necessary for any field with as
in the name since that means something in ESQL. We used to get errors when including this field without the backticks but I actually just tried it again without the backticks and am not getting those errors anymore so something might have changed with the language ability to recognize fields like this. I'm going to keep the backticks though as they are still supported.
| where Esql.activity_type != "normal_activity" | ||
''' | ||
|
||
[rule.investigation_fields] |
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.
I don't know if we have used dynamic fields in timelines before and what the implications are. With the best practices and guidelines being followed, key:value pairs like Esql.source_ip_values
may show up in timelines whereas Esql.activity_fidelity_score
is likely unique to this rule. That would only be for alerts too, not raw telemetry and may not be valuable to pivoting and triaging.
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.
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.
We should consider https://github.com/elastic/detection-rules/pull/5055/files#r2322658965 and make a decision before merging. I'd caution on not including them for ESQL rules with dynamic fields. Happy to consider other thoughts.
Based on the docs we shouldn't have a problem here https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#custom-highlighted-esql-fields When configuring an ES|QL rule’s Custom highlighted fields, you can specify any fields that the rule’s aggregating or non-aggregating query return. This can help ensure that returned fields are visible in the alert details flyout while you’re investigating alerts. |
Pull Request
Issue link(s):
Summary - What I changed
Tuning was triggered by a community member
Pulumi
typos to exclude common IaC toolssource.as.organization.name == "AMAZON-02" and aws.cloudtrail.event_category == "Data"
to exclude the noisy multi-IP traffic coming from Amazon-02 networks performing high-throughput data-plane operations. I didn't exclude this network completely because this network can also indicate user-triggered events that are important to keep in the alert.How To Test
There's a saved timeline in our test stack which captures this query results over the last year, it includes the ByBit threat behavior this rule was initally meant to capture.