TMAegisBeta
Weitere Regeln für bottlerocket

Bottlerocket

TMA-BOTTLEROCKET-ADMIN-CONTAINER

Ensure the admin host container is disabled when not in use

HochStufe 1Automatisiertbottlerocket

Beschreibung

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.

So wird geprüft

Prüfmethode: Shell-Befehl

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
Erwartete Ausgabe
compliant

So wird behoben

Behebungsmethode: Anleitung oder Infrastruktur-Patch

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.

Eigenschaften

Betriebssysteme
Beliebig
Tags
bottlerockethost-containersaccess-control
Referenz
CIS Bottlerocket Benchmark - Host containers / administrative access (verify section number for your release)

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 bottlerocket