Nmap Development mailing list archives

Re: great book and small 6to4 conversion NSE script


From: Henrik Lund Kramshøj <hlk () kramse dk>
Date: Tue, 30 Dec 2008 09:50:39 +0100


On 30/12/2008, at 07.35, David Fifield wrote:

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?

Agreed, the current script is quite silly and simplistic. Still the information is
~comparable to traceroutes since this IPv4 address is the router which
is part of the infrastructure, so this is network mapping.

I would think a more elaborate script would be in place. I will start by making the output a single line. I also think I may come up with other nice information
to make this a bit more usable.

As I said to begin with - very silly script


Henrik

PS I am on the list, no need to reply directly :-)
--
Henrik Lund Kramshøj, Follower of the Great Way of Unix
hlk () security6 net, +45 2026 6000 cand.scient CISSP CEH
http://www.security6.net - IPv6, sikkerhed, netværk
http://e-learning.security6.net - gratis kursusmateriale



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


Current thread: