[Plugins-writers] RE: Plugins-writers Digest, Vol 22, Issue 2

From: Jingyu Dong (jdong@private)
Date: Wed Aug 10 2005 - 12:19:35 PDT


Thanks, Michel and George,

Yes, I need to write C plugin, because in my understanding NASL can't
capture raw 802.3 packets other than Ethernet. Say I want to capture
Cisco CDP packets. 

-----Original Message-----
From: plugins-writers-bounces@private
[mailto:plugins-writers-bounces@private] On Behalf Of
plugins-writers-request@private
Sent: Wednesday, August 10, 2005 12:00 PM
To: plugins-writers@private
Subject: Plugins-writers Digest, Vol 22, Issue 2

Send Plugins-writers mailing list submissions to
	plugins-writers@private

To subscribe or unsubscribe via the World Wide Web, visit
	http://mail.nessus.org/mailman/listinfo/plugins-writers
or, via email, send a message with subject or body 'help' to
	plugins-writers-request@private

You can reach the person managing the list at
	plugins-writers-owner@private

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Plugins-writers digest..."


Today's Topics:

   1. using libpcap in C plugin (Jingyu Dong)
   2. Re: using libpcap in C plugin (George A. Theall)
   3. Re: using libpcap in C plugin (Michel Arboi)
   4. nessus config params available for plugins? (Jan-Oliver Wagner)


----------------------------------------------------------------------

Message: 1
Date: Tue, 9 Aug 2005 11:56:46 -0400
From: "Jingyu Dong" <jdong@private>
Subject: [Plugins-writers] using libpcap in C plugin
To: <plugins-writers@private>
Message-ID:
	
<BC75A0FA6BFF1B49825EFD239D4B1BC5029016@corporate-serve.voipshield.com>
	
Content-Type: text/plain; charset="us-ascii"

Hello,

 

I wrote a C plugin which used libpcap APIs. To compile it, I copy a
makefile from an existing C plugin and change a little on it. 

 

My problems are:

 

1.	When executing 'make', it complained that 'struct pcap_if' not
found. It should be defined in 'pcap.h'. I looked around and found that
the head file included in library-nessus is really missing this
structure from original head file. So I copied this file from system
include directory, and the compile passed. So, is the libpcap included
with nessus an old version?
2.	When launched this .nes file, nessus daemon prompted in the log
file that it can' find ref for function pcap_next_ex. So I changed the
makefile - nessus.tmpl from "-lpcap-nessus" to "-lpcap". Then the plugin
can be launched as normal. But when I run the plugin, it caused
segmentation fault in the function call "pcap_next_ex". Finally, I
changed this function to "pcap_next" and everything works fine now. So
where's the problem?

 

Any suggestion would be appreciated! Thanks!!

 

Jingyu

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://mail.nessus.org/pipermail/plugins-writers/attachments/20050809/1e
f87599/attachment.html

------------------------------

Message: 2
Date: Tue, 09 Aug 2005 17:18:55 -0400
From: "George A. Theall" <theall@private>
Subject: Re: [Plugins-writers] using libpcap in C plugin
To: plugins-writers@private
Message-ID: <42F91DBF.6080509@private>
Content-Type: text/plain; charset=windows-1252

On Tue, Aug 09, 2005 at 11:56:46AM -0400, Jingyu Dong wrote:

> I wrote a C plugin which used libpcap APIs. 

Perhaps Renaud or Michel can give a more authoritative answer, but I
suspect NASL is the preferred method for writing plugins these days.

>    1. When executing 'make', it complained that 'struct pcap_if' not
>       found. It should be defined in 'pcap.h'. 

Are you using it in your plugin code? By default, Nessus comes with and
uses an older version of libpcap (libpcap-nessus) so I would expect
issues if your plugin uses, or tries to use, a different version.


George
-- 
theall@private


------------------------------

Message: 3
Date: Tue, 09 Aug 2005 23:36:36 +0200
From: Michel Arboi <mikhail@private>
Subject: Re: [Plugins-writers] using libpcap in C plugin
To: <plugins-writers@private>
Message-ID: <m3fytissgr.fsf@private>
Content-Type: text/plain; charset=us-ascii

On Tue Aug 09 2005 at 17:56, Jingyu Dong wrote:

> include directory, and the compile passed. So, is the libpcap included
> with nessus an old version?

Yes

> where's the problem?

Library conflict I suppose.

Do you really need to write a C plugin?


------------------------------

Message: 4
Date: Wed, 10 Aug 2005 16:28:56 +0200
From: Jan-Oliver Wagner <jan@private>
Subject: [Plugins-writers] nessus config params available for plugins?
To: Nessus Plugin Writeres Mailing List
	<plugins-writers@private>
Message-ID: <20050810142856.GE14524@private>
Content-Type: text/plain; charset=us-ascii

Hi,

I would love to see a plugin that produces a security
note or warning in the case when nasl_no_signature_checks
has been enabled. Similar to the plugin that
warns if you only have gpl feed.

Are the config parameters of nessusd easily available
for nasl plugins?

Best

	Jan
-- 
Jan-Oliver Wagner               http://intevation.de/~jan/
Intevation GmbH                      http://intevation.de/
Kolab Konsortium               http://kolab-konsortium.de/
FreeGIS                                http://freegis.org/


------------------------------

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

End of Plugins-writers Digest, Vol 22, Issue 2
**********************************************


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



This archive was generated by hypermail 2.1.3 : Wed Aug 10 2005 - 12:21:08 PDT