[๐Ÿ“] NFS no_root_squash privesc

Introduction In some environments, the root user on a networked file system is treated as an unprivileged user. This is known as โ€œroot squashing.โ€ If root squashing is disabled, an attacker who gains access to an unprivileged account on the file system may be able to escalate their privileges to root. Demonstration Attacker machine Create a directory named /tmp/mount: mkdir /tmp/mount Mount the network file system to /tmp/mount: mount -t nfs <IP>:<SHARED_FOLDER> /tmp/mount Copy the /bin/bash binary from the attackerโ€™s system to the mounted file system:...

April 11, 2023 ยท 1 min ยท 126 words