pentesting, updated
NFS enumeration
Identify exported NFS shares and the access they grant to an unauthenticated client.
Goal
Confirm which filesystem paths an NFS server exports and whether they can be mounted without authentication.
How to test
showmount -e 10.10.10.5 # list exported shares
mkdir /mnt/nfs && mount -t nfs 10.10.10.5:/export /mnt/nfs # mount an export
ls -la /mnt/nfs # inspect contents and ownership
What to look for
An export with no_root_squash (a local root user becomes root on the share too), or any export mountable without a matching UID — NFS trusts the client’s claimed UID by default.
Notes
Match your local UID to a UID seen in the share’s file ownership (useradd -u <uid> tmp && su tmp) to read files you would not otherwise have access to.