Dual stack node IPv6 address rapid scanning method and system based on host identifier association
Through the fast scanning method of dual-stack node IPv6 addresses based on host identifier association, using the mDNS protocol and ARP/DNS-SD protocol, the problem of low IPv6 address scanning efficiency and insufficient mobile terminal node support is solved, and IPv6 address fast and Complete scan, suitable for networks where IPv4 and IPv6 protocol stacks coexist.
Patent Information
- Application Number
- CN202410901901.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-09-17
AI Technical Summary
Existing IPv6 address scanning technology is inefficient in IPv6 networks, cannot complete address scanning quickly, and lacks support for mobile terminal nodes, resulting in low integrity of address scanning results and easy interception by firewalls.
Adopt a dual-stack node IPv6 address fast scanning method based on host identifier association. By obtaining the IPv4 address and host identifier, use the mDNS protocol to obtain the IPv6 address, and combine the ARP and DNS-SD protocols to achieve rapid scanning and integrity improvement of the IPv6 address. .
It enables fast and complete acquisition of IPv6 addresses in IPv6 networks, supports scanning of mobile terminal nodes, improves scanning efficiency and accuracy of results, and is suitable for networks where IPv4 and IPv6 protocol stacks coexist.
Smart Images

Figure CN118660031A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of IPv6 address scanning, and in particular to a dual-stack node IPv6 address fast scanning method and system based on host identifier association. Background Art
[0002] As IPv4 addresses are depleted, the existing Network Address Translation (NAT) technology that mitigates address depletion has destroyed the end-to-end model of the Internet and increased the complexity of the network. Therefore, the development of the global network to IPv6 is imperative. With the widespread deployment of IPv6 networks, the IPv6 support of network products is showing a rapid growth trend. As of October 2023, there will be 6,806 devices supporting IPv6, an increase of 30% from 2020. According to a survey by the Global IPv6 Test Center, 81% of the 34 common operating systems have the IPv6 protocol stack installed by default.
[0003] The expansion of IPv6 deployment and the increase in the number of IPv6 network devices have greatly increased the security risks faced by IPv6 networks. Therefore, it has become a vital task to conduct in-depth security assessments on IPv6 networks and formulate corresponding security policies based on them. In this context, IPv6 address scanning, as a basic work, is a key support for security assessment and policy formulation. In terms of security assessment, IPv6 address scanning technology can provide network administrators with a list of surviving hosts to discover potential vulnerabilities and security weaknesses of IPv6 hosts. In addition, in the process of security policy formulation, the results obtained from IPv6 address scanning can provide a key reference for the formulation and adjustment of network security policies. Based on the results of IPv6 address scanning, network administrators can accurately locate potential security risks and take effective preventive measures to ensure the security and reliability of IPv6 networks.
[0004] However, compared to the 32-bit IPv4 address, the IPv6 address is 128 bits long, and its address space is twice the IPv4 address space. 96times. Due to the huge address space and sparse address distribution of IPv6, if the traversal address scanning technology (such as ZMap and Masscan) in the IPv4 network environment is directly applied to the IPv6 network, even if it is scanned at full speed in all IPv6 addresses under the commonly used 64-bit prefix of the IPv6 local link, it will still take at least millions of years to complete, which is obviously unacceptable. For this reason, in the existing detection scanning technology, the IPv6 network protocol is used to send a detection data packet to induce the host to send its own IPv6 address configuration to the scanning host. However, as major operating system manufacturers pay more and more attention to address privacy, the above simple and effective local link IPv6 address scanning method faces the risk of being intercepted by the firewall and becoming invalid, resulting in the existing local link IPv6 address scanning technology. Problems such as low integrity of IPv6 address scanning results and lack of support for mobile terminal nodes. Summary of the invention
[0005] To this end, the present invention provides a dual-stack node IPv6 address fast scanning method and system based on host identifier association, which performs IPv6 address scanning based on dual-stack association information, can scan IPv6 survival addresses with high integrity, and supports IPv6 address scanning of mobile terminal nodes based on the mDNS (Multicast DNS) protocol.
[0006] According to the design scheme provided by the present invention, on the one hand, a dual-stack node IPv6 address fast scanning method based on host identifier association is provided, comprising:
[0007] Obtaining a live IPv4 address of a local link of a target network and a host identifier associated with the IPv4 address, wherein the host identifier is used to uniquely identify a host node;
[0008] Use the mDNS protocol to obtain the IPv6 address associated with the host identifier in the target network.
[0009] As a dual-stack node IPv6 address fast scanning method based on host identifier association of the present invention, further, obtaining the surviving IPv4 address of the local link of the target network includes:
[0010] Get the IPv4 address range of the local link of the target network;
[0011] Send an ARP (Address Resolution Protocol) request packet to all host nodes within the target network's IPv4 address range;
[0012] Receive the response data packet from the active host, and obtain the IPv4 address of the surviving host node in the target network and its corresponding MAC (Media Access Control) address by parsing the response data packet.
[0013] As a dual-stack node IPv6 address fast scanning method based on host identifier association of the present invention, further, obtaining a host identifier associated with an IPv4 address of a target network includes:
[0014] Constructing a first query message according to a DNS Service Discovery (DNS-SD) protocol, and sending the first query message to a surviving host node in a target network, wherein the first query message is used to request a service name opened by the host node;
[0015] Obtain a response data packet of the host node to the first query message by monitoring a designated port, and obtain a service name opened by the host node itself based on the response data packet;
[0016] According to the service name opened by the host node and in accordance with the DNS-SD protocol, a second query message is constructed, and the second query message is sent to the host node, where the second query message is used to request to obtain the service details of the host node;
[0017] Receive response data of the host node to the second query message, obtain the service details of the host node based on the response data, and extract the host identifier.
[0018] As a dual-stack node IPv6 address fast scanning method based on host identifier association of the present invention, further, using the mDNS protocol to obtain the IPv6 address associated with the host identifier in the target network includes:
[0019] Constructing an IPv6 address detection data packet using the mDNS protocol, and sending the IPv6 address detection data packet to a target network host node, wherein the IPv6 address detection data packet is used to query an IPv6 address associated with an IPv4 host identifier;
[0020] Receive the response data of the host node to the IPv6 address detection data packet, and parse the corresponding IPv6 address from the response data.
[0021] As a dual-stack node IPv6 address fast scanning method based on host identifier association of the present invention, further, the content of the IPv6 address detection data packet includes: destination MAC address, destination IPv6 address and query content with surviving IPv4 address host identifier information, wherein the destination MAC address is a specified standard multicast MAC address, and the destination IPv6 address is a specified mDNS special multicast address.
[0022] As a dual-stack node IPv6 address fast scanning method based on host identifier association of the present invention, further, it also includes:
[0023] The error reporting mechanism of the Internet Control Message Protocol version 6 (ICMPv6) protocol is used to classify different global unicast addresses of the same host to distinguish the permanent IPv6 global unicast address and the temporary IPv6 global unicast address of the host node. The ICMPv6 protocol error reporting mechanism is used to obtain the temporary IPv6 global unicast address of the host node.
[0024] As a dual-stack node IPv6 address fast scanning method based on host identifier association of the present invention, further, different global unicast addresses of the same host are classified by using the ICMPv6 protocol error reporting mechanism, including:
[0025] All host nodes in the target network send ICMPv6 messages with error options;
[0026] Receive the error message of each host node in response to the ICMPv6 message, and parse the temporary IPv6 global unicast address and source MAC address from the error message;
[0027] The temporary IPv6 global unicast address is matched with the global unicast address with the same source MAC address in the target network IPv6 address set, and the permanent IPv6 global unicast address and the temporary IPv6 global unicast address of the same host node are obtained based on the matching result. The target network IPv6 address set is an IPv6 address set constructed based on all IPv6 addresses associated with the host identifier in the target network.
[0028] On the other hand, the present invention also provides a dual-stack node IPv6 address fast scanning system based on host identifier association, comprising: a data acquisition module and an association scanning module, wherein:
[0029] A data acquisition module, used to acquire the IPv4 address of the local link of the target network and the host identifier associated with the IPv4 address, wherein the host identifier is used to uniquely identify the host node;
[0030] The associated scanning module is used to obtain the IPv6 address associated with the host identifier in the target network using the mDNS protocol.
[0031] Beneficial effects of the present invention:
[0032] The present invention obtains active IPv4 addresses in local links by scanning, obtains host identifiers associated with active IPv4 addresses by using the DNS-SD protocol, and obtains IPv6 addresses associated with the host identifier by using the mDNS protocol. It can quickly and completely obtain global unicast addresses and link-local addresses including terminal nodes such as Apple's ecological operating system in IPv6 local links. It is suitable for networks where IPv4 and IPv6 protocol stacks coexist, and provides surviving host list support for subsequent scanning of IPv6 network assets, discovery of potential security vulnerabilities, and optimization of network configuration, and has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a schematic diagram of a dual-stack node IPv6 address fast scanning process based on host identifier association in an embodiment;
[0034] Figure 2 This is a schematic diagram of the architecture of the dual-stack node IPv6 address fast scanning tool HScan6 in the embodiment;
[0035] Figure 3 This is a schematic diagram of the network environment topology for the Apple ecosystem operating system scanning capability test in the embodiment;
[0036] Figure 4 The figure is a schematic diagram of the completeness comparison of the IPv6 address scanning results in the embodiment. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and technical solutions.
[0038] To enhance the privacy of user IPv6 addresses, Apple ecosystem operating system (including macOS, iOS and iPadOS) nodes use random interface identifiers and temporary IPv6 addresses. In addition, due to the particularity of the protocol support and firewall configuration of mobile terminal nodes such as Apple, the existing local link IPv6 address scanning technology has the problems of low integrity of IPv6 address scanning results and lack of support for mobile terminal nodes. To this end, the embodiments of the present invention, see Figure 1 As shown, a dual-stack node IPv6 address fast scanning method based on host identifier association is provided, comprising:
[0039] S101. Acquire a live IPv4 address of a local link of a target network and a host identifier associated with the IPv4 address, wherein the host identifier is used to uniquely identify a host node.
[0040] Dual stack technology is one of the key technologies to achieve a smooth transition from IPv4 protocol to IPv6 protocol. It is the most widely used transition technology in wired and cellular networks. It can identify and process data packets using different protocols, allowing network nodes to select the appropriate protocol stack for data transmission based on the destination address. Dual stack technology enables seamless switching between IPv4 and IPv6, ensuring network connectivity and data transmission reliability. Currently, the mainstream Apple ecosystem operating systems on the market have all enabled the IPv6 protocol stack by default, and most of them are in a state where the IPv4 and IPv6 protocol stacks coexist.
[0041] The host identifier is used to identify different hosts on the network. If multiple hosts share the same host identifier, it will cause network communication errors and service access errors. Therefore, the host identifier of each host in the local link is unique. Based on the above analysis, in the local link, the IPv4 / IPv6 dual protocol stack of the Apple ecosystem operating system node has a unique host identifier.
[0042] In this embodiment, obtaining the surviving IPv4 address of the local link of the target network can be designed to include:
[0043] Get the IPv4 address range of the local link of the target network;
[0044] Send ARP request packets to all host nodes within the target network IPv4 address range;
[0045] Receive the response data packet from the active host, and obtain the IPv4 address and its corresponding MAC address of the surviving host node in the target network by parsing the response data packet.
[0046] The host identifier association obtains the host identifier of the surviving node in the IPv4 network environment, and obtains its corresponding IPv6 address through the host identifier, cleverly converting the large address space scanning task in the IPv6 local link environment into a small address space scanning task in the IPv4 local area network environment. Effectively reducing the address space to be scanned by 2 48 ~2 56 times, greatly improving the efficiency of local link IPv6 address scanning.
[0047] The existing protocols that can complete the detection function of active hosts in IPv4 local area networks mainly include Internet Control Message Protocol (ICMP), Transmission Control Protocol (TCP) and Address Resolution Protocol (ARP).
[0048] ICMP and TCP scans send Ping requests and SYN connection requests to the target host respectively, obtain the target host's response, and thus determine the activity of the target host. However, the above two protocols are easily blocked or intercepted by firewalls or intrusion detection systems (IDS).
[0049] The ARP protocol is one of the basic protocols of the IPv4 network, responsible for completing the mapping from IPv4 addresses to MAC addresses, so ARP packets are not easily blocked or restricted. Since all operating systems implement this protocol internally, compared to the method of using the DNS-SD protocol to obtain service records through multicast to indirectly obtain active nodes in the IPv4 LAN, using ARP scanning to perform traversal active address detection on the IPv4 LAN can obtain the most complete set of active addresses in the IPv4 LAN, effectively improving the scalability of the HScan6 tool.
[0050] Based on the above facts, in the embodiment of this case, the IPv4 network address range can be obtained first, and then an ARP request packet is sent to all hosts within the address range using a traversal method, and then a response from an active host is obtained, and finally the response packet is parsed to obtain the IPv4 address of the active host and its corresponding MAC address.
[0051] Wherein, obtaining the host identifier associated with the target network and the IPv4 address may be designed to include:
[0052] Constructing a first query message according to the DNS-SD protocol, and sending the first query message to a surviving host node in the target network, wherein the first query message is used to request to obtain a service name opened by the host node;
[0053] Obtain a response data packet of the host node to the first query message by monitoring a designated port, and obtain a service name opened by the host node itself based on the response data packet;
[0054] According to the service name opened by the host node and in accordance with the DNS-SD protocol, a second query message is constructed, and the second query message is sent to the host node, where the second query message is used to request to obtain the service details of the host node;
[0055] Receive response data of the host node to the second query message, obtain the service details of the host node based on the response data, and extract the host identifier.
[0056] The DNS-SD protocol defines the functions of actively querying the host's open services and querying service detailed information. The former can induce the target host to return the name of its own open services by sending a DNS query message with the query name "_services._dns-sd._udp.local" and the type of PTR record to the target host, while the latter sends a DNS query message with the service name as the query name to the target host, so that the target host returns detailed information about the service.
[0057] According to the above principles, in the embodiment of this case, in the process of discovering host identification information, a DNS-SD query message with the query name "_services._dns-sd._udp.local" can be first constructed, and its target IPv4 address and target MAC address are the IPv4 address and MAC address corresponding to the active host discovered by the IPv4 address discovery module. Then, listen to port 5353 to obtain the corresponding response data packet to obtain the services opened by the corresponding node, and parse out the service name opened by the target host. Then, according to the open service name of the target host, construct a DNS-SD query to obtain detailed service information, receive the response and parse out the host identifier from it.
[0058] S102: Use the mDNS protocol to obtain an IPv6 address associated with the host identifier in the target network.
[0059] Specifically, the mDNS protocol can be used to construct an IPv6 address detection data packet, and the IPv6 address detection data packet is sent to the target network host node, wherein the IPv6 address detection data packet is used to query the IPv6 address associated with the IPv4 host identifier; the host node receives the response data of the IPv6 address detection data packet, and parses the corresponding IPv6 address from the response data. The content of the IPv6 address detection data packet may include: the destination MAC address, the destination IPv6 address, and the query content with the live IPv4 address host identifier information, wherein the destination MAC address is a specified standard multicast MAC address, and the destination IPv6 address is a specified mDNS special multicast address.
[0060] The target host IPv6 address is obtained according to the host identifier. The existing protocols that can complete this function mainly include the Link-Local Multicast Name Resolution (LLMNR) protocol and the mDNS protocol.
[0061] The LLMNR protocol can resolve NetBIOS names to obtain the IPv6 address of the local link host. After analyzing and testing the protocol, it was found that the mainstream Apple ecosystem operating system nodes generally do not provide LLMNR services, making it difficult for the above technology to effectively complete the host identifier resolution work for the Apple ecosystem operating system nodes of the IPv6 local link.
[0062] The mDNS protocol is highly supported in the mainstream Apple ecosystem operating system, and defines a function for querying the IPv6 address of the corresponding Apple ecosystem operating system node through the host identifier in the service details. Therefore, in the embodiment of this case, the mDNS protocol can be used for rapid discovery of IPv6 addresses.
[0063] By constructing and sending an mDNS IPv6 address detection packet with the destination MAC address being the standard multicast MAC address 01:00:5E:00:00:FB, the destination IPv6 address being the mDNS special multicast address ff02::fb, and the query content being the IPv4 host identification information, the Apple ecosystem operating system node will feed back its own IP configuration information to the querying host after receiving the detection packet, from which its configured IPv6 address information can be parsed.
[0064] At the same time, in the embodiment of this case, the ICMPv6 protocol error reporting mechanism can be used to classify different global unicast addresses of the same host to distinguish the permanent IPv6 global unicast address and temporary IPv6 global unicast address of the host node. The ICMPv6 protocol error reporting mechanism is used to obtain the temporary IPv6 global unicast address of the host node.
[0065] Specifically, an ICMPv6 message with an error option may be sent to all host nodes in the target network;
[0066] Receive error messages from each host node in response to the ICMPv6 message, and parse out a temporary IPv6 global unicast address and a source MAC address from the error message; match the temporary IPv6 global unicast address with a global unicast address with the same source MAC address in the target network IPv6 address set, and obtain the permanent IPv6 global unicast address and the temporary IPv6 global unicast address of the same host node based on the matching result, wherein the target network IPv6 address set is an IPv6 address set constructed based on all IPv6 addresses associated with a host identifier in the target network.
[0067] Permanent IPv6 global unicast addresses are persistent and stable. Finding permanent IPv6 global unicast addresses in the IPv6 address set helps to establish a persistent data set for long-term research and analysis.
[0068] In the process of obtaining IPv6 address information, since the IPv6 address is included in the data packet in the form of AAAA record, the parsed IPv6 address set has the problem of being difficult to effectively distinguish between permanent and temporary IPv6 global unicast addresses of the same host. Therefore, the classification of different global unicast addresses of the same host is introduced.
[0069] At the same time, due to the differences in the settings of each node in the real network, it is difficult for a small number of nodes to effectively obtain their temporary IPv6 global unicast addresses. Therefore, for these hosts, this module is used to complete the completion of the IPv6 temporary global unicast addresses.
[0070] According to the error reporting function defined in the ICMPv6 protocol, if a host receives an ICMPv6 packet with a source address that is a global unicast address and a destination address that is the multicast address ff02::1 of all nodes in the link-local range and an error option, it will respond with an error message using the host's temporary IPv6 global unicast address as the source address.
[0071] Based on this, by following the above mechanism, an ICMPv6 message containing an error option is sent to ff02::1, and then the response error message is received, and the temporary IPv6 global unicast address and source MAC address are parsed from it. Finally, the temporary IPv6 global unicast address obtained from the error report message is compared and checked with the global unicast address with the same MAC address in the IPv6 address set, thereby completing the effective classification and supplementation of different global unicast addresses of the same host.
[0072] like Figure 2 As shown, in the embodiment of this case, a fast IPv6 address scanning tool HScan6 based on host identifier association is also provided. In the architecture of the scanning tool HScan6, the DNS-SD protocol is part of the zero-configuration network protocol Bonjour provided by Apple, which allows devices to publish or discover services as service providers or users. When the device acts as a user of the service, the DNS-SD protocol allows it to obtain detailed service information in the local link, in which there is information that can identify the host providing the service, that is, the host identifier. Thus, the mDNS protocol can be further used to discover the IPv6 address information (including link-local addresses and all global unicast addresses) of the node of the Apple ecological operating system corresponding to the host identifier. And the common Apple ecological operating systems on the market support the DNS-SD protocol and the mDNS protocol (macOS10.14.5, iOS and iPadOS11.4 and above operating systems all support the above protocols). Therefore, in the embodiment of this case, the DNS-SD protocol can be used to discover the host identifier of the surviving host, and the dual-stack node IPv6 address fast scanning can be realized based on the host identifier association.
[0073] Furthermore, based on the above method, an embodiment of the present invention also provides a dual-stack node IPv6 address fast scanning system based on host identifier association, comprising: a data acquisition module and an association scanning module, wherein:
[0074] A data acquisition module, used to acquire the IPv4 address of the local link of the target network and the host identifier associated with the IPv4 address, wherein the host identifier is used to uniquely identify the host node;
[0075] The associated scanning module is used to obtain the IPv6 address associated with the host identifier in the target network using the mDNS protocol.
[0076] In order to verify the effectiveness of this solution, the following is a further explanation based on experimental data:
[0077] Using the HScan6 tool and comparing it with mainstream IPv6 address scanning tools, four Nmap scripts were selected, namely, MP6 (targets-ipv6-multicast-echo), SLAAC (targets-ipv6-multicast-slaac), MLD (targets-ipv6-multicast-mld), and IEH (targets-ipv6-multicast-invalid-dst) scripts, as well as two local link IPv6 address scanning tools LLMNR6 and LinkScan6 based on host name query.
[0078] The experimental environment is Figure 3 As shown in the figure, a comparative experiment was conducted in an IPv6 network environment containing 4 desktop versions of Apple's ecological operating system nodes (macOS10, macOS11, macOS12, and macOS13) and 6 mobile versions of Apple's ecological operating system nodes (iOS15, iOS16, iOS17, iPadOS15, iPadOS16, and iPadOS17). The configuration of the scanning host is Intel(R) Core(TM) i7-9750H (6 cores, 2.6GHz) and 16GB RAM. The firewalls of all nodes use the default configuration.
[0079] The scanning capabilities of the test scripts and tools for Apple ecosystem operating system nodes are shown in Tables 1, 2 and Figure 4 shown.
[0080] Table 1 Comparison of IPv6 address scanning results
[0081]
[0082] As can be seen from Table 1, the HScan6 tool detects at least 10 more IPv6 addresses than the Nmap script. Using HScan6, you can obtain the most complete IPv6 addresses of Apple ecosystem operating system nodes, 10 more IPv6 addresses than the MP6 and IEH scripts, 20 more IPv6 addresses than the MLD script, and 30 more IPv6 addresses than the SLAAC script, LLMNR6 scanning tool, and LinkScan6 scanning tool.
[0083] Depend on Figure 4 It can be seen that in terms of the completeness of the scan results, HScan6 can scan the most complete IPv6 addresses of the desktop and mobile versions of the Apple ecosystem operating system. The average number of IPv6 addresses scanned by each node is 1.5 times that of the MP6 and IEH address scanning scripts, and 3 times that of the MLD script. Figure 4 It can be found that the LLMNR6 and LinkScan6 scanning tools are difficult to effectively obtain the IPv6 addresses of Apple ecosystem operating system nodes. The main reason is that the current mainstream Apple ecosystem operating system nodes do not support obtaining the host name corresponding to the node through the NBNS (Network Basic Input / Output System Name Service) protocol, which makes the above two IPv6 address scanning tools unable to associate with the IPv6 address of the Apple ecosystem operating system node through the host name.
[0084] Table 2 Apple ecosystem operating system IP v6 address scan detailed results
[0085]
[0086] GUA1: Permanent IPv6 Global Unicast Address, GUA2: Temporary IPv6 Global Unicast Address, LLA: Link Local Address, -: No result
[0087] It can be found from Table 2 that HScan6 can discover all IPv6 addresses (including link-local addresses and all global unicast addresses) of 4 desktop versions of Apple ecosystem operating systems, and can discover 18 IPv6 addresses of 6 mobile versions of Apple ecosystem operating systems. Specifically for a single mobile version of Apple ecosystem operating system, two local link IPv6 address scanning tools based on host name queries, LLMNR6 and LinkScan6, cannot discover the IPv6 address of Apple mobile terminal nodes, while HScan6 can discover its link-local address and all IPv6 global unicast addresses. Compared with other IPv6 address scanning tools based on dual-stack association information, HScan6 can effectively obtain the IPv6 address of Apple mobile terminal nodes. Compared with Nmap's 4 address scanning scripts, HScan6 can discover the most complete IPv6 address.
[0088] The temporary IPv6 global unicast address and link-local address of the Apple ecosystem operating system node can be obtained by using the MP6 and IEH scripts. The main reason is that the above two scripts will use all global unicast addresses and link-local addresses of the scanned host as the source address, and send ICMPv6 probe packets to the target host. When the target host receives the probe packet with the temporary IPv6 global unicast address as the source address, it will also respond to the probe packet with the temporary IPv6 global unicast address as the source address. Similarly, the target host will respond to the probe packet with the link-local address as the source address. In order to protect the address privacy of the host, the target host usually does not respond to ICMPv6 probe packets with the permanent IPv6 global unicast address as the source address.
[0089] The main reason why the SLAAC address scanning script cannot scan any valid IPv6 addresses is that the experimental equipment is placed behind a Layer 2 switch. The ICMPv6-based access control list in the switch only receives ICMPv6 RA messages from directly connected routers and filters out RA messages from untrusted ports.
[0090] The above experimental data show that this solution can scan 10 mainstream versions of Apple's ecological operating systems (including 4 macOS versions, 3 iOS versions and 3 iPadOS versions), quickly obtain all IPv6 global unicast addresses and link-local addresses, and provide surviving host list support for subsequent scanning of IPv6 network assets, discovery of potential security vulnerabilities and optimization of network configuration.
[0091] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present invention.
[0092] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0093] The units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation is not considered to be beyond the scope of the present invention.
[0094] Those skilled in the art will appreciate that all or part of the steps in the above method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk. Optionally, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits, and accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of software function modules. The present invention is not limited to any specific form of combination of hardware and software.
[0095] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A dual-stack node IPv6 address fast scanning method based on host identifier association, characterized in that: Include: Obtaining a live IPv4 address of a local link of a target network and a host identifier associated with the IPv4 address, wherein the host identifier is used to uniquely identify a host node; The multicast DNS protocol is used to obtain the IPv6 address associated with the host identifier in the target network.
2. The dual-stack node IPv6 address fast scanning method based on host identifier association according to claim 1, characterized in that: Get the live IPv4 address of the local link of the target network, including: Get the IPv4 address range of the local link of the target network; Send ARP request packets to all host nodes within the target network IPv4 address range; Receive the response data packet from the active host, and obtain the IPv4 address and its corresponding MAC address of the surviving host node in the target network by parsing the response data packet.
3. The dual-stack node IPv6 address fast scanning method based on host identifier association according to claim 1 or 2, characterized in that: Get the host identifier associated with the target network and IPv4 address, including: Constructing a first query message according to the DNS service discovery protocol, and sending the first query message to a surviving host node in the target network, wherein the first query message is used to request a service name opened by the host node; Obtain a response data packet of the host node to the first query message by monitoring a designated port, and obtain a service name opened by the host node itself based on the response data packet; According to the service name opened by the host node and in accordance with the DNS-SD protocol, a second query message is constructed, and the second query message is sent to the host node, where the second query message is used to request to obtain the service details of the host node; Receive response data of the host node to the second query message, obtain the service details of the host node based on the response data, and extract the host identifier.
4. The dual-stack node IPv6 address fast scanning method based on host identifier association according to claim 1, characterized in that: Use the multicast DNS protocol to obtain the IPv6 address associated with the host identifier in the target network, including: Constructing an IPv6 address detection data packet using a multicast DNS protocol, and sending the IPv6 address detection data packet to a target network host node, wherein the IPv6 address detection data packet is used to query an IPv6 address associated with an IPv4 host identifier; Receive the response data of the host node to the IPv6 address detection data packet, and parse the corresponding IPv6 address from the response data.
5. The dual-stack node IPv6 address fast scanning method based on host identifier association according to claim 4, characterized in that: The content of the IPv6 address detection data packet includes: destination MAC address, destination IPv6 address and query content with surviving IPv4 address host identifier information, wherein the destination MAC address is a specified standard multicast MAC address, and the destination IPv6 address is a specified multicast DNS special multicast address.
6. The dual-stack node IPv6 address fast scanning method based on host identifier association according to claim 1, characterized in that: Also includes: The different global unicast addresses of the same host are classified by utilizing the error reporting mechanism of the ICMPv6 protocol to distinguish the permanent IPv6 global unicast address and the temporary IPv6 global unicast address of the host node. The ICMPv6 protocol error reporting mechanism is used to obtain the temporary IPv6 global unicast address of the host node.
7. The dual-stack node IPv6 address fast scanning method based on host identifier association according to claim 6, characterized in that: Use the ICMPv6 protocol error reporting mechanism to classify different global unicast addresses of the same host, including: All host nodes in the target network send ICMPv6 messages with error options; Receive the error message of each host node in response to the ICMPv6 message, and parse the temporary IPv6 global unicast address and source MAC address from the error message; The temporary IPv6 global unicast address is matched with the global unicast address with the same source MAC address in the target network IPv6 address set, and the permanent IPv6 global unicast address and the temporary IPv6 global unicast address of the same host node are obtained based on the matching result. The target network IPv6 address set is an IPv6 address set constructed based on all IPv6 addresses associated with the host identifier in the target network.
8. A dual-stack node IPv6 address fast scanning system based on host identifier association, characterized in that: It includes: a data acquisition module and an associated scanning module, wherein: A data acquisition module, used to acquire the IPv4 address of the local link of the target network and the host identifier associated with the IPv4 address, wherein the host identifier is used to uniquely identify the host node; The associated scanning module is used to obtain the IPv6 address associated with the host identifier in the target network using the multicast DNS protocol.
9. An electronic device, characterized in that: include: at least one processor, and a memory coupled to the at least one processor; The memory stores a computer program, and the computer program can be executed by the at least one processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 7 can be implemented.
Citation Information
Cited By
Network equipment detection method, equipment, medium and product
CN118890335A
