OpenVas Problem

Started by storm, March 26, 2017, 07:52:15 PM

Previous topic - Next topic

storm

After an uninstall, I have problems to reuse openvas.
Does anyone have a suggestion?

-I run several commands but can not be accessed from browser .... ???

sudo apt-get install sqlite3
sudo openvas-nvt-sync
sudo openvas-scapdata-sync
sudo openvas-certdata-sync

sudo service openvas-scanner restart
sudo service openvas-manager restart
sudo openvasmd --rebuild --progress


Login into https://localhost:443 with "admin" as username and password.

/etc/default/openvas-gsa
PORT_NUMBER=443 (4000 is 9)   | service openvas-gsa restart




Step 1: Checking OpenVAS Scanner ...
        OK: OpenVAS Scanner is present in version 5.0.7.
        OK: OpenVAS Scanner CA Certificate is present as /var/lib/openvas/CA/cacert.pem.
        OK: redis-server is present in version v=3.0.6.
        OK: scanner (kb_location setting) is configured properly using the redis-server socket: /var/run/redis/redis.sock
        OK: redis-server is running and listening on socket: /var/run/redis/redis.sock.
        OK: redis-server configuration is OK and redis-server is running.
        OK: NVT collection in /var/lib/openvas/plugins contains 52289 NVTs.
        OK: Signature checking of NVTs is enabled in OpenVAS Scanner.
        OK: The NVT cache in /var/cache/openvas contains 52888 files for 52289 NVTs.
Step 2: Checking OpenVAS Manager ...
        OK: OpenVAS Manager is present in version 6.0.9.
        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 146.
        OK: OpenVAS Manager expects database at revision 146.
        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).

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

Please follow the instructions marked with FIX above and run this
script again.

If you think this result is wrong, please report your observation
and help us to improve this check routine:
http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss
Please attach the log-file (/tmp/openvas-check-setup.log) to help us analyze the problem.




openvas-check-setup 2.3.7
  Mode:  desktop
  Date:  Sun, 26 Mar 2017 19:35:39 +0200

Checking for old OpenVAS Scanner <= 2.0 ...
./openvas-check-setup: 172: ./openvas-check-setup: openvasd: not found

Checking presence of OpenVAS Scanner ...
OpenVAS Scanner 5.0.7
Most new code since 2005: (C) 2015 Greenbone Networks GmbH
Nessus origin: (C) 2004 Renaud Deraison <deraison@nessus.org>
License GPLv2: GNU GPL version 2
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


Checking OpenVAS Scanner version ...

        OK: OpenVAS Scanner is present in version 5.0.7.
plugins_folder = /var/lib/openvas/plugins
cache_folder = /var/cache/openvas
include_folders = /var/lib/openvas/plugins
max_hosts = 30
max_checks = 10
be_nice = no
logfile = /var/log/openvas/openvassd.messages
log_whole_attack = no
log_plugins_name_at_load = no
dumpfile = /var/log/openvas/openvassd.dump
cgi_path = /cgi-bin:/scripts
optimize_test = yes
checks_read_timeout = 5
network_scan = no
non_simult_ports = 139, 445
plugins_timeout = 320
scanner_plugins_timeout = SCANNER_NVT_TIMEOUT
safe_checks = yes
auto_enable_dependencies = yes
use_mac_addr = no
nasl_no_signature_check = no
drop_privileges = no
unscanned_closed = yes
unscanned_closed_udp = yes
vhosts =
vhosts_ip =
report_host_details = yes
cert_file = /var/lib/openvas/CA/servercert.pem
key_file = /var/lib/openvas/private/CA/serverkey.pem
ca_file = /var/lib/openvas/CA/cacert.pem
kb_location = /var/run/redis/redis.sock
timeout_retry = 3
config_file = /etc/openvas/openvassd.conf
Checking OpenVAS Scanner CA cert ...

        OK: OpenVAS Scanner CA Certificate is present as /var/lib/openvas/CA/cacert.pem.
Checking presence of redis ...
        OK: redis-server is present in version v=3.0.6.

Checking if redis-server is configured properly to run with openVAS ...
        OK: scanner (kb_location setting) is configured properly using the redis-server socket: /var/run/redis/redis.sock
Checking if redis-server is running ...
        OK: redis-server is running and listening on socket: /var/run/redis/redis.sock.
        OK: redis-server configuration is OK and redis-server is running.

Checking NVT collection ...

        OK: NVT collection in /var/lib/openvas/plugins contains 52289 NVTs.
Checking status of signature checking in OpenVAS Scanner ...
        OK: Signature checking of NVTs is enabled in OpenVAS Scanner.

        OK: The NVT cache in /var/cache/openvas contains 52888 files for 52289 NVTs.

Checking presence of OpenVAS Manager ...
OpenVAS Manager 6.0.9
Manager DB revision 146
Copyright (C) 2010-2015 Greenbone Networks GmbH
License GPLv2+: GNU GPL version 2 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.



        OK: OpenVAS Manager is present in version 6.0.9.
Checking OpenVAS Manager client certificate ...

        OK: OpenVAS Manager client certificate is present as /var/lib/openvas/CA/clientcert.pem.
Checking OpenVAS Manager database ...

        OK: OpenVAS Manager database found in /var/lib/openvas/mgr/tasks.db.
Checking access rights of OpenVAS Manager database ...

        OK: Access rights for the OpenVAS Manager database are correct.
Checking sqlite3 presence ...
        OK: sqlite3 found, extended checks of the OpenVAS Manager installation enabled.

Checking OpenVAS Manager database revision ...
        OK: OpenVAS Manager database is at revision 146.
Checking database revision expected by OpenVAS Manager ...
        OK: OpenVAS Manager expects database at revision 146.
        OK: Database schema is up to date.
Checking OpenVAS Manager database (NVT data) ...
        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).


ZEROF

#1
Hi,

sudo apt-get remove --purge openvas*

Remove all files that apt can't (in most cases /var/lib/openvas), you will see that error in terminal if you edited anything on your own, if not, you can move to next step:

sudo apt-get install openvas nsis rpm -y

Open BBox menu and run from Services menu, OpenVas start, when asked "Do you want to rebuild NVT cache? [Y/n] > y", this will update nvt data base and you are almost good to go. Rebuilding NVT cache will take some time, go back to BBox menu>Services>Openvas run openvas sync. After this go back again to BBox menu, and start openvas again(but be sure that nvt is done and sync as well, don't restart OpenVAS before), as OpenVAS run already, it will be just restarted. I think that in this point you will be good to go, because i'm  ;D

GSA port is 4000, not 443, https://localhost:4000 (if not working install vivaldi browser or try to remove certs for OpenVas from firefox advanced settings, and restart firefox)

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*