Password Policy Discovery
Adversaries may attempt to access detailed information about the password policy used within an enterprise network or cloud environment. Password policies enforce complexity requirements that make passwords harder to guess or crack through brute force. By discovering lockout thresholds, minimum length, and complexity rules, adversaries can tailor dictionary and brute force attacks to comply with the policy — maximizing credential testing while avoiding account lockout. Discovery occurs via command-line utilities (net accounts, Get-ADDefaultDomainPasswordPolicy, chage, pwpolicy), cloud APIs (AWS GetAccountPasswordPolicy), and network device CLIs. This technique is commonly observed in the early reconnaissance phase of intrusions by groups including OilRig, Turla, and Chimera.
let PasswordPolicyCommands = dynamic([
"net accounts",
"net.exe accounts",
"Get-ADDefaultDomainPasswordPolicy",
"Get-ADFineGrainedPasswordPolicy",
"Get-PassPol",
"pwpolicy",
"chage -l",
"chage --list",
"pam.d",
"common-password",
"pwquality",
"show aaa",
"NtdsAudit"
]);
let PasswordPolicyCmdlets = dynamic([
"Get-ADDefaultDomainPasswordPolicy",
"Get-ADFineGrainedPasswordPolicy",
"Get-ADFineGrainedPasswordPolicySubject",
"Get-PassPol"
]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (
// net accounts and net accounts /domain
(FileName =~ "net.exe" or FileName =~ "net1.exe") and ProcessCommandLine has "accounts"
) or (
// PowerShell AD password policy cmdlets
(FileName =~ "powershell.exe" or FileName =~ "pwsh.exe") and
ProcessCommandLine has_any (PasswordPolicyCmdlets)
) or (
// CrackMapExec or other tools querying password policy via LDAP/WMI patterns
ProcessCommandLine has_any ("NtdsAudit", "--pass-pol", "--password-policy")
) or (
// Linux: chage command reading password aging info
FileName =~ "chage" and (ProcessCommandLine has "-l" or ProcessCommandLine has "--list")
) or (
// macOS: pwpolicy command
FileName =~ "pwpolicy" and ProcessCommandLine has "getaccountpolicies"
)
| extend DiscoveryMethod = case(
ProcessCommandLine has "accounts /domain" or ProcessCommandLine has "accounts", "net accounts",
ProcessCommandLine has_any ("Get-ADDefaultDomainPasswordPolicy", "Get-ADFineGrainedPasswordPolicy"), "PowerShell AD Cmdlet",
ProcessCommandLine has "Get-PassPol", "PoshC2 Get-PassPol",
ProcessCommandLine has "NtdsAudit", "NtdsAudit Utility",
ProcessCommandLine has "chage", "Linux chage",
ProcessCommandLine has "pwpolicy", "macOS pwpolicy",
ProcessCommandLine has_any ("--pass-pol", "--password-policy"), "CrackMapExec-style",
"Other"
)
| extend IsDomainQuery = ProcessCommandLine has "/domain" or ProcessCommandLine has_any ("Get-ADDefaultDomainPasswordPolicy", "Get-ADFineGrainedPasswordPolicy")
| project Timestamp, DeviceName, AccountName, AccountDomain,
FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
DiscoveryMethod, IsDomainQuery
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- IT administrators running 'net accounts /domain' for routine password policy audits or compliance checks
- Security tools and vulnerability scanners (Nessus, Qualys, CIS-CAT) that enumerate password policy as part of baseline hardening assessments
- Active Directory management scripts and monitoring agents (e.g., Azure AD Connect health, SIEM onboarding scripts) that periodically query domain password policy
- Help desk staff using net accounts to verify lockout policy before resetting a locked account
- Automated identity governance platforms (SailPoint, Saviynt) querying fine-grained password policies during access reviews
References (13)
- https://attack.mitre.org/techniques/T1201/
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/net-accounts
- https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountPasswordPolicy.html
- https://superuser.com/questions/150675/how-to-display-password-policy-information-for-a-user-ubuntu
- https://www.jamf.com/jamf-nation/discussions/18574/user-password-policies-on-non-ad-machines
- https://www.us-cert.gov/ncas/alerts/TA18-106A
- https://github.com/clymb3r/PowerShell/blob/master/Get-PassHashes/Get-PassHashes.ps1
- https://github.com/byt3bl33d3r/CrackMapExec
- https://github.com/nettitude/PoshC2
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1201/T1201.md
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_net_password_policy_discovery.yml
- https://www.fireeye.com/blog/threat-research/2017/12/targeted-attack-in-middle-east-by-apt34.html
- https://research.nccgroup.com/2021/01/12/abusing-cloud-services-to-fly-under-the-radar/
Unlock Pro Content
Get the full detection package for T1201 including response playbook, investigation guide, and atomic red team tests.