TMAegisBeta
More rules for windows

Windows (desktop and server)

TMA-WIN10-1.1.2

Ensure 'Maximum password age' is set to '365 or fewer days, but not 0'

HighLevel 1Automatedwindows

Description

This policy setting defines how long a user can use their password before it expires. Values for this policy setting range from 0 to 999 days. If you set the value to 0, the password will never expire. Because attackers can crack passwords, the more frequently you change the password the less opportunity an attacker has to use a cracked password. However, the lower this value is set, the higher the potential for an increase in calls to help desk support due to users having to change their password or forgetting which password is current. The recommended state for this setting is 365 or fewer d

How it is checked

Audit method: Shell command

shell
$f = Join-Path $env:TEMP ('tmaegis-' + [guid]::NewGuid().ToString() + '.inf'); secedit /export /cfg $f /areas SECURITYPOLICY USER_RIGHTS /quiet | Out-Null; $c = Get-Content $f -ErrorAction SilentlyContinue; Remove-Item $f -Force -ErrorAction SilentlyContinue; $line = $c | Where-Object { $_ -match '^\s*MaximumPasswordAge\s*=' } | Select-Object -First 1; $v = if ($line) { ($line -split '=', 2)[1].Trim().Trim('"') } else { $null }; if (($null -ne $v -and [int64]$v -le 365 -and [int64]$v -ne 0)) { 'compliant' } else { 'non-compliant: ' + $v }
Expected output
compliant

How it is fixed

Fix method: Guidance or infrastructure patch

Set through Group Policy (domain policy for domain members): Computer Configuration\Policies\Windows Settings\Security Settings\Account Policies\Password Policy\Maximum password age

Properties

Operating systems
windows-10
Tags
cis-convertedseceditwindows
Reference
CIS Microsoft Windows 10 Enterprise Benchmark v4.0.0 - 1.1.2

Check this host

Run this on a machine you are allowed to audit. The scan is read-only.

shell
tmaegis scan --target windows