TMAegis
Más reglas para bottlerocket

TMA-BOTTLEROCKET-ADMIN-CONTAINER

Ensure the admin host container is disabled when not in use

AltaNivel 1Automatizadabottlerocket

Descripción

The admin container is privileged and can obtain a root shell on the host (sheltie) and runs an SSH server. It should be enabled only for troubleshooting. The audit runs "apiclient get settings.host-containers.admin.enabled"; run it from the control container (for example via SSM: apiclient exec control ...), since running it inside the admin container proves the container is on and the rule will fail.

Cómo se verifica

Método de auditoría: Comando de shell

shell
out=$(apiclient get settings.host-containers.admin.enabled 2>/dev/null) || exit 1
v=$(printf '%s' "$out" | tr -d ' \n' | sed -n 's/.*"enabled":\([a-z]*\).*/\1/p')
[ "$v" = false ] && echo compliant
Salida esperada
compliant

Cómo se corrige

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

Set in user data: [settings.host-containers.admin] enabled = false, or after troubleshooting run from the control container: apiclient set host-containers.admin.enabled=false.

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
bottlerockethost-containersaccess-control
Referencia
CIS Bottlerocket Benchmark - Host containers / administrative access (verify section number for your release)

Verificar este host

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

shell
tmaegis scan --target bottlerocket