{
  "id": "CB-UBU-AUDIT-008",
  "standard": "ubuntu",
  "version": "0.1.2",
  "url": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-AUDIT-008",
  "json": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-AUDIT-008.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-AUDIT-008.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-008",
    "title": "Send system logs to a remote log server",
    "finding": {
      "title": "System logs are only stored on the system that produced them",
      "description": "An intruder with root access can erase the local logs, and a lost disk takes the history with it."
    },
    "status": "active",
    "profiles": [
      "core"
    ],
    "risk": {
      "severity": "medium"
    },
    "assessment": "manual",
    "tags": [
      "logging",
      "remote",
      "journald",
      "rsyslog"
    ],
    "description": "A copy of the logs must leave the system as they are produced, to a log server or a central\ncollection platform the system cannot modify. On Ubuntu, two ways fit the chosen logging system:\n\n- with the journal alone, `systemd-journal-upload` (package `systemd-journal-remote`) sends the\n  journal over HTTPS to a `systemd-journal-remote` server;\n- with rsyslog, an `omfwd` action sends messages over TCP, preferably with TLS\n  (CB-UBU-AUDIT-009).\n",
    "rationale": "Remote logs survive the compromise or loss of the system and are the reference when local logs\nhave been altered. They also allow correlating events across systems.\n",
    "impact": "Requires a log server and network flows to it. Messages are queued when the server is\nunreachable; size the queue so a long outage does not fill the disk.\n",
    "audit": {
      "manual": "1. With the journal alone: run `systemctl is-active systemd-journal-upload` and check `URL=` in\n   `systemd-analyze cat-config systemd/journal-upload.conf`.\n2. With rsyslog: look for an `action(type=\"omfwd\" target=...)` or `@@host` line with\n   `grep -Er 'omfwd|^\\s*[^#].*@@?' /etc/rsyslog.conf /etc/rsyslog.d/`.\n3. Confirm on the log server that recent messages from this system have arrived.\n"
    },
    "remediation": {
      "manual": "1. With the journal alone: install `systemd-journal-remote`, set `URL=https://<server>:19532`\n   and the client certificate in `/etc/systemd/journal-upload.conf.d/`, then run\n   `systemctl enable --now systemd-journal-upload`.\n2. With rsyslog: add to `/etc/rsyslog.d/60-remote.conf`:\n   ```\n   *.* action(type=\"omfwd\" target=\"<server>\" port=\"6514\" protocol=\"tcp\"\n              StreamDriver=\"gtls\" StreamDriverMode=\"1\" StreamDriverAuthMode=\"x509/name\"\n              queue.type=\"LinkedList\" queue.filename=\"fwd\" queue.saveOnShutdown=\"on\"\n              action.resumeRetryCount=\"-1\")\n   ```\n   then run `systemctl restart rsyslog`.\n",
      "rollback": "Disable `systemd-journal-upload`, or remove the forwarding file and restart rsyslog.\n"
    },
    "references": [
      {
        "title": "systemd-journal-upload.service(8), Ubuntu manual pages",
        "url": "https://manpages.ubuntu.com/manpages/noble/man8/systemd-journal-upload.service.8.html",
        "publisher": "Canonical",
        "kind": "vendor-doc",
        "accessed": "2026-10-19"
      },
      {
        "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-9(2)",
        "relation": "related"
      }
    ],
    "threats": [
      {
        "framework": "mitre-attack",
        "id": "T1070.002"
      }
    ],
    "related_controls": [
      {
        "id": "CB-UBU-AUDIT-009",
        "type": "related"
      }
    ],
    "authors": [
      {
        "name": "Alice",
        "github": "Sn0wAlice"
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}