Single stack host IPv6 address rapid scanning method and system based on service instance name association
Through the fast scanning method of single-stack host IPv6 address based on service instance name association, DNS-SD and mDNS protocols are used to obtain active host information in the IPv6 single-stack environment, solving the problem of insufficient support for IPv6 single-stack environment in the existing technology, realizing the implementation of the implementation of DNS-SD and mDNS protocols. Efficient IPv6 address scanning of Apple's ecological operating system has been improved to improve the completeness of the scan results.
Patent Information
- Application Number
- CN202411077125.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-19
AI Technical Summary
The existing local link IPv6 address scanning technology lacks support for the IPv6 single-stack environment, resulting in incomplete scanning results. The existing methods based on IPv4/IPv6 dual-stack associated information have increased the application threshold and cannot effectively support the Apple ecosystem operating system.
Using a single-stack host IPv6 address fast scanning method based on service instance name association, the service instance name and IPv6 address of the active host in the IPv6 target network are obtained through DNS-SD and mDNS protocols, and ICMPv6 packet multicast is constructed to discover the local link active The host uses the service type to enumerate the request packet to obtain the open service type, realizing the rapid scanning of the IPv6 single-stack environment.
Improves the completeness of IPv6 address scan results, is suitable for operating system host nodes in single-stack ecosystems including iOS, macOS and iPadOS, supports IPv6 address scanning of Apple's ecosystem operating system, lowers application thresholds, and enhances the scalability of scanning. sex.
Smart Images

Figure CN118984333A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of IPv6 address scanning, and in particular to a method and system for quickly scanning a single-stack host IPv6 address based on service instance name association. Background Art
[0002] With the widespread deployment of IPv6, it is essential to manage and evaluate IPv6 network assets in order to improve the visibility, security and reliability of IPv6 networks and reduce potential risks. In this context, IPv6 address scanning has become a vital task, providing key support for asset management and security assessment. In terms of IPv6 network asset management, network administrators can quickly grasp the IP addresses and status information of various devices and services in IPv6 networks through IPv6 address scanning technology. In terms of network security assessment, IPv6 address scanning technology can provide a list of surviving hosts for network administrators to discover potential vulnerabilities and security weaknesses of IPv6 hosts.
[0003] Compared with IPv4, IPv6 has a larger address space, which brings new challenges to IPv6 address scanning. Existing address scanning technologies based on traversal patterns commonly used in IPv4 environments (such as Zmap and Masscan) will bring huge resource and time overhead if directly applied to IPv6 networks. According to the location of the scanner, existing IPv6 address scanning can be divided into two categories: remote link IPv6 address scanning and local link IPv6 address scanning. Among them, most remote link IPv6 address scanning technologies use heuristic algorithms, machine learning and other methods to mine the density or structure information of active IPv6 addresses, and then discover the pattern of high-density areas of seed addresses or active addresses, and generate a set of IPv6 predicted addresses to be scanned based on this, so as to reduce the IPv6 address space that needs to be scanned, thereby realizing the rapid discovery of IPv6 active addresses. Local link IPv6 address scanning technology mainly sends various types of detection messages to induce IPv6 hosts to feed back their own IPv6 address information to the scanning host, thereby completing IPv6 address scanning.
[0004] However, in order to maintain the security of the operating system, most modern firewalls will block data packets sent by some existing local link IPv6 address scanning technologies by default. To solve the above problems, IPv4 / IPv6 dual stack association information is used to complete IPv6 address scanning. Although the above method can effectively avoid the influence from some firewalls, it increases the application threshold of local link IPv6 address scanning technology. In addition, most of the current local link IPv6 address scanning technologies based on IPv4 / IPv6 dual stack association information are mainly targeted at Windows nodes and some Linux nodes, and lack support for Apple ecosystem operating system nodes. For this reason, there is an urgent need for a local link IPv6 address scanning solution to support IPv6 single stack environments and improve the integrity of scanning results. Summary of the invention
[0005] To this end, the present invention provides a single-stack host IPv6 address fast scanning method and system based on service instance name association, which solves the problems that the existing local link IPv6 address scanning technology lacks support for IPv6 single-stack environment and the scanning result integrity is not high.
[0006] According to the design scheme provided by the present invention, on the one hand, a single-stack host IPv6 address fast scanning method based on service instance name association is provided, comprising:
[0007] Get the active hosts on the local link of the IPv6 target network and the open service types of the active hosts;
[0008] Based on the open service type, query the service instance name corresponding to the active host node using the service instance name query request message in the DNS-SD (DNS Service Discovery) protocol, where the service instance name consists of the host identification information and the service type;
[0009] Use the mDNS protocol to obtain the IPv6 address associated with the service instance name in the IPv6 target network.
[0010] As a single-stack host IPv6 address fast scanning method based on service instance name association of the present invention, further, obtaining the active host of the local link of the IPv6 target network includes:
[0011] Constructing an ICMPv6 data packet for discovering an active host on a local link and multicasting the ICMPv6 data packet to an IPv6 target network, wherein the ICMPv6 data packet carries an invalid extension header;
[0012] According to the response information of the ICMPv6 data packet, parse and obtain the temporary IPv6 address and the corresponding MAC address of the active host on the local link.
[0013] As a single-stack host IPv6 address fast scanning method based on service instance name association of the present invention, further, the ICMPv6 data packet uses the multicast address of all host nodes within the local link range as the destination address and carries an invalid extension header.
[0014] As a single stack host IPv6 address fast scanning method based on service instance name association of the present invention, further, obtaining the open service type of the active host on the local link of the IPv6 target network includes:
[0015] Constructing a service type enumeration request message according to the DNS-SD protocol, wherein the destination IPv6 address and the destination MAC address of the service type enumeration request message are respectively the IPv6 address of the local link active host and its corresponding MAC address;
[0016] The response data packet of the local link active host to the service type enumeration request message is obtained by monitoring the designated port, and the service type opened by the local link active host itself is obtained based on the response data packet.
[0017] As a single-stack host IPv6 address fast scanning method based on service instance name association of the present invention, further, using the service instance name query request message in the DNS-SD protocol to query the service instance name corresponding to the active host node includes:
[0018] Constructing a service instance name query message according to the DNS-SD protocol, wherein the service instance name query message uses the service type opened by the target host as the query content and enables the target host to return the service instance name, wherein the destination IPv6 address and the destination MAC address of the target host are the IPv6 address and the MAC address of the local link active host respectively;
[0019] Receive response data from the target host to the service instance name query message, and extract the service instance name from the response data.
[0020] As a single stack host IPv6 address fast scanning method based on service instance name association of the present invention, further, using the mDNS protocol to obtain the IPv6 address associated with the service instance name in the IPv6 target network, comprising:
[0021] An IPv6 address detection packet is constructed using the mDNS (Multicast DNS) protocol, where the IPv6 address detection packet is used to query the host identification information contained in the local link service instance name;
[0022] Receive IP configuration feedback information of the local link host for the IPv6 address detection packet, and acquire the IPv6 address associated with the service instance name based on the IP configuration feedback information.
[0023] As a single-stack host IPv6 address fast scanning method based on service instance name association of the present invention, further, in the constructed IPv6 address detection packet, the destination IPv6 address is the multicast address ff02::fb, and the destination MAC address is the multicast MAC address 33:33:00:00:00:fb.
[0024] On the other hand, the present invention also provides a single-stack host IPv6 address fast scanning system based on service instance name association, comprising: a service type enumeration module, a service instance name discovery module and an IPv6 address detection module, wherein:
[0025] The service type enumeration module is used to obtain the active hosts on the local link of the IPv6 target network and the open service types of the active hosts;
[0026] A service instance name discovery module, used to query the service instance name corresponding to the active host node based on the open service type and using the service instance name query request message in the DNS-SD protocol, wherein the service instance name consists of the host identification information and the service type;
[0027] The IPv6 address detection module is used to obtain the IPv6 address associated with the service instance name in the IPv6 target network using the mDNS protocol.
[0028] Beneficial effects of the present invention:
[0029] The present invention obtains the active host of the local link of the IPv6 target network and the open service type of the active host; based on the open service type and using the service instance name query request message in the DNS-SD protocol to query the service instance name corresponding to the active host node, the service instance name consists of host identification information and service type; uses the mDNS protocol to obtain the IPv6 address associated with the service instance name in the IPv6 target network, which can be applied to the host node scanning of the operating system in specific single-stack ecosystems including iOS, macOS and iPadOS, improves the completeness of the address scanning, and provides address list support for subsequent scanning of IPv6 network assets, discovery of potential security vulnerabilities and optimization of network configuration, etc., and has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a schematic diagram of a single-stack host IPv6 address quick scan process based on service instance name association in an embodiment;
[0031] Figure 2 This is a schematic diagram of the architecture of the local link IPv6 address fast scanning tool AScan6 in the embodiment;
[0032] Figure 3The working principle of the IPv6 address fast scanning system based on service instance association in the embodiment is shown;
[0033] Figure 4 This is a schematic diagram of the network environment topology for testing the IPv6 address scanning capability of the Apple ecosystem operating system in the embodiment;
[0034] Figure 5 This is a schematic diagram of the network environment topology for the scanning capability test of some Linux nodes in the embodiment;
[0035] Figure 6 This is a comparison diagram of the IPv6 address scanning results of the Apple ecosystem operating system node in the embodiment;
[0036] Figure 7 The following is a comparison diagram of the IPv6 address scanning results of some Linux operating system nodes 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] In order to enhance the privacy of user IPv6 addresses, and Apple ecosystem operating system (including macOS, iOS and iPadOS) nodes generally use random interface identifiers and temporary IPv6 addresses, the existing local link IPv6 address scanning technology has problems such as low scan result integrity for Apple ecosystem operating system nodes, the embodiments of the present invention, see Figure 1 As shown, a method for quickly scanning a single-stack host IPv6 address based on service instance name association is provided, comprising:
[0039] S101. Obtain active hosts on the local link of the IPv6 target network and the open service types of the active hosts.
[0040] Specifically, obtaining the active hosts on the local link of the IPv6 target network can be designed to include:
[0041] Constructing an ICMPv6 data packet for discovering an active host on a local link and multicasting the ICMPv6 data packet to an IPv6 target network, wherein the ICMPv6 data packet carries an invalid extension header;
[0042] According to the response information of the ICMPv6 data packet, parse and obtain the temporary IPv6 address and the corresponding MAC address of the active host on the local link.
[0043] The ICMPv6 data packet has a multicast address of all host nodes within the local link range as a destination address and carries an invalid extension header.
[0044] Specifically, the open service types of active hosts on the local link of the IPv6 target network are obtained, which can be designed to include:
[0045] Constructing a service type enumeration request message according to the DNS-SD protocol, wherein the destination IPv6 address and the destination MAC address of the service type enumeration request message are respectively the IPv6 address of the local link active host and its corresponding MAC address;
[0046] The response data packet of the local link active host to the service type enumeration request message is obtained by monitoring the designated port, and the service type opened by the local link active host itself is obtained based on the response data packet.
[0047] The existing local link IPv6 address scanning technology mainly uses IPv4 / IPv6 dual stack association information to complete IPv6 address scanning. Among the various IPv4 / IPv6 dual stack association information, the host name has attracted the attention of researchers due to its uniqueness and easy accessibility in the local link. The protocols that can be used to obtain the host name are mainly SNMP (Simple Network Management Protocol) and NBNS (NetBIOS Name Service) protocols.
[0048] SNMP is a standard protocol for managing network nodes in IP networks, allowing network administrators to monitor, configure and manage devices in the network. However, due to some security risks of SNMP, Apple's ecological operating system generally does not enable SNMP service by default, so the SNMP method cannot be used.
[0049] The NBNS protocol was designed primarily for early Windows networks and is not suitable for Apple's ecosystem operating system. Therefore, the NBNS protocol cannot be used to discover host names for Apple's ecosystem operating system.
[0050] Through experiments and analysis, it is found that the above host name resolution protocols lack support for Apple's ecological operating system. Therefore, it is very difficult to complete the IPv6 address scanning of Apple's ecological operating system using the host name association information.
[0051] In Bonjour, the Zeroconf technology launched by Apple, the DNS-SD protocol allows devices as service users or providers to discover or publish service instance names within the local link range. When a device obtains the service instance name as a service user, it can use the mDNS protocol to obtain the IP address corresponding to the host identification information in the service instance name, thereby realizing automatic discovery of local link devices and services.
[0052] Currently, the above protocols are widely supported in Apple's ecological operating systems (macOS10.14.5, iOS and iPadOS11.4 and above all support the above protocols), and support IPv6 single stack environment. In addition, Windows and Linux operating systems can obtain support for related protocols through additional configuration.
[0053] Based on the above principle, in the embodiment of this case, see Figure 2 As shown in the figure, we can first discover the active host on the IPv6 local link and query the open services of the active host. Then, we use the DNS-SD protocol to query the service instance name information of the corresponding node. Finally, we use the mDNS protocol to query all its IPv6 addresses according to the host identification information in the service instance name.
[0054] To facilitate devices to discover services of interest in the local link, DNS-SD defines a function called service type enumeration request to actively query the open service types of active hosts in the local link. By sending a DNS query message with the query content of "_services._dns-sd._udp.local" and the type of PTR record to the target host, the active host in the local link is induced to return a double-label format. <service>name, plus the open service type of the .loacl domain name.
[0055] In this process, ICMPv6 packets carrying invalid extension headers can be used to induce the local link surviving host to send ICMPv6 Parameter Problem messages of type 4, thereby discovering the local link active host and obtaining the target host of the DNS-SD service type enumeration request.
[0056] Since ICMPv6 is an important technical protocol in IPv6 networks and is implemented in most mainstream operating systems, the above method can obtain the most complete IPv6 local link active host address set, effectively improving the scalability of the AScan6 tool, compared with the method of indirectly obtaining the active hosts of the IPv6 local link by using the DNS-SD multicast technology to obtain service records.
[0057] Therefore, in the service type enumeration, an ICMPv6 data packet carrying an invalid extension header with the local link range multicast address ff02::1 as the destination address can be constructed to induce the local link active host to send an ICMPv6 parameter problem message, from which the temporary IPv6 global unicast address of the local link active host and its corresponding MAC address can be parsed. Then, a DNS-SD service type enumeration request with the query content "_services._dns-sd._udp.local" is constructed, and its destination IPv6 address and destination MAC address are the IPv6 address of the local link active host and its corresponding MAC address, respectively. Finally, port 5353 is monitored to obtain the response data packet to obtain the service type opened by the corresponding active node. Its specific implementation is shown in Algorithm 1.
[0058] Algorithm 1 Service Type Enumeration Algorithm Input: None Output: Open Service Type IP
[0059]
[0060] S102. Based on the open service type, query the service instance name corresponding to the active host node using a service instance name query request message in the DNS-SD protocol, where the service instance name consists of host identification information and service type.
[0061] Specifically, a service instance name query message can be constructed according to the DNS-SD protocol. The service instance name query message uses the service type opened by the target host as the query content and enables the target host to return the service instance name, wherein the destination IPv6 address and destination MAC address of the target host are respectively the IPv6 address and MAC address of the active host in the local link; and receives the response data of the target host to the service instance name query message, and extracts the service instance name from the response data.
[0062] When the local link open service is known, the service instance name provides detailed information about the device open service. The service instance name consists of host identification information and service type. The former is used to identify the host that provides the service, and the latter is used to identify the service provided by the host. DNS-SD defines a request to query the service instance name. The request uses the service type opened by the target host as the query content, so that the target host returns its service instance name.
[0063] According to the above principle, in service instance name discovery, we can first construct a service instance name query message, whose destination IPv6 address and MAC address are the IPv6 address and MAC address of the node obtained by the service type enumeration module, and the query content is the open service of the node. Then, we receive the response data packet and extract the service instance name from it. Algorithm 2 is its specific implementation.
[0064] Algorithm 2 Service instance name discovery algorithm Input: node related information and open service type service_list
[0065] Output: service instance name information service_inst
[0066]
[0067] S103: Use the mDNS protocol to obtain an IPv6 address associated with the service instance name in the IPv6 target network.
[0068] Specifically, the mDNS protocol can be used to construct an IPv6 address detection packet, where the IPv6 address detection packet is used to query the host identification information contained in the local link service instance name; receive IP configuration feedback information of the local link host for the IPv6 address detection packet, and obtain the IPv6 address associated with the service instance name based on the IP configuration feedback information.
[0069] mDNS defines the function of querying the IPv6 address of the active node of the corresponding local link through the host identification information in the service instance name, and the mainstream Apple ecosystem operating systems currently support this protocol. Although the LLMNR protocol can also complete the above function, experiments and analysis have found that the mainstream Apple ecosystem operating systems currently do not generally provide LLMNR services.
[0070] According to the above analysis, the mDNS protocol is selected as the backup protocol for IPv6 address fast discovery. The mDNS IPv6 address detection packet with the destination MAC address as the multicast MAC address 33:33:00:00:00:fb and the destination IPv6 address as the multicast address ff02::fb can be constructed and sent. The query content is the host identification information contained in the IPv6 local link service instance name. After receiving the detection packet, the Apple ecosystem operating system host will feedback its own IP configuration information to the scanning host, from which its IPv6 address information can be parsed. Its specific implementation is shown in Algorithm 3.
[0071] Algorithm 3 IPv6 address fast discovery algorithm Input: service instance name information service_inst
[0072] Output: IPv6 address ipv6
[0073]
[0074] Further, based on the above method, an embodiment of the present invention also provides a single-stack host IPv6 address fast scanning system based on service instance name association, comprising: a service type enumeration module, a service instance name discovery module and an IPv6 address detection module, wherein:
[0075] The service type enumeration module is used to obtain the active hosts on the local link of the IPv6 target network and the open service types of the active hosts;
[0076] A service instance name discovery module, used to query the service instance name corresponding to the active host node based on the open service type and using the service instance name query request message in the DNS-SD protocol, wherein the service instance name consists of the host identification information and the service type;
[0077] The IPv6 address detection module is used to obtain the IPv6 address associated with the service instance name in the IPv6 target network using the mDNS protocol.
[0078] See also Figure 3 As shown in the figure, the service type enumeration module is first used to discover the active hosts on the IPv6 local link and query the open services of the active hosts. Then, the service instance name discovery module uses the DNS-SD protocol to query the service instance name information of the corresponding node. Finally, the IPv6 address detection module uses the mDNS protocol to query all its IPv6 addresses based on the host identification information in the service instance name.
[0079] In order to verify the effectiveness of this solution, the following is a further explanation based on experimental data:
[0080] Compare the AScan6 tool in this case with mainstream IPv6 address scanning tools, including the four IPv6 address scanning scripts in Nmap NSE (Nmap Scripting Engine), namely MLD
[0081] (targets-ipv6-multicast-mld), MP6 (targets-ipv6-multicast-echo), IEH
[0082] (targets-ipv6-multicast-invalid-dst) and SLAAC (targets-ipv6-multicast-slaac) scanning scripts as well as two local link IPv6 address scanning tools LLMNR6 and LinkScan6 based on host name queries.
[0083] In order to verify the effectiveness of this solution, we selected Apple's ecological operating system with high market share. Figure 4 The scanning capability of AScan6 for Apple ecosystem operating system nodes was tested in the IPv6 local link network environment shown in the figure, and compared with the existing local link scanning technology, where VMware Workstation Pro 17 was used to open 4 desktop versions of Apple ecosystem operating systems (macOS10, macOS11, macOS12 and macOS13) and 6 mobile versions of Apple ecosystem operating systems (iOS15, iOS16, iOS17, iPadOS15, iPadOS16 and iPadOS17).
[0084] And in such Figure 5 The AScan6 tool's scanning capability for some Linux system nodes is tested in the local link environment shown. The hosts involved in the test include 4 desktop versions (Ubuntu 20.04, Ubuntu 21.04, Ubuntu 22.04, Ubuntu 23.04) and 3 server versions (Ubuntu Server 20.04, Ubuntu Server 22.04, UbuntuServer 23.04) Linux systems. The configuration of the scanning host is Intel(R) Core(TM) i7-9750H (6 cores, 2.6GHz) and 16GB RAM. All firewalls use the default configuration.
[0085] The comparative experimental results of the AScan6 scanning tool in this case on the IPv6 address scanning capability of Apple ecosystem operating system nodes are shown in Tables 1, 2 and Figure 6 shown.
[0086] Table 1 IPv6 address scanning comparison experimental results
[0087]
[0088] From Table 1, the AScan6 tool in this solution can detect a total of 30 IPv6 addresses of 10 different Apple ecosystem operating systems, which is at least 10 more IPv6 addresses than the Nmap IPv6 address scanning script. Specifically, the AScan6 tool in this solution obtains 10 more IPv6 addresses than the MP6 and IEH scanning scripts, 20 more IPv6 addresses than the MLD scanning script, and 30 more IPv6 addresses than the SLAAC scanning script, LLMNR6, and LinkScan6 scanning tools.
[0089] From the scanning speed point of view, since the AScan6 tool in this case needs to perform four data packet sending, receiving and parsing processes, its scanning speed is not as good as Nmap's four IPv6 address scanning scripts and the local link IPv6 address scanning tools LLMNR6 and LinkScan6 based on host name queries.
[0090] However, in terms of scan result completeness, AScan6 in this case solution has the best IPv6 address scan result completeness compared with the above tools and scripts. The scan result completeness of AScan6 in this case solution is 1.5 times that of MP6 and IEH scan scripts, and 3 times that of MLD scan script.
[0091] Depend on Figure 6 As shown in Table 2, for a single Apple ecosystem operating system node, the AScan6 tool in this solution can detect all IPv6 addresses (including link-local addresses and all global unicast addresses) of 4 desktop versions and 6 mobile versions of the Apple ecosystem operating system. In summary, compared with other scanning technologies, the AScan6 tool can obtain the most complete IPv6 addresses of Apple ecosystem operating system nodes with higher efficiency.
[0092] Table 2 Detailed results of IPv6 address scanning on different macOS, iOS and iPadOS versions
[0093]
[0094] GUA1: Permanent IPv6 Global Unicast Address; GUA2: Temporary IPv6 Global Unicast Address; LLA: Link Local Address
[0095] It can be found from Table 2 that 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 scanning scripts. The main reason is that the above two scripts will use all global unicast addresses and local link addresses owned by the scanning host as the source address, and send ICMPv6 detection packets to the target host. When the target host receives the detection packet with the temporary IPv6 global unicast address as the source address, it will also respond to the detection packet with its own temporary IPv6 global unicast address as the source address. Similarly, the target host will respond to the detection packet with the link-local address as the source address. In order to protect its address privacy, the target host will not respond to the ICMPv6 detection packet with the permanent IPv6 global unicast address as the source address.
[0096] The scanning results of the AScan6 tool in this case for some Linux operating systems are as follows: Figure 7 And as shown in Table 3.
[0097] Depend on Figure 7 It can be seen that in this case, AScan6 can detect a total of 18 IPv6 addresses of 4 desktop versions and 3 server versions of the Linux operating system, 11 more IPv6 addresses than the MLD scanning script, and 4 more IPv6 addresses than the MP6 and IEH scanning scripts.
[0098] Table 3 Detailed results of IPv6 address scanning on different Linux versions
[0099]
[0100] As can be seen from Table 3, specifically for a single Linux operating system, AScan6 in this solution can obtain all IPv6 addresses of all nodes (including link-local addresses and all global unicast addresses).
[0101] Compared with Nmap's four IPv6 address scanning scripts and the local link IPv6 address scanning tools LLMNR6 and LinkScan6 based on host name query, AScan6 has the highest scanning result completeness. At the same time, according to Table 3, it is easy to find that for the server version of the Linux system, the MP6 and IEH scanning scripts can effectively discover its permanent IPv6 global unicast address. The reason is that the server version of the Linux system has only one IPv6 global unicast address. Therefore, when receiving a probe message with a global unicast address as the source address, the host will respond to the probe message with its unique global unicast address.
[0102] The SLAAC script cannot effectively obtain IPv6 addresses regardless of the operating system it scans. The reason is that the scanning host in this experiment is placed behind a Layer 2 switch. The ICMPv6-based access control list in the switch only receives ICMPv6 RA (Router Advertisement) messages from directly connected routers and filters out ICMPv6 RA messages from untrusted ports.
[0103] The above experimental data show that the existing LLMNR6 and LinkScan6 cannot scan valid IPv6 addresses, while AScan6 in this solution can scan up to 20 additional IPv6 addresses compared to Nmap's 4 scripts, which improves the completeness of IPv6 address scanning; specifically, on a single Apple ecosystem operating system node, AScan6 in this solution detects 1 to 2 more IPv6 global unicast addresses than Nmap's 4 scripts; in terms of address scanning applicability for Linux operating systems, the number of IPv6 addresses scanned by AScan6 in this solution is 1.29 to 2.57 times that of Nmap's 4 scripts. Therefore, this solution can scan 10 mainstream versions (including 4 macOS versions, 3 iOS versions, and 3 iPadOS versions) of Apple ecosystem operating systems and 7 versions of Linux operating systems (including 4 desktop versions and 3 server versions) in an IPv6 single stack environment, and quickly obtain complete IPv6 global unicast addresses and link-local addresses, effectively improving the completeness of local link IPv6 address scanning results.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] 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.< / service>
Claims
1. A method for quickly scanning a single-stack host IPv6 address based on service instance name association, characterized in that: Include: Get the active hosts on the local link of the IPv6 target network and the open service types of the active hosts; Based on the open service type, query the service instance name corresponding to the active host node using the service instance name query request message in the DNS-SD protocol, where the service instance name consists of host identification information and service type; Use the mDNS protocol to obtain the IPv6 address associated with the service instance name in the IPv6 target network.
2. The single-stack host IPv6 address fast scanning method based on service instance name association according to claim 1 is characterized in that: Get the active hosts on the local link of the IPv6 target network, including: Constructing an ICMPv6 data packet for discovering an active host on a local link and multicasting the ICMPv6 data packet to an IPv6 target network, wherein the ICMPv6 data packet carries an invalid extension header; According to the response information of the ICMPv6 data packet, parse and obtain the temporary IPv6 address and the corresponding MAC address of the active host on the local link.
3. The single-stack host IPv6 address fast scanning method based on service instance name association according to claim 1 is characterized in that: The ICMPv6 data packet has a multicast address of all host nodes within a local link range as a destination address and carries an invalid extension header.
4. The single-stack host IPv6 address fast scanning method based on service instance name association according to claim 1 or 2, characterized in that: Get the open service types of active hosts on the local link of the IPv6 target network, including: Constructing a service type enumeration request message according to the DNS-SD protocol, wherein the destination IPv6 address and the destination MAC address of the service type enumeration request message are respectively the IPv6 address of the local link active host and its corresponding MAC address; The response data packet of the local link active host to the service type enumeration request message is obtained by monitoring the designated port, and the service type opened by the local link active host itself is obtained based on the response data packet.
5. The single stack host IPv6 address fast scanning method based on service instance name association according to claim 1 is characterized in that: Use the service instance name query request message in the DNS-SD protocol to query the service instance name corresponding to the active host node, including: Constructing a service instance name query message according to the DNS-SD protocol, wherein the service instance name query message uses the service type opened by the target host as the query content and enables the target host to return the service instance name, wherein the destination IPv6 address and the destination MAC address of the target host are the IPv6 address and the MAC address of the local link active host respectively; Receive response data from the target host to the service instance name query message, and extract the service instance name from the response data.
6. The single-stack host IPv6 address fast scanning method based on service instance name association according to claim 1 is characterized in that: Use the mDNS protocol to obtain the IPv6 address associated with the service instance name in the IPv6 target network, including: Constructing an IPv6 address detection packet using the mDNS protocol, wherein the IPv6 address detection packet is used to query the host identification information contained in the local link service instance name; Receive IP configuration feedback information of the local link host for the IPv6 address detection packet, and acquire the IPv6 address associated with the service instance name based on the IP configuration feedback information.
7. The single stack host IPv6 address fast scanning method based on service instance name association according to claim 6 is characterized in that: In the constructed IPv6 address detection packet, the destination IPv6 address is the multicast address ff02::fb, and the destination MAC address is the multicast MAC address 33:33:00:00:00:fb.
8. A single-stack host IPv6 address fast scanning system based on service instance name association, characterized in that: Contains: service type enumeration module, service instance name discovery module and IPv6 address detection module, among which, The service type enumeration module is used to obtain the active hosts on the local link of the IPv6 target network and the open service types of the active hosts; A service instance name discovery module, used to query the service instance name corresponding to the active host node based on the open service type and using the service instance name query request message in the DNS-SD protocol, wherein the service instance name consists of the host identification information and the service type; The IPv6 address detection module is used to obtain the IPv6 address associated with the service instance name in the IPv6 target network using the mDNS 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.
