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

[Rule Tuning] Potential Malicious File Downloaded from Google Drive #2980

Closed
BenB196 opened this issue Jul 30, 2023 · 3 comments
Closed

[Rule Tuning] Potential Malicious File Downloaded from Google Drive #2980

BenB196 opened this issue Jul 30, 2023 · 3 comments
Assignees
Labels
community Rule: Tuning tweaking or tuning an existing rule stale 60 days of inactivity

Comments

@BenB196
Copy link

BenB196 commented Jul 30, 2023

Link to rule

https://github.com/elastic/detection-rules/blob/main/rules/cross-platform/command_and_control_google_drive_malicious_file_download.toml

Description

In relatively large deployments (500+ hosts) this rule will never successfully run and will always timeout.

This appears to be a cardinality issue mainly with:

sequence by host.id, process.entity_id with maxspan=30s
[any where
/* Look for processes started or libraries loaded from untrusted or unsigned Windows, Linux or macOS binaries */
(event.action in ("exec", "fork", "start", "load")) or

If you were to look at a 9-minute window with just the first query part (event.action in ("exec", "fork", "start", "load")), there are a significant number of matches:

image

This part has an extremely high cardinality, with process.entity_id alone have ~250k unique values.

image

If you look at the combine host.id and process.entity_id you can better see the cardinality problem.

image

I think that this cardinality issue is causing excessively long running rule times.

Example Data

Timeout Errors:

image

@BenB196 BenB196 added the Rule: Tuning tweaking or tuning an existing rule label Jul 30, 2023
@botelastic
Copy link

botelastic bot commented Oct 27, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added the stale 60 days of inactivity label Oct 27, 2023
@botelastic
Copy link

botelastic bot commented Nov 3, 2023

This has been closed due to inactivity. If you feel this is an error, please re-open and include a justifying comment.

@w0rk3r
Copy link
Contributor

w0rk3r commented Jan 16, 2024

Tunings to this rule are being tracked in this issue: #3391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Rule: Tuning tweaking or tuning an existing rule stale 60 days of inactivity
Projects
None yet
Development

No branches or pull requests

3 participants