Contents:
Temporary workaround installation and setup process:
By default, at this point, Kali Linux comes with Postgres version 12.3. When OpenVAS (and gvm) is installed, postgres is upgraded to version 13. The problem is that the gvm program is still looking for postgres on port 5432, but whenever there's more than one version of postgres installed on a computer, higher versions get different port mappings. version 13 will listen on 5433.
The simple solution is to edit the postgresql.conf file for both versions to make sure version 13 is listening on 5432 and version 12 is listening on anything else. Here's how I did that:
sudo nano /etc/postgresql/13/main/postgresql.conf
change the
port = 5433
line to read:
port = 5432
Then edit the version 12 config file:
sudo nano /etc/postgresql/12/main/postgresql.conf
so the port line has any value besides 5432.
The change should take effect with
sudo systemctl restart postgresql
After that, everything should be normal (although I haven't tested it all, yet).
When all that's done, you'll use these three commands to get everything set up:
sudo gvm-setup
sudo gvm-feed-update
sudo gvm-start
Check OpenVAS configuration and launch the service
openvas-check-setup
sudo openvas-start
sudo nano /lib/systemd/system/greenbone-security-assistant.service
ExecStart=/usr/sbin/gsad --foreground --listen=192.168.1.3 \
--port=443 --listen=192.168.1.3 --mport=9390 --allow-header-host 192.168.1.3 \
--timeout=1440
systemctl daemon-reload && systemctl restart \
greenbone-security-assistant.service
Download a web app scan
wget download.greenbone.net/web-app-scan.xml
Working with the OpenVAS command line
sudo openvasmd --get-scanners
sudo openvasmd --get-users
sudo openvasmd --create-scanner=newscan2 \
--scanner-host=192.168.1.14 \
--scanner-port=80 \
--scanner-type=OpenVAS Scanner
Building a mail server
apt install postfix mailutils
nano /etc/postfix/main.cf
inet_interfaces = localhost
systemctl restart postfix