PowerShell GPO Configuration Modification
Adversaries may modify Group Policy settings via PowerShell to impair defensive capabilities or maintain persistence within a Windows environment.
Adversaries often attempt to modify Group Policy Objects (GPO) to change system configurations, disable security controls, or establish persistence. By leveraging PowerShell to interact with the Windows Registry or specific GPO configuration paths, attackers can bypass security defaults or disable features such as Windows SmartScreen. This technique falls under the umbrella of defense impairment and privilege escalation, as successful modifications typically require administrative or SYSTEM level privileges. Monitoring for PowerShell script blocks that reference critical GPO-related registry keys provides visibility into unauthorized configuration changes that could impact the security posture of the endpoint or the wider domain environment.
Impact
Successful modification of GPO settings can lead to the widespread disablement of security features, unauthorized persistence, and the potential for privilege escalation across the enterprise. Unauthorized changes to policy refresh times or SmartScreen settings can reduce the effectiveness of endpoint protection platforms and increase the likelihood of subsequent malicious actions going undetected.
Recommendation
Detection engineering teams should implement monitoring for PowerShell script blocks referencing GPO registry paths.
- Deploy the provided Sigma rule to capture script block logging events (Event ID 4104) that target GPO registry keys.
- Ensure PowerShell Script Block Logging is enabled across the environment to provide the necessary telemetry.
- Correlate detections with GPO backup logs and Active Directory audit logs to verify if changes were authorized via standard management tools.
Immediate actions
Enable PowerShell Script Block Logging (Event ID 4104) across all endpoints
Threat Hunt
Search for script block logs containing targeted GPO registry paths
Data: Event ID 4104
Mitigations
Restrict write access to sensitive HKLM registry paths to authorized system accounts only
T1484.001
Detection coverage 1
Detect GPO Configuration Modification via PowerShell
mediumDetects PowerShell script blocks attempting to modify registry keys associated with Group Policy settings.
Detection queries are available on the platform. Get full rules →