How do I identify available NFS shares on a remote server

0 votes
I’m trying to enumerate Network File System (NFS) shares on a remote server to verify configurations and access control. Are there particular commands or tools I should use to list available NFS shares and determine their accessibility?

If anyone could share methods for NFS enumeration or examples of useful command-line queries, it would be very helpful.
Nov 6 in Cyber Security & Ethical Hacking by Anupam
• 6,890 points
71 views

1 answer to this question.

0 votes

Depending on the type of server access (local vs. remote) and the operating systems of both your local computer and the remote server, you may need to use different commands and tools to find available NFS (Network File System) shares on a distant server.

For Linux/Unix Clients

1. Using showmount Command

The showmount command is the most straightforward way to list available NFS shares on a remote server. You'll need the remote server's hostname or IP address.

showmount -e <remote_server_hostname_or_IP>
  • Example: showmount -e 192.168.1.100
  • Output: This will display the remotely mounted directories along with the clients they are mounted to, if any.

2. Using nmap for NFS Service Detection

If you suspect NFS might be running on a non-standard port or want to verify if the NFS service is active without directly querying the server (in cases where direct queries are blocked or limited), nmap can help detect the NFS service.

nmap -sT -p 111,2049 <remote_server_hostname_or_IP>

Ports:

  • 111 is for the portmapper service (rpcbind), which manages RPC services, including NFS.
  • 2049 is the default NFS port (for NFSv4 and later; earlier versions might use other ports, but 2049 is a good starting point).

3. Accessing and Listing Shares with mount

If you have the necessary permissions and want to temporarily mount and inspect an NFS share:

Create a Mount Point:

mkdir ~/nfs_temp

Mount the NFS Share:

sudo mount -t nfs <remote_server_hostname_or_IP>:<share_name> ~/nfs_temp

List the Contents:

ls ~/nfs_temp

Unmount When Done:

sudo umount ~/nfs_temp

For Windows Clients/Servers

1. Using Windows Command Line/Powershell to Enumerate NFS Shares

Windows does not natively support NFS client functionality out of the box for end-users, but if you have the Windows Services for UNIX (or Windows Subsystem for Linux in newer Windows versions), you can use the showmount command as described above within the Linux subsystem.

For native Windows approaches, especially in a server context with Windows Server supporting NFS sharing:

For Windows Server Administrators

Use the Server Manager or Powershell to manage NFS shares. You can list NFS shares with Powershell:

Get-NfsShare

To Access NFS Shares from a Windows Client: You typically need to map the network drive. The process involves:

  • Open File Explorer, right-click on This PC, and select Map network drive...
  • Specify the Folder: Use the format \\<server_name>\<share_name> (e.g., \\192.168.1.100\my_share)
  • Finish the Wizard: Follow through the rest of the wizard, possibly requiring credentials depending on the share's security settings.
answered Nov 19 by CaLLmeDaDDY
• 9,600 points

Related Questions In Cyber Security & Ethical Hacking

0 votes
0 answers

How do I write a simple PERL script to scan for open ports on a target machine?

I’m learning about network security and I ...READ MORE

Oct 17 in Cyber Security & Ethical Hacking by Anupam
• 6,890 points
130 views
0 votes
0 answers

I do not have a real result about encryption file use AES mode CFB in pycrptodome on python

I'm using Ubuntu win. on python I ...READ MORE

Aug 23, 2019 in Cyber Security & Ethical Hacking by Ahmed
• 310 points

closed Aug 23, 2019 by Ahmed 902 views
+1 vote
1 answer

How do you decrypt a ROT13 encryption on the terminal itself?

Yes, it's possible to decrypt a ROT13 ...READ MORE

answered Oct 17 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 9,600 points
135 views
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
0 votes
1 answer

How do I use Metasploit to perform NetBIOS enumeration on a target?

It's common practice to use Metasploit for ...READ MORE

answered Nov 18 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 9,600 points
68 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP