Get DomainPolicy with Powershell Script Block
The following analytic detects the execution of the `Get-DomainPolicy` cmdlet using PowerShell Script Block Logging (EventCode=4104). It leverages logs capturing script block text to identify attempts to obtain the…
Description
The following analytic detects the execution of the `Get-DomainPolicy` cmdlet using PowerShell Script Block Logging (EventCode=4104). It leverages logs capturing script block text to identify attempts to obtain the password policy in a Windows domain. This activity is significant as it indicates potential reconnaissance efforts by adversaries or Red Teams to gather domain policy information, which is crucial for planning further attacks. If confirmed malicious, this behavior could lead to detailed knowledge of domain security settings, aiding in privilege escalation or lateral movement within the network.
Detection logic
Detection requirements
- Platform
- IaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- powershell_script_block_logging_4104
Known benign triggers
- Administrators or power users may use this command for troubleshooting.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| attack.mitre.org/techniques/T1201/ | 6 |
| github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet | 7 |
| powersploit.readthedocs.io/en/latest/Recon/Get-DomainPolicy/ | 2 |
From the source
- At source
- Open at source
- Upstream identifier
- a360d2b2-065a-11ec-b0bf-acde48001122
- Tagged by the source as
- Active Directory DiscoveryEndpointendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securityendpoint
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Aug 26, 2026
- Version
- 1