PDA

View Full Version : [HowTo] Installation procedure of OpenVAS on Kali Linux 2022.1



wingcommander'99
2022-04-08, 18:48
I. POSTGRESQL.


Start the service for the gvm module (Greenbone Vulnerability Management)

To do this, open a terminal window:


sudo /etc/init.d/postgresql start


II. INSTALLATION OF GVM.


In a terminal window:

https://i.ibb.co/r5HYxDF/OV.png (https://imgbb.com/)


sudo apt install --install-recommends gvm -y


sudo gvm-setup


https://i.ibb.co/zhPJSy9/OV1.png (https://imgbb.com/)

Be patient it will take a long time.

Once the installation is complete, let's go to the setup check:


sudo gvm-check-setup


https://i.ibb.co/T09zfRg/OV2.png (https://imgbb.com/)


Once the setup is complete you will have this type of output:

https://i.ibb.co/sRn4G5k/OV3.png (https://ibb.co/8sqwpzT)


To avoid a "FIX" error message on next boot:

https://i.ibb.co/xF1VgKF/OV6.png (https://ibb.co/9ZbR4mZ)


To do this, simply start the redis-server service:


sudo systemctl start [email protected]


https://i.ibb.co/YT16SQ8/OV7.png (https://imgbb.com/)


Enable this same service on every boot:


sudo systemctl enable [email protected]


https://i.ibb.co/Vmyjppz/OV8.png (https://imgbb.com/)

https://i.ibb.co/gmKkD5H/OV9.png (https://ibb.co/GnSzVKB)



Perform a final check of the setup which will tell us that the installation is ok:

https://i.ibb.co/dGN0qFB/OV10.png (https://imgbb.com/)


Then let's add a "kali" user and his password: (by default but both need to be changed)


sudo runuser -u _gvm -- gvmd --create-user=kali --password=kali

https://i.ibb.co/y6Mr1SC/OV4.png (https://imgbb.com/)


Once the installation is complete, let's go to the management console.

To do this, open a web window and enter the following address:


https://127.0.0.1:9392/login


https://i.ibb.co/3F6Sjfk/OV11.png (https://ibb.co/kDbqw3M)


Press ?Advanced? to accept the self-signed certificate despite the alert:

https://i.ibb.co/stQJ7Y5/OV11-1.png (https://ibb.co/Yb8TgsD)


Fill in the identifiers created previously:

https://i.ibb.co/MR1R54j/OV12.png (https://ibb.co/D7M7gy6)


And here you are in the dashboard:

https://i.ibb.co/ch3M8K6/OV13.png (https://ibb.co/pjwGK6f)


If any time after a restart of your Kali Linux OpenVAS does not start, redo
a setup check:


sudo gvm-check-setup


UPDATE KALI 2022.4:


it turns out after updating to kali linux version 2022.4, that in OpenVas it is impossible for the utility to get access to the logs. Just give the right rights to correct the incident with the line below:


sudo chmod 666 /var/log/gvm/openvas.log

This action is no longer required in version 2023.1

Fred Sheehan
2022-07-28, 19:47
Good Post! :D

Kali1990
2022-12-04, 11:31
Hello,

that installation procedure is great.
I followed all the steps, but during the gvm-check-setup it stopped after Checkpoint 5 and gives me the output ERROR: No users found. You need to create at least one user to log in. To FIX the following was done sudo runuser -u _gvm -- gvmd --create-user=<name> --password=<password>. Unfortunately the user was not created.
Therefor I could not proceed. Has anyone an idea what could be the background that I'm not able to create a user and how to fix that issue.

Thanks in advance.

Fred Sheehan
2023-01-23, 01:25
They missed the last bit of creating the user, adding them to the admin group;

sudo -u _gvm gvmd --create-user=fred --password=pwd --role=Admin

and I typically remove the default account that was created at install;

sudo -u _gvm gvmd --delete-user=admin --inheritor=fred

wingcommander'99
2023-02-05, 13:35
They missed the last bit of creating the user, adding them to the admin group;

sudo -u _gvm gvmd --create-user=fred --password=pwd --role=Admin

and I typically remove the default account that was created at install;

sudo -u _gvm gvmd --delete-user=admin --inheritor=fred



Thank you for this tip, I had not gone that far, actually in the context of securing an account, it is more prudent to deactivate or delete the admin user.

lc-no-ano
2023-03-24, 14:58
Does anyone know if the GVM package is included in the most recent release of Kali 2023.1? I have tried to locate it to no avail.

KellieAguilar
2023-04-07, 07:20
There are several different reasons that can lead to this error when you install GVM on your system. However, in most cases, this error occurs when GVM can't find any users in your system to create an account.

To work around this issue, you can perform the following steps:

Run the following command to create a user with an arbitrary name and password:

css

sudo runuser -u _gvm -- gvmd --create-user=<name> --password=<password>

For example, if you want to create a user named "gvmuser" and password "password", you can run the following command:

css

sudo runuser -u _gvm -- gvmd --create-user=gvmuser --password=password

After creating the user successfully, you can log in to GVM using the username and password you created.

If you get another error, double check your installation steps and make sure you followed the instructions correctly.

If you are still having problems installing GVM, you can consult the documentation or consult the GVM community to help resolve your issue.