Nmap ipv6-node-info NSE Script
This page contains detailed information about how to use the ipv6-node-info NSE script. For list of all NSE scripts, visit the Nmap NSE Library.
Select: |
---|
Script Overview
Script source code: https://github.com/nmap/nmap/tree/master/scripts/ipv6-node-info.nse
Script categories: default, discovery, safe
Target service / protocol: -
Target network port(s): -
List of CVEs: -
Script Description
The ipv6-node-info.nse script obtains hostnames, IPv4 and IPv6 addresses through IPv6 Node Information Queries.
IPv6 Node Information Queries are defined in RFC 4620. There are three useful types of queries:
- qtype=2: Node Name
- qtype=3: Node Addresses
- qtype=4: IPv4 Addresses
Some operating systems (Mac OS X and OpenBSD) return hostnames in response to qtype=4, IPv4 Addresses. In this case, the hostnames are still shown in the "IPv4 addresses" output row, but are prefixed by "(actually hostnames)".
Ipv6-node-info NSE Script Arguments
The ipv6-node-info.nse script does not have any arguments.
Ipv6-node-info NSE Script Example Usage
Here's an example of how to use the ipv6-node-info.nse script:
nmap -6 <target>
Ipv6-node-info NSE Script Example Output
Here's a sample output from the ipv6-node-info.nse script:
| ipv6-node-info:
| Hostnames: mac-mini.local
| IPv6 addresses: fe80::a8bb:ccff:fedd:eeff, 2001:db8:1234:1234::3
|_ IPv4 addresses: mac-mini.local
Ipv6-node-info NSE Script Example XML Output
Here's a sample XML output from the ipv6-node-info.nse script produced by providing the -oX <file>
Nmap option:
<elem key="Hostnames">mac-mini.local</elem>
<table key="IPv6 addresses">
<elem>fe80::a8bb:ccff:fedd:eeff</elem>
<elem>2001:db8:1234:1234::3</elem>
</table>
<table key="IPv4 addresses">
<elem>mac-mini.local</elem>
</table>
Author
- David Fifield
References
- https://nmap.org/nsedoc/scripts/ipv6-node-info.html
- https://github.com/nmap/nmap/tree/master/scripts/ipv6-node-info.nse
See Also
Related NSE scripts to the ipv6-node-info.nse script:
Visit Nmap NSE Library for more scripts.
The ipv6-node-info.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.
Unknown qtype
Here is a relevant code snippet related to the "Unknown qtype " error message:
78: flags = 0x003E
79: elseif qtype == QTYPE_NODEIPV4ADDRESSES then
80: -- Set the A flag (see RFC 4620, Figure 4).
81: flags = 0x0002
82: else
83: error("Unknown qtype " .. qtype)
84: end
85: local payload = string.pack(">I2 I2", qtype, flags) .. nonce .. dst
86: local p = packet.Packet:new()
87: p:build_icmpv6_header(ICMPv6_NODEINFOQUERY, ICMPv6_NODEINFOQUERY_IPv6ADDR, payload, src, dst)
88: p:build_ipv6_packet(src, dst, packet.IPPROTO_ICMPV6)
(parsing error)
Here is a relevant code snippet related to the "(parsing error)" error message:
160: status, names = try_decode_nodenames(data)
161: if empty(names) then
162: return
163: end
164: if not status then
165: names[#names+1] = "(parsing error)"
166: end
167:
168: outlib.list_sep(names)
169: return names
170: end
Version
This page has been created based on Nmap version 7.92.
Go back to menu.