OpenVas Instalacion
OpenVas Instalacion
Instalacion OpenVas
Vamos a instalar el escaner de vulnerabilidades OpenVas, en uns distro kali que tenemos en nuestro proxmox.
Primero de todo, actualizamos:
1
2
3
4
5
6
7
8
9
10
11
┌──(root㉿kali)-[~]
└─# apt-get update
Get:1 http://kali.download/kali kali-rolling InRelease [41.5 kB]
Get:2 http://kali.download/kali kali-rolling/main amd64 Packages [20.3 MB]
Get:3 http://kali.download/kali kali-rolling/main amd64 Contents (deb) [49.0 MB]
Fetched 69.3 MB in 7s (10.4 MB/s)
Reading package lists... Done
┌──(root㉿kali)-[~]
└─#
apt-get dist-upgrade
Instalamos GVM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
┌──(root㉿kali)-[~]
└─# apt-get install gvm*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'gvm' for glob 'gvm*'
Note, selecting 'gvm-tools' for glob 'gvm*'
Note, selecting 'gvmd' for glob 'gvm*'
Note, selecting 'gvmd-common' for glob 'gvm*'
gvmd is already the newest version (24.0.0-1).
gvmd set to manually installed.
gvmd-common is already the newest version (24.0.0-1).
gvmd-common set to manually installed.
The following packages were automatically installed and are no longer required:
imagemagick-6.q16 libbfio1 libc++1-19 libc++abi1-19 libcapstone4 libconfig++9v5 libconfig9 libdirectfb-1.7-7t64
libegl-dev libfmt9 libgdal35 libgl1-mesa-dev libgles-dev libgles1 libglvnd-core-dev libglvnd-dev
libgtksourceview-3.0-1 libgtksourceview-3.0-common libgtksourceviewmm-3.0-0v5 libhdf5-103-1t64 libhdf5-hl-100t64
libjxl0.9 libmagickcore-6.q16-7-extra libmagickcore-6.q16-7t64 libmagickwand-6.q16-7t64 libmbedcrypto7t64
libpaper1 libpoppler140 libqt5x11extras5 libsuperlu6 libtag1v5 libtag1v5-vanilla libtagc0 libunwind-19
libwebrtc-audio-processing1 libx265-209 openjdk-23-jre openjdk-23-jre-headless python3-appdirs
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
greenbone-security-assistant gsad libmicrohttpd12t64
The following NEW packages will be installed:
greenbone-security-assistant gsad gvm gvm-tools libmicrohttpd12t64
0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Need to get 3,686 kB of archives.
After this operation, 15.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Iniciamos configuracion openvas
Se iniciará la descarga de todas las firmas que utiliza Openvas para detectar vulnerabilidades
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
┌──(root㉿kali)-[~]
└─# gvm-setup
[>] Starting PostgreSQL service
[>] Creating GVM's certificate files
[>] Creating PostgreSQL database
[*] Creating database user
[*] Creating database
[*] Creating permissions
CREATE ROLE
[*] Applying permissions
GRANT ROLE
[*] Creating extension uuid-ossp
CREATE EXTENSION
[*] Creating extension pgcrypto
CREATE EXTENSION
[*] Creating extension pg-gvm
CREATE EXTENSION
[>] Migrating database
Aqui ya tendriamos usuario y password para entrar por la consola. Lo apuntamos.
Instalamos asistemte greenbone
1
2
3
apt-get install -y greenbone-security-assistant
Revisamos instalación GVM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
┌──(root㉿kali)-[~]
└─# gvm-check-setup
gvm-check-setup 23.11.0
Test completeness and readiness of GVM-23.11.0
Step 1: Checking OpenVAS (Scanner)...
OK: OpenVAS Scanner is present in version 23.13.1.
OK: Notus Scanner is present in version 22.6.4.
OK: Server CA Certificate is present as /var/lib/gvm/CA/servercert.pem.
Checking permissions of /var/lib/openvas/gnupg/*
OK: _gvm owns all files in /var/lib/openvas/gnupg
OK: redis-server is present.
OK: scanner (db_address setting) is configured properly using the redis-server socket: /var/run/redis-openvas/redis-server.sock
OK: the mqtt_server_uri is defined in /etc/openvas/openvas.conf
OK: _gvm owns all files in /var/lib/openvas/plugins
OK: NVT collection in /var/lib/openvas/plugins contains 93377 NVTs.
OK: The notus directory /var/lib/notus/products contains 472 NVTs.
Checking that the obsolete redis database has been removed
Could not connect to Redis at /var/run/redis-openvas/redis-server.sock: No such file or directory
OK: No old Redis DB
Starting ospd-openvas service
Waiting for ospd-openvas service
OK: ospd-openvas service is active.
OK: ospd-OpenVAS is present in version 22.7.1.
Step 2: Checking GVMD Manager ...
OK: GVM Manager (gvmd) is present in version 24.0.0.
Step 3: Checking Certificates ...
OK: GVM client certificate is valid and present as /var/lib/gvm/CA/clientcert.pem.
OK: Your GVM certificate infrastructure passed validation.
Step 4: Checking data ...
OK: SCAP data found in /var/lib/gvm/scap-data.
OK: CERT data found in /var/lib/gvm/cert-data.
Step 5: Checking Postgresql DB and user ...
OK: Postgresql version and default port are OK.
Step 6: Checking Greenbone Security Assistant (GSA) ...
OK: Greenbone Security Assistant is present in version 24.0.0~git.
Step 7: Checking if GVM services are up and running ...
Starting gvmd service
Waiting for gvmd service
OK: gvmd service is active.
Starting gsad service
Waiting for gsad service
OK: gsad service is active.
Step 8: Checking few other requirements...
OK: nmap is present.
OK: ssh-keygen found, LSC credential generation for GNU/Linux targets is likely to work.
OK: nsis found, LSC credential package generation for Microsoft Windows targets is likely to work.
OK: xsltproc found.
WARNING: Your password policy is empty.
SUGGEST: Edit the /etc/gvm/pwpolicy.conf file to set a password policy.
Step 9: Checking greenbone-security-assistant...
OK: greenbone-security-assistant is installed
It seems like your GVM-23.11.0 installation is OK.
Iniciamos Open y haz login
En una terminal ejecuta sudo gvm-start y abre un browser
Acceder desde otra maquina.
Ahora mismo, solo podemos acceder desde kali a la consola, vamos a cambiarlo para poder entrar desde otras maquinas.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
┌──(root㉿kali)-[~]
└─# systemctl status gsad
● gsad.service - Greenbone Security Assistant daemon (gsad)
Loaded: loaded (/usr/lib/systemd/system/gsad.service; disabled; preset: disabled)
Active: active (running) since Fri 2025-02-14 10:11:40 CET; 1min 15s ago
Invocation: 47f1b28860c7421cacaac561693c2057
Docs: man:gsad(8)
https://www.greenbone.net
Main PID: 3362 (gsad)
Tasks: 4 (limit: 9384)
Memory: 2.7M (peak: 3.1M)
CPU: 28ms
CGroup: /system.slice/gsad.service
├─3362 /usr/sbin/gsad --foreground --listen 127.0.0.1 --port 9392
└─3365 /usr/sbin/gsad --foreground --listen 127.0.0.1 --port 9392
Feb 14 10:11:40 kali systemd[1]: Starting gsad.service - Greenbone Security Assistant daemon (gsad)...
Feb 14 10:11:40 kali systemd[1]: Started gsad.service - Greenbone Security Assistant daemon (gsad).
┌──(root㉿kali)-[~]
Editamos el servicio, para que en lugar de estar escuchando en local, escuche para todas las redes por ejemplo:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
vi /usr/lib/systemd/system/gsad.service
[Unit]
Description=Greenbone Security Assistant daemon (gsad)
Documentation=man:gsad(8) https://www.greenbone.net
After=network.target gvmd.service
Wants=gvmd.service
[Service]
Type=exec
User=_gvm
Group=_gvm
RuntimeDirectory=gsad
RuntimeDirectoryMode=2775
PIDFile=/run/gsad/gsad.pid
ExecStart=/usr/sbin/gsad --foreground --listen 0.0.0.0 --port 9392
Restart=always
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target
Alias=greenbone-security-assistant.service
Donde pone listen, hemos cambiado 127.0.0.1 por 0.0.0.0 Restartamos servicio y listos
1
2
3
4
5
6
7
8
9
┌──(root㉿kali)-[~]
└─# systemctl restart gsad
Warning: The unit file, source configuration file or drop-ins of gsad.service changed on disk. Run 'systemctl daemon-reload' to reload units.
┌──(root㉿kali)-[~]
└─# systemctl daemon-reload
┌──(root㉿kali)-[~]
└─#
This post is licensed under CC BY 4.0 by the author.