Update Greenbone Vulnerability Management Plugins on Kali (NVT, Cert Data & SCAP Data) Automatically

Once you have installed or configured the Greenbone Vulnerability Management system it is a good idea to ensure it is kept up to date and running the latest security scripts to find the latest vulnerabilities as well as sync to the most updated nvt, scap and cert data.  The best way to do this is to create a script that sync’s the necessary data for you automatically each day.

Create a script under /usr/local/bin called update-gvm

  • vi /usr/local/bin/update-gvm

add the following contents to the file

  • sudo runuser -u _gvm — greenbone-nvt-sync
  • sudo runuser -u _gvm — greenbone-scapdata-sync
  • sudo runuser -u _gvm — greenbone-certdata-sync

save the file and make it executable

  • chmod a+x /usr/local/bin/update-gvm

run the script to make sure it works and that there are no errors

  • /usr/local/bin/update-gvm

add the script to cron to run daily

  • crontab -e

add the following contents

  • 1 1 * * * /usr/local/bin/update-gvm 1>/dev/null 2>/dev/null

the above cronjob will be run at 1-minute past 1 every day

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.