{
  "id": "CB-UBU-AUDIT-035",
  "standard": "ubuntu",
  "version": "main",
  "url": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUDIT-035",
  "json": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUDIT-035.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUDIT-035.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-035",
    "title": "Keep a protected copy of the AIDE database",
    "finding": {
      "title": "The AIDE reference database is only stored on the system it protects",
      "description": "An intruder with root access can update the database to accept their changes, and AIDE will then report nothing."
    },
    "status": "active",
    "profiles": [
      "server-hardened",
      "desktop-hardened"
    ],
    "risk": {
      "severity": "medium"
    },
    "assessment": "manual",
    "tags": [
      "aide",
      "integrity"
    ],
    "description": "The AIDE database (`/var/lib/aide/aide.db`) and its configuration are the reference of the\nintegrity check. A copy must be kept where the system cannot write: read-only media, a backup\nserver, or an integrity platform that pulls it. Checks should be run against that copy, or the\nlocal database compared with it, and its own checksum recorded.\n",
    "rationale": "An integrity check is only as trustworthy as its reference. A database that root can rewrite\ndoes not resist an attacker who already has root.\n",
    "impact": "Every legitimate update of the database (after upgrades) must also update the protected copy.\n",
    "audit": {
      "manual": "1. Find where the protected copy of `/var/lib/aide/aide.db` is kept, and check that the system\n   cannot modify it.\n2. Compare it with the local database: `sha512sum /var/lib/aide/aide.db` must match the\n   checksum recorded with the copy, unless a reviewed update has been made since.\n"
    },
    "remediation": {
      "manual": "1. After each reviewed database build or update, copy `/var/lib/aide/aide.db` and\n   `/etc/aide/` to a read-only medium or a backup server the system cannot write to, and record\n   `sha512sum /var/lib/aide/aide.db` with it.\n2. For a trusted check, run AIDE from the copy, for example\n   `aide --check -c /etc/aide/aide.conf -B 'database_in=file:/mnt/ro/aide.db'`.\n",
      "rollback": "Not applicable.\n"
    },
    "references": [
      {
        "title": "aide.conf(5), Ubuntu manual pages",
        "url": "https://manpages.ubuntu.com/manpages/noble/man5/aide.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 (R77)",
        "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": "R77",
        "relation": "equivalent"
      },
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "SI-7",
        "relation": "related"
      }
    ],
    "threats": [
      {
        "framework": "mitre-attack",
        "id": "T1565.001"
      },
      {
        "framework": "cwe",
        "id": "CWE-353"
      }
    ],
    "related_controls": [
      {
        "id": "CB-UBU-AUDIT-034",
        "type": "related"
      }
    ],
    "authors": [
      {
        "name": "Alice",
        "github": "Sn0wAlice"
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}