TMAegisBeta
Más reglas para vmware

VMware ESXi

TMA-ESXI9-7.8

Ensure unauthorized modification and disconnection of devices is disabled

MediaNivel 1Automatizadavmware

Descripción

In a virtual machine, users and processes without root or administrator privileges can disconnect devices, such as network adapters and CD-ROM drives, and modify device settings within the guest operating system. These actions should be prevented. Expected: isolation.device.edit.disable = "TRUE". 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.

Cómo se verifica

Método de auditoría: Comando de shell

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='^isolation[.]device[.]edit[.]disable$' -v MODE='eq' -v VAL='TRUE' '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
Salida esperada
compliant

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

To prevent unauthorized device modifications and disconnections, run the following PowerCLI command: # Add the setting to all VMs Get-VM | New-AdvancedSetting -Name "isolation.device.edit.disable" -value $true

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
vmwareesxivirtual-machine
Referencia
CIS VMware ESXi 9.0 Benchmark v1.0.0 - 7.8 Ensure unauthorized modification and disconnection of devices is disabled

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target vmware