OK, I made some changes on redis.service configuration. It appears that the pidfile and sockfile werent at the right place. The “db_address = /run/redis-openvas/redis.sock” is specified in the openvas configuration file.
With the following configuration for redis service, I was able to start it succefully:
cat << EOF > /etc/systemd/system/redis.service
[Unit]
Description=Advanced key-value store
After=network.target
Documentation=http://redis.io/documentation, man:redis-server(1)
[Service]
Type=forking
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
ExecStop=/bin/kill -s TERM $MAINPID
PIDFile=/run/redis-openvas/redis-server.pid
TimeoutStopSec=0
Restart=always
User=redis
Group=redis
RuntimeDirectory=redis
RuntimeDirectoryMode=2755
UMask=007
PrivateTmp=yes
LimitNOFILE=65535
PrivateDevices=yes
ProtectHome=yes
ReadOnlyDirectories=/
ReadWriteDirectories=-/var/lib/redis
ReadWriteDirectories=-/var/log/redis
ReadWriteDirectories=-/var/run/redis-openvas
NoNewPrivileges=true
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
MemoryDenyWriteExecute=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictNamespaces=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
# redis-server can write to its own config file when in cluster mode so we
# permit writing there by default. If you are not using this feature, it is
# recommended that you replace the following lines with "ProtectSystem=full".
ProtectSystem=true
ReadWriteDirectories=-/etc/redis
[Install]
WantedBy=multi-user.target
Alias=redis.service
EOF
root@gvm:~# ls -l /run/redis-openvas/
total 4
-rw-rw---- 1 redis redis 4 Jun 11 16:38 redis-server.pid
srwxrwx--- 1 redis redis 0 Jun 11 16:38 redis.sock
But once again, after starting the task scan, it gets interrupted with no information in the logs, more than the posted in the following lines:
ospd-openvas.log
OSPD[636] 2021-06-11 16:38:12,550: INFO: (ospd.main) Starting OSPd OpenVAS version 21.4.0. │
OS│OSPD[636] 2021-06-11 16:47:21,499: INFO: (ospd.command.command) Scan ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa added to the queue in position 1. │
OS│OSPD[636] 2021-06-11 16:47:27,217: INFO: (ospd.ospd) Currently 1 queued scans. │
OS│OSPD[636] 2021-06-11 16:47:27,248: INFO: (ospd.ospd) Starting scan ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa. │
OS│OSPD[636] 2021-06-11 16:47:40,042: ERROR: (ospd_openvas.daemon) Task ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa was unexpectedly stopped or killed. │
OS│OSPD[636] 2021-06-11 16:47:40,044: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Host scan finished. │
OS│OSPD[636] 2021-06-11 16:47:40,046: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Host scan finished. Progress: 0, Status: RUNNING │
OS│OSPD[636] 2021-06-11 16:47:40,046: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Scan interrupted. │
02│OSPD[636] 2021-06-11 16:47:41,618: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Scan process is dead and its progress is 0 │02
sd│OSPD[636] 2021-06-11 16:47:41,620: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Scan interrupted. │er
ro│OSPD[636] 2021-06-11 16:47:41,626: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Scan process is dead and its progress is 0 │
sd│OSPD[636] 2021-06-11 16:47:41,626: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Scan interrupted. │r
it│OSPD[636] 2021-06-11 16:47:41,678: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Scan process is dead and its progress is 0 │
sd│OSPD[636] 2021-06-11 16:47:41,678: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Scan interrupted. │ p
ar│OSPD[636] 2021-06-11 16:47:41,699: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Scan process is dead and its progress is 0 │
sd│OSPD[636] 2021-06-11 16:47:41,699: INFO: (ospd.ospd) ba5f6dac-d08c-4ef7-8195-a21a3c6d6daa: Scan interrupted
gvmd.log
event target:MESSAGE:2021-06-11 16h41.36 CDT:983: Target phpipam-target (3faae28f-6ebc-4bfe-892f-9a323ab68c8a) has been created by admin │10
sd│event task:MESSAGE:2021-06-11 16h42.05 CDT:1079: Status of task (ffd21897-d148-4bf1-b885-726157c1a1e7) has changed to New │er
ro│event task:MESSAGE:2021-06-11 16h42.05 CDT:1079: Task phpipam-task (ffd21897-d148-4bf1-b885-726157c1a1e7) has been created by admin │
sd│event task:MESSAGE:2021-06-11 16h47.16 CDT:1579: Status of task phpipam-task (ffd21897-d148-4bf1-b885-726157c1a1e7) has changed to Requested │r
it│event task:MESSAGE:2021-06-11 16h47.16 CDT:1579: Task phpipam-task (ffd21897-d148-4bf1-b885-726157c1a1e7) has been requested to start by admin │
sd│event task:MESSAGE:2021-06-11 16h47.21 CDT:1585: Status of task phpipam-task (ffd21897-d148-4bf1-b885-726157c1a1e7) has changed to Queued │ p
ar│event task:MESSAGE:2021-06-11 16h47.31 CDT:1585: Status of task phpipam-task (ffd21897-d148-4bf1-b885-726157c1a1e7) has changed to Running │
sd│event task:MESSAGE:2021-06-11 16h47.41 CDT:1585: Status of task phpipam-task (ffd21897-d148-4bf1-b885-726157c1a1e7) has changed to Interrupted
openvas.log
main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load gb_wmi_access.nasl, a dependency of Tencent FoxMail Detection (Windows SMB Login). This may be due to a parse error, o│54
ut│r it failed to find the dependency. Please check the path to the file. │
ut│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load gb_wmi_access.nasl, a dependency of Adobe DNG Converter Detection (Windows). This may be due to a parse error, or it f│
md│ailed to find the dependency. Please check the path to the file. │
ev│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load gb_wmi_access.nasl, a dependency of Foxit PDF Toolkit Detection. This may be due to a parse error, or it failed to fin│
ev│d the dependency. Please check the path to the file. │
ev│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load gb_wmi_access.nasl, a dependency of Norton Remove and Reinstall Detection (Windows SMB Login). This may be due to a pa│
ev│rse error, or it failed to find the dependency. Please check the path to the file. │
ev│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load gb_desktop_board_bios_info_ssh_login_detect.nasl, a dependency of Intel Desktop Boards SMM Local Privilege Escalation │
ev│Vulnerability (INTEL-SA-00022) - Linux. This may be due to a parse error, or it failed to find the dependency. Please check the path to the file. │
ev│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load smb_registry_access.nasl, a dependency of Windows Registry Check. This may be due to a parse error, or it failed to fi│
ev│nd the dependency. Please check the path to the file. │
ev│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load gb_wmi_access.nasl, a dependency of Orangeworm Kwampirs Trojan Detection. This may be due to a parse error, or it fail│
ev│ed to find the dependency. Please check the path to the file. │
ev│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load smb_registry_access.nasl, a dependency of Oilrig / Cleaver Malicious Scheduled Task Detection. This may be due to a pa│
01│rse error, or it failed to find the dependency. Please check the path to the file. │54
OS│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load nessus_detect.nasl, a dependency of Java Debug Wire Protocol (JDWP) Service Detection. This may be due to a parse erro│
OS│r, or it failed to find the dependency. Please check the path to the file. │
OS│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load gb_symantec_pcanywhere_access_server_detect.nasl, a dependency of Collect banner of unknown services. This may be due │
OS│to a parse error, or it failed to find the dependency. Please check the path to the file. │
OS│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load nessus_detect.nasl, a dependency of Collect banner of unknown services. This may be due to a parse error, or it failed│
OS│ to find the dependency. Please check the path to the file. │
OS│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load smb_registry_access.nasl, a dependency of HIDDEN COBRA Trojan 'Volgmer' Detection. This may be due to a parse error, o│
OS│r it failed to find the dependency. Please check the path to the file. │
OS│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load gb_wmi_access.nasl, a dependency of Google Chrome MEGA Extension Trojan (Windows). This may be due to a parse error, o│
OS│r it failed to find the dependency. Please check the path to the file. │
OS│sd main:WARNING:2021-06-11 20h47.39 utc:1760: There was a problem trying to load gb_wmi_access.nasl, a dependency of Get OS Version, OS Type, OS Servicepack and OS Name over WMI (win). This may be du│
OS│e to a parse error, or it failed to find the dependency. Please check the path to the file.
What am I doing wrong? I cant get enough info from the logs. The scanner is failing and gvm logs arent enough helpfull in this case. Only with “journalctl -f” I am able to see what happen when the scan is stopped:
Jun 11 17:22:30 gvm sudo[4459]: gvm : TTY=unknown ; PWD=/opt/gvm ; USER=root ; COMMAND=/opt/gvm/sbin/openvas --scan-start 335d82ce-a5d1-4e1c-8c0c-68ff21f79dd2
Jun 11 17:22:30 gvm sudo[4459]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 11 17:22:31 gvm python[636]: (process:1760): GLib-WARNING (recursed) **: Invalid UTF-8 passed to g_io_channel_write_chars().
Need a hand here community…I am getting out of ideas
I really want to use GVM 21.04…and I am documenting everything for others newcomers interested in this greate security solution