TMAegis
Više pravila za aix

TMA-AIX-4.4.1.3

Ensure NFS client mounts include nosuid and nodev options

VisokaNivo 1Automatskaaix

Opis

When using NFS shares ensure that suid/sgid program execution and/or access to system devices via permissions set on any mounted NFS filesystem are disabled. Setting the nosuid and nodev options means that files on the NFS server cannot be used to gain privileged access on the client. Audit: automated read-only check derived from the CIS audit procedure; it prints "compliant" when the control is met.

Kako se proverava

Metod provere: Komanda ljuske

shell
command -v lsnfsmnt >/dev/null 2>&1 || exit 1; out=$( { lsnfsmnt -l | egrep -v "^Name" | grep -v nosuid; lsnfsmnt -l | egrep -v "^Name" | grep -v nodev ; } 2>/dev/null ); [ -z "$out" ] && echo compliant || printf '%s\n' "$out" | head -n 20
Očekivani izlaz
compliant

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

For each NFS mount, disable suid programs and device access. List the current NFS mounts: lsnfsmnt -l | /usr/bin/egrep -v "^Name" | /usr/bin/grep -v "nosuid" | while read remote server mntpnt rest; do chnfsmnt -d ${remote} -f ${mntpnt} -h ${server} -y -z done lsnfsmnt -l | /usr/bin/egrep -v "^Name" | /usr/bin/grep -v "nodev" | while read remote server mntpnt rest; do chnfsmnt -d ${remote} -f ${mntpnt} -h ${server} -y -z done NOTE: The NFS mount needs is re-mounted automatically by chnfsmnt. NOTE: The second loop might not do anything as both loops set both nosuid (-y) and nodev (-z)

Svojstva

Operativni sistemi
Bilo koji
Oznake
aixnetwork
Referenca
CIS IBM AIX 7 Benchmark v1.2.0 - 4.4.1.3 Ensure NFS client mounts include nosuid and nodev options

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 aix