Back to services
file-share2049/tcp/udp

NFS

NFSNetwork File SystemNFS Share

NFS (Network File System) shares directories over the network. Misconfigured exports (no_root_squash) allow root-level file access and privilege escalation.

Ports

PortProtocolDescription
2049tcp/udpNFS
111tcp/udpPortmapper/rpcbind
20048tcpmountd

Fingerprints

Banner / ProbeExpected Response
nmap -sV -p <port> <target>Service banner and version info
nc -nv <target> <port>Raw banner grab

Key Files

PathDescription
/etc/passwdList of system users
/etc/shadowPassword hashes for local users
/etc/ssh/sshd_configSSH server configuration
~/.ssh/id_rsaSSH private key

Default Credentials

UsernamePasswordContext
adminadminGeneric admin account
rootrootGeneric root account

Known CVEs

IdentifierTypeDescription
PEno_root_squash misconfiguration

Exploitation Primitives

TechniqueTool / CommandResult
Show Mountsshowmount -e <target>List NFS exports
Mount Sharemount -t nfs <target>:/share /mnt/nfs -o nolockMount NFS share

Notes

Always start with full port scan: `nmap -sV -sC -p- <target>`.

Check for default credentials before brute-forcing.

Use service-specific NSE scripts: `nmap --script <service>-* -p <port> <target>`.

Remember to check both IPv4 and IPv6 if applicable.

Seen on

ShodanCensysFOFAZoomEye

References