Script targets-ipv6-map4to6

Script types: prerule
Categories: discovery
Download: https://svn.nmap.org/nmap/scripts/targets-ipv6-map4to6.nse

Script Summary

This script runs in the pre-scanning phase to map IPv4 addresses onto IPv6 networks and add them to the scan queue.

The technique is more general than what is technically termed "IPv4-mapped IPv6 addresses." The lower 4 bytes of the IPv6 network address are replaced with the 4 bytes of IPv4 address. When the IPv6 network is ::ffff:0:0/96, then the script generates IPv4-mapped IPv6 addresses. When the network is ::/96, then it generates IPv4-compatible IPv6 addresses.

Script Arguments

targets-ipv6-map4to6.IPv4Hosts

This must have at least one IPv4 Host for the script be able to work (Ex. 192.168.1.1 or { 192.168.1.1, 192.168.2.2 } ) or Subnet Addresses ( 192.168.1.0/24 or { 192.168.1.0/24, 192.168.2.0/24 } )

targets-ipv6-subnet

Table/single IPv6 address with prefix (Ex. 2001:db8:c0ca::/48 or { 2001:db8:c0ca::/48, 2001:db8:FEA::/48 })

max-newtargets, newtargets

See the documentation for the target library.

Example Usage

nmap -6 --script targets-ipv6-map4to6 --script-args newtargets,targets-ipv6-map4to6.IPv4Hosts={192.168.1.0/24},targets-ipv6-subnet={2001:db8:c0ca::/64}

Script Output

Pre-scan script results:
| targets-ipv6-map4to6:
|   node count: 256
|   addresses:
|_    2001:db8:c0ca:0:0:0:c0a8:100/120

Requires


Author:

  • Raúl Armando Fuentes Samaniego

License: Same as Nmap--See https://nmap.org/book/man-legal.html

prerule

prerule (host, port)

The script need to be working with IPv6

(To bad can't do it with both at same time )

Parameters

host
 
port