NFS (Network File System) runs on TCP port 2049 and provides remote file access over a network. Nmap identifies it as nfs. NFS relies on the portmapper/rpcbind service (TCP/UDP 111) to register and locate its services. It is common on Linux servers and network-attached storage devices.
NFS exports that allow access to * (everyone) or specific subnets without proper restrictions are a frequent finding. Mounting an open export gives direct access to files, which may include home directories, configuration files, SSH keys, and application data. NFS v2 and v3 use host-based authentication only, with no user-level password checks, so UID/GID spoofing can bypass permissions.
List available exports with showmount -e target or Nmap's nfs-showmount script. Mount accessible shares and review their contents. Check file permissions and look for no_root_squash configurations that allow root-level access from the client side.
Enumeration
NFS export discovery, content listing, and share mounting guides
NFS Export Discovery
NFS Share Content Enumeration
Vulnerability Discovery
Find open NFS exports, weak configs, and no_root_squash misconfigs
NFS no_root_squash Detection
Identifies misconfigured NFS exports with no_root_squash enabled, allowing remote root privilege escalation via mounted shares.
NFS World-Readable Exports
Identifies misconfigured NFS exports allowing unauthenticated access, covering enumeration with showmount, mounting shares, and extracting sensitive data from world-readable exports.
Exploitation
Mount NFS shares and exploit UID trust to access files and credentials
NFS UID Spoofing – Reading Files Without Root
NFS World-Readable Share – File and Credential Extraction
Privilege Escalation
Abuse NFS no_root_squash to plant SUID binaries or SSH keys