Displays all available network shares:
showmount -e $target
Normal mount
mount -t nfs $target:/home /mnt
Mounting with nfspy — with the hide option, it mounts and unmounts for the server so the victim cannot see the new connection via showmount.
nfspy -o server=192.168.1.124:/home,hide,allow_other,ro,intr /mnt
Mount via SSH
ssh -N -L 3049:localhost:2049 user@hostname mount -t nfs -o port=3049 -o proto=tcp localhost:/home /mnt
Notes
- If you could mount a share but don’t have access to files, create on the host system an user or a gid and access with this user.
- If this not directly works, try to mount in another NFS version (here is the explanation), e.g.
-
# mount -t nfs -o vers=3 $target:/home /mnt
- Attack idea:
- Access a NFS share and add a SUID bit.
- On the victim, access this program / file to get root!
- NFS2 doesn’t support authentication! Try vers=2 !
- Behind proxychains?
Leave a Reply
You must be logged in to post a comment.