diff --git a/components/rsyslog.yml b/components/rsyslog.yml
index 32163ad5dea..2659542e666 100644
--- a/components/rsyslog.yml
+++ b/components/rsyslog.yml
@@ -14,6 +14,7 @@ rules:
- journald_compress
- journald_forward_to_syslog
- journald_storage
+- logging_services_active
- logwatch_configured_hostlimit
- logwatch_configured_splithosts
- package_logrotate_installed
diff --git a/components/systemd.yml b/components/systemd.yml
index 82f86d71e8b..63e370d936b 100644
--- a/components/systemd.yml
+++ b/components/systemd.yml
@@ -25,6 +25,7 @@ rules:
- journald_forward_to_syslog
- journald_disable_forward_to_syslog
- journald_storage
+- logging_services_active
- package_systemd-journal-remote_installed
- package_timesyncd_installed
- package_timesyncd_removed
diff --git a/controls/cis_ubuntu2404.yml b/controls/cis_ubuntu2404.yml
index 89ec9ea2219..c0b809c6ca8 100644
--- a/controls/cis_ubuntu2404.yml
+++ b/controls/cis_ubuntu2404.yml
@@ -2272,8 +2272,16 @@ controls:
levels:
- l1_server
- l1_workstation
- status: planned
- notes: TODO. Rule does not seem to be implemented, nor does it map to any rules in ubuntu2204 profile.
+ rules:
+ - logging_services_active
+ status: automated
+ notes: |
+ The title of this rule is misleading. The actual audit checks that at least
+ one of "rsyslogd" and "systemd-journald" is active.
+ See https://workbench.cisecurity.org/benchmarks/18959/tickets/23601
+
+ Remediation is not automated as the choice of correct logging service
+ is dependent on site policy.
- id: 6.1.2.1.1
title: Ensure systemd-journal-remote is installed (Automated)
diff --git a/linux_os/guide/system/logging/logging_services_active/oval/shared.xml b/linux_os/guide/system/logging/logging_services_active/oval/shared.xml
new file mode 100644
index 00000000000..c63eef2c35c
--- /dev/null
+++ b/linux_os/guide/system/logging/logging_services_active/oval/shared.xml
@@ -0,0 +1,47 @@
+
+ systemctl is-active rsyslog systemd-journald ++ The command should return at least one active. + +rationale: |- + The system should have one active logging service to avoid conflicts + and ensure consistency. + +severity: medium + +platform: machine + +warnings: + - general: |- + This rule does not come with a remediation. There are specific rules + for enabling each logging service which should be enabled instead. diff --git a/linux_os/guide/system/logging/logging_services_active/tests/journald.pass.sh b/linux_os/guide/system/logging/logging_services_active/tests/journald.pass.sh new file mode 100644 index 00000000000..9477273f676 --- /dev/null +++ b/linux_os/guide/system/logging/logging_services_active/tests/journald.pass.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# +# packages = rsyslog +# remediation = none + +systemctl stop syslog* +systemctl stop rsyslog* +systemctl start systemd-journald diff --git a/linux_os/guide/system/logging/logging_services_active/tests/multiple.pass.sh b/linux_os/guide/system/logging/logging_services_active/tests/multiple.pass.sh new file mode 100644 index 00000000000..7ff39625108 --- /dev/null +++ b/linux_os/guide/system/logging/logging_services_active/tests/multiple.pass.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# +# packages = rsyslog +# remediation = none + +systemctl start rsyslog +systemctl start systemd-journald diff --git a/linux_os/guide/system/logging/logging_services_active/tests/none.fail.sh b/linux_os/guide/system/logging/logging_services_active/tests/none.fail.sh new file mode 100644 index 00000000000..7c518755f90 --- /dev/null +++ b/linux_os/guide/system/logging/logging_services_active/tests/none.fail.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# +# packages = rsyslog +# remediation = none + +systemctl stop systemd-journald* +systemctl stop syslog* +systemctl stop rsyslog* diff --git a/linux_os/guide/system/network/firewall_single_service_active/oval/shared.xml b/linux_os/guide/system/network/firewall_single_service_active/oval/shared.xml index 0b34ebf54ec..b8254289c93 100644 --- a/linux_os/guide/system/network/firewall_single_service_active/oval/shared.xml +++ b/linux_os/guide/system/network/firewall_single_service_active/oval/shared.xml @@ -1,13 +1,7 @@