Nmap Development mailing list archives

Re: Forcing scripts to run?


From: David Fifield <david () bamsoftware com>
Date: Mon, 12 Jul 2010 10:33:08 -0600

On Mon, Jul 12, 2010 at 11:26:18AM -0500, Ron wrote:
I was helping somebody resolve an issue this morning, and realized
there's a feature missing from NSE that maybe ought to be there:
forcing a script to run against a host and/or port in spite of its
hostrule/portrule. 

What happened was, he had a custom HTTP running on a non-standard
port. Nmap -sV didn't recognize it as a HTTP server (and shouldn't --
it wasn't a standard configuration), so http-headers.nse wouldn't run
against it. The only way to do it would be to change the service to
run on a port that Nmap recognizes as HTTP or to hack the portrule to
say "if port == 1234 then return true end". Neither of those are great
solutions. 

Any ideas how it could work? I imagine this as similar to
--version-all, except it would be running every script against every
host/port. 

I don't know of a way to do it. I had an idea for an implementation. You
would run a command like this:

nmap -sn -p 1234 target

With -sn (a.k.a. -sP), Nmap would assume that the ports given by -p are
open, just as with -Pn (a.k.a. -PN a.k.a. -P0) it assumes that all hosts
listed are up.

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: