Skip to content

NFS enumeration

25 commands

Enumerating and mounting NFS exports: list shares, check their access controls and mount them to inspect files and permissions.

  • NFS
  • file shares

Install NFS enumeration

sudo apt install nfs-common

Basic Export Enumeration2

showmount -e 192.168.1.20

Lists the NFS export list (shared directories) available on the target IPv4 address.

showmount --exports 10.10.10.15

Uses the long-form flag to request the list of exported filesystems from the target.

Hostname Based Enumeration1

showmount -e nfs.example.local

Queries the NFS exports from a target identified by its DNS hostname or FQDN.

Local Host Enumeration1

showmount -e

Queries the local host's rpc.mountd to see what the local machine is currently exporting.

Local Host Enumeration (Explicit)1

showmount -e localhost

Explicitly targets the localhost loopback interface to verify local NFS export configurations.

Client Access and Permission Enumeration2

showmount -a 192.168.1.20

Lists all mount points in the form 'host:dir' to see which clients are currently connected.

showmount --all 10.10.10.15

Uses the long-form flag to display both the client hostname and the directory they have mounted.

Blue Team Exposure Validation1

showmount -a nfs-server.corp.internal

Checks a specific corporate server to identify unauthorized active client connections.

Listing Mounted Directories2

showmount -d 192.168.1.20

Lists only the directories that are currently mounted by remote clients, excluding client IPs.

showmount --directories 10.10.10.15

Uses the long-form flag to list only the filesystem paths currently in use by clients.

Link

Quiet and Script Friendly Output3

showmount -e --no-headers 192.168.1.20

Lists exports without the descriptive header line, ideal for parsing in bash scripts.

Link
showmount -a --no-headers 10.10.10.15

Lists active client mounts without headers for easy text processing or piping to awk.

Link
showmount -d --no-headers 192.168.1.50

Lists actively mounted directories without headers to quickly identify hot data paths.

Link

IPv6 Target Enumeration1

showmount -e 2001:db8::1

Queries NFS exports on a target using its IPv6 address.

Link

IPv6 Client Enumeration1

showmount -a 2001:db8::1

Lists active clients and mount points on an IPv6-enabled NFS server.

Link

Red Team Initial Reconnaissance1

showmount -e --no-headers target-dmz.local

Stealthier initial check for exports on a DMZ target to feed directly into mount tools.

Link

Red Team Active User Reconnaissance1

showmount -a --no-headers 192.168.100.10

Identifies which IP addresses are actively using the share to target specific users.

Link

Incident Response Assessment1

showmount -a 127.0.0.1

Run locally on a compromised server to identify if data is actively being exfiltrated via NFS.

Link

Tool Verification and Help1

showmount --help

Displays the help message to verify supported flags and syntax.

Link

Tool Verification and Version1

showmount --version

Checks the installed version of nfs-utils/showmount for compatibility or bug checking.

Link

Advanced Combined Enumeration (Exports)1

showmount --exports --no-headers 172.16.1.5

Combines long-form export flag with no-headers for clear, verbose-syntax scripting.

Link

Advanced Combined Enumeration (All)1

showmount --all --no-headers 172.16.1.5

Combines long-form all flag with no-headers to audit connections programmatically.

Link

Advanced Combined Enumeration (Directories)1

showmount --directories --no-headers 172.16.1.5

Combines long-form directory flag with no-headers to map active file system usage.

Link

Blue Team Hardening Validation2

showmount -e 10.0.0.5

Verifies that sensitive directories are not being exported to the world (everyone).

Link
showmount -a 10.0.0.5

Verifies that only authorized hosts are currently mounted to the NFS shares.

Link