环境:宿主机为Windows10,虚拟机安装CentOS8,虚拟机的网络连接方式为桥接。
https://www.tenable.com/downloads
[root@localhost nessus]# rpm -i Nessus-8.14.0-es8.x86_64.rpm
[root@localhost ~]# service nessusd start
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
https://centos的ip:8834
https://zh-cn.tenable.com/products/nessus/nessus-essentials
[root@localhost ~]# /opt/nessus/sbin/nessuscli fetch --challenge
https://plugins.nessus.org/v2/offline.php
[root@localhost ~]# /opt/nessus/sbin/nessuscli update ./all-2.0.tar.gz
[root@localhost ~]# /opt/nessus/sbin/nessuscli fetch --register-offline ./nessus.license
[root@localhost ~]# cp -r /opt/nessus/lib/nessus/plugins/ ./
[root@localhost ~]# service nessusd restart
https://plugins.nessus.org/v2/plugins.php
[root@localhost ~]# vim plugin_feed_info.inc
PLUGIN_SET = "202108312219";
PLUGIN_FEED = "ProfessionalFeed (Direct)";
PLUGIN_FEED_TRANSPORT = "Tenable Network Security Lightning";
[root@localhost ~]# cp /root/plugin_feed_info.inc /opt/nessus/var/nessus/
[root@localhost ~]# rm -rf /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc
[root@localhost ~]# service nessusd restart
由于Nessus服务每次重启后,都会重置plugin_feed_info.inc,这将会使nessus/plugins目录下所有的插件都被删除,无法扫描。因此要将nessus服务设置为手动,并且先停止nessus服务。
[root@localhost ~]# systemctl disable nessusd
[root@localhost ~]# service nessusd stop
以后每次使用nessus就重复第6步的操作,故可以写成批处理。
[root@localhost ~]# vim crack_nessus.sh
内容如下:
service nessusd stop;
cp /root/plugin_feed_info.inc /opt/nessus/var/nessus/;
rm -rf /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc;
service nessusd start;
将crack_nessus.sh写到系统启动的脚本里。这样每次重启CentOS,会自动执行解除IP限制程序。
[root@localhost ~]# chmod +x /etc/rc.d/rc.local
[root@localhost ~]# vim /etc/rc.d/rc.local
添加如下内容到rc.local
/bin/bash /root/crack_nessus.sh
至此,nessus完全解除IP限制完成。
在解除ip限制的过程中,如果已经解除成功,但是新建扫描项目时,发现很快就结束,无扫描结果。此时查看plugins目录内容是否被删除。
[root@localhost ~]# du -h /opt/nessus/lib/nessus/plugins
正常情况下,该目录应该在1.2G左右。如远远低于此数值。请按如下步骤操作(前提是备份好了plugins目录):
service nessusd stop;
rm -rf /opt/nessus/lib/nessus/plugins
cp -r ./plugins /opt/nessus/lib/nessus/
cp /root/plugin_feed_info.inc /opt/nessus/var/nessus/;
rm -rf /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc;
service nessusd start;
然后打开浏览器,正常访问nessus。(https://centos的ip:8843)
静待plugins更新完成。
原文:https://www.jianshu.com/p/295f24e71c96