Openvas 9 - Distributed Setup

If you are responsible for a number of offices located in different regions its best to setup scanners in the regions to best utilise network bandwidth.  You can control all these scanners from a single host.  The following setup has worked well for me and I hope the following helps you in getting a distributed openvas setup up and running.

First ensure you setup openvas correctly and that it is using libssh0.7 and greater.  You can follow my post on how to do this here.

Create an admin account on the newly created remote scanner that will be used for remote administration/scanning.
  • openvasmd --create-user=newusername --role=Admin
The system will generate a unique/random password.  If you'd prefer to setup your own password,  run the following command
  • openvasmd --new-password=my_secure_password --user=newusername
We will need the CA certificate from the remote scanner in order to setup the necessary credentials on our primary scanner.  To locate the installed CA cert run the following.
  •  openvas-manage-certs -V
Openvas will list the location of the installed certificates and notify of their status. You will need the cacert.pem file which should be stored under /var/lib/openvas/private/CA

By default openvas does not listen on TCP connections and you would therefor not be able to connect to it remotely.  In order to correct this,  update the startup config for openvas-manager.
Use your favourite editor and edit /etc/init.d/openvas-manager
update the DAEMON_ARGS line to reflect the server address and a port of your chosing.
  • DAEMON_ARGS=" --listen=HOSTORIP --port=9393"
Restart the openvas-manager process.
  • /etc/init.d/openvas-manager restart

Next setup a new logon on your primary Scanner.
Go to configuration -> Credentials and use the username/password created above.

Next setup the scanner.
Go to configuration -> scanner
click on the new scanner option (small star in the top left hand corner)
Enter the necessary details,  ie hostname/ip address plus the port selected above and browse to the copied cacert.pem file mentioned above.

Create the Target host as you would normally.  When creating the task,  select the new scanner in the "Scanner" section.  When the task is run "manually" or via a scheduler it will then connect to the remote scanner which in turn will setup the target and do the necessary scanning.

If the task is stuck on "Requested" and does not change even after refreshing the page,  log on to the Primary scanner and view the scanner and manager logs.
  • tail /var/log/openvas/openvasmd.log
  • tail /var/log/openvas/openvassd.messages
If there are no logs indicating the error ,  log on to the slave scanner and view its logs.  Normally the issue is permissions or the cacert.pem is incorrect.




Comments

  1. Nice post.Thanks for sharing Information.....

    Morpheus tv apk is the very free and easily designed application which streams the movies videos and tv shows with high-quality it can be used for free.
    Android Box
    smartphones

    ReplyDelete

Post a Comment

Popular posts from this blog

DSTV Now on Amazon Fire TV Stick

Update Openvas Feeds

Zabbix - adding apt update checks