# yaml-language-server: $schema=../../../../schema/control.schema.json id: CB-UBU-AUTH-007 title: Never disable authentication for sudo globally finding: title: sudo is configured to skip authentication description: With authentication disabled, every sudo rule works without a password, for every user it applies to. status: active profiles: [core] risk: severity: high assessment: automated tags: [sudo, privilege-escalation] applicability: facts: [sudo] description: | The `!authenticate` default turns off password checks for every rule it applies to. Unlike a `NOPASSWD:` tag on one rule, it is easy to miss because it sits in a `Defaults` line. rationale: | A global `!authenticate` silently turns every administrator account into a password-less root account: stealing any of their sessions is enough to control the system. impact: | None for a standard configuration. Ubuntu does not set it. notes: | sudo-rs, the `sudo` of Ubuntu 26.04, does not know the `authenticate` setting: its `visudo` rejects the line. The check still applies, since the original sudo stays installed and can be selected again through the `sudo` alternative. audit: manual: | Run `grep -r '!authenticate' /etc/sudoers /etc/sudoers.d/`. There must be no match. checks: - id: sudoers engine: file-content description: No !authenticate in /etc/sudoers. spec: { path: /etc/sudoers, pattern: "^[^#]*!\\s*authenticate", expect: no_match } - id: sudoers-d engine: file-content description: No !authenticate in /etc/sudoers.d/. spec: { path: /etc/sudoers.d/*, pattern: "^[^#]*!\\s*authenticate", expect: no_match } remediation: manual: | Remove every `Defaults ... !authenticate` entry with `visudo` (or `visudo -f` for files in `/etc/sudoers.d/`). rollback: | Add the entry back with `visudo`. references: - title: sudoers(5), Ubuntu manual pages url: https://manpages.ubuntu.com/manpages/noble/man5/sudoers.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 (R39) 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: R39 relation: partial - framework: nist-800-53r5 framework_version: "5.1.1" id: IA-11 relation: related - framework: cis-ubuntu-2004 framework_version: "3.0.0" id: "5.2.5" relation: equivalent - framework: cis-ubuntu-2204 framework_version: "3.0.0" id: "5.2.5" relation: equivalent - framework: cis-ubuntu-2404 framework_version: "2.0.0" id: "5.2.5" relation: equivalent - framework: cis-ubuntu-2604 framework_version: "1.0.0" id: "5.2.5" relation: equivalent threats: - framework: mitre-attack id: T1548.003 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: "Passes on a fresh install; profiles core and server-hardened." - date: 2026-10-19 by: Sn0wAlice versions: ["22.04"] environment: Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic notes: "Passes on a fresh install; profiles core and server-hardened." - date: 2026-10-19 by: Sn0wAlice versions: ["24.04"] environment: Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic notes: "Passes on a fresh install; profiles core and server-hardened." - date: 2026-10-19 by: Sn0wAlice versions: ["26.04"] environment: Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic notes: "Passes on a fresh install; profiles core and server-hardened." introduced_in: 0.1.0 created: 2026-10-19 updated: 2026-10-19