TMAegisBeta
More rules for windows

Windows (desktop and server)

TMA-WIN10-18.9.3.1

Ensure 'Include command line in process creation events' is set to 'Enabled'

HighLevel 1Automatedwindows

Description

This policy setting controls whether the process creation command line text is logged in security audit events when a new process has been created. The recommended state for this setting is: Enabled. Note: This feature that this setting controls was not originally supported in workstation OSes older than Windows 8.1. However, in February 2015 Microsoft added support for the feature to Windows 7 and Windows 8.0 via an update - KB3004375. Therefore, this setting is also important to set on those older OSes.

How it is checked

Audit method: Windows registry

registry
$bad = @(); $v = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit' -Name 'ProcessCreationIncludeCmdLine_Enabled' -ErrorAction SilentlyContinue).'ProcessCreationIncludeCmdLine_Enabled'; if (-not ($null -ne $v -and @(1) -contains [int64]$v)) { $bad += 'ProcessCreationIncludeCmdLine_Enabled=' + $v }; if ($bad.Count -eq 0) { 'compliant' } else { 'non-compliant: ' + ($bad -join ', ') }
Expected output
compliant

How it is fixed

Fix method: Shell command

shell
if (-not (Test-Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit')) { New-Item -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit' -Force | Out-Null }; New-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit' -Name 'ProcessCreationIncludeCmdLine_Enabled' -Value 1 -PropertyType DWord -Force | Out-Null

Properties

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

Check this host

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

shell
tmaegis scan --target windows