Home / How to / Install, setup, configure and run OpenVAS on Kali Linux

Install, setup, configure and run OpenVAS on Kali Linux

Vulnerability scanning is a crucial phase of a penetration test and having an updated vulnerability scanner in your security toolkit can often make a real difference by helping you discover overlooked vulnerable items. For this reason, we’ve manually packaged the latest and newly released OpenVAS 8.0 tool and libraries for Kali Linux. Although nothing major has changed in this release in terms of running the vulnerability scanner, I wanted to give a quick overview on how to Install, setup, configure and run OpenVAS on Kali Linux

Setting up Kali for installing OpenVAS

If you haven’t already, make sure your Kali is up-to-date and install the latest OpenVAS. Once done, run the openvas-setup command to setup OpenVAS, download the latest rules, create an admin user, and start up the various services. Depending on your bandwidth and computer resources, this could take a while.

[email protected]:~# apt-get update && apt-get dist-upgrade -y
[email protected]:~# reboot

Install, setup, configure and run OpenVAS on Kali Linux - blackMORE Ops - 1

After the reboot has completed, you need to open terminal again and install OpenVAS.

[email protected]:~# apt-get install openvas -y

Install, setup, configure and run OpenVAS on Kali Linux - blackMORE Ops - 2

This should take some time as the install is around 81.6MB assuming that none of the per-requisitities were ever installed. Sit back and keep reading this guide while the installation continues.
After the installation is finished, you need to run openvas-setup. This again will take a VERY long time as at this point it will download a lot of CVE, sync NVT’s, Vulnerabilities etc. This process also generates a certificate for HTTPS login to OpenVAS gui.

[email protected]:~# openvas-setup
[>] Checking redis.conf
[*] Editing redis.conf

[>] Checking openvassd.conf
[*] Adding to openvassd.conf

[>] Restarting redis-server

[>] Checking OpenVAS certificate infrastructure
ERROR: Directory for keys (/var/lib/openvas/private/CA) not found!
ERROR: CA key not found in /var/lib/openvas/private/CA/cakey.pem

[*] Creating OpenVAS certificate infrastructure

Installed private key to /var/lib/openvas/private/CA/clientkey.pem.
Installed certificate to /var/lib/openvas/CA/clientcert.pem.

[>] Updating OpenVAS feeds
[*] [1/3] Updating: NVT
--2018-03-08 03:00:45--  http://dl.greenbone.net/community-nvt-feed-current.tar.bz2
Resolving dl.greenbone.net (dl.greenbone.net)..., 2a01:130:2000:127::d1
Connecting to dl.greenbone.net (dl.greenbone.net)||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34536678 (33M) [application/octet-stream]
Saving to: ‘/tmp/greenbone-nvt-sync.dsrKn1A33f/openvas-feed-2018-03-08-4271.tar.bz2’

/tmp/greenbone-nvt- 100%[===================>]  32.94M  2.46MB/s    in 13s     
Mar 08 03:04:15 kali systemd[1]: Starting Open Vulnerability Assessment System Manager Daemon...

[*] Opening Web UI ( in: 5... 4... 3... 2... 1... 

[>] Checking for admin user
[*] Creating admin user
User created with password 'e432aa97-2fd3-4c1b-8c16-1166cbd19d70'.

[+] Done

Checking for OpenVAS ports

Once openvas-setup completes its process, the OpenVAS manager, scanner, and GSAD services should be listening:

[email protected]:~# [email protected]:~# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0  *               LISTEN      4782/gsad           
tcp        0      0*               LISTEN      4774/gsad           
tcp        0      0*               LISTEN      4776/openvasmd      
[email protected]:~# 

Note those ports? 9392 is for WebGUI/OpenVAS Web Interface.

Checking OpenVAS services

Most guides including the official guides would say to run openvas-start but I found it useful to run openvas-check-setup before launching OpenVAS just in case something went missing. For example, in my setup; note that this is a FRESH Kali Installation with Fresh OpenVAS Installation, I found 1 error about greenbone-scapdata-sync.

[email protected]:~# openvas-check-setup 
openvas-check-setup 2.3.7
  Test completeness and readiness of OpenVAS-9

  Please report us any non-detected problems and
  help us to improve this check routine:
        ERROR: No OpenVAS SCAP database found. (Tried: /var/lib/openvas/scap-data/scap.db)
        FIX: Run a SCAP synchronization script like greenbone-scapdata-sync.

 ERROR: Your OpenVAS-9 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:
Please attach the log-file (/tmp/openvas-check-setup.log) to help us analyze the problem.

The fix is given in the error as well, simple run greenbone-scapdata-sync and it will sync OpenVAS SCAP database files.

[email protected]:~# greenbone-scapdata-sync
OpenVAS community feed server - http://www.openvas.org/
This service is hosted by Greenbone Networks - http://www.greenbone.net/

All transactions are logged.

If you have any questions, please use the OpenVAS mailing lists
or the OpenVAS IRC chat. See http://www.openvas.org/ for details.

By using this service you agree to our terms and conditions.

Only one sync per time, otherwise the source ip will be blocked.

receiving incremental file list
     18,282,318 100%    3.05MB/s    0:00:05 (xfr#1, to-chk=76/89)
            181 100%    0.34kB/s    0:00:00 (xfr#68, to-chk=0/89)

sent 10,379 bytes  received 884,066,503 bytes  2,847,268.54 bytes/sec
total size is 926,410,667  speedup is 1.05
part 0 Done
part 1 Done
part 0 Done
part 1 Done

I have a really fast Internet connection, but this took some time! However after it finished, I ran openvas-check-setup again to ensure there’s to major errors.

[email protected]:~# openvas-check-setup 

It seems like your OpenVAS-9 installation is OK.

This time it came back as OK. There were few warnings, if you want you can follow up on those.

Starting OpenVAS services

Now that we’ve configured OpenVAS, updated all NVT’s and Scrap Databases, we can launch OpenVAS. You can simply start all the necessary services by running openvas-start.

[email protected]:~# openvas-start
[*] Please wait for the OpenVAS services to start.
[*] You might need to refresh your browser once it opens.
[*]  Web UI (Greenbone Security Assistant):

● greenbone-security-assistant.service - Greenbone Security Assistant
   Loaded: loaded (/lib/systemd/system/greenbone-security-assistant.service; disabled; vendor preset: disabled)
[*] Opening Web UI ( in: 5... 4... 3... 2... 1... 

Setup OpenVAS User account and changing password

Remember the long password that was auto-created for admin user by default? You don’t? Neither do I!

I just feel that it’s a lot easier to set a manual password and create a new user from CLI. You can do that too:

[email protected]:~# 
[email protected]:~# openvasmd --create-user=blackmore
User created with password '19c29356-c59e-481a-8c3d-80225f80302b'.
[email protected]:~# openvasmd --create-user=blackmoreops
User created with password 'b4f70c8b-1c45-442d-a41b-b87b24f473b6'.
[email protected]:~# 
[email protected]:~# openvasmd --user=blackmoreops --new-password=operations1
[email protected]:~# openvasmd --user=admin --new-password=administrator1
[email protected]:~# openvasmd --user=blackmore --new-password=operations1
[email protected]:~# 
[email protected]:~# openvasmd --get-users
[email protected]:~# 

Connecting to the OpenVAS Web Interface

Point your browser to, accept the self signed SSL certificate and plugin the credentials for the admin user.

The admin password was generated during the setup phase. We’ve changed it but if you haven’t look through the outputs of simply reset it.

Type in Admin username and password or one of the new users you’ve setup and bang, you’re in.

OpenVAS is now ready for you to configure a scan-config and run a scan against a given IP or range. You are going to love that part!

Check Also

Configuring and Tuning OpenVAS in Kali Linux - blackMORE Ops

Configure, Tune, Run and Automate OpenVAS on Kali Linux

Users often request the addition of vulnerability scanners to Kali, most notably the ones that …

Correct way of installing VirtualBox Guest Additions in Kali Linux 2016.2/2017 (Kali Rolling)

How to install VirtualBox Guest Additions in Kali Linux (Kali Rolling / Kali Linux 2016.2 / Kali 2017)

Since Kali Linux 2016 came out (also known as Kali Rolling), it seems that Official …

One comment

  1. This worked in UBUNTU:

    sudo apt-get install openvas

Use WordPress.com, Twitter, Facebook, or Google+ accounts to comment (anonymous comments allowed)

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Privacy Policy on Cookies Usage

Some services used in this site uses cookies to tailor user experience or to show ads.