Skip to content

Commit bc6f9b5

Browse files
authored
[Rule Tuning] Potential PowerShell Obfuscated Script (#5389)
* [Rule Tuning] Potential PowerShell Obfuscated Script * Update defense_evasion_posh_obfuscation.toml
1 parent 02979fe commit bc6f9b5

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

rules/windows/defense_evasion_posh_obfuscation.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -91,7 +91,6 @@ event.category:process and host.os.type:windows and
9191
"[convert]::toint16" or
9292
"[char][int]$_" or
9393
("ConvertTo-SecureString" and "PtrToStringAuto") or
94-
".GetNetworkCredential().password" or
9594
"-BXor" or
9695
("replace" and "char") or
9796
"[array]::reverse" or
@@ -106,9 +105,33 @@ event.category:process and host.os.type:windows and
106105
("$VerbosePreference" and "[1,3]+'X'-Join''") or
107106
("rahc" or "ekovin" or "gnirts" or "ecnereferpesobrev" or "ecalper" or "cepsmoc" or "dillehs") or
108107
("System.Management.Automation.$([cHAr]" or "System.$([cHAr]" or ")+[cHAR]([byte]")
108+
) and
109+
not powershell.file.script_block_text : (
110+
("Copyright (c) 2018 Ansible Project" or "Export-ModuleMember -Function Add-CSharpType") and
111+
("[Object]$AnsibleModule" or "$AnsibleModule.Tmpdir")
109112
)
110113
'''
111114

115+
[[rule.filters]]
116+
[rule.filters.meta]
117+
negate = true
118+
[rule.filters.query.wildcard."file.directory"]
119+
case_insensitive = true
120+
value = "?:\\\\Program Files\\\\WindowsPowerShell\\\\Modules\\\\*"
121+
122+
[[rule.filters]]
123+
[rule.filters.meta]
124+
negate = true
125+
[rule.filters.query.wildcard."file.directory"]
126+
case_insensitive = true
127+
value = "?:\\\\Program Files (x86)\\\\WindowsPowerShell\\\\Modules\\\\*"
128+
129+
[[rule.filters]]
130+
[rule.filters.meta]
131+
negate = true
132+
[rule.filters.query.wildcard."file.path"]
133+
case_insensitive = true
134+
value = "?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\Downloads\\\\*"
112135

113136
[[rule.threat]]
114137
framework = "MITRE ATT&CK"

0 commit comments

Comments
 (0)