The default Docker configuration file should be audited on RHEL

docker

Classification:

compliance

Framework:

cis-docker

Control:

1.1.13

이 페이지는 아직 영어로 제공되지 않습니다. 현재 번역 작업을 진행 중입니다.
현재 번역 프로젝트에 대해 궁금한 점이나 의견이 있으시면 언제든지 문의하세요!

Description

The /etc/sysconfig/docker file should carry an audit rule, so that the audit log records every change to it and every use of it.

Rationale

On RHEL and Amazon Linux, /etc/sysconfig/docker can set options of the Docker daemon. An audit rule on it records who read, changed, or ran it, and when. An investigation of a compromise needs this record.

Audit

List the loaded audit rules and look for /etc/sysconfig/docker:

auditctl -l | grep /etc/sysconfig/docker

Datadog passes the rule when a loaded audit rule watches /etc/sysconfig/docker, fails it when the path exists without a watch, and reports it not applicable when the path is absent.

Remediation

Add a watch for the path to a file in /etc/audit/rules.d, then load the rules:

echo "-w /etc/sysconfig/docker -k docker" >> /etc/audit/rules.d/docker.rules
augenrules --load

Impact

Every use or change of the path adds a record to the audit log, which needs rotation and room of its own.

Default value

A new installation leaves the audit rules to the administrator, and the rule fails until the watch is added.

References

  1. https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/system_design_guide/auditing-the-system_system-design-guide