TMAegisBêta
Plus de règles pour windows

Windows (desktop and server)

TMA-WIN2025-2.2.36

Ensure 'Log on as a batch job' is set to 'Administrators' (DC Only)

MoyenneNiveau 2Automatiséewindows

Description

This policy setting allows accounts to log on using the task scheduler service. Because the task scheduler is often used for administrative purposes, it may be needed in enterprise environments. However, its use should be restricted in high security environments to prevent misuse of system resources or to prevent threat actors from using the right to launch malicious code after gaining user level access to a computer. The recommended state for this setting is: Administrators. Note: Certain policy settings must be configured in the Default Domain Controller Policy to ensure they are applied glo

Méthode de vérification

Méthode d'audit: Commande shell

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*SeBatchLogonRight\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 { $_ } }); if ((($have | Sort-Object -Unique) -join ',') -eq 'S-1-5-32-544') { 'compliant' } else { 'non-compliant: ' + ($have -join ',') }
Sortie attendue
compliant

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

Set through Group Policy (domain policy for domain members): Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Log on as a batch job

Propriétés

Systèmes d'exploitation
windows-server-2025-dc
Étiquettes
cis-convertedseceditwindows
Référence
CIS Microsoft Windows Server 2025 Benchmark v2.1.0 - 2.2.36

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target windows --level 2