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 Solution] [Detections] Error when editing duplicate of prebuilt detection rule using EQL #89960

Closed
MikePaquette opened this issue Feb 2, 2021 · 8 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Detection Rules Security Solution rules and Detection Engine Feature:Event Correlation (EQL) Rule Security Solution Event Correlation (EQL) rule type impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. needs design Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.

Comments

@MikePaquette
Copy link

Kibana version: 7.11 BC5

Elasticsearch version: 7.11 BC5

Server OS version: Elastic Cloud

Browser version: Chrome Version 88.0.4324.96

Browser OS version: macOS 10.14.6

Original install method (e.g. download page, yum, from source, etc.): Elastic Cloud Deployment

Describe the bug:
When attempting to edit an EQL-based rule (which has been duplicated from a prebuilt rule), an error occurs

Steps to reproduce:

  1. Load pre-built rules (461)
  2. Duplicate all 461 pre-built rules - now have 461 custom rules
  3. View custom rules
  4. click on one EQL-based rule to view rule details (e.g., Persistence via Microsoft Office AddIns [Duplicate])
  5. Click on Edit Rule Settings
  6. Get error toaster message and these details:
verification_exception
Found 1 problem
line -1:-1: Unknown index [*,-*]

Error: EsError
    at search_interceptor_EnhancedSearchInterceptor.handleSearchError (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/plugin/data/data.plugin.js:8:189169)
    at t.selector (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/plugin/dataEnhanced/dataEnhanced.plugin.js:2:35413)
    at t.error (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:429:94087)
    at t._error (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:429:134047)
    at t.error (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:40304)
    at t._error (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:40610)
    at t.error (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:40304)
    at t._error (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:40610)
    at t.error (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:40304)
    at t._error (https://9047020492624fefa1c5b15963618d35.europe-west1.gcp.cloud.es.io:9243/37827/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:40610)

Expected behavior:
No error is expected.

Screenshots (if relevant):
Screen Shot 2021-02-01 at 8 38 12 PM

image

image

image

Errors in browser console (if relevant): None

Provide logs and/or server output (if relevant): N/A

Any additional context: Only tested on one deployment

cc: @MadameSheema have you seen this behavior?
cc: @paulewing

@MikePaquette MikePaquette added bug Fixes for quality problems that affect the customer experience Feature:Detection Rules Security Solution rules and Detection Engine Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Feb 2, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@peluja1012
Copy link
Contributor

@MikePaquette Thanks for reporting this. This behavior is present in previous release versions as well. It occurs because we validate EQL queries upon rule creation and rule edit. Validation takes into account the configured indices. If none of the indices exist we display the error you posted above. This error is valid because none of the indices exist and thus the rule will also fail upon rule execution. The logs-endpoint.events indices don't get created until the Elastic Endpoint package is installed. Here is a screenshot of a duplicated prebuilt rule failing execution with the same error due to missing indices:

image

While the observed behavior is expected, we could consider making a UX improvement such that we display the index error as first a class validation error as opposed to displaying it in an error toaster (which signals the user that there was an unhandled error).

Screen Shot 2021-02-02 at 1 34 02 PM

@MadameSheema MadameSheema added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Feb 3, 2021
@dontcallmesherryli
Copy link

Expected behavior, requires additional UX input to make it a better user experience.

@leegengyu
Copy link

leegengyu commented Jun 14, 2021

@peluja1012 I would like to seek clarification regarding what you mentioned: If none of the indices exist we display the error you posted above. This error is valid because none of the indices exist and thus the rule will also fail upon rule execution.

In my case, I am seeing the same error (with a small variant):

image

The Lateral Movement via Startup Folder rule stated 3 index patterns: logs-endpoint.events.*, winlogbeat-*, and logs-windows.*. I have only got winlogbeat-* active, but not the other 2.

However, despite the case, I am still getting error for this rule (and many others, since they typically specify those 3 index patterns). Could you advise on this please?

@peluja1012
Copy link
Contributor

Hi @leegengyu, could you please try executing the same EQL query using Kibana -> Dev Tools and let us know what error is reported? Also, what versions of Elasticsearch and Kibana are you running?

GET logs-endpoint.events.*,winlogbeat-*,logs-windows.*/_eql/search
{
  "query":"""
  <EQL query>
  """
}

@leegengyu
Copy link

@peluja1012 Thanks for getting back to me.

This error did not appear anymore (somehow). But I'll be sure to get back to here if it does.

Thank you once again!

@peluja1012 peluja1012 added Team:Detection Rule Management Security Detection Rule Management Team Feature:Event Correlation (EQL) Rule Security Solution Event Correlation (EQL) rule type labels Sep 14, 2021
@peluja1012 peluja1012 added Team:Detection Alerts Security Detection Alerts Area Team and removed Team:Detection Rule Management Security Detection Rule Management Team labels Aug 4, 2022
@yctercero yctercero added Team:Detection Engine Security Solution Detection Engine Area and removed Team:Detection Alerts Security Detection Alerts Area Team labels May 13, 2023
@yctercero
Copy link
Contributor

Addressed by #180407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Detection Rules Security Solution rules and Detection Engine Feature:Event Correlation (EQL) Rule Security Solution Event Correlation (EQL) rule type impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. needs design Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
Development

No branches or pull requests

7 participants