Skip to main content

Server audits

A server audit checks one machine from top to bottom in a single run and grades it from A to F. Use it when you build a server and hand it over to a client or a team, or to check where an existing server stands.

What an audit checks​

Every audit runs all of DeaconGuard's checks:

  • Package vulnerabilities, against the distribution's own security advisories.
  • System file integrity, against the package manager's checksums.
  • Malware and compromise indicators.
  • Security configuration.
  • The hardening baseline: 72 controls, from accounts and SSH to kernel settings, logging and file permissions. See the baseline's controls.
  • An antivirus scan with ClamAV. Optionally the advanced antivirus scan with YARA rules too.

On a Mac, an audit runs the checks that apply to macOS: whether the Mac has Apple's latest updates, and the macOS baseline. The others are for Linux.

It also records the machine's inventory: operating system, kernel, hardware, memory, uptime, disks and their usage, network addresses, listening services, administrators and accounts that can log in, time zone and clock synchronisation, and the number of packages.

Like every scan, an audit only reads: it changes nothing on the machine. It takes a few minutes, mostly for the antivirus scan.

Run an audit​

  • Dashboard: open the host and choose Run audit, as an operator or admin. The audit's page opens and updates by itself until it finishes; you can leave it.
  • Command line, on the server: sudo -u deaconguard deaconguard audit HOST_ID (add --advanced for the YARA scan, --json for the full result). For the machine you are on, without a server: deaconguard audit --local --allow-sudo.
  • Automatically, when a machine enrolls: on Server audits, an admin turns on Audit new machines when they enroll. A newly built server then has an audit ready by the time it's handed over. This needs the machine's agent to be 0.12.0 or later; for an older agent, the server logs why it didn't audit.

Audits need the agent 0.12.0 or later on the machine. Upgrade an older one with curl -fsSL https://get.deaconguard.io | sudo sh -.

The grade​

The score, out of 100, is the share of the baseline's applicable controls that pass, weighted by severity: a critical control counts 10, high 6, medium 3 and low 1. Controls that don't apply to the machine, or whose risk was accepted, are left out.

An audit of web-01: grade D, score 67 of 100 with 36 of 66 controls passed, what holds the grade back, and the results of the other checks.An audit of web-01: grade D, score 67 of 100 with 36 of 66 controls passed, what holds the grade back, and the results of the other checks.

The grade comes from the score: A from 90, B from 80, C from 70, D from 60, and F below that. Then anything that should stop a handover lowers it, whatever the score:

FoundGrade at most
Malware or signs of compromiseF
System files that differ from what their packages installedD
A vulnerability known to be exploited (CISA KEV) with a fix availableD
A release past its end of life: no more security fixesD
Critical vulnerabilities with a fix availableC
A failed critical control, such as an account with an empty passwordC
High-severity vulnerabilities with a fix availableB
A release on extended support only: Ubuntu Pro, Debian LTS or SUSE LTSSB

The audit's page lists these under What holds the grade back, and anything that couldn't be checked fully under Not fully checked, for example controls that need root when the audit ran without it.

Read the results​

The audit's page shows:

  • the grade, the score, and how many controls passed, failed, were accepted or don't apply;
  • what holds the grade back;
  • vulnerabilities with a fix available, by severity, and the result of each other check;
  • every control, filtered by Failed, Accepted, Passed or the rest. Open one to see the evidence found, why it matters and how to fix it;
  • the inventory.

Full scan report links to every finding in detail. To hand the audit over, Create report makes a PDF with your branding and the client's name, also as HTML, Excel, CSV or JSON: see Reports.

Audits are kept until someone deletes them: they don't count towards the 10 scans each host keeps.

Accepted risks​

Sometimes a failed control is right for a particular machine: password logins needed by a client's legacy tool, or IP forwarding on a router. An admin opens the control and chooses Accept the risk, with:

  • a reason, shown with the control and recorded in the audit log;
  • this host only or every host;
  • an expiry date, 90 days ahead by default, or none.

An accepted control shows as Accepted in that audit and later ones, and leaves the score. When the risk expires, or an admin chooses Withdraw, the control counts as failed again.

The DeaconGuard Linux baseline​

The baseline is DeaconGuard's own set of hardening controls for servers, written from common Linux security practice. Each control reports pass, fail, not applicable (for example SSH controls on a machine without an SSH server), or not checked (the evidence couldn't be read, usually without root).

The controls read the machine's settings with fixed, read-only commands, and audits also show how they map to compliance frameworks and, on Ubuntu 22.04 and 24.04 and RHEL 8 and 9, to the rules of the DISA STIG, next to your own policies. Some need root: password files, the firewall, file permissions across the disk and the audit rules. Agents run as root, so audits through an agent see everything. Only the account names and whether a password is set are read from /etc/shadow; password hashes never leave the file.

Accounts and passwords​

IDControlSeverity
ACC-01Only root has user ID 0Critical
ACC-02No account has an empty passwordCritical
ACC-03Passwords expire within a yearLow
ACC-04Passwords need at least 12 charactersMedium
ACC-05Accounts lock after repeated failed loginsMedium
ACC-06New files are not readable by everyoneLow
ACC-07System accounts cannot log inMedium
ACC-08Every account has its own user IDMedium
ACC-09Unused accounts are locked after 90 daysLow
ACC-10Passwords can't reuse the last 4Medium
ACC-11Accounts lock after at most 10 failed loginsMedium

SSH​

IDControlSeverity
SSH-01Root cannot log in over SSH with a passwordHigh
SSH-02SSH password logins are offMedium
SSH-03SSH refuses empty passwordsCritical
SSH-04SSH X11 forwarding is offLow
SSH-05SSH allows at most 4 login attempts per connectionLow
SSH-06Idle SSH sessions are closedLow
SSH-07SSH host-based authentication is offMedium
SSH-08SSH ignores .rhosts filesMedium
SSH-09SSH logins must finish within a minuteLow
SSH-10Users cannot pass environment settings to SSHLow
SSH-11SSH uses no weak ciphers or MACsMedium
SSH-12Only root can read the SSH server configurationMedium
SSH-13SSH shows a warning banner before loginLow
SSH-14SSH logs every loginLow

Network​

IDControlSeverity
NET-01IP forwarding is offMedium
NET-02ICMP redirects are not acceptedLow
NET-03ICMP redirects are not sentLow
NET-04Source-routed packets are refusedMedium
NET-05Reverse path filtering is onLow
NET-06SYN cookies are onLow
NET-07Broadcast pings are ignoredLow
NET-08Impossible source addresses are loggedLow
NET-09IPv6 redirects are not acceptedLow

Kernel​

IDControlSeverity
KRN-01Address space layout randomisation is fully onHigh
KRN-02Only root can read the kernel logLow
KRN-03Kernel addresses are hiddenLow
KRN-04Processes cannot trace unrelated processesLow
KRN-05Privileged programs don't write core dumpsMedium
KRN-06Hard and symbolic link protection is onMedium
KRN-07Core dumps are off for everyoneLow

Services and firewall​

IDControlSeverity
SVC-01A host firewall is activeMedium
SVC-02No risky service listens on every interfaceHigh
SVC-03No legacy remote-access servers are installedHigh
SVC-04No graphical desktop server is installedLow
SVC-05Printing and service discovery are not runningLow
SVC-06The mail server only accepts local mailMedium
SVC-07USB storage can't be usedLow

Logging and auditing​

IDControlSeverity
LOG-01The audit daemon is runningMedium
LOG-02Audit rules are loadedLow
LOG-03System logs are collectedMedium
LOG-04Logs survive a rebootLow
LOG-05Log files aren't readable by everyoneLow

Files and permissions​

IDControlSeverity
FS-01/etc/passwd is protectedHigh
FS-02/etc/shadow is protectedCritical
FS-03/etc/group is protectedMedium
FS-04/etc/gshadow is protectedMedium
FS-05Only root can change scheduled jobsLow
FS-06/tmp is mounted nodev and nosuidLow
FS-07/dev/shm is mounted nodev, nosuid and noexecLow
FS-08No files are writable by everyoneMedium
FS-09Shared directories have the sticky bitMedium
FS-10Every file has an ownerLow
FS-11No setuid programs outside system directoriesMedium
FS-12Only root can read the boot loader configurationLow
FS-13Home directories are privateLow

Updates​

IDControlSeverity
UPD-01Security updates install automaticallyMedium
UPD-02No reboot is pending to finish updatesMedium
UPD-03Packages are only installed from signed sourcesMedium

Time​

IDControlSeverity
TIME-01Time synchronisation is runningMedium
TIME-02The clock is synchronisedLow

Mandatory access control​

IDControlSeverity
MAC-01AppArmor or SELinux is enforcingMedium

The DeaconGuard macOS baseline​

On a Mac, the audit checks 18 controls of DeaconGuard's macOS baseline, written from Apple's own security guidance, with fixed, read-only commands: fdesetup, csrutil, spctl, the application firewall, launchctl, systemsetup, softwareupdate --list --no-scan (which uses what the Mac already knows, without asking Apple), and the system's preference files. Settings a configuration profile from an MDM sets win over local ones, as on the Mac itself, and the evidence says which applied.

The agent runs as root, so it sees everything. Without root, Remote Login and network time can't be read and are reported as not checked.

Control IDs start with MACOS-, so they never mix with the Linux baseline's. Like the Linux controls, they map to compliance frameworks, and a control that doesn't fit, such as Screen Sharing on a Mac your IT team manages with it, can be accepted.

System protection​

IDControlSeverity
MACOS-01FileVault encrypts the startup diskHigh
MACOS-02System Integrity Protection is onHigh
MACOS-03Gatekeeper checks apps before they openHigh
MACOS-04XProtect's malware definitions are recent (45 days)Medium

Services and firewall​

IDControlSeverity
MACOS-05The firewall is onMedium
MACOS-06The firewall's stealth mode is onLow
MACOS-07Remote Login (SSH) is offMedium
MACOS-08Screen Sharing and Remote Management are offMedium
MACOS-09File Sharing is offLow

Accounts and passwords​

IDControlSeverity
MACOS-10The guest account is offMedium
MACOS-11Automatic login is offHigh

Updates​

IDControlSeverity
MACOS-12The Mac checks for updates automaticallyMedium
MACOS-13macOS updates download automaticallyLow
MACOS-14Security responses and system files install automaticallyHigh
MACOS-15macOS updates install automaticallyLow
MACOS-16App Store apps update automaticallyLow
MACOS-17No found updates are waiting to be installedMedium

Time​

IDControlSeverity
MACOS-18The clock is set automaticallyLow