Windows Password Policy Modification to Unlimited via Net.exe
Adversaries use 'net accounts /maxpwage:unlimited' to disable password expiration policies on Windows hosts, effectively ensuring compromised credentials remain valid for long-term persistence.
Adversaries and commodity malware frequently leverage the built-in Windows net.exe or net1.exe utilities to weaken security posture during post-exploitation activities. By executing the command net accounts /maxpwage:unlimited, an attacker forces the local or domain password policy to stop enforcing expiration requirements. This prevents security controls like forced password rotations from invalidating credentials that the attacker has compromised. This technique is often observed as part of a persistence mechanism, allowing the actor to maintain stable access to a victim's account for extended periods without needing to re-authenticate or re-compromise the user. Defenders should treat this command as a high-fidelity indicator of credential maintenance activity rather than routine administrative work, as such policy modifications are rarely performed in production environments.
Attack Chain
- Initial compromise of a host, often through credential dumping or malicious payload execution.
- Execution of a shell or command-line interface (e.g., cmd.exe, powershell.exe) by the malicious process.
- The malicious process invokes
net.exeornet1.exeusing a child process creation event. - The attacker passes the arguments
accountsfollowed by/maxpwage:unlimitedto the utility. - The Windows Service Control Manager or Netlogon service processes the request to update the SAM or Active Directory object policy.
- The system configuration is updated to ignore expiration intervals for user accounts.
- The attacker maintains long-term, uninterrupted access to the account, bypassing organizational password rotation requirements.
Impact
Successful execution of this command results in a weakened security posture by disabling mandatory password rotation. This allows attackers to maintain persistence on compromised accounts for an indefinite period, increasing the risk of data exfiltration and further lateral movement. This activity is frequently associated with ransomware operators and crypto-stealing malware attempting to lock in access to infected environments.
Recommendation
- Deploy the provided Sigma rule to detect the execution of
net accountswith themaxpwageparameter. - Implement auditing for process creation events (Event ID 4688 or Sysmon Event ID 1) that include command-line arguments to ensure visibility into the full utility path and parameters.
- Investigate any instances of
net.exespawning from non-administrative processes or unexpected parent binaries (e.g., malware droppers). - Use the
drilldown_searchesprovided in security monitoring platforms to review the history of affected endpoints and identify related malicious activity, such as risk events from the preceding 7 days.
Immediate actions
Deploy the Sigma rule to monitor for password policy changes.
Threat Hunt
Search for historical process creation events involving 'net accounts' and 'unlimited'.
Data: Endpoint process creation logs
Mitigations
Restrict administrative rights to the 'net' utility to authorized personnel.
T1489
Detection coverage 1
Detect Windows Password Policy Modification via Net.exe
mediumDetects the use of net.exe or net1.exe to set the maximum password age policy to unlimited.
Detection queries are available on the platform. Get full rules →