Mailing List Archive

writing new plugin
Hi all,

I have started writing a new nessus plugin in nasl.

1. When I run the plugin with nasl (at a command line), I get
"A non-authenticated script attempted to use an authenticated function - returning NULL"
How can I fix this ? I guess I need some sort of key to put in my script ?
(when I run the same nasl script with parameter /X, the script runs fine and works correctly)

2. The script does not run from within the nessus client. I guess this is because of the problem explained above ?

3. ID conventions.
In the plugin, there is a script_id variable. What are the conventions about this id ?
I don't want to use an ID that could be used by one of the official plugins
Can I just take any ID, as long as it's unique
(e.g. prepend the ID with a alphanumerical string ?)


Thanks




____________________________________________________

Peter Van Eeckhoutte
peter.ve@telenet.be - peter.ve@corelan.be
____________________________________________________

My Blog : http://www.corelan.be:8800 (IPv4 and IPv6)
My Tools : http://freetools.corelan.be
RIPE Handle PVE50-RIPE
a.k.a. c0d3r on various forums
____________________________________________________


This transmission is intended only for use by the intended recipient(s). If you are not an intended recipient you should not read, disclose, copy, circulate or in any other way use the information contained in this transmission. The information contained in this transmission may be confidential and/or privileged. If you have received this transmission in error, please notify the sender immediately and delete this transmission including any attachments.
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: writing new plugin [ In reply to ]
You can try the option nasl_no_signature_check option in nessud.conf
And indeed non-signed plugins which use authenticated function won't
run by default (as security)
Tenable always gave an ID range (very high) for private plugins, but
if you take a very high number there shouldn't be an problem

--Ferdy

On Fri, Jan 30, 2009 at 12:01 PM, Peter Van Eeckhoutte (corelan)
<peter.ve@corelan.be> wrote:
> Hi all,
>
> I have started writing a new nessus plugin in nasl.
>
> 1. When I run the plugin with nasl (at a command line), I get
> "A non-authenticated script attempted to use an authenticated function - returning NULL"
> How can I fix this ? I guess I need some sort of key to put in my script ?
> (when I run the same nasl script with parameter /X, the script runs fine and works correctly)
>
> 2. The script does not run from within the nessus client. I guess this is because of the problem explained above ?
>
> 3. ID conventions.
> In the plugin, there is a script_id variable. What are the conventions about this id ?
> I don't want to use an ID that could be used by one of the official plugins
> Can I just take any ID, as long as it's unique
> (e.g. prepend the ID with a alphanumerical string ?)
>
>
> Thanks
>
>
>
>
> ____________________________________________________
>
> Peter Van Eeckhoutte
> peter.ve@telenet.be - peter.ve@corelan.be
> ____________________________________________________
>
> My Blog : http://www.corelan.be:8800 (IPv4 and IPv6)
> My Tools : http://freetools.corelan.be
> RIPE Handle PVE50-RIPE
> a.k.a. c0d3r on various forums
> ____________________________________________________
>
>
> This transmission is intended only for use by the intended recipient(s). If you are not an intended recipient you should not read, disclose, copy, circulate or in any other way use the information contained in this transmission. The information contained in this transmission may be confidential and/or privileged. If you have received this transmission in error, please notify the sender immediately and delete this transmission including any attachments.
> _______________________________________________
> Plugins-writers mailing list
> Plugins-writers@list.nessus.org
> http://mail.nessus.org/mailman/listinfo/plugins-writers
>
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: writing new plugin [ In reply to ]
The nessusd.conf option did the trick

Thanks




____________________________________________________

Peter Van Eeckhoutte
peter.ve@telenet.be - peter.ve@corelan.be
____________________________________________________

My Blog : http://www.corelan.be:8800 (IPv4 and IPv6)
My Tools : http://freetools.corelan.be
RIPE Handle PVE50-RIPE
a.k.a. c0d3r on various forums
____________________________________________________

-----Original Message-----
From: f.riphagen@gmail.com [mailto:f.riphagen@gmail.com]
Sent: vrijdag 30 januari 2009 16:10
To: Peter Van Eeckhoutte (corelan)
Cc: plugins-writers@list.nessus.org
Subject: Re: [Plugins-writers] writing new plugin

You can try the option nasl_no_signature_check option in nessud.conf
And indeed non-signed plugins which use authenticated function won't
run by default (as security)
Tenable always gave an ID range (very high) for private plugins, but
if you take a very high number there shouldn't be an problem

--Ferdy

On Fri, Jan 30, 2009 at 12:01 PM, Peter Van Eeckhoutte (corelan)
<peter.ve@corelan.be> wrote:
> Hi all,
>
> I have started writing a new nessus plugin in nasl.
>
> 1. When I run the plugin with nasl (at a command line), I get
> "A non-authenticated script attempted to use an authenticated function - returning NULL"
> How can I fix this ? I guess I need some sort of key to put in my script ?
> (when I run the same nasl script with parameter /X, the script runs fine and works correctly)
>
> 2. The script does not run from within the nessus client. I guess this is because of the problem explained above ?
>
> 3. ID conventions.
> In the plugin, there is a script_id variable. What are the conventions about this id ?
> I don't want to use an ID that could be used by one of the official plugins
> Can I just take any ID, as long as it's unique
> (e.g. prepend the ID with a alphanumerical string ?)
>
>
> Thanks
>
>
>
>
> ____________________________________________________
>
> Peter Van Eeckhoutte
> peter.ve@telenet.be - peter.ve@corelan.be
> ____________________________________________________
>
> My Blog : http://www.corelan.be:8800 (IPv4 and IPv6)
> My Tools : http://freetools.corelan.be
> RIPE Handle PVE50-RIPE
> a.k.a. c0d3r on various forums
> ____________________________________________________
>
>
> This transmission is intended only for use by the intended recipient(s). If you are not an intended recipient you should not read, disclose, copy, circulate or in any other way use the information contained in this transmission. The information contained in this transmission may be confidential and/or privileged. If you have received this transmission in error, please notify the sender immediately and delete this transmission including any attachments.
> _______________________________________________
> Plugins-writers mailing list
> Plugins-writers@list.nessus.org
> http://mail.nessus.org/mailman/listinfo/plugins-writers
>

This transmission is intended only for use by the intended recipient(s). If you are not an intended recipient you should not read, disclose, copy, circulate or in any other way use the information contained in this transmission. The information contained in this transmission may be confidential and/or privileged. If you have received this transmission in error, please notify the sender immediately and delete this transmission including any attachments.
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: writing new plugin [ In reply to ]
On Jan 30, 2009, at 6:01 AM, Peter Van Eeckhoutte (corelan) wrote:

> 1. When I run the plugin with nasl (at a command line), I get
> "A non-authenticated script attempted to use an authenticated
> function - returning NULL"
> How can I fix this ? I guess I need some sort of key to put in my
> script ?
> (when I run the same nasl script with parameter /X, the script runs
> fine and works correctly)

In addition to Ferdy's suggestion, you can also use nasl's "-X" option
to avoid the signature check, if you're only interested in running it
via the commandline.

> 2. The script does not run from within the nessus client. I guess
> this is because of the problem explained above ?

Yes.

> 3. ID conventions.
> In the plugin, there is a script_id variable. What are the
> conventions about this id ?
> I don't want to use an ID that could be used by one of the official
> plugins
> Can I just take any ID, as long as it's unique
> (e.g. prepend the ID with a alphanumerical string ?)

We recommend using script IDs in the range 60000 - 62000 for plugins
you might write for internal use.

George
--
theall@tenablesecurity.com



_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: writing new plugin [ In reply to ]
Thanks - it works now

I have another question

I am using checkbox, radio and entry fields in my plugin preferences
I would like to be able to allow people to select multiple entries from a list (listbox allowing multiple selections)

Is this possible ?

thanks



____________________________________________________

Peter Van Eeckhoutte
peter.ve@telenet.be - peter.ve@corelan.be
____________________________________________________

My Blog : http://www.corelan.be:8800 (IPv4 and IPv6)
My Tools : http://freetools.corelan.be
RIPE Handle PVE50-RIPE
a.k.a. c0d3r on various forums
____________________________________________________

-----Original Message-----
From: plugins-writers-bounces@list.nessus.org [mailto:plugins-writers-bounces@list.nessus.org] On Behalf Of George A. Theall
Sent: zaterdag 31 januari 2009 1:48
To: Plugins-writers@list.nessus.org
Subject: Re: [Plugins-writers] writing new plugin

On Jan 30, 2009, at 6:01 AM, Peter Van Eeckhoutte (corelan) wrote:

> 1. When I run the plugin with nasl (at a command line), I get
> "A non-authenticated script attempted to use an authenticated
> function - returning NULL"
> How can I fix this ? I guess I need some sort of key to put in my
> script ?
> (when I run the same nasl script with parameter /X, the script runs
> fine and works correctly)

In addition to Ferdy's suggestion, you can also use nasl's "-X" option
to avoid the signature check, if you're only interested in running it
via the commandline.

> 2. The script does not run from within the nessus client. I guess
> this is because of the problem explained above ?

Yes.

> 3. ID conventions.
> In the plugin, there is a script_id variable. What are the
> conventions about this id ?
> I don't want to use an ID that could be used by one of the official
> plugins
> Can I just take any ID, as long as it's unique
> (e.g. prepend the ID with a alphanumerical string ?)

We recommend using script IDs in the range 60000 - 62000 for plugins
you might write for internal use.

George
--
theall@tenablesecurity.com



_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers

This transmission is intended only for use by the intended recipient(s). If you are not an intended recipient you should not read, disclose, copy, circulate or in any other way use the information contained in this transmission. The information contained in this transmission may be confidential and/or privileged. If you have received this transmission in error, please notify the sender immediately and delete this transmission including any attachments.
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: writing new plugin [ In reply to ]
On Jan 31, 2009, at 3:44 AM, Peter Van Eeckhoutte (corelan) wrote:

> I am using checkbox, radio and entry fields in my plugin preferences
> I would like to be able to allow people to select multiple entries
> from a list (listbox allowing multiple selections)
>
> Is this possible ?

No. Allowable preference types are 'entry', 'password', 'checkbox',
'radio', and 'file'.

George
--
theall@tenablesecurity.com



_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: writing new plugin [ In reply to ]
On Jan 30, 2009, at 7:47 PM, George A. Theall wrote:

> We recommend using script IDs in the range 60000 - 62000 for plugins
> you might write for internal use.

Correction -- people should use 50000 - 52999 for custom plugins; the
60000-69999 range is used by Security Center when auto-generating
plugins ID's for compliance checks.

George
--
theall@tenablesecurity.com



_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers