![](http://2.bp.blogspot.com/-b4yjhubd6CA/XMrIY116X-I/AAAAAAAAAeQ/xh-gyMT1DDoQerQ52rbRACEZYekBLEoHgCLcBGAs/s1600/OpenVAS_Ubuntu_19_04-8.png)
OpenVAS is a full-featured vulnerability scanner. Its capabilities include authenticated and unauthenticated testing, various high level and low level Internet and industrial protocols, performance tuning for large-scale scans and a powerful internal programming language to implement any type of vulnerability test.
Ubuntu includes the OpenVAS in its repository, which is free and open source. This tutorial will walk you through the steps to install, tune and run OpenVAS on an Ubuntu 19.04 server.
For this tutorial, our Ubuntu 19.04 virtual machine has 2 vCPUs and 2GB of RAM, which is generally sufficient to scan small numbers of hosts at once. However, still if you can provide more resources to it, the smoother your scanning system will run.
If prerequisites as stated above are in place then you may proceed to install OpenVAS using the following commands:
sudo apt install rpm nsis alien
sudo apt install openvas
The installation will take several minutes to complete.
Configuring OpenVAS
When you are done with installing openvas, execute the following command to run its initial configuration process:
sudo openvas-setup
It will take plenty of time to complete. At the end of the setup, automatically-generated password for the admin user will be displayed. It is highly recommended to change auto generated password so that you can remember it.
![](http://3.bp.blogspot.com/-8y6T8r47To0/XMq6XKk4zDI/AAAAAAAAAcM/AnbwNgtKzIMqpQiwNUaXuGzn9NIs_7IIQCLcBGAs/s1600/OpenVAS_Ubuntu_19_04-1.png)
If you need to create an additional OpenVAS users, run ‘openvasmd’ with the –create-user option, which will add a new user and display the randomly-generated password.
sudo openvasmd --create-user=operator
![](http://2.bp.blogspot.com/-J4hLFAKgxJM/XMq6eTmKV6I/AAAAAAAAAcQ/4NZ2vcQoVfYtyCIKEvbkXyeN533ZihbyACLcBGAs/s1600/OpenVAS_Ubuntu_19_04-2.png)
sudo openvasmd --get-users
Output
admin
operator
If you’re anything like me, you will forget to save the admin password or accidentally delete it. Fortunately, changing OpenVAS user passwords can easily be accomplished with ‘openvasmd’ and the –new-password option.
sudo openvasmd --user=operator --new-password=yourpassword
sudo openvasmd --user=admin --new-password=yourpassword
![](http://1.bp.blogspot.com/-OTvGu664Y-M/XMq662L7oxI/AAAAAAAAAcg/Pc_uwLxXdN8bCdfKLeTXCEPTjXSYstfpACLcBGAs/s1600/OpenVAS_Ubuntu_19_04-3.png)
Starting and Stopping OpenVAS
You can start or stop openvas services by executing the following commands:
sudo systemctl enable openvas-manager
sudo systemctl enable openvas-scanner
sudo systemctl start openvas-manager
sudo systemctl start openvas-scanner
If you want to stop openvas services, run the following to stop it:
sudo systemctl stop openvas-scanner
sudo systemctl stop openvas-manager
When the services finish initializing, you should find TCP ports 9390 and 9392 listening on your loopback interface.
sudo netstat -ant
![](http://1.bp.blogspot.com/-srtxxInZcM4/XMq7FDb8fhI/AAAAAAAAAco/qi2nPJulhKA_JbLDqWlksLUfnrXdDEEZQCLcBGAs/s1600/OpenVAS_Ubuntu_19_04-5.png)
By default, the web interface is only accessible from the local computer and you will not be able to access it from a remote machine. If you need to make it accessible from the intranet or internet then open the following file with root privileges in your preferred text editor:
sudo nano /etc/default/greenbone-security-assistant
Near the top, you should see a parameter that specifies the address that the web interface will listen on. You need to change the value from 127.0.0.1 to the real IP address of your Ubuntu machine. This will let it listen to connections from the intranet, and you will be able to connect:
![](http://2.bp.blogspot.com/-HJxxYCkMXIc/XMq7jOAyluI/AAAAAAAAAc0/rdOi5tG-YtM_9Txf2m-Av-Qb6ftYtCLFgCLcBGAs/s1600/OpenVAS_Ubuntu_19_04-6.png)
When done, save and close.
Accessing OpenVAS Web Interface
The Greenbone Security Assistant is the OpenVAS web interface available at https://ip_address:9392. After accepting the self-signed certificate warning you will be presented a login page.
![](http://3.bp.blogspot.com/-J0gc35A5M2k/XMq7wdWtPqI/AAAAAAAAAc4/EABij0RDZUwcq7mVD4WXkWdKRCs4EA_UgCLcBGAs/s1600/OpenVAS_Ubuntu_19_04-7.png)
You will need to enter the username and password you configured earlier. For this guide, the username was admin.
![](http://4.bp.blogspot.com/-mceMU3X2rI4/XMq8DSwz4nI/AAAAAAAAAdA/-oSlLBEV4_8xW3ABmYskP1wi43dGNeXWwCLcBGAs/s1600/OpenVAS_Ubuntu_19_04-9.png)
Once you sign in, you will see the main dashboard.
![](http://2.bp.blogspot.com/-ftBosKUnUhQ/XMq82_3L6LI/AAAAAAAAAdI/8z9wKKh-Vv0rtQdhNZLMW-4F_A1CHF6KQCLcBGAs/s1600/OpenVAS_Ubuntu_19_04-10.png)
Set Up Credentials
OpenVAS provide the most complete results when you are able to provide the scanning engine with credentials to use on scanned systems. OpenVAS will use these credentials to log in to the scanned system and perform detailed enumeration of installed software, patches, etc. You can add credentials via the “Credentials” entry under the “Configuration” menu.
![](http://3.bp.blogspot.com/-BltoUCEMKXc/XMrBgALTKnI/AAAAAAAAAdU/lUp0YH2lYt8bEkur7L0ecvnmXGxerw9WgCLcBGAs/s1600/OpenVAS_Ubuntu_19_04-11.png)
Click on Star
![](http://2.bp.blogspot.com/-2s1GlZfvSm0/XMrBqhwQrGI/AAAAAAAAAdY/5Dct54-yuNoIT2D3ta1C_zJY_wkFbCweACLcBGAs/s1600/OpenVAS_Ubuntu_19_04-12.png)
Enter the credentials information of the hosts you want to scan and click Create.
![](http://2.bp.blogspot.com/-XCFwVtI24nI/XMrB5UGQqnI/AAAAAAAAAdg/uzLDRXU42SgIteuB-RkNQHo7j5l5VOX2ACLcBGAs/s1600/OpenVAS_Ubuntu_19_04-13.png)
Target Configuration
You can configure them under the “Targets” section of the “Configuration” menu.
![]()
Scan Configuration
Prior to launching a vulnerability scan, you should fine-tune the Scan Config that will be used, which can be done under the “Scan Configs” section of the “Configuration” menu. You can clone any of the default Scan Configs and edit its options, disabling any services or checks that you don’t require.
![]()
Task Configuration
Your credentials, targets, and scan configurations are in place so now you’re ready to put everything together and run a vulnerability scan. In OpenVAS, vulnerability scans are conducted as “Tasks”. When you set up a new task, you can further optimize the scan by either increasing or decreasing the concurrent activities that take place.
With more finely-tuned scan settings and target selection, the results of your scan will be much more useful.
![]()
Wrapping up
You can configure them under the “Targets” section of the “Configuration” menu.
![](http://1.bp.blogspot.com/-WX03jjfFmz0/XMrCZQjD6OI/AAAAAAAAAds/JZH6XCPynnQLFVLUTzjrg48-KLi2GrNcwCLcBGAs/s1600/OpenVAS_Ubuntu_19_04-14.png)
Scan Configuration
Prior to launching a vulnerability scan, you should fine-tune the Scan Config that will be used, which can be done under the “Scan Configs” section of the “Configuration” menu. You can clone any of the default Scan Configs and edit its options, disabling any services or checks that you don’t require.
![](http://3.bp.blogspot.com/-xkoHbwRnYqk/XMrC0yQdATI/AAAAAAAAAd0/4jsIDYl1UYklG6ZoDYRKmiQneWGNl0wlgCEwYBhgL/s1600/OpenVAS_Ubuntu_19_04-15.png)
Task Configuration
Your credentials, targets, and scan configurations are in place so now you’re ready to put everything together and run a vulnerability scan. In OpenVAS, vulnerability scans are conducted as “Tasks”. When you set up a new task, you can further optimize the scan by either increasing or decreasing the concurrent activities that take place.
With more finely-tuned scan settings and target selection, the results of your scan will be much more useful.
![](http://3.bp.blogspot.com/-EwIcsQWHmj8/XMrECLlhs6I/AAAAAAAAAd8/cHXDpX0pK_4S4JKqO-xUuNd8W4FF_b0XACLcBGAs/s1600/OpenVAS_Ubuntu_19_04-16.png)
Wrapping up
With the wide range of available features in OpenVAS, we were only able to touch the surface. The number of connected devices in our homes and workplaces is increasing all the time and managing them becomes more of a challenge. Making effective use of a vulnerability scanner can make that management at least a little bit easier.