Detect Password Policy Discovery in IBM QRadar
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.
MITRE ATT&CK
- Tactic
- Discovery
- Technique
- T1201 Password Policy Discovery
- Canonical reference
- https://attack.mitre.org/techniques/T1201/
QRadar Detection Query
SELECT DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') AS EventTime,
sourceip, username, LOGSOURCENAME(logsourceid) AS LogSource,
"Process Name", "Command",
CASE
WHEN LOWER("Command") LIKE '%accounts%' AND (LOWER("Process Name") LIKE '%net.exe' OR LOWER("Process Name") LIKE '%net1.exe') THEN 'net accounts'
WHEN LOWER("Command") LIKE '%get-addefaultdomainpasswordpolicy%' THEN 'PowerShell AD Cmdlet'
WHEN LOWER("Command") LIKE '%get-adfinegrainedpasswordpolicy%' THEN 'PowerShell AD Cmdlet'
WHEN LOWER("Command") LIKE '%get-passpol%' THEN 'PoshC2 Get-PassPol'
WHEN LOWER("Command") LIKE '%ntdsaudit%' THEN 'NtdsAudit Utility'
WHEN LOWER("Command") LIKE '%-pass-pol%' OR LOWER("Command") LIKE '%--password-policy%' THEN 'CrackMapExec-style'
WHEN LOWER("Process Name") LIKE '%chage%' AND (LOWER("Command") LIKE '% -l%' OR LOWER("Command") LIKE '%--list%') THEN 'Linux chage'
WHEN LOWER("Process Name") LIKE '%pwpolicy%' AND LOWER("Command") LIKE '%getaccountpolicies%' THEN 'macOS pwpolicy'
ELSE 'Other'
END AS DiscoveryMethod
FROM events
WHERE LOGSOURCETYPEID IN (12, 13, 45, 143, 352)
AND starttime > NOW() - 86400000
AND (
(LOWER("Process Name") LIKE '%net.exe' OR LOWER("Process Name") LIKE '%net1.exe') AND LOWER("Command") LIKE '%accounts%'
OR (LOWER("Process Name") LIKE '%powershell.exe' OR LOWER("Process Name") LIKE '%pwsh.exe')
AND (
LOWER("Command") LIKE '%get-addefaultdomainpasswordpolicy%'
OR LOWER("Command") LIKE '%get-adfinegrainedpasswordpolicy%'
OR LOWER("Command") LIKE '%get-passpol%'
)
OR LOWER("Command") LIKE '%ntdsaudit%'
OR LOWER("Command") LIKE '%-pass-pol%'
OR LOWER("Command") LIKE '%--password-policy%'
OR (LOWER("Process Name") LIKE '%chage%' AND (LOWER("Command") LIKE '% -l %' OR LOWER("Command") LIKE '%--list%'))
OR (LOWER("Process Name") LIKE '%pwpolicy%' AND LOWER("Command") LIKE '%getaccountpolicies%')
)
ORDER BY starttime DESC AQL query for QRadar detecting Password Policy Discovery via Windows Security Event ID 4688 and Sysmon Event ID 1 process creation logs. Identifies net accounts, PowerShell AD cmdlets, NtdsAudit, CrackMapExec, Linux chage, and macOS pwpolicy commands.
Data Sources
Required Tables
False Positives & Tuning
- Domain administrators executing periodic password policy audits as part of change management workflows
- Vulnerability management tools enumerating Active Directory configuration for compliance reporting
- Help desk staff using net accounts to verify lockout thresholds when assisting users
Other platforms for T1201
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Local Password Policy Discovery via net accounts
Expected signal: Sysmon Event ID 1: Process Create with Image ending in net.exe or net1.exe, CommandLine='net accounts'. Security Event ID 4688 (if command line auditing is enabled) with same details. Parent process will be cmd.exe or the calling shell.
- Test 2Domain Password Policy Discovery via net accounts /domain
Expected signal: Sysmon Event ID 1: Process Create with Image=net.exe, CommandLine='net accounts /domain'. Net.exe internally calls net1.exe which also generates a process creation event. The query contacts the PDC emulator — Sysmon Event ID 3 (Network Connect) may show a connection to the DC on port 445 or 135.
- Test 3Domain Password Policy via PowerShell Get-ADDefaultDomainPasswordPolicy
Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-ADDefaultDomainPasswordPolicy'. PowerShell ScriptBlock Log Event ID 4104 capturing the full command. Sysmon Event ID 7 (Image Load) may show Microsoft.ActiveDirectory.Management.dll being loaded.
- Test 4Linux Password Policy Discovery via PAM configuration
Expected signal: On systems with auditd: syscall audit records for openat()/read() on /etc/security/pwquality.conf and /etc/pam.d/common-password (auditd rule: -w /etc/pam.d/ -p r -k pam_policy_read). Process creation event for chage with -l argument. On MDE Linux agent: DeviceProcessEvents event for chage with ProcessCommandLine containing '-l'.
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.