mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-06 09:12:46 +01:00
fix: set ideal property to true for PowerShell rules in WELA.ps1
This commit is contained in:
4
WELA.ps1
4
WELA.ps1
@@ -397,7 +397,7 @@ function GuideYamatoSecurity
|
|||||||
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -valueName "EnableModuleLogging" -expectedValue 1
|
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -valueName "EnableModuleLogging" -expectedValue 1
|
||||||
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
|
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
|
||||||
$rules | ForEach-Object { $_.applicable = $enabled }
|
$rules | ForEach-Object { $_.applicable = $enabled }
|
||||||
$rules | ForEach-Object { $_.ideal = $enabled }
|
$rules | ForEach-Object { $_.ideal = $true }
|
||||||
$current = if ($enabled) { "Enabled" } else { "Disabled" }
|
$current = if ($enabled) { "Enabled" } else { "Disabled" }
|
||||||
$auditResult += [WELA]::New(
|
$auditResult += [WELA]::New(
|
||||||
"PowerShell",
|
"PowerShell",
|
||||||
@@ -417,7 +417,7 @@ function GuideYamatoSecurity
|
|||||||
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -valueName "EnableScriptBlockLogging" -expectedValue 1
|
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -valueName "EnableScriptBlockLogging" -expectedValue 1
|
||||||
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
|
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
|
||||||
$rules | ForEach-Object { $_.applicable = $enabled }
|
$rules | ForEach-Object { $_.applicable = $enabled }
|
||||||
$rules | ForEach-Object { $_.ideal = $enabled }
|
$rules | ForEach-Object { $_.ideal = $true }
|
||||||
$current = if ($enabled) { "Enabled" } else { "Disabled" }
|
$current = if ($enabled) { "Enabled" } else { "Disabled" }
|
||||||
$auditResult += [WELA]::New(
|
$auditResult += [WELA]::New(
|
||||||
"PowerShell",
|
"PowerShell",
|
||||||
|
|||||||
Reference in New Issue
Block a user