Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions rules/windows/defense_evasion_masquerading_werfault.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2020/08/24"
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2025/05/05"
updated_date = "2025/08/12"

[transform]
[[transform.osquery]]
Expand Down Expand Up @@ -120,7 +120,10 @@ type = "eql"

query = '''
sequence by host.id, process.entity_id with maxspan = 5s
[process where host.os.type == "windows" and event.type:"start" and process.name : ("wermgr.exe", "WerFault.exe") and process.args_count == 1]
[process where host.os.type == "windows" and event.type:"start" and process.name : ("wermgr.exe", "WerFault.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[^\"].*""")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FP example
image

[network where host.os.type == "windows" and process.name : ("wermgr.exe", "WerFault.exe") and network.protocol != "dns" and
network.direction : ("outgoing", "egress") and destination.ip !="::1" and destination.ip !="127.0.0.1"
]
Expand Down
6 changes: 4 additions & 2 deletions rules/windows/defense_evasion_rundll32_no_arguments.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down Expand Up @@ -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[^\"].*""")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example FP
image

] 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
Expand Down
10 changes: 8 additions & 2 deletions rules/windows/defense_evasion_unusual_dir_ads.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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[^\"].*"""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example FP
image

)
'''


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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[^\"].*"""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example FP
image

)]
[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",
Expand Down
Loading