Skip to content

Commit 532b68c

Browse files
authored
[Rule Tuning] PowerShell Script Block Logging Disabled (#4980)
1 parent e3a7ee9 commit 532b68c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

rules/windows/defense_evasion_disable_posh_scriptblocklogging.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -89,7 +89,15 @@ registry where host.os.type == "windows" and event.type == "change" and
8989
"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\\EnableScriptBlockLogging",
9090
"\\REGISTRY\\MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\\EnableScriptBlockLogging",
9191
"MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\\EnableScriptBlockLogging"
92-
) and registry.data.strings : ("0", "0x00000000")
92+
) and registry.data.strings : ("0", "0x00000000") and
93+
not (
94+
process.executable : (
95+
"?:\\Windows\\System32\\svchost.exe",
96+
"?:\\Windows\\System32\\DeviceEnroller.exe",
97+
"?:\\Windows\\system32\\omadmclient.exe",
98+
"?:\\Program Files (x86)\\N-able Technologies\\AutomationManagerAgent\\AutomationManager.AgentService.exe"
99+
) and user.id == "S-1-5-18"
100+
)
93101
'''
94102

95103

0 commit comments

Comments
 (0)