NFS World-Readable Exports
NFS exports with a wildcard client list (*) or insecure options are accessible from any host that can reach the NFS port. Even read-only exports with no authentication expose the full directory tree — SSH keys, config files, credentials, and application secrets are common finds on exposed home directories and web roots.
Identify Open Exports
Check the client restriction on each export. A wildcard or broad subnet means any host in range can mount:
Export list for 10.10.10.50: /home/jsmith * /var/www/html 10.0.0.0/8 /backup 192.168.1.0/24
* on /home/jsmith = accessible from anywhere. /var/www/html restricted to a /8 is still wide — any host in that range can mount without credentials.
Confirm Mountability Without Credentials
Mount attempts require no authentication — if the export list shows the host, mounting succeeds:
total 48 drwxr-xr-x 5 1001 1001 4096 May 01 09:22 . drwxr-xr-x 3 root root 4096 Jan 10 11:05 .. -rw------- 1 1001 1001 220 Jan 10 11:05 .bash_history drwx------ 2 1001 1001 4096 Jan 10 11:05 .ssh -rw-r--r-- 1 1001 1001 807 Jan 10 11:05 .profile
Successful mount with directory listing confirms unauthenticated read access. UID-based permissions still apply — files owned by the user may appear as unreadable if UID does not match. See NFS UID Spoofing to bypass UID restrictions.
Assess Accessible Content
After mounting, check for high-value files regardless of apparent permissions:
.ssh/authorized_keys is writable if the share is read-write or if UID spoofing is available — see NFS World-Readable Share Exploitation for the full extraction workflow.
Check for insecure and no_subtree_check Options
These options weaken NFS further beyond open client lists:
| nfs-ls: Volume /home/jsmith | NFS: (rw,insecure,no_subtree_check,anonuid=1001,anongid=1001)
Option | Meaning |
|---|---|
| Allows connections from unprivileged ports (above 1024) — bypasses old NFS client restriction |
| Disables path validation — clients can access files outside the exported directory via filehandle guessing |
| Anonymous (unauthenticated) access maps to UID X — if X is a real user, anonymous clients get that user's access |
anonuid set to a non-nobody UID means unauthenticated mounts get real user access without any UID spoofing needed.
Scan Subnet for Exposed NFS
In an internal engagement, scan the full subnet for exposed NFS:
Any host responding to showmount with a wildcard export is immediately mountable.
References
-
Linux man — exports(5)linux.die.net/man/5/exports (opens in new tab)
insecure, no_subtree_check, anonuid option definitions
-
nfs-showmount NSE scriptnmap.org/nsedoc/scripts/nfs-showmount.html (opens in new tab)
Export discovery and client access list enumeration
Was this helpful?
Your feedback helps improve this page.