openvas修改界面显示时间(时区)

openvas默认使用UTC时间,也就是世界统一时间。这样可能对使用、生成报告会造成一些影响,所以需要修改为中国时间。

 修改方法:

点击 右上角 当前的 “用户名” ,可以看到 my setting 。点击,扳手 图标。

把timezone的值改为: Asia/Shanghai  往下拖动滚动条,点击 save my settings  即可。

这样时间就正确了。

PS:

原先以为只需改 UTC 为 CST  (中国标准时间)。结果发现不行,后来看openvas自带的文档说等于系统tz变量。tz就是timezone缩写,系统本身为 Asia/Shanghai 时区 ,就尝试修改为 Asia/Shanghai 。问题解决。

openvas对时区的解释:

Timezone

The format of the timezone is the same as that of the TZ environment variable on GNU/Linux systems. That is, the same value accepted by the tzset C function. There are three versions of the format. Note the lack of spaces in the examples.

openvas 的一些配置

openvas-mkcert -q
openvas-mkcert-client -n om -i   这两句运行所需的证书文件
openvas-nvt-sync   升级NVT库
初始化操作:
openvassd
openvasmd –migrate
openvasmd –rebuild
添加一个管理员的openvas登录用户
openvasad -c ‘add_user’ -n root -r ‘Admin’
启动openvas
openvassd –listen=127.0.0.1 –port=9391
最后启动openvas manager
openvasmd –database=/usr/local/var/lib/openvas/mgr/tasks.db –slisten=127.0.0.1 –sport=9391 –listen=0.0.0.0 –port=9390

 

打开网页版:http://localhost:9392
gsad –listen=0.0.0.0 –port=9392 –alisten=127.0.0.1 –aport=9393 –mlisten=127.0.0.1 –mport=9390 –http-only

ERROR: The number of NVTs in the OpenVAS Manager database is too low.

安装完openvas,登陆web界面时候报错:
Login failed: OMP Service is down.

从官网 http://www.openvas.org/setup-and-start.html 找到检查openvas状态的脚本,下载执行。官方描述如下:

The OpenVAS developers provide a handy tool called openvas-check-setup to check the state of your OpenVAS installation. To use this tool simply follow these three steps:

Download the latest version of openvas-check-setup.
Ensure that the script is executable:
chmod +x openvas-check-setup
Execute the script:
./openvas-check-setup
for current stable release or
./openvas-check-setup [ –v4 | –v5 | –v6 | … ]
for other respective OpenVAS releases.
openvas-check-setup will now analyze the state of your OpenVAS installation and propose fixes should it detect any errors or misconfigurations. It will also check if all required OpenVAS services are running and listening on the correct ports.

In case the hints did not help you to get a working OpenVAS installation, please report the problem to us and we will update/fix openvas-check-setup: OpenVAS Users Mailing List.

If you want to install the OpenVAS services on a server and you do not need clients like OpenVAS CLI or GSD in your installation you can skip the checks for these modules by starting openvas-check-setup with the –server parameter instead:

./openvas-check-setup [–server]

[root@centos-6.5-x64 ~]# wget -c https://svn.wald.intevation.org/svn/openvas/trunk/tools/openvas-check-setup --no-check-certificate
[root@centos-6.5-x64 ~]# ./openvas-check-setup --server

openvas-check-setup 2.2.3
Test completeness and readiness of OpenVAS-6
(add ‘–v4’, ‘–v5’ or ‘–v7’
if you want to check for another OpenVAS version)

Please report us any non-detected problems and
help us to improve this check routine:
http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss

Send us the log-file (/tmp/openvas-check-setup.log) to help analyze the problem.

Step 1: Checking OpenVAS Scanner …
OK: OpenVAS Scanner is present in version 3.4.1.
OK: OpenVAS Scanner CA Certificate is present as /var/lib/openvas/CA/cacert.pem.
OK: NVT collection in /var/lib/openvas/plugins contains 34309 NVTs.
WARNING: Signature checking of NVTs is not enabled in OpenVAS Scanner.
SUGGEST: Enable signature checking (see http://www.openvas.org/trusted-nvts.html).
OK: The NVT cache in /var/cache/openvas contains 34309 files for 34309 NVTs.
Step 2: Checking OpenVAS Manager …
OK: OpenVAS Manager is present in version 4.0.5.
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 74.
OK: OpenVAS Manager expects database at revision 74.
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’.

ERROR: Your OpenVAS-6 installation is not yet complete!

解决方法,依次执行下面命令:

[root@centos-6.5-x64 ~]# openvassd
[root@centos-6.5-x64 ~]# mkdir -p /usr/local/var/lib/openvas/mgr
[root@centos-6.5-x64 ~]# touch /usr/local/var/lib/openvas/mgr/tasks.db
[root@centos-6.5-x64 ~]# openvasmd --backup
[root@centos-6.5-x64 ~]# openvasmd --rebuild
[root@centos-6.5-x64 ~]# openvasad -c 'add_user' -u openvasadmin -r Admin
[root@centos-6.5-x64 ~]# openvasmd -p 9390 -a 127.0.0.1
[root@centos-6.5-x64 ~]# openvasad -a 127.0.0.1 -p 9393
[root@centos-6.5-x64 ~]# gsad --http-only --listen=127.0.0.1 -p 9392

老外的资料:http://pentestit.de/openvas-auf-backtrack-5-r1-installieren/