Skip to content

Commit 8d9822e

Browse files
authored
[Rule Tuning] Fix process.pe.original_file_name Conditions (#5101)
* [Rule Tuning] Fix process.pe.original_file_name Conditions * --
1 parent d69ede2 commit 8d9822e

9 files changed

+22
-28
lines changed

rules/windows/collection_winrar_encryption.toml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/12/04"
33
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/09/12"
66

77
[rule]
88
author = ["Elastic"]
@@ -60,14 +60,6 @@ references = [
6060
]
6161
risk_score = 47
6262
rule_id = "45d273fb-1dca-457d-9855-bcb302180c21"
63-
setup = """## Setup
64-
65-
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
66-
events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
67-
Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
68-
`event.ingested` to @timestamp.
69-
For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
70-
"""
7163
severity = "medium"
7264
tags = [
7365
"Domain: Endpoint",
@@ -89,8 +81,8 @@ process where host.os.type == "windows" and event.type == "start" and
8981
(
9082
(
9183
(
92-
process.name:"rar.exe" or ?process.code_signature.subject_name == "win.rar GmbH" or
93-
?process.pe.original_file_name == "Command line RAR"
84+
process.name : ("rar.exe", "WinRAR.exe") or ?process.code_signature.subject_name == "win.rar GmbH" or
85+
?process.pe.original_file_name == "WinRAR.exe"
9486
) and
9587
process.args == "a" and process.args : ("-hp*", "-p*", "/hp*", "/p*")
9688
) or

rules/windows/defense_evasion_clearing_windows_console_history.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2021/11/22"
33
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/09/12"
66

77
[rule]
88
author = ["Austin Songer"]
@@ -86,7 +86,7 @@ query = '''
8686
process where host.os.type == "windows" and event.type == "start" and
8787
(
8888
process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") or
89-
?process.pe.original_file_name in ("powershell.exe", "pwsh.dll", "powershell_ise.exe")
89+
?process.pe.original_file_name in ("PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE")
9090
) and
9191
(
9292
process.args : "*Clear-History*" or

rules/windows/defense_evasion_clearing_windows_event_logs.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/02/18"
33
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/09/12"
66

77
[rule]
88
author = ["Elastic"]
@@ -88,7 +88,7 @@ process where host.os.type == "windows" and event.type == "start" and
8888
(
8989
(
9090
process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") or
91-
?process.pe.original_file_name in ("powershell.exe", "pwsh.dll", "powershell_ise.exe")
91+
?process.pe.original_file_name in ("PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE")
9292
) and
9393
process.args : "Clear-EventLog"
9494
)

rules/windows/defense_evasion_defender_exclusion_via_powershell.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2021/07/20"
33
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/09/12"
66

77
[rule]
88
author = ["Elastic"]
@@ -100,7 +100,7 @@ type = "eql"
100100

101101
query = '''
102102
process where host.os.type == "windows" and event.type == "start" and
103-
(process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") or ?process.pe.original_file_name in ("powershell.exe", "pwsh.dll", "powershell_ise.exe")) and
103+
(process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") or ?process.pe.original_file_name in ("PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE")) and
104104
process.args : ("*Add-MpPreference*", "*Set-MpPreference*") and
105105
process.args : ("*-Exclusion*")
106106
'''

rules/windows/defense_evasion_disabling_windows_defender_powershell.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2021/07/07"
33
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/09/12"
66

77
[rule]
88
author = ["Elastic"]
@@ -90,7 +90,7 @@ query = '''
9090
process where host.os.type == "windows" and event.type == "start" and
9191
(
9292
process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") or
93-
?process.pe.original_file_name in ("powershell.exe", "pwsh.dll", "powershell_ise.exe")
93+
?process.pe.original_file_name in ("PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE")
9494
) and
9595
process.args : "Set-MpPreference" and process.args : ("-Disable*", "Disabled", "NeverSend", "-Exclusion*")
9696
'''

rules/windows/defense_evasion_disabling_windows_logs.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2021/05/06"
33
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/09/12"
66

77
[rule]
88
author = ["Elastic", "Ivan Ninichuck", "Austin Songer"]
@@ -90,7 +90,7 @@ process where host.os.type == "windows" and event.type == "start" and
9090
(
9191
(
9292
process.name : ("pwsh.exe", "powershell.exe", "powershell_ise.exe") or
93-
?process.pe.original_file_name in ("pwsh.exe", "powershell.exe", "powershell_ise.exe")
93+
?process.pe.original_file_name in ("PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE")
9494
) and
9595
process.args : "Set-Service" and process.args: "EventLog" and process.args : "Disabled"
9696
) or

rules/windows/defense_evasion_powershell_windows_firewall_disabled.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2021/10/15"
33
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/09/12"
66

77
[rule]
88
author = ["Austin Songer"]
@@ -96,7 +96,7 @@ query = '''
9696
process where host.os.type == "windows" and event.type == "start" and
9797
(
9898
process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") or
99-
?process.pe.original_file_name in ("powershell.exe", "pwsh.dll", "powershell_ise.exe")
99+
?process.pe.original_file_name in ("PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE")
100100
) and
101101
process.args : "*Set-NetFirewallProfile*" and
102102
process.args : "*-Enabled*" and process.args : "*False*" and

rules/windows/initial_access_suspicious_ms_exchange_worker_child_process.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2021/03/08"
33
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/09/12"
66

77
[rule]
88
author = ["Elastic"]
@@ -85,8 +85,10 @@ type = "eql"
8585
query = '''
8686
process where host.os.type == "windows" and event.type == "start" and
8787
process.parent.name : "w3wp.exe" and process.parent.args : "MSExchange*AppPool" and
88-
(process.name : ("cmd.exe", "powershell.exe", "pwsh.exe", "powershell_ise.exe") or
89-
?process.pe.original_file_name in ("cmd.exe", "powershell.exe", "pwsh.dll", "powershell_ise.exe"))
88+
(
89+
(process.name : ("cmd.exe", "powershell.exe", "pwsh.exe", "powershell_ise.exe") or
90+
?process.pe.original_file_name in ("Cmd.Exe", "PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE"))
91+
)
9092
'''
9193

9294

rules/windows/initial_access_webshell_screenconnect_server.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/03/26"
33
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/09/12"
66

77
[rule]
88
author = ["Elastic"]
@@ -86,7 +86,7 @@ query = '''
8686
process where host.os.type == "windows" and event.type == "start" and
8787
process.parent.name : "ScreenConnect.Service.exe" and
8888
(process.name : ("cmd.exe", "powershell.exe", "pwsh.exe", "powershell_ise.exe", "csc.exe") or
89-
?process.pe.original_file_name in ("cmd.exe", "powershell.exe", "pwsh.dll", "powershell_ise.exe"))
89+
?process.pe.original_file_name in ("Cmd.Exe", "PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE"))
9090
'''
9191

9292

0 commit comments

Comments
 (0)