{
  "id": "CB-UBU-AUDIT-006",
  "standard": "ubuntu",
  "version": "main",
  "url": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUDIT-006",
  "json": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUDIT-006.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUDIT-006.yml",
  "profiles_effective": [
    "core",
    "server",
    "server-hardened",
    "desktop",
    "desktop-hardened"
  ],
  "license": "Text CC BY 4.0, code Apache-2.0",
  "attribution": "CIRSEC Baselines, https://baselines.cirsec.org",
  "control": {
    "id": "CB-UBU-AUDIT-006",
    "title": "Review which messages rsyslog writes and where",
    "finding": {
      "title": "The rsyslog rules have not been reviewed against the site logging needs",
      "description": "Security messages may be missing from the files that are kept, monitored or forwarded."
    },
    "status": "active",
    "profiles": [
      "core"
    ],
    "risk": {
      "severity": "low"
    },
    "assessment": "manual",
    "tags": [
      "rsyslog",
      "logging"
    ],
    "applicability": {
      "facts": [
        "rsyslog"
      ],
      "conditions": "Only when rsyslog is installed.\n"
    },
    "description": "rsyslog sorts messages into files by facility and priority with the rules in\n`/etc/rsyslog.conf` and `/etc/rsyslog.d/*.conf`. Ubuntu writes, among others,\n`/var/log/syslog`, `/var/log/auth.log` (authentication), `/var/log/kern.log` and\n`/var/log/user.log`. The site must check that the messages it needs (authentication, privilege\nuse, kernel, critical errors of its services) end up in files that are kept long enough and\nmonitored.\n",
    "rationale": "A message that is not written anywhere cannot be investigated. The defaults are generic; only\nthe administrator knows which services and events matter.\n",
    "impact": "None known.\n",
    "audit": {
      "manual": "1. Read the rules with `grep -Ev '^\\s*(#|$)' /etc/rsyslog.conf /etc/rsyslog.d/*.conf`.\n2. Check that `auth,authpriv.*` goes to a dedicated file (`/var/log/auth.log` on Ubuntu), that\n   `kern.*` and `*.emerg` are logged, and that the messages of the services this system runs\n   reach a file or the remote log server.\n3. Check that each file is rotated (CB-UBU-AUDIT-007) and kept as long as the site policy\n   requires.\n"
    },
    "remediation": {
      "manual": "Add the missing rules in a file of `/etc/rsyslog.d/`, for example:\n```\nauth,authpriv.*   /var/log/auth.log\nkern.*            -/var/log/kern.log\n*.emerg           :omusrmsg:*\n```\nThen run `systemctl restart rsyslog`.\n",
      "rollback": "Remove the added file and run `systemctl restart rsyslog`.\n"
    },
    "references": [
      {
        "title": "rsyslog.conf(5), Ubuntu manual pages",
        "url": "https://manpages.ubuntu.com/manpages/noble/man5/rsyslog.conf.5.html",
        "publisher": "Canonical",
        "kind": "vendor-doc",
        "accessed": "2026-10-19"
      },
      {
        "title": "ANSSI-BP-028 v2.0 - Recommandations de configuration d'un système GNU/Linux (R71)",
        "url": "https://messervices.cyber.gouv.fr/documents-guides/fr_np_linux_configuration-v2.0.pdf",
        "publisher": "ANSSI",
        "kind": "guide",
        "accessed": "2026-10-19"
      }
    ],
    "mappings": [
      {
        "framework": "anssi-linux",
        "framework_version": "2.0",
        "id": "R71",
        "relation": "partial"
      },
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "AU-2",
        "relation": "related"
      }
    ],
    "threats": [
      {
        "framework": "cwe",
        "id": "CWE-778"
      }
    ],
    "related_controls": [
      {
        "id": "CB-UBU-AUDIT-005",
        "type": "related"
      }
    ],
    "authors": [
      {
        "name": "Alice",
        "github": "Sn0wAlice"
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}