killchain-compendium/Enumeration/NFS.md

1.4 KiB

NFS Enumeration

The Network File System (NFS) is a distributed file system protocol that allows clients in a network to access and interact with files and directories on remote servers as if they were local. Developed by Sun Microsystems in the 1980s, NFS is designed to enable efficient sharing and management of files across different operating systems and platforms.

NFS operates based on a client-server model, where the client is the system that requests access to files or directories, and the server is the system that holds and manages these resources. The NFS protocol defines a set of operations that clients can use to perform file-related tasks, such as reading, writing, creating, deleting, and listing files and directories.

Find NFS Shares on the Network

NFS provides a level of transparency to the user and applications. Remote files and directories are accessed just like local ones, with no need for the user to be aware of the underlying network communication. You just have to find the shares.

You can look for NFS mounts on a network using the following command

rpcinfo -p $TARGET_IP

or another alternative is

showmount -e $TARGET_IP

Mount NFS Shares

Clients can "mount" remote directories onto their local file system, making the remote files and directories appear as if they are part of the client's own file system hierarchy.

Mount a share via the following command

mount -t nfs $TARGET_IP /tmp/nfsfiles