Enabling Services

  1. I installed GVM on my Kali purple Virtual Machine, but the gsad.service, gvmd.service, ospd-openvas.service are all disabled. how can I enable them please? I attach the screenshot here.

  2. I need to connect the GSA from the commandline but the error generating like below, could you please help me why and how to solve this?

gvm-cli tls --hostname 127.0.0.1 --port 9392 --xml “rootkali”
[WinError 10061] No connection could be made because the target machine actively refused it

Hi,

first of all for the next post please take a look at Start Here - #3 by bricks

At least they are running at the moment. For enabling the services just run

sudo systemctl enable notus-scanner
sudo systemctl enable ospd-openvas
sudo systemctl enable gvmd
sudo systemctl enable gsad

A TLS connection doesn’t work out of the box. Only the unix socket connection requires no additional setup. It requires to change the gvmd.service systemd file and adjust the arguments passed to the gvmd in the ExecStart line.

2 Likes

Hi Bricks,
Thank you for your swift response. I enabled the services but still preset is disabled.

As you see from the below code I can connect to my GSA web-interface and I can use to start scanning. But my question is I couldn’t connect to my interface from gvm-cli or from the command line eventhough I used socket.

(kali㉿kali)-[~]
└─$ sudo gvm-start
[>] Please wait for the GVM services to start.
[>]
[>] You might need to refresh your browser once it opens.
[>]
[>] Web UI (Greenbone Security Assistant): https://127.0.0.1:9392

● gsad.service - Greenbone Security Assistant daemon (gsad)
Loaded: loaded (/lib/systemd/system/gsad.service; enabled; preset: disabled)
Active: active (running) since Wed 2024-02-21 08:42:53 EST; 43ms ago
Docs: man:gsad(8)
https://www.greenbone.net
Main PID: 4491 (gsad)
Tasks: 1 (limit: 4563)
Memory: 1.6M
CPU: 27ms
CGroup: /system.slice/gsad.service
└─4491 /usr/sbin/gsad --foreground --listen 0.0.0.0 --port 9392

Feb 21 08:42:53 kali systemd[1]: Starting gsad.service - Greenbone Security Assistant daemon (gsad)…
Feb 21 08:42:53 kali systemd[1]: Started gsad.service - Greenbone Security Assistant daemon (gsad).

● gvmd.service - Greenbone Vulnerability Manager daemon (gvmd)
Loaded: loaded (/lib/systemd/system/gvmd.service; enabled; preset: disabled)
Active: active (running) since Wed 2024-02-21 08:42:48 EST; 5s ago
Docs: man:gvmd(8)
Process: 4257 ExecStart=/usr/sbin/gvmd --osp-vt-update=/run/ospd/ospd.sock --listen-group=_gvm (code=exited, status=0/SUCCESS)
Main PID: 4268 (gvmd)
Tasks: 1 (limit: 4563)
Memory: 188.5M
CPU: 15.224s
CGroup: /system.slice/gvmd.service
└─4268 "gvmd: Waiting " --osp-vt-update=/run/ospd/ospd.sock --listen-group=_gvm

Feb 21 08:42:29 kali systemd[1]: Starting gvmd.service - Greenbone Vulnerability Manager daemon (gvmd)…
Feb 21 08:42:29 kali systemd[1]: gvmd.service: Can’t open PID file /run/gvmd/gvmd.pid (yet?) after start: Operation not permitted
Feb 21 08:42:48 kali systemd[1]: Started gvmd.service - Greenbone Vulnerability Manager daemon (gvmd).

● ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)
Loaded: loaded (/lib/systemd/system/ospd-openvas.service; enabled; preset: disabled)
Active: active (running) since Wed 2024-02-21 08:42:29 EST; 24s ago
Docs: man:ospd-openvas(8)
man:openvas(8)
Process: 4185 ExecStart=/usr/bin/ospd-openvas --config /etc/gvm/ospd-openvas.conf --log-config /etc/gvm/ospd-logging.conf (code=exited, status=0/SUCCESS)
Main PID: 4246 (ospd-openvas)
Tasks: 5 (limit: 4563)
Memory: 193.9M
CPU: 13.714s
CGroup: /system.slice/ospd-openvas.service
├─4246 /usr/bin/python3 /usr/bin/ospd-openvas --config /etc/gvm/ospd-openvas.conf --log-config /etc/gvm/ospd-logging.conf
└─4250 /usr/bin/python3 /usr/bin/ospd-openvas --config /etc/gvm/ospd-openvas.conf --log-config /etc/gvm/ospd-logging.conf

Feb 21 08:42:24 kali systemd[1]: Starting ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)…
Feb 21 08:42:26 kali ospd-openvas[4185]: /usr/lib/python3/dist-packages/requests/init.py:109: RequestsDependencyWarning: urllib3 (2.1.0) or chardet (5.1.0)/charset_normalizer (3.0.1) doesn’t match a supported version!
Feb 21 08:42:26 kali ospd-openvas[4185]: warnings.warn(
Feb 21 08:42:29 kali systemd[1]: Started ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas).

[>] Opening Web UI (https://127.0.0.1:9392) in: 5… 4… 3… 2… 1…

The reason need to connect to the GSA is My Target is I want to generate xml files and list of targets or hosts by connecting from the command line. Could you please send me how to generate this?

Thank you.

Hi,

please format your post according to Start Here - #3 by bricks Without appropriate formatting it’s so damn difficult to read. Just edit your last post and add backticks.

2 Likes

Additionally you need to take a look at the logs Troubleshooting - Greenbone Community Documentation

2 Likes