Scanning device, scanning method, and scanning program
The scanning device addresses the inefficiency in IPv6 scanning by using IPv4 port usage statistics to select AS and hosts in the IPv6 space, enhancing scanning efficiency and identifying vulnerabilities, allowing for proactive security measures.
Patent Information
- Application Number
- PCT/JP2023/008177
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2024-09-12
AI Technical Summary
Efficient scanning in the IPv6 space is challenging due to the vast number of addresses and limited port handling, leading to poor efficiency and biased results when investigating network connectivity and vulnerable hosts.
A scanning device that selects AS and hosts in the IPv6 space based on port usage status in the IPv4 space, using statistical information to generate scan targets and prioritize active ports, and performs scans to identify vulnerable hosts and protocol prevalence.
Enables efficient scanning in the IPv6 space by narrowing down AS and hosts for each port, improving processing efficiency and identifying vulnerable hosts and protocol prevalence, thereby facilitating proactive countermeasures against cyber attacks.
Smart Images

Figure JP2023008177_12092024_PF_FP_ABST
Abstract
Description
Scanning device, scanning method, and scanning program
[0001] The present invention relates to a scanning device, a scanning method, and a scanning program.
[0002] A technique called scanning (or port scanning) is known, in which packets are sent to a host and the responses are analyzed, with the aim of understanding the network connectivity of the host, the port or application operation status, etc. Scanning can be used to investigate protocol prevalence, network topology, the existence of vulnerable hosts, etc.
[0003] In addition, the number of addresses in the IPv6 space is enormous compared to the IPv4 space, making brute force scanning difficult. To address this issue, a technique is known that uses seeds to generate scan targets (IP addresses in the IPv6 space) in advance (see, for example, Non-Patent Document 1).
[0004] For example, there is a technique called scan target generation, which inputs known active hosts as seeds and outputs hosts predicted to be active. In addition, hit lists collected from public information such as DNS (Domain Name System) may be used as seeds.
[0005] Target Generation for Internet-wide IPv6 Scanning, [online], [Retrieved February 20, 2023], Internet (https: / / zakird.com / papers / imc17-6gen.pdf)
[0006] However, conventional techniques may have difficulty in efficiently scanning the IPv6 space.
[0007] When performing application-specific investigations, such as investigating vulnerable hosts, by scanning, it is necessary to understand not only the existence of the host but also the ports operating on the host. When performing a scan that takes ports into consideration, the number of scans required is equal to the number of target hosts multiplied by the number of target ports, which reduces efficiency.
[0008] In addition, since the hit list only handles a limited number of ports, the bias in the ports corresponding to the IPv6 addresses given as seeds affects the scan targets, making it difficult to efficiently scan a wide variety of ports.
[0009] In order to solve the above-mentioned problems and achieve the object, the scanning device is characterized by having an AS selection unit that selects an AS to be scanned in IPv6 space based on the usage status of ports in IPv4 space; a generation unit that generates an IPv6 address of a scan target from an IPv6 address corresponding to the AS selected by the AS selection unit among IPv6 addresses given as seeds; a host selection unit that selects an IPv6 address of a scan target from the IPv6 addresses generated by the generation unit based on the results of past scans of other ports of the same host; a scanning unit that performs a scan by specifying the IPv6 address selected by the host selection unit; and a scan result storage unit that stores the results of the scan performed by the scanning unit.
[0010] According to the present invention, scanning can be performed efficiently in the IPv6 space.
[0011] Fig. 1 is a diagram showing an example of the configuration of a scanning device according to a first embodiment. Fig. 2 is a diagram showing an example of combination data of hosts and operating ports in an IPv4 space. Fig. 3 is a flowchart showing the processing flow of the scanning device according to the first embodiment. Fig. 4 is a diagram showing an example of a computer that executes a scanning program.
[0012] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A scanning device, a scanning method, and a scanning program according to the present invention will be described in detail below with reference to the accompanying drawings. However, the present invention is not limited to the following embodiments.
[0013] [Configuration of First Embodiment] The configuration of a scanning device will be described with reference to Fig. 1. Fig. 1 is a diagram showing an example of the configuration of a scanning device according to the first embodiment.
[0014] As shown in FIG. 1, the scanning device 10 includes a preprocessing unit 11 , an AS selection unit 12 , a generation unit 13 , a host selection unit 14 , a scanning unit 15 , a scanning result holding unit 16 , and an output control unit 17 .
[0015] 1, the scanning device 10 uses IPv4 statistical information and seed information for processing. The scanning device 10 may store the IPv4 statistical information and seed information. The scanning device 10 may also receive input of the IPv4 statistical information and seed information.
[0016] The seed information is information containing seeds for generating hosts as scan targets, and is a set of IPv6 IP addresses (IPv6 addresses) (address format) known to be active, i.e., used as hosts.
[0017] In this embodiment, a host is represented by an IPv4 IP address (IPv4 address) or an IPv6 IP address (IPv6 address).
[0018] The seed information is used to generate an IPv6 address to be a scan target. In addition, a method for generating a host from a seed in this embodiment may be the method described in Non-Patent Document 1.
[0019] The preprocessing unit 11 removes IPv6 addresses that satisfy the conditions from the IPv6 addresses provided as seeds. For example, the preprocessing unit 11 removes addresses that do not require scan target generation from the seed information. Note that the processing by the preprocessing unit 11 may be omitted.
[0020] For example, the preprocessing unit 11 removes IPv6 addresses consisting of bit strings generated randomly based on entropy from the seed information using the method described in Reference 1. Reference 1: Clusters in the Expanse: Understanding and Unbiasing IPv6 Hitlists (https: / / dl.acm.org / doi / 10.1145 / 3278532.3278564)
[0021] The AS selector 12 selects an AS to be scanned for each port to be scanned based on the usage status of ports in the IPv4 space.
[0022] In the seed information, an active port is further associated with the seed IPv6 address. The AS selection unit 12 preferentially selects an AS in which the port corresponding to the IPv6 address given as the seed and the port to be scanned are often both active.
[0023] The IPv4 statistical information is information indicating the usage status of ports in the IPv4 space of a target AS. Fig. 2 is a diagram showing an example of combination data of hosts (IP addresses) and operating ports in the IPv4 space of one AS.
[0024] As shown in Figure 2, IPv4 statistical information is information that associates IPv4 addresses with port numbers that indicate operating ports. For example, in Figure 2, host "198.51.100.1" is associated with port number "xxx." Note that "xxx," "yyy," and "zzz" are actually numbers such as "80" and "443."
[0025] It is assumed that port "xxx" is associated with the IPv6 address given as a seed, while port "yyy" and port "zzz" are not associated with the IPv6 address given as a seed.
[0026] First, based on the usage status, the AS selection unit 12 calculates the co-occurrence rate as the ratio of the number of hosts on which a port associated with an IPv6 address given as a seed and a port to be scanned are both operating to the number of hosts on which a port associated with an IPv6 address given as a seed is operating for each AS.
[0027] For example, as shown in Figure 2, a port with port number "xxx" (hereinafter simply referred to as port "xxx") is operating on three hosts: "198.51.100.1", "198.51.100.2", and "198.51.100.4". Therefore, the number of hosts on which port "xxx" is operating is three.
[0028] Furthermore, ports "xxx" and "yyy" are active on hosts "198.51.100.2" and "198.51.100.4." Therefore, the number of hosts on which both port "xxx" and port "yyy" are active is two.
[0029] Therefore, the AS selection unit 12 calculates the co-occurrence rate of port "yyy" with port "xxx" as 2 / 3. In addition, using a similar method, the AS selection unit 12 calculates the co-occurrence rate of port "zzz" with port "xxx" as 1 / 3.
[0030] For example, the AS selection unit 12 selects an AS whose co-occurrence rate with the port associated with the IPv6 address given as the seed of the port to be scanned is equal to or greater than a threshold value of 1 / 2.
[0031] The generation unit 13 generates an IPv6 address of a scan target from the IPv6 address corresponding to the AS selected by the AS selection unit among the IPv6 addresses given as seeds. The generation unit 13 can generate an IPv6 address by the method described in Non-Patent Document 1.
[0032] The host selection unit 14 can select the IPv6 address of the scan target based on responses to previous scans of other ports of the same host, including rejection messages, errors, and no responses.
[0033] For example, if a previous scan of another port on the same host sent a TCP SYN scan, the active host's active port will respond with a SYN+ACK, indicating that it is active.
[0034] In addition, in response to a previous scan of another port on the same host, an error such as a RST (reset) rejection message or an ICMP (Internet Control Message Protocol) error may be returned. Also, in response to a previous scan of another port on the same host, no response may be returned (no response).
[0035] The host selection unit 14 selects the IPv6 address of the scan target by taking into consideration not only responses indicating that the host is active, but also responses such as a rejection message, an error, and no response.
[0036] For example, if a previous scan of another port of the same host returns data indicating that the address is active or a rejection message, the host selector 14 prioritizes the selection of the target IPv6 address of the scan. Also, for example, the host selector 14 does not prioritize the selection of an IPv6 address that returned an error or no response in a previous scan of another port of the same host.
[0037] The scanning unit 15 performs a scan by specifying the IPv6 address selected by the host selecting unit 14 .
[0038] The scan result holding unit 16 holds the scan results from the scanning unit 15. When subsequently scanning other ports of the same host, the host selection unit 14 uses the scan results held by the scan result holding unit 16. In other words, the scan results held by the scan result holding unit 16 are an example of a response to a previous scan of another port of the same host.
[0039] In addition, based on the response to the scan performed by the scan unit 15 (the scan result stored by the scan result storage unit 16), the generation unit 13 further generates a scan target from the IPv6 address corresponding to the AS selected by the AS selection unit among the IPv6 addresses given as seeds, and the host selection unit 14 further selects an IPv6 address to be the next scan target based on past responses to other ports of the same host.
[0040] In this way, the scanning by the scanning unit 15, the generation of scan targets by the generation unit 13, and the selection of hosts by the host selection unit 14 are repeated. Note that the repeated processing of the scanning by the scanning unit 15, the generation of scan targets by the generation unit 13, and the selection of hosts by the host selection unit 14 may be omitted.
[0041] The output control unit 17 outputs the results of the scan performed by the scanning unit 15. For example, the output control unit 17 outputs the host and port in association with the response to the scan.
[0042] [Processing of First Embodiment] The processing flow of the scanning device 10 will be described with reference to Fig. 3. Fig. 3 is a flowchart showing the processing flow of the scanning device according to the first embodiment.
[0043] As shown in FIG. 3, first, the preprocessing unit 11 removes unnecessary seeds from among seeds indicating hosts (IPv6) that are known to be active (step S101).
[0044] Next, the AS selector 12 selects an AS to scan the IPv6 space at the port to be scanned based on data (IPv4 statistical information) showing statistical characteristics of port usage in the IPv4 space (step S102).
[0045] Here, the generating unit 13 generates a scan target from the IPv6 address corresponding to the AS selected by the AS selecting unit among the IPv6 addresses given as seeds (step S103).
[0046] Next, the host selection unit 14 narrows down the hosts to be scanned based on responses to previous scans of other ports of the same host (step S104). That is, the host selection unit 14 selects hosts to be scanned from the scan targets generated by the generation unit 13.
[0047] The scanning unit 15 also scans the ports of the narrowed-down target hosts (step S105).
[0048] Then, the scan result storage unit 16 stores the scan response (step S106).
[0049] If the condition for ending the scan is met (Yes in step S107), the scanning device 10 ends the process.
[0050] On the other hand, if the condition for ending the scan is not satisfied (No in step S107), the scanning device 10 returns to step S103 and repeats the process. The conditions for ending the scan include the passage of a certain amount of time since the start of the process, the execution of step S105 reaching a specified number of times, etc.
[0051] [Effects of the First Embodiment] The AS selector 12 selects ASes to scan for each port to scan in the IPv6 space using statistical information on the IPv4 space of the target AS, instead of the IPv6 space, whose statistical characteristics are difficult to grasp. This allows the scanning device 10 to efficiently select ASes. Note that data on combinations of hosts and operating ports is publicly available as statistical information on the IPv4 space (see Reference 2). Reference 2: Search Engine for the Internet of Everything (https: / / www.shodan.io / )
[0052] Furthermore, the generation unit 13 generates a scan target IPv6 address from the IPv6 address corresponding to the AS selected by the AS selection unit among the IPv6 addresses provided as seeds. The host selection unit 14 selects a scan target IPv6 address from the IPv6 addresses generated by the generation unit 13 based on past responses to other ports of the same host. The scanning unit 15 performs a scan by specifying the IPv6 address selected by the host selection unit 14. The scan result storage unit 16 stores the scan results by the scanning unit and uses the stored scan results when the host selection unit selects a host when scanning other ports of the same host thereafter.
[0053] In this way, the scanning device 10 can efficiently perform scanning in the IPv6 space by narrowing down the ASs and hosts for each port to be scanned.
[0054] In this embodiment, the AS selector 12 and the host selector 14 list the hosts that exist in the IPv6 space within the target AS to be scanned at the scan target port.
[0055] The scanning device 10 scans the listed hosts and ports and performs an investigation specific to the application corresponding to the port, thereby discovering hosts running vulnerable versions of applications and hosts using compromised encryption keys. As a result, according to this embodiment, it becomes possible to take measures before a cyber-attack occurs.
[0056] Furthermore, the results of the scanning device 10 scanning the hosts listed for each port to be scanned can be used to conduct a survey of the current state of affairs, such as the prevalence of protocols corresponding to various ports.
[0057] The preprocessing unit 11 removes IPv6 addresses that satisfy the conditions from the IPv6 addresses given as seeds. The scanning unit 15 performs a scan by specifying ports corresponding to the IPv6 addresses that were not removed by the preprocessing unit 11 from among the IPv6 addresses given as seeds. In this way, the scanning device 10 can improve the efficiency of processing by removing unnecessary seeds in advance.
[0058] The AS selector 12 calculates, based on the usage status, for each scan target port, the ratio of the number of hosts on which the port associated with the IPv6 address given as a seed and the scan target port are both operating to the number of hosts on which the port associated with the IPv6 address given as a seed is operating, as a co-occurrence rate, and prioritizes the selection of ASs with a high co-occurrence rate. This enables the scanning device 10 to prioritize scanning ASs with a large number of hosts on which the scan target ports are likely to be active.
[0059] The host selection unit 14 selects the IPv6 address of the scan target based on past responses to other ports of the same host, including rejection messages, errors, and no responses. The scan result storage unit 16 stores the scan results from the scanning unit 15 and uses the stored scan results from the host selection unit 14 when scanning other ports of the same host in the future. This allows the scanning device 10 to obtain not only whether a port is active but also other information. For example, if a specific rejection message is returned as a response, even if the port is not operating, there may be a response from the transport layer, which means that other ports on the same host may be operating. Furthermore, depending on the response, information such as a lack of network connectivity or the target host's firewall blocking communication may be obtained.
[0060] Based on the response to the scan performed by the scanning unit 15, the generating unit 13 further generates a scan target from the IPv6 address corresponding to the AS selected by the AS selecting unit among the IPv6 addresses given as seeds, and the host selecting unit 14 further selects an IPv6 address to be the next scan target based on past responses to other ports of the same host. In this way, the generation of scan targets by the generating unit 13, the selection of hosts by the host selecting unit 14, and the scanning by the scanning unit 15 may be repeated in some cases. This allows the scanning device 10 to generate IPv6 addresses that are likely to be active, thereby making processing more efficient.
[0061] [System Configuration, etc.] The components of each device shown in the figure are conceptual functional units and do not necessarily have to be physically configured as shown. In other words, the specific form of distribution and integration of each device is not limited to that shown in the figure, and all or part of the devices can be functionally or physically distributed or integrated in any unit depending on various loads, usage conditions, etc. Furthermore, all or any part of the processing functions performed by each device can be realized by a CPU (Central Processing Unit) and a program analyzed and executed by the CPU, or can be realized as hardware using wired logic. The program may be executed not only by the CPU but also by other processors such as a GPU.
[0062] Furthermore, among the processes described in this embodiment, all or part of the processes described as being performed automatically can be performed manually, or all or part of the processes described as being performed manually can be performed automatically using a known method.In addition, the information including the processing procedures, control procedures, specific names, various data and parameters shown in the above documents and drawings can be changed as desired unless otherwise specified.
[0063] [Program] In one embodiment, the scanning device 10 can be implemented by installing a scanning program that executes the above-described collection process as package software or online software on a desired computer. For example, by executing the above-described scanning program on an information processing device, the information processing device can function as the scanning device 10. The information processing device referred to here includes desktop and notebook personal computers. Other information processing devices also include mobile communication terminals such as smartphones, mobile phones, and PHS (Personal Handyphone Systems), as well as slate terminals such as PDAs (Personal Digital Assistants).
[0064] The scanning device 10 can also be implemented as a scan server that provides the above-described scanning processing services to clients, with the terminal devices used by users as clients. For example, the scan server is implemented as a server that provides a scanning service that receives seed information and IPv4 statistical information and outputs scan results. In this case, the scan server may be implemented as a web server or as a cloud that provides the above-described scanning processing services through outsourcing.
[0065] 4 is a diagram showing an example of a computer that executes a scan program. The computer 1000 includes, for example, a memory 1010 and a CPU 1020. The computer 1000 also includes a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.
[0066] The memory 1010 includes a read-only memory (ROM) 1011 and a random access memory (RAM) 1012. The ROM 1011 stores a boot program such as a basic input / output system (BIOS). The hard disk drive interface 1030 is connected to a hard disk drive 1090. The disk drive interface 1040 is connected to a disk drive 1100. A removable storage medium such as a magnetic disk or optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to a mouse 1110 and a keyboard 1120, for example. The video adapter 1060 is connected to a display 1130, for example.
[0067] The hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, the programs that define the processes of the scanning device 10 are implemented as program modules 1093 in which computer-executable code is written. The program modules 1093 are stored, for example, in the hard disk drive 1090. For example, the program modules 1093 for executing processes similar to those of the functional configuration of the scanning device 10 are stored in the hard disk drive 1090. The hard disk drive 1090 may be replaced by an SSD (Solid State Drive).
[0068] Furthermore, setting data used in the processing of the above-described embodiment is stored as program data 1094, for example, in the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads the program module 1093 or the program data 1094 stored in the memory 1010 or the hard disk drive 1090 into the RAM 1012 as necessary, and executes the processing of the above-described embodiment.
[0069] The program module 1093 and program data 1094 may not necessarily be stored in the hard disk drive 1090, but may also be stored in a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and program data 1094 may be stored in another computer connected via a network (such as a local area network (LAN) or a wide area network (WAN)). The program module 1093 and program data 1094 may then be read by the CPU 1020 from the other computer via the network interface 1070.
[0070] REFERENCE SIGNS LIST 10 Scanning device 11 Preprocessing unit 12 AS selection unit 13 Generation unit 14 Host selection unit 15 Scanning unit 16 Scan result storage unit 17 Output control unit
Claims
1. A scanning device comprising: an AS selection unit which selects an AS to be scanned in IPv6 space based on port usage in IPv4 space; a generation unit which generates an IPv6 address of a scan target from an IPv6 address corresponding to the AS selected by the AS selection unit among IPv6 addresses given as seeds; a host selection unit which selects an IPv6 address of a scan target from among the IPv6 addresses generated by the generation unit based on the results of past scans of other ports of the same host; a scanning unit which performs a scan by specifying the IPv6 address selected by the host selection unit; and a scan result storage unit which stores the results of the scan performed by the scanning unit.
2. The scanning device according to claim 1, further comprising a pre-processing unit that removes IPv6 addresses that satisfy a condition from the IPv6 addresses given as the seed, and the scanning unit performs a scan by specifying a port corresponding to an IPv6 address that has not been removed by the pre-processing unit from among the IPv6 addresses given as the seed.
3. The scanning device described in claim 1, characterized in that the AS selection unit calculates, based on the usage status, for each port, the ratio of the number of hosts in which a port associated with an IPv6 address given as a seed and a port to be scanned are both operating to the number of hosts in which a port associated with an IPv6 address given as a seed is operating, as a co-occurrence rate, and preferentially selects an AS with a high co-occurrence rate.
4. The scanning device according to claim 1, characterized in that the generation unit generates an IPv6 address of a scan target from an IPv6 address corresponding to an AS selected by the AS selection unit among the IPv6 addresses given as seeds based on a response to a scan performed by the scanning unit.
5. The scanning device described in claim 1, characterized in that the host selection unit selects a scan target IPv6 address from among the IPv6 addresses generated by the generation unit based on responses to previous scans of other ports of the same host, including rejection messages, errors, and no responses.
6. A scanning method executed by a scanning device, comprising: an AS selection step of selecting an AS to be scanned in an IPv6 space based on port usage in an IPv4 space; a generation step of generating an IPv6 address of a scan target from an IPv6 address corresponding to the AS selected by the AS selection step among IPv6 addresses given as seeds; a host selection step of selecting an IPv6 address of a scan target from among the IPv6 addresses generated by the generation step based on the results of a past scan of other ports of the same host; a scanning step of performing a scan by designating the IPv6 address selected by the host selection step; and a scan result storage step of storing the results of the scan performed by the scanning step.
7. A scanning program that causes a computer to execute the following steps: an AS selection step of selecting an AS to be scanned in IPv6 space based on port usage in IPv4 space; a generation step of generating an IPv6 address of a scan target from an IPv6 address corresponding to the AS selected in the AS selection step among IPv6 addresses given as seeds; a host selection step of selecting an IPv6 address of a scan target from among the IPv6 addresses generated in the generation step based on the results of a past scan of other ports of the same host; a scan step of performing a scan by specifying the IPv6 address selected in the host selection step; and a scan result storage step of storing the results of the scan performed in the scan step.
