TMAegisBeta
More rules for windows

Windows (desktop and server)

TMA-WIN10-2.2.19

Ensure 'Deny log on locally' to include 'Guests'

HighLevel 1Automatedwindows

Description

This security setting determines which users are prevented from logging on at the computer. This policy setting supersedes the Allow log on locally policy setting if an account is subject to both policies. The recommended state for this setting is to include: Guests. Important: If you apply this security policy to the Everyone group, no one will be able to log on locally.

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*SeDenyInteractiveLogonRight\s*=' } | Select-Object -First 1; $v = if ($line) { ($line -split '=', 2)[1].Trim().Trim('"') } else { $null }; $have = @(if ($v) { $v -split ',' | ForEach-Object { $_.Trim().TrimStart('*') } | Where-Object { $_ } }); $missing = @('S-1-5-32-546') | Where-Object { $have -notcontains $_ }; if ($missing.Count -eq 0) { 'compliant' } else { 'non-compliant: ' + ($have -join ',') }
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\Local Policies\User Rights Assignment\Deny log on locally

Properties

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

Check this host

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

shell
tmaegis scan --target windows