CtrlK

Pentest Notes / Services

NFS

Access Rights

PermissionsDescription
rwGives read and write permissions to the shared directory.
roGives users and systems read-only access to the shared directory.
no_root_squashroot user on the client has more rights than a normal user.
root_squashroot user on the client rights of a normal user.
syncensures that changes are only transferred after they have been saved on the file system.
asyncfast transfer, causes inconsistencies in the file system if changes have not been fully committed.

Create NFS share

Done in the system that has files, say the target machine
creating the physical folder that will hold the data.

mkdir [share_name]
echo '[path to share_name] hostname(rw,sync,no_root_squash)' >> /etc/exports

Mount NFS share

Done in the system that needs the files which are available in target machine
Entry point for the target machine

mkdir ~/target_nfs
mount [MACHINE_IP]:[path to share] ~/target_nfs

Any file that we place in the target system's share folder, will be accessible in our system

Enumeration

Tool: nfs-common