Pentesting NFS
Last updated
echo '/mnt/nfs 10.129.14.0/24(sync,no_subtree_check)' >> /etc/exports
systemctl restart nfs-kernel-server
exportfssudo nmap 10.129.14.128 -p111,2049 -sV -sC
sudo nmap --script nfs* 10.129.14.128 -sV -p111,2049showmount -e 10.129.14.128mkdir target-NFS
sudo mount -t nfs 10.129.14.128:/ ./target-NFS/ -o nolock
cd target-NFS
tree .sudo mount -t nfs TARGET:/EXPORT_NAME ./target-NFS/ -o nolockls -l mnt/nfs/
ls -n mnt/nfs/grep -RniE 'password|passwd|credential|secret|token|jdbc|ldap|bind|connectionString' .
find . -iname '*.config' -o -iname '*.xml' -o -iname '*.properties' -o -iname '*.yml' -o -iname '*.ini' -o -iname '*.bak' -o -iname '*.old'cd ..
sudo umount ./target-NFS