- Notifications
You must be signed in to change notification settings - Fork 603
[Rule Tuning] Fixes FPs related to a process.args_count bug #4971
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
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
| @@ -2,7 +2,7 @@ | |
creation_date = "2020/09/02" | ||
integration = ["endpoint", "windows"] | ||
maturity = "production" | ||
updated_date = "2025/03/20" | ||
updated_date = "2025/08/12" | ||
| ||
[transform] | ||
[[transform.osquery]] | ||
| @@ -116,7 +116,9 @@ query = ''' | |
sequence with maxspan=1h | ||
[process where host.os.type == "windows" and event.type == "start" and | ||
(process.name : "rundll32.exe" or process.pe.original_file_name == "RUNDLL32.EXE") and | ||
process.args_count == 1 | ||
(process.args_count == 1 and | ||
/* Excludes bug where a missing closing quote sets args_count to 1 despite extra args */ | ||
not process.command_line regex~ """\".*\.exe[^\"].*""") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. | ||
] by process.entity_id | ||
[process where host.os.type == "windows" and event.type == "start" and process.parent.name : "rundll32.exe" | ||
] by process.parent.entity_id | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
| @@ -2,7 +2,7 @@ | |
creation_date = "2020/12/04" | ||
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"] | ||
maturity = "production" | ||
updated_date = "2025/03/20" | ||
updated_date = "2025/08/12" | ||
| ||
[rule] | ||
author = ["Elastic"] | ||
| @@ -79,7 +79,13 @@ type = "eql" | |
| ||
query = ''' | ||
process where host.os.type == "windows" and event.type == "start" and | ||
process.args : "?:\\*:*" and process.args_count == 1 | ||
process.args : "?:\\*:*" and | ||
( | ||
process.args_count == 1 and | ||
| ||
/* Excludes bug where a missing closing quote sets args_count to 1 despite extra args */ | ||
not process.command_line regex~ """\".*\.exe[^\"].*""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. | ||
) | ||
''' | ||
| ||
| ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
| @@ -2,7 +2,7 @@ | |
creation_date = "2020/02/18" | ||
integration = ["endpoint", "windows"] | ||
maturity = "production" | ||
updated_date = "2025/03/20" | ||
updated_date = "2025/08/12" | ||
| ||
[rule] | ||
author = ["Elastic"] | ||
| @@ -73,7 +73,13 @@ type = "eql" | |
| ||
query = ''' | ||
sequence by host.id, process.entity_id with maxspan=1m | ||
[process where host.os.type == "windows" and event.type == "start" and process.name : "rundll32.exe" and process.args_count == 1] | ||
[process where host.os.type == "windows" and event.type == "start" and process.name : "rundll32.exe" and | ||
( | ||
process.args_count == 1 and | ||
| ||
/* Excludes bug where a missing closing quote sets args_count to 1 despite extra args */ | ||
not process.command_line regex~ """\".*\.exe[^\"].*""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. | ||
)] | ||
[network where host.os.type == "windows" and process.name : "rundll32.exe" and | ||
not cidrmatch(destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", | ||
"192.0.0.0/29", "192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
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.
FP example
