TCP 2049: NFS
Network File System is a distributed file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a computer network much like local storage is accessed.
-- Wikipedia
Basics
Show mounts
Mount
Privilege escalation via root_squash
When enabled (default), connected users are assigned "nfsnobody" (least local privileges). However, when turned off, one can upload a SUID binary and execute it.
e.g. using bash
On target
Exploitation
If permissions are "65534 / nobody", "4294967294 / UNKNOWN"
Try to use nfs version 3
Now all that's left is to create a user with that id, to access the file
Source: Write-up Vulnix - playing around with NFS - Christophe Tafani-Dereeper
Last updated