Sweshi's Tutorials

Vulnerability Analysis Tools Tutorials


openVAS tutorial

NOTICE: All the tutorials on this website are meant to help you find security vulnerabilties on your own network and devices to understand your security posture before black hats do. Penetration testing without a written consent is illegal and you can be prosecuted. Use these tutorials to secure your own networks or those whose permission you have been granted. Keep it ethical and keep it professional.
Table of Contents
openvas introduction

OpenVAS (Open Vulnerability Assessment System) is an open-source framework used for vulnerability scanning and management from Greenbone. It provides a set of tools and services to perform security testing on networks,systems and applications. It can be used to identify vulnerabilities, and generate detailed reports about them. OpenVAS is often used in ethical penetration testing to assess the security posture of systems and networks.

installing openvas on Kali Linux

To begin, we will first update our repository. The commands below update the repository and upgrade it. I have used -y to accept the prompts in advance.

sudo apt update -y sudo apt upgrade -y

We will now run the actual installation for openvas with the updated repository

sudo apt install openvas -y

Its a big download so you might wait for quite some time. We will now run the following command to start the postgre service.

gvm-setup

if you have an error, run the following command if not, proceed to the section that on using openvas

fixing the postgre error

Stop the postgre service from running.

systemctl stop postgresql@14-main

Once we stop the service, we need to make sure that the port number is correct. So open the configuration file and change to port 5432. In this case, I use the vim command. Press i to insert, scroll to the section with the port number, change it to 5432 and save by pressing the escape key, then :wq!

vim /etc/postgresal/16/main/postgresql.conf

Once the port number is changed, you can then restart the service

systemctl restart postgresql

This should fix the error message. So run the setup command again and wait for it to complete

sudo gvm-setup

Make sure that everything is fine by running the command below that inspects the installation. If there are any problems to fix, the exact command to run will be shown at this step.

sudo gvm-check-setup
Changing the openVAS password | Resetting the openVAS password

Change the default admin password using the following command. Replace "passwd" with your own new password.

sudo -E -u _gvm gvmd --user=admin --new-password=passwd

You can now start the service using the command shown below

gvm-start

Once started, you can then open the web GUI on 127.0.0.1:93932