Actually you need to make the scanner make aware of the new script. GSA is the web interface and simply shows what is collected in the database. See here for an overview how the modules relate to each other:
If you enabled signature checking for your setup, then you need to establish trust for your own scripts or else they will be ignored:
You need to use a OID out of a special range to prevent collision and you should place them into the “private/” directory to not let it be removed during feed sync.
Please check the log files for any problems with the scripts. The following topic might help with resolving any problem:
Ok all this i know and I understand, set the new script in the path where the greenbone-nvt-sync put the Greenbone Community Feed NVTs, check that the oid is unique, restart the openvassd for reload the nvts like de pic
when reload completly restart gvmd and gsa but the numbers of NVT appeared in the web not contain the new nasl script.
If you can see, the number of NVT show in the reload process and the number in the GSA web is diferent, Why? openssd not is the tool for update de sqlite?
In the openssd.conf i put the var for not check signatures like the future releases say that the community edition will work.
I tried other posibility, I add my new nasl scritp before install gvmd-8.0-beta2 and cd gsa-8.0-beta2 if i do this action the script appears in the GSA, This made me think that the rebuild NVT information in GVMD don’t work fine or I don’t know how rebuild this correctly
You can investigate your issue by asking two questions:
Step 1: Is the Scanner (openvassd) aware of the plugin ?
Put your plugin in the plugins directory (under private/ if you don’t want it to disappear with feed updates…)
Restart openvassd (or kill -HUP), check the log files for any errors.
To verify that it was inserted correctly in the nvticache (Redis) by the scanner, use these commands (adjust for redis socket path, plugin name and oid):
There is one important caveat though: GVMd rebuilds the cache automatically, but only when the plugin feed version has changed, ie. In plugins/plugin_feed_info.inc, increase PLUGIN_SET value before you reload/restart openvassd.
Does this still work for GVM 21? I have tried to put one addition folder (named myself) under /var/lib/openvas/plugins, and then created a nasl file under it.
I’m sure the nasl is good since I just copied one from community feed and changed oid and name.
then, I executed the sql to trigger the rebuild action.
but, unfortunately, I can’t find the custom nvt from GSA. anything wrong?
Hello @cycloneqi ,
are you using nasl_no_signature_check = no openvas option? In that case, since your script has no valid signature, it will not be uploaded.
Otherwise, it should be uploaded first in the Redis cache, and then updated in the gvmd database.
If this doesn’t happen, try with gvmd --rebuild.
Check with ps -aux | grep <process-name> the running proces (openvas upload, gvmd rebuild). Also, check for logs, to be sure that your nasl script is being uploaded.