Home page logo

nmap-dev logo Nmap Development mailing list archives

[NSE] broadcast-ping
From: Gorjan Petrovski <mogi57 () gmail com>
Date: Wed, 22 Jun 2011 14:09:40 +0200

Hi all,

I think a dedicated thread for this script is in order, to make things public.

I've ran into some issues regarding crafting and sending ICMP packets.

* I started crafting the ICMP packet from the IP header, using raw
IPv4 sockets from the nmap library;
The problem was inserting a source IP address because there is no way
to get the interface that the dnet:ip_open() function opens a socket
on. (I'm submitting a proposal for this soon)
It was suggested that I should use the nmap.get_interface() function,
however this returns nil for me regardless of whether I use it in a
prerule or hostrule script.

* Another issue is the length of the ICMP payload. The --ttl and
--data-length options should be made available to NSE in order to
craft the payload appropriately (Submitting a proposal for this too)

Meanwhile, I'm gonna finish the script using a kind of a hack. Opening
a normal socket and getting the interface that way should solve half
of the first issue. I'm gonna let the user specify the interface he
wants to send a broadcast ping on with a script argument, in case the
above option doesn't select the appropriate interface.

The ICMP payload will be of a fixed length, filled with random data
until the --ttl and --data-length are available to NSE.

Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]