[Openvas-plugins] ssh_authorization.nasl
Carsten Koch-Mauthe
c.koch-mauthe at dn-systems.de
Tue Apr 29 16:20:04 CEST 2008
Hi,
today i've heared that the ssh_settings.nasl is replaced by ssh_authorization.nasl in openvas. So i've tried to change one of my scripts to use the new one.
But the ssh_authorization.nasl is not working here.
There are no ssh entries on the OpenvasClient credentials page with the new script. Very strange.
Now i've found why. There is some code in the openvasclient which will show the ssh creds only if the script name is "SSH settings"
===
openvas-client/nessus/prefs_dialog/prefs_dialog_plugins_prefs.c: if ( strcmp(plugin_name, "SSH settings") == 0 )
===
So this script can not work, it is named "SSH Authorization".
How to fix ? Change the client or change the script ?
I've right now changed the script to work again for me.
I've changed the following:
name["english"] = "SSH settings";
Added ssh_password again, of course i need the ssh password and i think the user should decide what to use for authorization.
script_add_preference(name:"SSH password (unsafe!):", type:"password", value:"");
ssh_password = script_get_preference_file_content("SSH password (unsafe!):");
if (ssh_password) set_kb_item(name:"Secret/SSH/password", value:ssh_password);
Also i've added the check if the values are set or not befor writing to the kb. The openvasd will give a dump with syntax_errors if trying to write NULL values to the kb.
=== /var/log/openvas/openvasd.dump ===
...
[15083](/usr/lib/openvas/plugins/ssh_authorization.nasl) Syntax error with set_kb_item() [null value for name 'Secret/SSH/publickey']
[15083](/usr/lib/openvas/plugins/ssh_authorization.nasl) Syntax error with set_kb_item() [null value for name 'Secret/SSH/privatekey']
[15085](/usr/lib/openvas/plugins/ssh_authorization.nasl) Syntax error with set_kb_item() [null value for name 'Secret/SSH/publickey']
[15085](/usr/lib/openvas/plugins/ssh_authorization.nasl) Syntax error with set_kb_item() [null value for name 'Secret/SSH/privatekey']
[15087](/usr/lib/openvas/plugins/ssh_authorization.nasl) Syntax error with set_kb_item() [null value for name 'Secret/SSH/publickey']
[15087](/usr/lib/openvas/plugins/ssh_authorization.nasl) Syntax error with set_kb_item() [null value for name 'Secret/SSH/privatekey']
[15091](/usr/lib/openvas/plugins/ssh_authorization.nasl) Syntax error with set_kb_item() [null value for name 'Secret/SSH/publickey']
...
===
I've added also the complete changed script to this mail.
--
Gruss
Carsten Koch-Mauthe
http://www.dn-systems.de mail: c.koch-mauthe at dn-systems.de
DN-Systems Enterprise Internet Solutions GmbH
Hornemannstr. 11 31137 Hildesheim, Germany
Tel. +49-5121-28989-0 Fax. +49-5121-28989-11
21 Sunrise Ct, S.San Francisco, CA 94080, USA
Tel. +1-650-472-2512 Mob. +1-650-430-1219
Handelsregister HRB-3213 Amtsgericht Hildesheim
Geschäftsführer Lukas Grunwald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wald.intevation.org/pipermail/openvas-plugins/attachments/20080429/c6d16d33/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssh_authorization.nasl.zip
Type: application/x-zip
Size: 1237 bytes
Desc: not available
Url : http://lists.wald.intevation.org/pipermail/openvas-plugins/attachments/20080429/c6d16d33/ssh_authorization.nasl.bin
More information about the Openvas-plugins
mailing list