Nmap Development mailing list archives

Re: great book and small 6to4 conversion NSE script


From: David Fifield <david () bamsoftware com>
Date: Mon, 29 Dec 2008 23:35:32 -0700

On Mon, Dec 29, 2008 at 10:59:19PM +0100, Henrik Lund Kramshøj wrote:
Had a lot of fun playing with Nmap yesterday, trying to make a Lua
version of a Perl script that uses Net::DNS, didn't really work out
but I made this small script for  converting a 2002::/16 6to4 address
to get the IPv4 gateway address - silly and small, include if you wish
:-)

Sample output, you can't really scan this address from outside my net,  
it was hardcoded as an alias on one of my boxes:
hlk@bigfoot:dns$ sudo ../nmap-4.76/nmap -6 --script-trace --script  
ipv6-6to4-address.nse -v -p30-40 2002:d99d:3f71:cf0f::1

Host script results:
|  IPv6 6to4 gateway address:
|_  IPv4 receiving gateway: 217.157.63.113

So this script is just doing a hex conversion for us, changing d99d:3f71
to 217.157.63.113. I like it. For just this little bit of information I
would condense the output to one line:

|_ IPv6 6to4 gateway address: IPv4 gateway: 217.157.63.113

The next release of Nmap will print the script's file name rather than
its id so it will look like

|_ ipv6-6to4-address: IPv4 gateway: 217.157.63.113

I'm inclined to include this script, but not having a 6to4 network I
don't have a feel for how useful it would really be. There's not much
cost to adding this one, as it only runs against 6to4 addresses and it
doesn't create any network traffic. Maybe it will look silly when
scanning a big subnet where every IPv6 address has the same IPv4
gateway. Does anyone with a 6to4 network want to comment?

ipOps.ip_in_range( host.ip, "2002::/16" )

The ipOps library rules, eh?

David Fifield

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


Current thread: