TMAegisBeta
Weitere Regeln für vmware

VMware ESXi

TMA-ESXI9-7.6

Virtual machines must limit console sharing.

MittelStufe 1Automatisiertvmware

Beschreibung

By default, remote console sessions can be connected to by more than one user at a time. Permit only one remote console connection to a VM at a time. Other attempts will be rejected until the first connection disconnects. Expected: RemoteDisplay.maxConnections = "1". The audit parses every .vmx file under /vmfs/volumes/ on the host and lists the VMs that do not comply; it passes when none are found (or no VMs exist). Runs in the ESXi Shell (busybox sh) as root.

So wird geprüft

Prüfmethode: Shell-Befehl

shell
command -v find >/dev/null 2>&1 || exit 1
out=$(find /vmfs/volumes/ -maxdepth 3 -type f -name '*.vmx' 2>/dev/null | while IFS= read -r f; do
  awk -v KEYRE='^remotedisplay[.]maxconnections$' -v MODE='eq' -v VAL='1' 'BEGIN { re = tolower(KEYRE) }
{ line = $0; sub(/^[ \t]+/, "", line); i = index(line, "="); if (i == 0) next
  k = tolower(substr(line, 1, i - 1)); sub(/[ \t]+$/, "", k)
  v = substr(line, i + 1); sub(/^[ \t]*"?/, "", v); sub(/"?[ \t\r]*$/, "", v); v = tolower(v)
  if (k ~ re) { seen = 1; if (MODE == "not" && v == tolower(VAL)) bad = bad " " k "=" v
                else if (MODE != "not" && MODE != "ge" && v != tolower(VAL)) bad = bad " " k "=" v
                else if (MODE == "ge" && (v + 0) < (VAL + 0)) bad = bad " " k "=" v } }
END { if ((MODE == "eq" || MODE == "ge") && !seen) bad = " " KEYRE " not set"
      if (bad != "") print FILENAME ":" bad }' "$f"
done)
[ -z "$out" ] && echo compliant || printf '%s\n' "$out" | head -n 25
Erwartete Ausgabe
compliant

So wird behoben

Behebungsmethode: Anleitung oder Infrastruktur-Patch

To set this configuration utilize the vSphere interface as follows: 1. Select the VM then select Actions followed by Edit Settings. 2. Click on the VM Options tab then expand Advanced. 3. Click on EDIT CONFIGURATION. 4. Click on ADD CONFIGURATION PARAMS then input RemoteDisplay.maxConnections with a value of 1. 5. Click OK, then OK again. Alternatively, run the following PowerCLI command for VMs that do not specify the setting: # Add the setting to all VMs Get-VM | New-AdvancedSetting -Name "RemoteDisplay.maxConnections" -value 1 Run the following PowerCLI command for VMs that specify the setting but have the wrong value for it: # Add the setting to all VMs Get-VM | New-AdvancedSetting ...

Eigenschaften

Betriebssysteme
Beliebig
Tags
vmwareesxivirtual-machine
Referenz
CIS VMware ESXi 9.0 Benchmark v1.0.0 - 7.6 Virtual machines must limit console sharing.

Diesen Host prüfen

Führen Sie dies auf einem Rechner aus, den Sie prüfen dürfen. Der Scan ist schreibgeschützt.

shell
tmaegis scan --target vmware