{
  "id": "CB-UBU-AUDIT-011",
  "standard": "ubuntu",
  "version": "main",
  "url": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUDIT-011",
  "json": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUDIT-011.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUDIT-011.yml",
  "profiles_effective": [
    "server-hardened",
    "desktop-hardened"
  ],
  "license": "Text CC BY 4.0, code Apache-2.0",
  "attribution": "CIRSEC Baselines, https://baselines.cirsec.org",
  "control": {
    "id": "CB-UBU-AUDIT-011",
    "title": "Install and run the audit daemon",
    "finding": {
      "title": "The kernel audit records are not collected",
      "description": "Without auditd, security relevant system calls, file changes and command runs are not recorded anywhere."
    },
    "status": "active",
    "profiles": [
      "server-hardened",
      "desktop-hardened"
    ],
    "risk": {
      "severity": "medium"
    },
    "assessment": "automated",
    "tags": [
      "auditd"
    ],
    "description": "The Linux audit framework records events chosen by rules (system calls, file accesses, program\nruns) with the identity of the user who logged in. `auditd` (package `auditd`) receives these\nrecords from the kernel and writes them to `/var/log/audit/audit.log`; `audispd-plugins` adds\nthe plugins that forward them (syslog, remote server). Neither is installed by default.\n\nThis control requires both packages and the `auditd` service enabled and running.\n",
    "rationale": "The audit log is the detailed, per-user record that investigations rely on after an intrusion.\nIt is also required by the audit rules controls CB-UBU-AUDIT-016 to CB-UBU-AUDIT-029.\n",
    "impact": "auditd uses a few megabytes of memory. The disk space used depends on the rules and on the\nactivity; see CB-UBU-AUDIT-013 and CB-UBU-AUDIT-014.\n",
    "setting": {
      "location": "auditd and audispd-plugins packages, auditd.service",
      "default_value": "Not installed",
      "recommended_value": "Installed, auditd.service enabled and active"
    },
    "audit": {
      "manual": "1. Run `dpkg-query -W -f='${Package} ${Status}\\n' auditd audispd-plugins`. Both must end with\n   `installed`.\n2. Run `systemctl is-enabled auditd` and `systemctl is-active auditd`. They must print\n   `enabled` and `active`.\n",
      "checks": [
        {
          "id": "auditd",
          "engine": "package",
          "description": "auditd is installed.",
          "spec": {
            "name": "auditd",
            "state": "installed"
          }
        },
        {
          "id": "plugins",
          "engine": "package",
          "description": "audispd-plugins is installed.",
          "spec": {
            "name": "audispd-plugins",
            "state": "installed"
          }
        },
        {
          "id": "service",
          "engine": "systemd-unit",
          "description": "auditd.service is enabled.",
          "spec": {
            "unit": "auditd.service",
            "state": "enabled"
          }
        }
      ]
    },
    "remediation": {
      "manual": "Run `apt-get install auditd audispd-plugins`, then `systemctl enable --now auditd`.\n",
      "effects": {
        "restart": "none",
        "disruption": "none",
        "lockout_risk": false
      },
      "rollback": "Run `apt-get purge auditd audispd-plugins`.\n",
      "scripts": [
        {
          "id": "auditd",
          "from_check": "auditd"
        },
        {
          "id": "plugins",
          "from_check": "plugins"
        },
        {
          "id": "service",
          "from_check": "service"
        }
      ]
    },
    "references": [
      {
        "title": "auditd.conf(5), Ubuntu manual pages",
        "url": "https://manpages.ubuntu.com/manpages/noble/man5/auditd.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 (R73)",
        "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": "R73",
        "relation": "partial",
        "note": "R73 also lists the events to record, covered by CB-UBU-AUDIT-016 to 029."
      },
      {
        "framework": "anssi-linux",
        "framework_version": "2.0",
        "id": "R33",
        "relation": "related"
      },
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "AU-12",
        "relation": "related"
      },
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "AU-3",
        "relation": "related"
      }
    ],
    "threats": [
      {
        "framework": "mitre-attack",
        "id": "T1562.012"
      },
      {
        "framework": "cwe",
        "id": "CWE-778"
      }
    ],
    "authors": [
      {
        "name": "Alice",
        "github": "Sn0wAlice"
      }
    ],
    "verified": [
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "20.04"
        ],
        "environment": "Proxmox VM, Ubuntu 20.04 cloud image, kernel 5.4.0-216-generic",
        "notes": "Fails on stock image; fix installs auditd 2.8.5 and audispd-plugins, service enabled; passes after reboot."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "22.04"
        ],
        "environment": "Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic",
        "notes": "Fails on stock image; fix installs auditd 3.0.7 and audispd-plugins, service enabled; passes after reboot."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "24.04"
        ],
        "environment": "Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic",
        "notes": "Fails on stock image; fix installs auditd 3.1.2 and audispd-plugins, service enabled; passes after reboot."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "26.04"
        ],
        "environment": "Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic",
        "notes": "Fails on stock image; fix installs auditd 4.1.2 and audispd-plugins, service enabled; passes after reboot."
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}