NFS

Network File System

Sun Microsystems: Same purpose as SMB

  • Access file systems over a network as if they were local

  • Uses entirely different protocol. NFS is used between Linux and Unix systems.

    • NFS clients can't communicate directly with SMB servers

    • Internet standard: Governs procedures in a distributed file system

    • NSFv3: Protocol version 3.0 has been in use for many years: Authenticates client pc

    • NFSv4: As with Win SMB, the user must authenticate

Footprinting

  • Ports 111, 2049; Can get info via RPC

sudo nmap 10.10.10.10 -p111,2049 -sV -sC --script nfs* # nse script 

PORT    STATE SERVICE VERSION
111/tcp open  rpcbind 2-4 (RPC #100000)
| rpcinfo: 
|   program version    port/proto  service
|   100000  2,3,4        111/tcp   rpcbind
|   100003  3,4         2049/tcp   nfs
|   100005  1,2,3      47217/tcp6  mountd
|   100021  1,3,4      39542/udp   nlockmgr
|   100227  3           2049/tcp6  nfs_acl
2049/tcp open  nfs_acl 3 (RPC #100227)

Once discovered, we can mount to our local machine

  • Create an empty folder the NFS share will be mounted

  • We can navigate it and view the contents just like our local system

  • root_squash is set? Can't edit backup.sh file even as root

showmount -e 10.10.10.10 # show available NFS shares
mkdir moo-share # create folder to download to
sudo mount -t nfs 10.10.10.10:/ ./moo-share/ -o nolock # mount nfs share 

tree . # list folder structure 
ls -l mnt/nfs/ # list contents with user/group names 
ls -n mnt/nfs/ # list contents with uid/guids 

sudo unmount ./moo-share # unmount share

Last updated