当我的 Kali 安装将 OpenVAS 更新到 v7 时,问题就开始了:我的admin
Web 服务用户名停止工作,因此我无法再登录。
我已经尝试了所有我能想到的方法来解决这个问题(删除所有 OpenVAS 用户,admin
再次添加,手动删除.db
,最后通过 apt-get 清除并重新安装),但无济于事。我现在在运行时得到这个openvas-check-setup
:
Step 2: Checking OpenVAS Manager ...
OK: OpenVAS Manager is present in version 5.0.2.
OK: OpenVAS Manager client certificate is present as /var/lib/openvas/CA/clientcert.pem.
OK: OpenVAS Manager database found in /var/lib/openvas/mgr/tasks.db.
OK: Access rights for the OpenVAS Manager database are correct.
OK: sqlite3 found, extended checks of the OpenVAS Manager installation enabled.
OK: OpenVAS Manager database is at revision 123.
OK: OpenVAS Manager expects database at revision 123.
OK: Database schema is up to date.
ERROR: The number of NVTs in the OpenVAS Manager database is too low.
FIX: Make sure OpenVAS Scanner is running with an up-to-date NVT collection and run 'openvasmd --rebuild'.
WARNING: OpenVAS Scanner is NOT running!
SUGGEST: Start OpenVAS Scanner (openvassd).
这建议运行 OpenVAS 扫描仪,但它不会启动:
root@kali:/var/log/openvas# openvas-start
Starting OpenVas Services
Starting Greenbone Security Assistant: ERROR.
Starting OpenVAS Scanner: ERROR.
Starting OpenVAS Manager: ERROR.
通常扫描仪需要一段时间才能启动,但在这种情况下它根本没有启动。
检查扫描仪日志显示我需要重建/更新的错误,如果我尝试使用--update
或--rebuild
给出启动管理器
# openvasmd --progress --rebuild -v
Rebuilding NVT cache... failed.
管理器日志给出以下消息:
Failed to receive data: A TLS packet with unexpected length was received.
更新:检查扫描仪日志 ( openvassd.messages
) 显示扫描仪服务器拒绝连接:
# tail /var/log/openvas/openvassd.messages
[Fri Dec 5 11:15:34 2014][4778] bad login attempt from 127.0.0.1
如何修复 OpenVAS?如果这是建议的修复方法,我很乐意删除 OpenVAS 并完全重新安装它?如果是这样,我该怎么办?
请告诉我是否应该编辑我的问题以添加特定日志或其他信息,我知道这可能是解决此问题的情况。
答案1
解决了。我必须跑
openvas-mkcert-client -n om -i
我从中找到的这个帖子- 这是一个不同的问题,但错误消息相同。
然后我可以重建 NVT 缓存:
# openvasmd --progress --rebuild -v
Rebuilding NVT cache... done.
现在查看日志显示成功:
# tail /var/log/openvas/openvasmd.log
md main: INFO:2014-12-05 11h29.21 utc:5383: OpenVAS Manager
md main: INFO:2014-12-05 11h29.22 utc:5384: Set to connect to address 127.0.0.1 port 9391
md main: INFO:2014-12-05 11h29.22 utc:5384: Updating NVT cache.
# tail /var/log/openvas/openvassd.messages
[Fri Dec 5 11:30:45 2014][5386] Communication closed by client
[Fri Dec 5 11:30:45 2014][5386] Client not present
现在我可以成功登录Web界面并使用OpenVAS: