可以对目标主机进行"showmount -e"操作,此操作将泄露目标主机大量敏感信息,比如目录结构。更糟糕的是,如果访问控制不严的话,攻击者有可能直接访问到目标主机上的数据。
建议:NSFOCUS建议您采取以下措施以降低威胁: 限制可以获取NFS输出列表的IP和用户。除非绝对必要,请关闭NFS服务、MOUNTD。
解决:vi /etc/hosts.deny 编辑这个配置文件在里面加上:mountd: all 就可以
/etc/hosts.deny
mountd: all #cent7.0设置方式
Portmap:ALL:deny #cent6.0设置方式
rpcbind: ALL : deny #cent5.0设置方式
#验证这个漏洞
[root@5gxx-2-15 ~]# hostname -I
10.192.64.15
[root@5gxx-2-15 ~]# showmount -e 10.192.64.14
Export list for 10.192.64.14:
/apps/nfs 10.192.64.0/24
#在10.192.64.14 /etc/hosts.deny 添加 mountd: all
[root@5gxx-2-14 ~]# echo 'mountd: all' >> /etc/hosts.deny
[root@5gxx-2-14 ~]# cat /etc/hosts.deny
mountd: all
#在10.192.64.15上验证
[root@5gxx-2-15 ~]# showmount -e 10.192.64.14
rpc mount export: RPC: Authentication error; why = Failed (unspecified error)