Skip to content
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

[Security][Detections] Create Threshold-based Rule type #68409

Closed
spong opened this issue Jun 5, 2020 · 8 comments
Closed

[Security][Detections] Create Threshold-based Rule type #68409

spong opened this issue Jun 5, 2020 · 8 comments
Assignees
Labels
enhancement New value added to drive a business result Feature:Detection Rules Anything related to Security Solution's Detection Rules Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.9.0

Comments

@spong
Copy link
Member

spong commented Jun 5, 2020

This issue is for creating a new rule type based on thresholds/aggregations, and can appear as a separate card for selection within the Define Rule section of the Create Rule flow.

There are actually several kinds of aggregation-based rules that could fall in here: # hits, sum, terms, significant terms, etc.

Latest mocks:

cc @marrasherrier

@spong spong added enhancement New value added to drive a business result Team:SIEM v7.9.0 Feature:Detection Rules Anything related to Security Solution's Detection Rules labels Jun 5, 2020
@spong spong self-assigned this Jun 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@NerdSec
Copy link

NerdSec commented Jun 23, 2020

Hi @spong ,

This is really encouraging and definitely a required feature. I just had a question on how do we handle data that is coming with a delay?

I agree that this is a broad question, and not really something that should concern the log aggregator. But in reality, getting logs in realtime is not always feasible. An obvious workaround would be to increase the timeframe, but then you have to accept a delay in terms of rule triggers!

@spong
Copy link
Member Author

spong commented Jun 23, 2020

Hey there @NerdSec -- thanks for commenting! 🙂

To better handle delayed events we'll be adding the ability to specify a Default Timestamp setting as part of the rule (#65941) so users can specify which timestamp field the rule will use during it's execution phase. This'll allow us to specify which timestamp is closest to ingest time, so if any data is delayed in making it into the system it'll still be processed as part of the next rule run. This'll be especially helpful for endpoints or other agents that are offline for a few days and then come back online and push up all their data. Tangentially, we also have some work with regards to mitigating gaps in rule runs -- you can see more about that here: #63290.

Hope this helps!

@NerdSec
Copy link

NerdSec commented Jun 24, 2020

One small input here. In most of the use cases we have implemented, we ended up needing the terms, date_histogram, cardinality, and bucket_selector aggs. We did not the ESQL implementation, rather built the agg queries in the console, which wasn't quite user friendly.

Some use cases:

  • Multiple logon failures from single source IP
  • Concurrent user logins from multiple regions/geo locations
  • Single source ip targeting multiple websites
  • Multiple occurrences of an unique infection from the same machine

I am not sure if it was the correct route, but we implemented a terms agg/cardinality with a bucket selector to choose which events matched our condition!

@dontcallmesherryli
Copy link

dontcallmesherryli commented Jun 30, 2020

Had discussion with @spong @MikePaquette @marrasherrier to answer questions and decrease scope.

  • Product is comfortable with just using default fields of Detection Alert List and Timeline for threshold rule based alerts. Where a field would have multiple values, the alert list can show "Multiple Values" on field value. User should still be able to use the right click function to get top values and filter on values.

  • Scope will be cut to only have a query field, a group by field, and threshold count field for user to create a threshold rule.

  • Backend need is adding field value of "Threshold Rule" for rule kind and "threshold count".

Screen Shot 2020-06-30 at 4 05 05 PM

@marrasherrier
Copy link
Contributor

@FrankHassanabad
Copy link
Contributor

This is completed and shipping, so closing the ticket now.

@spong
Copy link
Member Author

spong commented Jul 29, 2020

Resolved by #71371! Thanks again @patrykkopycinski

@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Detection Rules Anything related to Security Solution's Detection Rules Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.9.0
Projects
None yet
Development

No branches or pull requests

7 participants