Mailing List Archive

Command line scan
Does anyone have a sample command line that can be used to have nesses scan
a single IP address? I would like to script a scan of systems as they come
on line. The IP address is picked out of a log, and then I would like to
run nessus against this IP in "real-time". I used "nasl" until the plugins
that I needed required dependencies.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: Command line scan [ In reply to ]
On Wed, Oct 12, 2005 at 01:20:29PM -0500, Duane Fletcher wrote:

> Does anyone have a sample command line that can be used to have nesses
> scan a single IP address?

You can invoke a commandline scan with something like the following:

nessus localhost 1241 me noway targets targets.nbe

where "targets" is a file containing the targets to scan and
"targets.nbe" is the file to which results (in NBE format) are written.

"man nessus" covers these and other options that you might find useful.

> I would like to script a scan of systems as
> they come on line. The IP address is picked out of a log, and then I
> would like to run nessus against this IP in "real-time".

Hope you've thought about what to do with each host during the several
minutes it might take to scan it.

George
--
theall@tenablesecurity.com
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: Command line scan [ In reply to ]
On Wed Oct 12 2005 at 20:20, Duane Fletcher wrote:

> Does anyone have a sample command line that can be used to have nesses
> scan a single IP address?

I guess that a very simple shell script would do it.
Something like this should work:

#!/bin/sh
TMP=/tmp/addr.$$
for IP in $@; do
echo $IP > $TMP
nessus -q nessus_host 1241 user pass $TMP ${IP}.nbe
rm -f $TMP
done
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: Command line scan [ In reply to ]
Thank you for the reponse(s). I was hoping for a solution that allowed
nessus to be used as more of an inline scan. I ned to scan the systems one
at a time when they connect. Nasl worked great since I could run it with a
single IP address on the command line and then take additional actions based
on the "Success" response.

Can nessus take stdin for the IP address to scan?
Can the output of nessus be sent to stdout?
Can nasl be configured to enable dependencies?

Thanks!


>From: Michel Arboi <mikhail@nessus.org>
>To: "Duane Fletcher" <fletcherduane@hotmail.com>
>CC: plugins-writers@list.nessus.org
>Subject: Re: [Plugins-writers] Command line scan
>Date: Wed, 12 Oct 2005 21:38:20 +0200
>
>On Wed Oct 12 2005 at 20:20, Duane Fletcher wrote:
>
> > Does anyone have a sample command line that can be used to have nesses
> > scan a single IP address?
>
>I guess that a very simple shell script would do it.
>Something like this should work:
>
>#!/bin/sh
>TMP=/tmp/addr.$$
>for IP in $@; do
> echo $IP > $TMP
> nessus -q nessus_host 1241 user pass $TMP ${IP}.nbe
> rm -f $TMP
>done

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: Command line scan [ In reply to ]
On Wed, Oct 12, 2005 at 02:55:26PM -0500, Duane Fletcher wrote:

> Can nessus take stdin for the IP address to scan?
> Can the output of nessus be sent to stdout?

Use a script to handle these things and call nessus.

> Can nasl be configured to enable dependencies?

No. While the commandline interpreter can be called with two or more
plugins, it does not have any way to pass information from one plugin to
another (well, at least the stock NASL2 interpreter doesn't).

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