Qu’est-ce qu’OpenVAS (Greenbone) ?

OpenVAS est un scanner de vulnérabilité qui permet de scruter son Système d’Information à la recherche des CVE connues.

Labo de test

Mise en place sur une Debian 11.5 installéé sur un Intel NUC i5 / 32 Go de ram / 256 Go de SSD.

Installation des prérequis

apt update && apt upgrade

puis

sudo apt install gcc g++ make bison flex libksba-dev curl redis libpcap-dev cmake git pkg-config libglib2.0-dev libgpgme-dev nmap libgnutls28-dev uuid-dev libssh-gcrypt-dev libldap2-dev gnutls-bin libmicrohttpd-dev libhiredis-dev zlib1g-dev libxml2-dev libnet-dev libradcli-dev clang-format libldap2-dev doxygen gcc-mingw-w64 xml-twig-tools libical-dev perl-base heimdal-dev libpopt-dev libunistring-dev graphviz libsnmp-dev python3-setuptools python3-paramiko python3-lxml python3-defusedxml python3-dev gettext python3-polib xmltoman python3-pip texlive-fonts-recommended texlive-latex-extra --no-install-recommends xsltproc sudo vim rsync libbsd-dev json-glib-tools json-glib-dev libpaho-* -y

Yarn :

sudo curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
sudo echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn -y

Postgresql :

  sudo curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc
  sudo echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list
  sudo apt update
  sudo apt install postgresql-11 postgresql-contrib-11 postgresql-server-dev-11 -y

Puis :

  sudo su
  
  sudo -Hiu postgres
createuser gvm
createdb -O gvm gvmd

psql gvmd
create role dba with superuser noinherit;
grant dba to gvm;
\q
exit

Enfin :

  sudo systemctl restart postgresql
  sudo systemctl enable postgresql

Update nodejs :

  sudo curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
  sudo apt update && sudo apt install nodejs

152 sudo su 153 greenbone-nvt-sync 154 sudo greenbone-nvt-sync 155 sudo chown -R gvm: /var/lib/openvas/ 156 sudo su

141 sudo mkdir /var/lib/notus 142 sudo chown gvm:gvm -R /var/lib/notus