OpenVAS is included in the current Kali linux distro, so this guide will walk you through the initial setup of OpenVAS and then how you use the program.
First we need to create a certificate for OpenVAS to use. You can just accept all the default values by pressing [Enter] – they are only used locally.
Next we will create a matching certificate with a username. It doesn’t matter what this username is – you’ll never use it again outside this setup. Our username here is “pentest”.
sudo openvas-mkcert-client -n pentest -i
Next we can update our database of vulnerabilities. Keep this command in mind – you’ll want to update every now and then.
Next we’ll need to stop a few services so that we can perform updates without conflict.
sudo service openvas-manager stop
sudo service openvas-scanner stop
Now we can start our actual scanner and allow it to update itself. These steps can take a while – be patient!
Rebuild our database …
sudo openvasmd --rebuild
Update our security content automation protocol data…(another database used by OpenVAS to check for vulnerabilities)
Update cert data …
Woo! The back end stuff is all setup now. Now we need to create an administrator user and password used to log in to the OpenVAS system. All this sounds complicated, but it’s not. Once things are up and running, it’s point and click! Here we’ll use the username “admin”. You’ll be asked to pick a password – don’t forget these, you’ll need them when you want to use OpenVAS.
sudo openvasad -c add_user -n admin -R Admin
You’ll be asked for a password and warned that this account has full privileges.
Now we need to restart all these services we’ve been updating.
sudo killall openvassd
sudo service openvas-scanner start
sudo service openvas-manager start
sudo service openvas-administrator restart
sudo service greenbone-security-assistant restart
Wait a second, you say! What is that greenbone thing?! Well – glad you asked! That is a web interface for the OpenVAS program. It’s pretty – you’ll like it a lot.
With all of this done, you can pull up your browser and point it to https://localhost:9392. Remember that username and password I told you you’d need to remember? Good! use that to log in to the welcome screen of Greenbone.
Once you’re logged in, you can use the quick start box to enter in the host you wish to scan and hit “Start Scan” to get going. It’s as easy as that! You can view results even before the scan is done, then when it’s over you can output the results as HTML, PDF, TXT, and many more. Enjoy!