CtrlK
Pentest Notes / Services
NFS
Access Rights
| Permissions | Description |
|---|---|
| rw | Gives read and write permissions to the shared directory. |
| ro | Gives users and systems read-only access to the shared directory. |
| no_root_squash | root user on the client has more rights than a normal user. |
| root_squash | root user on the client rights of a normal user. |
| sync | ensures that changes are only transferred after they have been saved on the file system. |
| async | fast 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