Skip to content

Commit a4be733

Browse files
w0rk3rtradebot-elastic
authored andcommitted
[Rule Tuning] PowerShell Rules - Misc Tuning/Severity Bumps (#5486)
* [Rule Tuning] PowerShell Misc Tuning/Severity Bump * bump sev (cherry picked from commit a9bdfaa)
1 parent d06383a commit a4be733

7 files changed

+23
-20
lines changed

rules/windows/defense_evasion_posh_obfuscation_backtick.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -117,8 +117,8 @@ from logs-windows.powershell_operational* metadata _id, _version, _index
117117
agent.id,
118118
user.id
119119
120-
// Filter for scripts that match the pattern at least 10 times
121-
| where Esql.script_block_pattern_count >= 10
120+
// Filter for scripts that match the pattern at least 20 times
121+
| where Esql.script_block_pattern_count >= 20
122122
123123
| where file.name not like "TSS_*.psm1"
124124
// ESQL requires this condition, otherwise it only returns matches where file.name exists.

rules/windows/defense_evasion_posh_obfuscation_backtick_var.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -51,7 +51,7 @@ PowerShell, a powerful scripting language in Windows environments, can be exploi
5151
- Implement enhanced monitoring on the affected host and similar systems to detect any recurrence of obfuscation techniques or related suspicious activities.
5252
- Update endpoint protection and intrusion detection systems with indicators of compromise (IOCs) derived from the analysis to improve detection capabilities for similar threats in the future.
5353
"""
54-
risk_score = 21
54+
risk_score = 73
5555
rule_id = "d43f2b43-02a1-4219-8ce9-10929a32a618"
5656
setup = """## Setup
5757
@@ -71,7 +71,7 @@ Steps to implement the logging policy via registry:
7171
reg add "hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging" /v EnableScriptBlockLogging /t REG_DWORD /d 1
7272
```
7373
"""
74-
severity = "low"
74+
severity = "high"
7575
tags = [
7676
"Domain: Endpoint",
7777
"OS: Windows",

rules/windows/defense_evasion_posh_obfuscation_char_arrays.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -51,7 +51,7 @@ PowerShell, a powerful scripting language, is often targeted by adversaries for
5151
- Update endpoint protection and ensure that AMSI and other security features are fully enabled and configured to detect similar threats.
5252
- Escalate the incident to the security operations center (SOC) for further analysis and to determine if additional systems are affected.
5353
"""
54-
risk_score = 21
54+
risk_score = 73
5555
rule_id = "85e2d45e-a3df-4acf-83d3-21805f564ff4"
5656
setup = """## Setup
5757
@@ -71,7 +71,7 @@ Steps to implement the logging policy via registry:
7171
reg add "hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging" /v EnableScriptBlockLogging /t REG_DWORD /d 1
7272
```
7373
"""
74-
severity = "low"
74+
severity = "high"
7575
tags = [
7676
"Domain: Endpoint",
7777
"OS: Windows",

rules/windows/defense_evasion_posh_obfuscation_concat_dynamic.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -50,7 +50,7 @@ PowerShell is a powerful scripting language used for task automation and configu
5050
- Escalate the incident to the security operations team for further analysis and to determine if additional systems have been compromised.
5151
- Update endpoint protection and monitoring tools to enhance detection capabilities for similar obfuscation techniques, leveraging insights from the MITRE ATT&CK framework.
5252
"""
53-
risk_score = 21
53+
risk_score = 73
5454
rule_id = "083383af-b9a4-42b7-a463-29c40efe7797"
5555
setup = """## Setup
5656
@@ -70,7 +70,7 @@ Steps to implement the logging policy via registry:
7070
reg add "hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging" /v EnableScriptBlockLogging /t REG_DWORD /d 1
7171
```
7272
"""
73-
severity = "low"
73+
severity = "high"
7474
tags = [
7575
"Domain: Endpoint",
7676
"OS: Windows",

rules/windows/defense_evasion_posh_obfuscation_high_number_proportion.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/04/16"
33
integration = ["windows"]
44
maturity = "production"
5-
updated_date = "2025/12/09"
5+
updated_date = "2025/12/17"
66

77
[rule]
88
author = ["Elastic"]
@@ -119,12 +119,15 @@ from logs-windows.powershell_operational* metadata _id, _version, _index
119119
user.id
120120
121121
// Filter for scripts with high numeric character ratio
122-
| where Esql.script_block_ratio > 0.30
122+
| where Esql.script_block_ratio > 0.35
123123
124124
// Exclude Windows Defender Noisy Patterns
125125
| where not (
126126
file.directory == "C:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Downloads" or
127-
file.directory like "C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\DataCollection*"
127+
file.directory like (
128+
"C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\DataCollection*",
129+
"C:\\\\Program Files\\\\SentinelOne\\\\Sentinel Agent*"
130+
)
128131
)
129132
// ESQL requires this condition, otherwise it only returns matches where file.directory exists.
130133
or file.directory is null

rules/windows/defense_evasion_posh_obfuscation_string_format.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -117,8 +117,8 @@ from logs-windows.powershell_operational* metadata _id, _version, _index
117117
agent.id,
118118
user.id
119119
120-
// Filter for scripts that match the pattern at least four times
121-
| where Esql.script_block_pattern_count >= 4
120+
// Filter for scripts that match the pattern at least five times
121+
| where Esql.script_block_pattern_count >= 5
122122
123123
// Exclude Noisy Patterns
124124

rules_building_block/defense_evasion_posh_obfuscation_proportion_special_chars.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ bypass_bbr_timing = true
33
creation_date = "2025/04/16"
44
integration = ["windows"]
55
maturity = "production"
6-
updated_date = "2025/12/09"
6+
updated_date = "2025/12/17"
77

88
[rule]
99
author = ["Elastic"]
@@ -86,7 +86,7 @@ from logs-windows.powershell_operational* metadata _id, _version, _index
8686
user.id
8787
8888
// Filter for scripts with high special character ratio
89-
| where Esql.script_block_ratio > 0.30
89+
| where Esql.script_block_ratio > 0.35
9090
9191
// Exclude Noisy Patterns
9292
| where not file.directory like "C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\DataCollection\\\\*"

0 commit comments

Comments
 (0)