TMA-FREEBSD-1.1.2.5.2
Ensure nosuid option set on /var/log partition
Deskripsi
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/log filesystem is only intended for log files, set this option to ensure that users cannot create setuid files in /var/log. Audit: when /var/log is a separate mount, its options (mount -p) must include nosuid; no separate mount is compliant (see the partition recommendation).
Cara pemeriksaan
Metode audit: Perintah shell
command -v mount >/dev/null 2>&1 || exit 1; o=$(mount -p | awk '$2=="/var/log" {print $4}'); if [ -z "$o" ]; then echo compliant; else case ",$o," in *,nosuid,*) echo compliant;; *) echo "/var/log options: $o";; esac; fi- Output yang diharapkan
compliant
Cara perbaikan
Metode perbaikan: Panduan atau patch infrastruktur
- IF - a separate partition exists for /var/log. Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/log partition. Example: <device> /var/log <fstype> rw,nosuid,noexec 0 0 Run the following command to remount /var/log with the configured options: # mount -u -o nosuid /var/log
Properti
- Sistem operasi
- Apa saja
- Tag
- freebsdaudit
- Referensi
- CIS FreeBSD 14 Benchmark v1.0.1 - 1.1.2.5.2 Ensure nosuid option set on /var/log partition
Periksa host ini
Jalankan ini pada mesin yang diizinkan untuk Anda audit. Pemindaian bersifat hanya baca.
tmaegis scan --target freebsd