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.
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
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.
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).
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).
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?
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.