# NFS Share Content Enumeration

- **URL:** https://hackindex.io/services/nfs/enumeration/nfs-share-content-enumeration
- **Path:** NFS > Enumeration
- **Up:** [Enumeration](https://hackindex.io/services/nfs/enumeration.md)
- **Published:** 2026-01-04
- **Updated:** 2026-01-04

Remote listing exposes directory contents and metadata on accessible exports. Success reveals sensitive files without local mount.

Remote enumeration tools:

- Nmap `nfs-ls` for file and directory listing
- Nmap `nfs-statfs` for share size and free space
- Nmap `nfs-showmount` for export access permissions

## NFS share content enumeration with Nmap

File and directory listing:

```bash
nmap -p 2049 --script nfs-ls $TARGET_IP
# | nfs-ls:
# |   Volume /mnt/nfs/files
# |   access: Read Lookup NoModify NoExtend NoDelete NoExecute
# |   PERMISSION  UID   GID   SIZE     MODIFICATION TIME  FILENAME
# |   drwxr-xr-x  1000  100   4096     2010-06-17 12:28   /mnt/nfs/files
# |   drwxr--r--  1000  1002  4096     2010-05-14 12:58   sources
# |   -rw-------  1000  1002  23606    2010-06-17 12:28   notes
# |
# |   Volume /home/storage/backup
# |   access: Read Lookup Modify Extend Delete NoExecute
# |   PERMISSION  UID   GID   SIZE     MODIFICATION TIME  FILENAME
# |   drwxr-xr-x  1000  100   4096     2010-06-11 22:31   /home/storage/backup
# |   -rw-r--r--  1000  1002  0        2010-06-10 08:34   filetest
# |   drwx------  1000  100   16384    2010-02-05 17:05   lost+found
# |   -rw-r--r--  0     0     5        2010-06-10 11:32   rootfile
# |   lrwxrwxrwx  1000  1002  8        2010-06-10 08:34   symlink
```

Enumerates exports with paths, permissions, owners.

Filesystem stats:

```bash
nmap -p 2049 --script nfs-statfs $TARGET_IP
# | nfs-statfs:
# |   Filesystem           1K-blocks  Used     Available  Use%  Blocksize
# |   /mnt/nfs/files       5542276    2732012  2528728    52%   4096
# |_  /mnt/nfs/opensource  5534416    620640   4632644    12%   4096
```

Disk usage and limits per export.

## References

- [nfs-ls NSE script](https://nmap.org/nsedoc/scripts/nfs-ls.html) - Remote directory listing and metadata
- [nfs-statfs NSE script](https://nmap.org/nsedoc/scripts/nfs-statfs.html) - Filesystem statistics
