
Summary
This rule detects changes made to the PowerShell script execution policy that may compromise the security of a Windows system. Specifically, it identifies the use of the 'Set-ExecutionPolicy' cmdlet to adjust the execution policy to less secure levels such as 'Unrestricted' or 'Bypass.' Such changes can allow potentially malicious scripts to execute without restrictions, undermining the integrity of the system. The detection mechanism looks for script block logging events where specified potentially insecure settings are applied, ensuring that the conditions for detection are precise to mitigate the risk of false positives. An exception for the command context is included, allowing legitimate administrative use cases to be excluded from alerts if related to Chocolatey package installation scripts. The rule is relevant only when Script Block Logging is enabled, ensuring it catches all relevant events accurately while minimizing the chances of misclassifying legitimate administrative actions.
Categories
- Endpoint
- Windows
Data Sources
- Script
- Process
Created: 2021-10-20