VULN_Linux_NFS_Exports
Description
Detects insecure /etc/exports NFS config which might allow privilege escalation to root or other users. The parameter insecure allows any non-root user to mount NFS shares via e.g. an SSH-tunnel. With no_root_squash SUID root binaries are allowed.
Query · yara
strings:
// line has to start with / to avoid triggering on #-comment lines
$conf1 = /\n\/.{2,200}?\binsecure\b/ ascii
$conf2 = /\n\/.{2,200}?\bno_root_squash\b/ ascii
condition:
filename == "exports" and
filepath contains "/etc" and
any of ($conf*)