Docker
TMA-DOCKER-1.1.9
Ensure auditing is configured for Docker files and directories - docker.sock
MédiaNível 2Automatizadadocker
Descrição
Auditing the Docker socket /var/run/docker.sock records changes and use of a security-critical Docker component, supporting incident investigation. The audit lists the loaded kernel audit rules (auditctl -l, needs root) and looks for a watch on docker.sock. Not applicable when the Docker socket /var/run/docker.sock is not present.
Como é verificado
Método de auditoria: Comando shell
shell
out=$(auditctl -l 2>/dev/null) || exit 1; printf '%s\n' "$out" | grep -q -e 'docker.sock' && echo compliant || echo missing- Saída esperada
compliant
Como é corrigido
Método de correção: Orientação ou patch de infraestrutura
Add '-w /var/run/docker.sock -k docker' to /etc/audit/rules.d/docker.rules, then load it with 'augenrules --load' (or restart auditd).
Propriedades
- Sistemas operacionais
- Qualquer
- Tags
- dockerauditdhost
- Referência
- CIS Docker Benchmark v1.9.0 - 1.1.9 Ensure auditing is configured for Docker files and directories - docker.sock
Verificar este host
Execute isto em uma máquina que você tenha permissão para auditar. A varredura é somente leitura.
shell
tmaegis scan --target docker --level 2