TMAegisBeta
Više pravila za freebsd

FreeBSD

TMA-FREEBSD-1.1.2.6.2

Ensure nosuid option set on /var/audit partition

VisokaNivo 1Automatskafreebsd

Opis

The nosuid mount option specifies that the filesystem cannot contain setuid files. WARNING This option is worthless if a publicly available suid or sgid wrapper is installed on your system. It is set automatically when the user does not have super-user privileges. Since the /var/audit filesystem is only intended for variable files such as logs, set this option to ensure that users cannot create setuid files in /var/audit. Audit: when /var/audit is a separate mount, its options (mount -p) must include nosuid; no separate mount is compliant (see the partition recommendation).

Kako se proverava

Metod provere: Komanda ljuske

shell
command -v mount >/dev/null 2>&1 || exit 1; o=$(mount -p | awk '$2=="/var/audit" {print $4}'); if [ -z "$o" ]; then echo compliant; else case ",$o," in *,nosuid,*) echo compliant;; *) echo "/var/audit options: $o";; esac; fi
Očekivani izlaz
compliant

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

- IF - a separate partition exists for /var/audit. Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/audit partition. Example: <device> /var/audit <fstype> rw,nosuid,noexec 0 0 Run the following command to remount /var/audit with the configured options: # mount -u -o nosuid /var/audit

Svojstva

Operativni sistemi
Bilo koji
Oznake
freebsdaudit
Referenca
CIS FreeBSD 14 Benchmark v1.0.1 - 1.1.2.6.2 Ensure nosuid option set on /var/audit partition

Proverite ovaj računar

Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.

shell
tmaegis scan --target freebsd