A strategy analysis method, device, equipment and readable storage medium
By obtaining and analyzing asset fingerprints, routing paths and port response information of IPv4 and IPv6 addresses, we can identify missing or inconsistent issues in dual-stack protection strategies, reduce security risks during the transition period of IPv4 and IPv6 dual-stacks, and improve network security.
Patent Information
- Application Number
- CN202110778934.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-09
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-07-09
AI Technical Summary
During the dual-stack transition period between IPv4 and IPv6, the dual-stack configuration of devices and systems has increased security risks, resulting in inconsistent and missing protection strategies, thereby increasing the risk of being attacked.
By obtaining IPv4 and IPv6 address sets, perform pre-processing and full-port scanning, analyze asset fingerprint information, routing paths and port response information, identify potential policy missing or inconsistencies, and conduct early warning analysis to reduce security risks.
Effectively discover and repair missing or inconsistent issues in IPv4 and IPv6 dual-stack protection strategies, reducing the risk of security attacks and improving network security.
Smart Images

Figure CN115604219B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a strategy analysis method, device, equipment and readable storage medium. Background Art
[0002] IP addresses are an important basic resource for the construction of communication networks. IPv6 (Internet Protocol Version 6) is the next generation IP protocol used to replace IPv4 (Internet Protocol Version 4). IPv6 can effectively solve the problem of insufficient IPv4 addresses by extending the address length to 128 bits.
[0003] In the process of IPv6 popularization, most of them adopt the scheme of gradual transition from IPv4 to IPv6, and the specific schemes adopted include dual stack, tunnel, translation, etc. Among them, the dual stack scheme of IPv4 and IPv6 accounts for a large proportion, which brings the corresponding security risks of the transition mechanism, that is, there are security risks in the transition period such as the dual stack configuration of IPv4 and IPv6.
[0004] Specifically, during the transition period, dual-stack networks run two logical channels, IPv4 and IPv6, at the same time, which increases the exposure of devices and systems. Accordingly, devices and systems need to be configured with dual-stack protection policies at the same time. In addition, it also means that protection devices such as firewalls and security gateways need to be configured with dual-stack policies at the same time, which increases the complexity of policy management and the chance of security protection being penetrated.
[0005] IPv4 and IPv6 dual stack protection strategies have the following two problems in terms of dual stack protection strategies of devices and systems themselves: first, inconsistent protection strategies; second, missing or leaky protection strategies. This, in turn, leads to other security issues, such as attackers launching attacks and taking over the enterprise intranet or the entire operator's existing network.
[0006] Therefore, there is an urgent need for corresponding analysis and early warning mechanisms for the IPv4 and IPv6 dual-stack protection strategies of devices and systems themselves, so as to timely discover problems with the IPv4 and IPv6 dual-stack protection strategies, and then better improve and strengthen the security protection strategies to reduce the risk of security attacks. Summary of the invention
[0007] The embodiments of the present application provide a policy analysis method, apparatus, device and readable storage medium to reduce the risk of security attacks.
[0008] In a first aspect, an embodiment of the present application provides a strategy analysis method, including:
[0009] Get the IPv4 address set and IPv6 address set respectively;
[0010] Preprocessing the IPv4 address set and the IPv6 address set to obtain a to-be-processed IP address set; wherein the to-be-processed IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0011] For a first IP address pair in the set of IP addresses to be processed, perform full port scans on the first IPv4 address and the first IPv6 address in the first IP address pair, respectively, to obtain a first port scan result corresponding to the first IPv4 address and a second port scan result corresponding to the first IPv6 address;
[0012] The preprocessing method includes one or more of the following:
[0013] Analyze the asset fingerprint information of the IP address;
[0014] Analyze the last hop of the routing path corresponding to the IP address;
[0015] Analyze the response information of the port corresponding to the IP address.
[0016] The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes:
[0017] Processing the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0018] Processing the first IP address set in a second manner to obtain a second IP address set;
[0019] Processing the second IP address set in a third manner to obtain a third IP address set, and using the third IP address set as the IP address set to be processed;
[0020] The first method, the second method, and the third method are any one of the preprocessing methods, and the first method, the second method, and the third method are different from each other.
[0021] The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes:
[0022] Processing the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0023] Processing the first IP address set in a second manner to obtain a second IP address set, and using the second IP address set as the IP address set to be processed;
[0024] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address, or the second method is to analyze the response information of the port corresponding to the IP address.
[0025] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0026] When the first manner, the second manner, or the third manner is to analyze the asset fingerprint information of the IP address, for the second IP address pair in the IP address set obtained by analyzing the asset fingerprint information of the IP address, the asset fingerprint information of the IPv4 address in the second IP address pair is completely or partially the same as the asset fingerprint information of the IPv6 address in the second IP address pair;
[0027] When the first manner, the second manner, or the third manner is to analyze the last hop of the routing path corresponding to the IP address, for a third IP address pair in the IP address set obtained by analyzing the last hop of the routing path corresponding to the IP address, the address of the last hop of the routing path corresponding to the IPv4 address in the third IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the third IP address pair;
[0028] When the first method, the second method or the third method is to analyze the response information of the port corresponding to the IP address, for the fourth IP address pair in the IP address set obtained by analyzing the response information of the port corresponding to the IP address, the response information of the target port corresponding to the IPv4 address in the fourth IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the third IP address pair.
[0029] The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes:
[0030] Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0031] Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0032] Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0033] The to-be-processed IP address set is obtained by using the fourth IP address set, the fifth IP address set, and the sixth IP address set.
[0034] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address;
[0035] The to-be-processed IP address set is obtained by using the fourth IP address set, the fifth IP address set, and the sixth IP address set in any of the following ways:
[0036] Obtaining the intersection of the fifth IP address set and the sixth IP address set; obtaining the union of the intersection and the fourth IP address set, and using the union as the IP address set to be processed;
[0037] Obtain a first union of the fourth IP address set and the fifth IP address set, and obtain a second union of the fourth IP address set and the sixth IP address set; obtain an intersection of the first union and the second union, and use the intersection as the IP address set to be processed.
[0038] The first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address;
[0039] The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes:
[0040] Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0041] Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0042] A union of the fourth IP address set and the fifth IP address set is used as the to-be-processed IP address set.
[0043] Among them, the first method is to analyze the asset fingerprint information of the IP address; the third method is to analyze the response information of the port corresponding to the IP address;
[0044] The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes:
[0045] Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0046] Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0047] A union of the fourth IP address set and the sixth IP address set is used as the to-be-processed IP address set.
[0048] The second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address;
[0049] The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes:
[0050] Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0051] Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0052] The intersection of the fifth IP address set and the sixth IP address set is used as the IP address set to be processed.
[0053] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0054] For the fifth IP address pair in the fourth IP address set, the asset fingerprint information of the IPv4 address in the fifth IP address pair is completely identical or partially identical to the asset fingerprint information of the IPv6 address in the fifth IP address pair;
[0055] For the sixth IP address pair in the fifth IP address set, the address of the last hop of the routing path corresponding to the IPv4 address in the sixth IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the sixth IP address pair;
[0056] For the seventh IP address pair in the sixth IP address set, the response information of the target port corresponding to the IPv4 address in the seventh IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the seventh IP address pair.
[0057] The performing full port scanning on the first IPv4 address and the first IPv6 address in the first IP address pair to obtain a first port scanning result corresponding to the first IPv4 address and a second port scanning result corresponding to the first IPv6 address includes:
[0058] Performing an i-th port scan on the first IPv4 address and the first IPv6 address respectively, where i is an integer and 1≤i≤65535;
[0059] The first response information returned by the i-th port to the first IPv4 address and the second response information returned to the first IPv6 address are respectively obtained.
[0060] Wherein, after obtaining the first port scanning result corresponding to the first IPv4 address and the second port scanning result corresponding to the first IPv6 address, the method further includes:
[0061] Perform early warning analysis based on the first port scanning result and the second port scanning result.
[0062] The performing early warning analysis according to the first port scanning result and the second port scanning result includes:
[0063] When the first response information and the second response information are different, it is determined that an early warning is required.
[0064] In a second aspect, an embodiment of the present application further provides a strategy analysis device, including:
[0065] A first acquisition module is used to respectively acquire an IPv4 address set and an IPv6 address set;
[0066] A first preprocessing module, configured to preprocess the IPv4 address set and the IPv6 address set to obtain a to-be-processed IP address set; wherein the to-be-processed IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0067] A second acquisition module is used to perform a full port scan on the first IPv4 address and the first IPv6 address in the first IP address pair in the set of IP addresses to be processed, to obtain a first port scan result corresponding to the first IPv4 address and a second port scan result corresponding to the first IPv6 address;
[0068] An early warning analysis module, used for performing early warning analysis according to the first port scanning result and the second port scanning result;
[0069] The preprocessing method includes one or more of the following:
[0070] Analyze the asset fingerprint information of the IP address;
[0071] Analyze the last hop of the routing path corresponding to the IP address;
[0072] Analyze the response information of the port corresponding to the IP address.
[0073] Wherein, the first preprocessing module includes:
[0074] A first processing submodule, configured to process the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0075] A second processing submodule, configured to process the first IP address set in a second manner to obtain a second IP address set;
[0076] A third processing submodule, configured to process the second IP address set in a third manner to obtain a third IP address set, and use the third IP address set as the IP address set to be processed;
[0077] The first method, the second method, and the third method are any one of the preprocessing methods, and the first method, the second method, and the third method are different from each other.
[0078] Wherein, the first preprocessing module includes:
[0079] A fourth processing submodule, configured to process the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0080] a fifth processing submodule, configured to process the first IP address set in a second manner to obtain a second IP address set, and use the second IP address set as the IP address set to be processed;
[0081] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address, or the second method is to analyze the response information of the port corresponding to the IP address.
[0082] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0083] When the first manner, the second manner, or the third manner is to analyze the asset fingerprint information of the IP address, for the second IP address pair in the IP address set obtained by analyzing the asset fingerprint information of the IP address, the asset fingerprint information of the IPv4 address in the second IP address pair is completely or partially the same as the asset fingerprint information of the IPv6 address in the second IP address pair;
[0084] When the first manner, the second manner, or the third manner is to analyze the last hop of the routing path corresponding to the IP address, for a third IP address pair in the IP address set obtained by analyzing the last hop of the routing path corresponding to the IP address, the address of the last hop of the routing path corresponding to the IPv4 address in the third IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the third IP address pair;
[0085] When the first method, the second method or the third method is to analyze the response information of the port corresponding to the IP address, for the fourth IP address pair in the IP address set obtained by analyzing the response information of the port corresponding to the IP address, the response information of the target port corresponding to the IPv4 address in the fourth IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the third IP address pair.
[0086] Wherein, the first preprocessing module comprises:
[0087] a sixth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0088] a seventh processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0089] an eighth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0090] The ninth processing submodule is used to obtain the to-be-processed IP address set by using the fourth IP address set, the fifth IP address set, and the sixth IP address set.
[0091] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the ninth processing submodule is used to obtain the to-be-processed IP address set by using the fourth IP address set, the fifth IP address set, and the sixth IP address set in any one of the following ways:
[0092] Obtaining the intersection of the fifth IP address set and the sixth IP address set; obtaining the union of the intersection and the fourth IP address set, and using the union as the IP address set to be processed;
[0093] Obtain a first union of the fourth IP address set and the fifth IP address set, and obtain a second union of the fourth IP address set and the sixth IP address set; obtain an intersection of the first union and the second union, and use the intersection as the IP address set to be processed.
[0094] The first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the first preprocessing module includes:
[0095] a tenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0096] an eleventh processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0097] The twelfth processing submodule is used to use the union of the fourth IP address set and the fifth IP address set as the to-be-processed IP address set.
[0098] Among them, the first method is to analyze the asset fingerprint information of the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the first preprocessing module includes:
[0099] A thirteenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0100] A fourteenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0101] The fifteenth processing submodule is used to use the union of the fourth IP address set and the sixth IP address set as the to-be-processed IP address set.
[0102] The second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the first preprocessing module includes:
[0103] A sixteenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0104] A seventeenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0105] The eighteenth processing submodule is used to use the intersection of the fifth IP address set and the sixth IP address set as the to-be-processed IP address set.
[0106] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0107] For the fifth IP address pair in the fourth IP address set, the asset fingerprint information of the IPv4 address in the fifth IP address pair is completely identical or partially identical to the asset fingerprint information of the IPv6 address in the fifth IP address pair;
[0108] For the sixth IP address pair in the fifth IP address set, the address of the last hop of the routing path corresponding to the IPv4 address in the sixth IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the sixth IP address pair;
[0109] For the seventh IP address pair in the sixth IP address set, the response information of the target port corresponding to the IPv4 address in the seventh IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the seventh IP address pair.
[0110] Wherein, the second acquisition module includes:
[0111] a scanning submodule, configured to perform an i-th port scan on the first IPv4 address and the first IPv6 address respectively, wherein i is an integer and 1≤i≤65535;
[0112] The acquisition submodule is used to respectively obtain the first response information returned by the i-th port to the first IPv4 address and the second response information returned to the first IPv6 address.
[0113] The warning analysis module is used to determine that a warning is required when the first response information and the second response information are different.
[0114] In a third aspect, an embodiment of the present application provides a policy analysis device, including: a processor and a transceiver;
[0115] Wherein, the processor is used for:
[0116] Get the IPv4 address set and IPv6 address set respectively;
[0117] Preprocessing the IPv4 address set and the IPv6 address set to obtain a to-be-processed IP address set; wherein the to-be-processed IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0118] For a first IP address pair in the set of IP addresses to be processed, perform full port scans on the first IPv4 address and the first IPv6 address in the first IP address pair, respectively, to obtain a first port scan result corresponding to the first IPv4 address and a second port scan result corresponding to the first IPv6 address;
[0119] Performing early warning analysis according to the first port scanning result and the second port scanning result;
[0120] The preprocessing method includes one or more of the following:
[0121] Analyze the asset fingerprint information of the IP address;
[0122] Analyze the last hop of the routing path corresponding to the IP address;
[0123] Analyze the response information of the port corresponding to the IP address.
[0124] Wherein, the processor is used for:
[0125] Processing the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0126] Processing the first IP address set in a second manner to obtain a second IP address set;
[0127] Processing the second IP address set in a third manner to obtain a third IP address set, and using the third IP address set as the IP address set to be processed;
[0128] The first method, the second method, and the third method are any one of the preprocessing methods, and the first method, the second method, and the third method are different from each other.
[0129] Wherein, the processor is used for:
[0130] Processing the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0131] Processing the first IP address set in a second manner to obtain a second IP address set, and using the second IP address set as the IP address set to be processed;
[0132] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address, or the second method is to analyze the response information of the port corresponding to the IP address.
[0133] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0134] When the first manner, the second manner, or the third manner is to analyze the asset fingerprint information of the IP address, for the second IP address pair in the IP address set obtained by analyzing the asset fingerprint information of the IP address, the asset fingerprint information of the IPv4 address in the second IP address pair is completely or partially the same as the asset fingerprint information of the IPv6 address in the second IP address pair;
[0135] When the first manner, the second manner, or the third manner is to analyze the last hop of the routing path corresponding to the IP address, for a third IP address pair in the IP address set obtained by analyzing the last hop of the routing path corresponding to the IP address, the address of the last hop of the routing path corresponding to the IPv4 address in the third IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the third IP address pair;
[0136] When the first method, the second method or the third method is to analyze the response information of the port corresponding to the IP address, for the fourth IP address pair in the IP address set obtained by analyzing the response information of the port corresponding to the IP address, the response information of the target port corresponding to the IPv4 address in the fourth IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the third IP address pair.
[0137] Wherein, the processor is used for:
[0138] Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0139] Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0140] Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0141] The to-be-processed IP address set is obtained by using the fourth IP address set, the fifth IP address set, and the sixth IP address set.
[0142] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address;
[0143] The processor is configured to obtain the to-be-processed IP address set by using the fourth IP address set, the fifth IP address set, and the sixth IP address set in any one of the following ways:
[0144] Obtaining the intersection of the fifth IP address set and the sixth IP address set; obtaining the union of the intersection and the fourth IP address set, and using the union as the IP address set to be processed;
[0145] Obtain a first union of the fourth IP address set and the fifth IP address set, and obtain a second union of the fourth IP address set and the sixth IP address set; obtain an intersection of the first union and the second union, and use the intersection as the IP address set to be processed.
[0146] Wherein, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the processor is used to:
[0147] Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0148] Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0149] A union of the fourth IP address set and the fifth IP address set is used as the to-be-processed IP address set.
[0150] Wherein, the first method is to analyze the asset fingerprint information of the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the processor is used to:
[0151] The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes:
[0152] Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0153] Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0154] A union of the fourth IP address set and the sixth IP address set is used as the to-be-processed IP address set.
[0155] The second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the processor is used to:
[0156] Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0157] Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0158] The intersection of the fifth IP address set and the sixth IP address set is used as the IP address set to be processed.
[0159] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0160] For the fifth IP address pair in the fourth IP address set, the asset fingerprint information of the IPv4 address in the fifth IP address pair is completely identical or partially identical to the asset fingerprint information of the IPv6 address in the fifth IP address pair;
[0161] For the sixth IP address pair in the fifth IP address set, the address of the last hop of the routing path corresponding to the IPv4 address in the sixth IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the sixth IP address pair;
[0162] For the seventh IP address pair in the sixth IP address set, the response information of the target port corresponding to the IPv4 address in the seventh IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the seventh IP address pair.
[0163] Wherein, the processor is used for:
[0164] Performing an i-th port scan on the first IPv4 address and the first IPv6 address respectively, where i is an integer and 1≤i≤65535;
[0165] The first response information returned by the i-th port to the first IPv4 address and the second response information returned to the first IPv6 address are respectively obtained.
[0166] Wherein, the processor is used for:
[0167] When the first response information and the second response information are different, it is determined that an early warning is required.
[0168] In a fourth aspect, an embodiment of the present application further provides a communication device, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor implements the steps in the strategy analysis method as described above when executing the program.
[0169] In a fifth aspect, an embodiment of the present application further provides a readable storage medium, on which a program is stored, and when the program is executed by a processor, the steps in the strategy analysis method as described above are implemented.
[0170] In the embodiment of the present application, the acquired IPv4 address set and IPv6 address set are preprocessed respectively, and a full port scan is performed according to the preprocessing result, so as to obtain the port scan result, and perform early warning analysis. Among them, the preprocessing method for preprocessing includes one or more of analyzing the asset fingerprint information of the IP address, analyzing the last hop of the routing path corresponding to the IP address, and analyzing the response information of the port corresponding to the IP address. Therefore, using the solution of the embodiment of the present application, the IPv4 and IPv6 dual stack protection strategies of the device and the system itself can be analyzed, and then the missing or inconsistent problems in the strategy can be found, thereby reducing the risk of security attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0171] Figure 1 This is one of the flow charts of the strategy analysis method provided in the embodiment of the present application;
[0172] Figure 2 This is the second flow chart of the strategy analysis method provided in the embodiment of the present application;
[0173] Figure 3 This is the third flow chart of the strategy analysis method provided in the embodiment of the present application;
[0174] Figure 4 This is the fourth flow chart of the strategy analysis method provided in the embodiment of the present application;
[0175] Figure 5 This is the fifth flow chart of the strategy analysis method provided in the embodiment of the present application;
[0176] Figure 6 This is the sixth flow chart of the strategy analysis method provided in the embodiment of the present application;
[0177] Figure 7 This is the seventh flow chart of the strategy analysis method provided in the embodiment of the present application;
[0178] Figure 8 This is the eighth flow chart of the strategy analysis method provided in the embodiment of the present application;
[0179] Fig. 9 It is one of the structural diagrams of the strategy analysis device provided in the embodiment of the present application;
[0180] Fig.10 This is the second structural diagram of the strategy analysis device provided in the embodiment of the present application;
[0181] Fig.11 It is a schematic diagram of a strategy analysis system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0182] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0183] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0184] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0185] See also Figure 1 , Figure 1 is a flow chart of the strategy analysis method provided in the embodiment of the present application, such as Figure 1 As shown, the following steps are included:
[0186] Step 101: Obtain an IPv4 address set and an IPv6 address set respectively.
[0187] The IPv4 address set and the IPv6 address set may be an IPv4 address segment and an IPv6 address segment, respectively. In practical applications, the IPv4 address set and the IPv6 address set may be directly obtained based on the address segment of an organization or administrative region, or the address segment of a park.
[0188] Step 102: pre-process the IPv4 address set and the IPv6 address set to obtain a set of IP addresses to be processed; wherein the set of IP addresses to be processed includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address.
[0189] The preprocessing method includes one or more of the following:
[0190] Analyze the asset fingerprint information of the IP address;
[0191] Analyze the last hop of the routing path corresponding to the IP address;
[0192] Analyze the response information of the port corresponding to the IP address.
[0193] When analyzing the asset fingerprint information of the IP address, multiple IP address pairs with completely or partially identical asset fingerprint information may be obtained, thereby forming an IP address set.
[0194] When analyzing the last hop of the routing path corresponding to the IP address, multiple IP address pairs with the same last hop may be obtained, thereby forming an IP address set.
[0195] When analyzing the response information of the port corresponding to the IP address, multiple IP address pairs with the same response to the port can be obtained, thereby forming an IP address set.
[0196] Set operations can be performed between different sets to obtain a set of IP addresses to be processed, or a set can be used as a processing basis for another preprocessing method to obtain a set of IP addresses to be processed.
[0197] Step 103: For the first IP address pair in the set of IP addresses to be processed, perform full port scans on the first IPv4 address and the first IPv6 address in the first IP address pair respectively to obtain a first port scan result corresponding to the first IPv4 address and a second port scan result corresponding to the first IPv6 address.
[0198] The first IP address pair is any IP address pair in the set of IP addresses to be processed. In this step, the first IPv4 address and the first IPv6 address may be scanned at the i-th port, respectively, where i is an integer and 1≤i≤65535. Afterwards, the first response information returned by the i-th port to the first IPv4 address and the second response information returned to the first IPv6 address are obtained respectively.
[0199] Step 104: Perform early warning analysis based on the first port scanning result and the second port scanning result.
[0200] When the first response information and the second response information are different, it is determined that an early warning is required; otherwise, it can be determined that an early warning is not required.
[0201] In the embodiment of the present application, the acquired IPv4 address set and IPv6 address set are preprocessed respectively, and a full port scan is performed according to the preprocessing result, so as to obtain the port scan result, and perform early warning analysis. Among them, the preprocessing method for preprocessing includes one or more of analyzing the asset fingerprint information of the IP address, analyzing the last hop of the routing path corresponding to the IP address, and analyzing the response information of the port corresponding to the IP address. Therefore, using the solution of the embodiment of the present application, the IPv4 and IPv6 dual stack protection strategies of the device and the system itself can be analyzed, and then the missing or inconsistent problems in the strategy can be found, thereby reducing the risk of security attacks.
[0202] In the embodiment of the present application, one or more of the above preprocessing methods can be used to preprocess the IPv4 address set and the IPv6 address set. In the following, the policy analysis method of the embodiment of the present application is described in detail in combination with different preprocessing methods.
[0203] 1. In the following embodiments, the above three methods are combined for preprocessing, wherein, during the preprocessing process, the execution process of the three preprocessing methods is serial, and the execution order of the three preprocessing methods is not limited in the embodiments of the present application.
[0204] Specifically, in this case, the IPv4 address set and the IPv6 address set can be first processed using a first method to obtain a first IP address set; then, the first IP address set can be processed using a second method to obtain a second IP address set; then, the second IP address set can be processed using a third method to obtain a third IP address set, and the third IP address set can be used as the IP address set to be processed; wherein the first method, the second method, and the third method are any one of the preprocessing methods, and the first method, the second method, and the third method are different from each other.
[0205] For example, the first method may be to analyze the asset fingerprint information of the IP address; the second method may be to analyze the last hop of the routing path corresponding to the IP address; the third method may be to analyze the response information of the port corresponding to the IP address.
[0206] In the embodiment of the present application, each IP address set (the first IP address set to the third IP address set) includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address.
[0207] For the above three different preprocessing methods, in the embodiments of the present application, different preprocessing methods correspond to different criteria to obtain IP address pairs that meet the requirements, and then form an IP address set.
[0208] When the first method, the second method or the third method is to analyze the asset fingerprint information of the IP address, for the second IP address pair in the IP address set obtained by analyzing the asset fingerprint information of the IP address, the asset fingerprint information of the IPv4 address in the second IP address pair is completely or partially the same as the asset fingerprint information of the IPv6 address in the second IP address pair.
[0209] The asset fingerprint information can be obtained by nmap, get, telnet and the like. The extracted asset fingerprint information includes but is not limited to OS (Operating System) information, banner information, host name information (hostname), etc., and is recorded as a tuple, for example, [OS|banner|hostname]. Here, completely identical means that all elements in the tuple are identical; partially identical means that some elements in the tuple are identical. When making comparisons, a text comparison method, a character comparison method or other comparison methods can be used. For example, if the elements in the tuple of an IPv4 address and the tuple of an IPv6 address are all identical, then the asset fingerprint information can be considered to be completely identical; if the OS information in the tuple of an IPv4 address and the tuple of an IPv6 address are the same, then the asset fingerprint information can be considered to be partially identical.
[0210] When the first method, the second method or the third method is to analyze the last hop of the routing path corresponding to the IP address, for the third IP address pair in the IP address set obtained by analyzing the last hop of the routing path corresponding to the IP address, the address of the last hop of the routing path corresponding to the IPv4 address in the third IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the third IP address pair.
[0211] The address of the last hop may be obtained by tracert, etc. After converting the address of the last hop of the routing path corresponding to the acquired IPv4 address or the last hop of the routing path corresponding to the IPv6 address, the two may be compared.
[0212] When the first method, the second method or the third method is to analyze the response information of the port corresponding to the IP address, for the fourth IP address pair in the IP address set obtained by analyzing the response information of the port corresponding to the IP address, the response information of the target port corresponding to the IPv4 address in the fourth IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the third IP address pair.
[0213] The target port includes but is not limited to ports 80, 8080, etc. In practical applications, the response information of the target port can be obtained by using methods such as get.
[0214] like Figure 2As shown, it is a flow chart of the policy analysis method of the embodiment of the present application. In this embodiment, the first method is to analyze the asset fingerprint information of the IP address, the second method is to analyze the last hop of the routing path corresponding to the IP address, and the third method is to analyze the response information of the port corresponding to the IP address. Specifically, the method may include:
[0215] Step 201: Obtain IPv4 and IPv6 address segments.
[0216] Here, the IPv4 and IPv6 address segments can be obtained based on the large address segments of the organization or administrative area, or the large address segments of the park.
[0217] Step 202: Acquire asset fingerprint information for the IPv4 address segment and the IPv6 address segment.
[0218] Specifically, you can use nmap, get, telnet and other methods to obtain asset fingerprint related information of IPv4 and IPv6 address segments.
[0219] From the obtained original asset fingerprint related information, the asset fingerprint information corresponding to the IPv4 address and the IPv6 address is extracted, including but not limited to OS information, banner information, host name information, etc., and recorded as a [OS|banner|hostname] tuple.
[0220] Step 203: compare the asset fingerprint information of the IPv4 address segment and the IPv6 address segment to determine whether the asset fingerprint information is the same.
[0221] Here, the asset fingerprint information is compared, that is, the above-mentioned multi-tuple comparison is performed to determine whether the asset fingerprint information is the same. The comparison method here can use a text comparison method, a character comparison method, or other comparison methods. If they are the same, the subsequent process is executed; otherwise, the process ends or the judgment of the next address pair is performed.
[0222] Step 204: After comparison, obtain the IPv4 and IPv6 pairs with the same asset fingerprint information, that is, determine the IPv4 and IPv6 addresses corresponding to the same tuple as the IPv4 and IPv6 pairs with the same asset fingerprint information.
[0223] The set of IPv4 and IPv6 pairs with the same asset fingerprint information is recorded as set Set A. In the set formed in the embodiment of the present application, each IPv4 and IPv6 pair is an element, and the processing of the set is performed on a pair of elements.
[0224] Step 205: For the IPv4 and IPv6 addresses corresponding to the IPv4 and IPv6 pairs with the same asset fingerprint attributes, the last hop of the routing path is obtained. That is, the last hop of the routing path is obtained for the elements in the set SetA. Specifically, the last hop can be obtained by tracert or other methods.
[0225] Step 206: Extract the corresponding last hop address information from the routing path information. That is, the result of the above step 205 is processed and intercepted accordingly to extract the last hop address information.
[0226] Step 207: Perform conversion and comparison on the address information of the last hop to determine whether the address of the last hop is the same. That is, receive the output of step 206, perform conversion and comparison on the last hop information to determine whether the address of the last hop is the same. If they are the same, execute the subsequent process; otherwise, end or perform the judgment on the next address pair.
[0227] Step 208: Get the IPv4 and IPv6 pairs with the same address of the last hop to form a set Set B. The IPv4 and IPv6 corresponding to the last hop determined to be the same are taken as the IPv4 and IPv6 pairs with the same last hop attributes. The set of these IPv4 and IPv6 pairs with the same last hop attributes is recorded as Set B.
[0228] Step 209: Acquire the response information of the common ports for the IPv4 and IPv6 addresses corresponding to the IPv4 and IPv6 pairs with the same last hop attributes. That is, acquire the response information of the common ports for the elements in the set SetB. The common ports may include but are not limited to ports 80, 8080, etc. Specifically, the get method may be used.
[0229] Step 210: Extract the returned port response information corresponding to the elements in the SetB set. That is, process the result of step 209 accordingly to extract the corresponding port response information.
[0230] Step 211, compare the commonly used port response information to determine whether the port response information is the same. That is, receive the output of step 210, compare the same commonly used port information, and determine whether the response information is the same. If the same, then execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0231] Step 212: Get the IPv4 and IPv6 pairs with the same common port response to form a set Set C. The IPv4 and IPv6 pairs with the same common port response are regarded as the IPv4 and IPv6 pairs with the same common port response attribute. The set of these IPv4 and IPv6 pairs with the same common port response attribute is recorded as set Set C.
[0232] Step 213: Perform a full port scan of 1-65535 for the IPv4 and IPv6 addresses corresponding to the IPv4 and IPv6 pairs with the same common port response attributes. That is, perform a full port scan of 1-65535 for the elements in the set SetC. Specifically, nmap and other methods may be used.
[0233] Step 214: Get the response information Xi returned corresponding to each port i of the IPv4 and IPv6 pairs, where i=1, 2, 3, ... 65535.
[0234] Step 215: Compare the response information Xi returned by port i to determine whether Xi is the same. That is, receive the output of step 214, compare the response information Xi returned to determine whether they are the same.
[0235] Step 216: If Xi is different, an early warning is issued and the port i is listed.
[0236] Step 217: If Xi is the same, no warning is given.
[0237] 2. In the following embodiments, two of the above preprocessing methods are combined to obtain a set of IP addresses to be processed. For example, the analysis of the asset fingerprint information of the IP address is combined with the analysis of the last hop of the routing path corresponding to the IP address, or the analysis of the asset fingerprint information of the IP address is combined with the analysis of the response information of the port corresponding to the IP address, etc. Then, the combination of the two methods is still a serial method.
[0238] In this case, the IPv4 address set and the IPv6 address set are processed using a first method to obtain a first IP address set, and then the first IP address set is processed using a second method to obtain a second IP address set, and the second IP address set is used as the IP address set to be processed; wherein the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address, or the second method is to analyze the response information of the port corresponding to the IP address.
[0239] Taking the combination of analyzing the asset fingerprint information of the IP address and analyzing the last hop of the routing path corresponding to the IP address as an example, the implementation process of the embodiment of the present application is described. Figure 3 As shown, the method may include:
[0240] Step 301: Obtain IPv4 and IPv6 address segments.
[0241] Here, the IPv4 and IPv6 address segments can be obtained based on the large address segments of the organization or administrative area, or the large address segments of the park.
[0242] Step 302: Acquire asset fingerprint information for the IPv4 address segment and the IPv6 address segment.
[0243] Specifically, you can use nmap, get, telnet and other methods to obtain asset fingerprint related information of IPv4 and IPv6 address segments.
[0244] From the obtained original asset fingerprint related information, the asset fingerprint information corresponding to the IPv4 address and the IPv6 address is extracted, including but not limited to OS information, banner information, host name information, etc., and recorded as a [OS|banner|hostname] tuple.
[0245] Step 303: compare the asset fingerprint information of the IPv4 address segment and the IPv6 address segment to determine whether the asset fingerprint information is the same. If they are the same, execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0246] Here, the asset fingerprint information is compared, that is, the above-mentioned multi-tuple is compared, so as to determine whether the asset fingerprint information is the same. The comparison method here can adopt a text comparison method, a character comparison method or other comparison methods.
[0247] Step 304: After comparison, obtain the IPv4 and IPv6 pairs with the same asset fingerprint information, that is, determine the IPv4 and IPv6 addresses corresponding to the same tuple as the IPv4 and IPv6 pairs with the same asset fingerprint information.
[0248] The set of IPv4 and IPv6 pairs with the same asset fingerprint information is recorded as set Set A. In the set formed in the embodiment of the present application, each IPv4 and IPv6 pair is an element, and the processing of the set is performed on a pair of elements.
[0249] Step 305: For the IPv4 and IPv6 addresses corresponding to the IPv4 and IPv6 pairs with the same asset fingerprint attributes, the last hop of the routing path is obtained. That is, the last hop of the routing path is obtained for the elements in the set SetA. Specifically, the acquisition can be carried out by tracert or other methods.
[0250] Step 306: Extract the corresponding last hop address information from the routing path information, that is, process and intercept the result of the above step 205 accordingly to extract the last hop address information.
[0251] Step 307: Perform conversion and comparison on the address information of the last hop to determine whether the address of the last hop is the same. That is, receive the output of step 306, perform conversion and comparison on the last hop information to determine whether the address of the last hop is the same. If they are the same, execute the subsequent process; otherwise, end or perform the judgment on the next address pair.
[0252] Step 308: Get the IPv4 and IPv6 pairs with the same address of the last hop. The IPv4 and IPv6 corresponding to the last hop determined to be the same are regarded as the IPv4 and IPv6 pairs with the same last hop attributes. The set of these IPv4 and IPv6 pairs with the same last hop attributes is recorded as set SetB.
[0253] Step 309: Perform a full port scan of 1-65535 for the IPv4 and IPv6 addresses corresponding to the IPv4 and IPv6 pairs with the same last hop attribute. That is, perform a full port scan of 1-65535 for the elements in the set SetC. Specifically, nmap and other methods may be used.
[0254] Step 310: Get the response information Xi returned corresponding to each port i of the IPv4 and IPv6 pairs, where i=1, 2, 3, ... 65535.
[0255] Step 311: compare the response information Xi returned by port i to determine whether Xi is the same. That is, receive the output of step 310, compare the response information Xi returned to determine whether they are the same.
[0256] Step 312: If Xi is different, an early warning is issued and the port i is listed.
[0257] Step 313: If Xi is the same, no warning is given.
[0258] Taking the combination of analyzing the asset fingerprint information of the IP address and analyzing the response information of the port corresponding to the IP address as an example, the implementation process of the embodiment of the present application is described. Figure 4 As shown, the method may include:
[0259] Step 401: Obtain IPv4 and IPv6 address segments.
[0260] Here, the IPv4 and IPv6 address segments can be obtained based on the large address segments of the organization or administrative area, or the large address segments of the park.
[0261] Step 402: Acquire asset fingerprint information for the IPv4 address segment and the IPv6 address segment.
[0262] Specifically, you can use nmap, get, telnet and other methods to obtain asset fingerprint related information of IPv4 and IPv6 address segments.
[0263] Corresponding asset fingerprint information is extracted from the obtained original asset fingerprint related information, including but not limited to OS information, banner information, host name information, etc., and recorded as a tuple such as [OS|banner|hostname].
[0264] Step 403: compare the asset fingerprint information of the IPv4 address segment and the IPv6 address segment to determine whether the asset fingerprint information is the same. If they are the same, execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0265] Here, the asset fingerprint information is compared, that is, the above-mentioned multi-tuple is compared, so as to determine whether the asset fingerprint information is the same. The comparison method here can adopt a text comparison method, a character comparison method or other comparison methods.
[0266] Step 404: After comparison, obtain the IPv4 and IPv6 pairs with the same asset fingerprint information, that is, determine the IPv4 and IPv6 addresses corresponding to the same tuple as the IPv4 and IPv6 pairs with the same asset fingerprint information.
[0267] The set of IPv4 and IPv6 pairs with the same asset fingerprint information is recorded as set Set A. In the set formed in the embodiment of the present application, each IPv4 and IPv6 pair is an element, and the processing of the set is performed on a pair of elements.
[0268] Step 405: For the IPv4 and IPv6 addresses corresponding to the IPv4 and IPv6 pairs with the same asset fingerprint information, obtain the response information of the commonly used ports. That is, obtain the response information of the commonly used ports for the elements in the set SetA. The commonly used ports may include but are not limited to ports 80, 8080, etc. Specifically, the get method may be used.
[0269] Step 406: Extract the port response information corresponding to the elements in the SetA set. That is, process the result of step 405 accordingly to extract the corresponding port response information.
[0270] Step 407: compare the commonly used port response information to determine whether the port response information is the same. That is, receive the output of step 406, compare the same commonly used port information, and determine whether the response information is the same. If they are the same, execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0271] Step 408: Get the IPv4 and IPv6 pairs with the same common port response to form a set Set C. The IPv4 and IPv6 pairs with the same common port response are regarded as the IPv4 and IPv6 pairs with the same common port response attribute. The set of these IPv4 and IPv6 pairs with the same common port response attribute is recorded as set Set C.
[0272] Step 409: Perform a full port scan of 1-65535 for the IPv4 and IPv6 addresses corresponding to the IPv4 and IPv6 pairs with the same common port response attributes. That is, perform a full port scan of 1-65535 for the elements in the set SetC. Specifically, nmap and other methods may be used.
[0273] Step 410: Get the response information Xi returned corresponding to each port i of the IPv4 and IPv6 pairs, where i=1, 2, 3, ... 65535.
[0274] Step 411: Compare the response information Xi returned by port i to determine whether Xi is the same. That is, receive the output of step 214, compare the response information Xi returned to determine whether they are the same.
[0275] Step 412: If Xi are different, an early warning is issued and the port i is listed; if Xi are the same, no early warning is issued.
[0276] In the embodiment of the present application, an analysis and early warning mechanism for the IPv4 and IPv6 dual-stack protection strategy of the device and the system itself is implemented, which is conducive to timely discovery of problems existing in the IPv4 and IPv6 dual-stack protection strategy, and then better improvement and reinforcement of the security protection strategy, reducing the risk of security attacks.
[0277] In the following embodiments, the above three methods are combined for preprocessing, wherein during the preprocessing process, the execution processes of the three preprocessing methods can be parallel.
[0278] In one implementation, the IPv4 address set and the IPv6 address set are processed by a first method to obtain a fourth IP address set; the IPv4 address set and the IPv6 address set are processed by a second method to obtain a fifth IP address set; the IPv4 address set and the IPv6 address set are processed by a third method to obtain a sixth IP address set; the fourth IP address set, the fifth IP address set, and the sixth IP address set are used to obtain the to-be-processed IP address set. The first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; and the third method is to analyze the response information of the port corresponding to the IP address.
[0279] In the above process of obtaining the set of IP addresses to be processed, you can obtain it in any of the following ways:
[0280] (1) obtaining an intersection of the fifth IP address set and the sixth IP address set; obtaining a union of the intersection and the fourth IP address set, and using the union as the IP address set to be processed;
[0281] (2) Obtain a first union of the fourth IP address set and the fifth IP address set, and obtain a second union of the fourth IP address set and the sixth IP address set; obtain an intersection of the first union and the second union, and use the intersection as the IP address set to be processed.
[0282] In one implementation, the IPv4 address set and the IPv6 address set are processed by a first method to obtain a fourth IP address set; the IPv4 address set and the IPv6 address set are processed by a second method to obtain a fifth IP address set; and the union of the fourth IP address set and the fifth IP address set is used as the IP address set to be processed. The first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address.
[0283] In one implementation, the IPv4 address set and the IPv6 address set are processed by the first method to obtain a fourth IP address set; the IPv4 address set and the IPv6 address set are processed by the third method to obtain a sixth IP address set; and the union of the fourth IP address set and the sixth IP address set is used as the IP address set to be processed. The first method is to analyze the asset fingerprint information of the IP address; and the third method is to analyze the response information of the port corresponding to the IP address.
[0284] In one implementation, the IPv4 address set and the IPv6 address set are processed by the second method to obtain a fifth IP address set; the IPv4 address set and the IPv6 address set are processed by the third method to obtain a sixth IP address set; the intersection of the fifth IP address set and the sixth IP address set is used as the IP address set to be processed. The second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address.
[0285] In the above several implementations, for the fifth IP address pair in the fourth IP address set, the asset fingerprint information of the IPv4 address in the fifth IP address pair is completely or partially the same as the asset fingerprint information of the IPv6 address in the fifth IP address pair; for the sixth IP address pair in the fifth IP address set, the address of the last hop of the routing path corresponding to the IPv4 address in the sixth IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the sixth IP address pair; for the seventh IP address pair in the sixth IP address set, the response information of the target port corresponding to the IPv4 address in the seventh IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the seventh IP address pair. Among them, the fifth IP address pair, the sixth IP address pair, and the seventh IP address pair are all any IP address pairs in the corresponding IP address sets.
[0286] 1. In the following embodiments, the IPv4 address set and the IPv6 address set are processed by the first method, the second method, and the third method respectively to obtain a fourth IP address set, a fifth IP address set, and a sixth IP address set. Then, the intersection of the fifth IP address set and the sixth IP address set is obtained; the union of the intersection and the fourth IP address set is obtained, and the union is used as the IP address set to be processed. Figure 5 As shown, the method may include:
[0287] Step 501: Obtain IPv4 and IPv6 address segments.
[0288] Here, the IPv4 and IPv6 address segments can be obtained based on the large address segments of the organization or administrative area, or the large address segments of the park.
[0289] Step 502: Acquire asset fingerprint information for the IPv4 address segment and the IPv6 address segment.
[0290] Specifically, you can use nmap, get, telnet and other methods to obtain asset fingerprint related information of IPv4 and IPv6 address segments.
[0291] From the obtained original asset fingerprint related information, the asset fingerprint information corresponding to the IPv4 address and the IPv6 address is extracted, including but not limited to OS information, banner information, host name information, etc., and recorded as a [OS|banner|hostname] tuple.
[0292] Step 503: compare the asset fingerprint information of the IPv4 address segment and the IPv6 address segment to determine whether the asset fingerprint information is the same. If they are the same, execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0293] Here, the asset fingerprint information is compared, that is, the above-mentioned multi-tuple is compared, so as to determine whether the asset fingerprint information is the same. The comparison method here can adopt a text comparison method, a character comparison method or other comparison methods.
[0294] Step 504: After comparison, the IPv4 and IPv6 pairs with the same asset fingerprint information are obtained to form a set Set A. The IPv4 and IPv6 addresses corresponding to the same tuples are regarded as the IPv4 and IPv6 pairs with the same asset fingerprint information.
[0295] The set of IPv4 and IPv6 pairs with the same asset fingerprint information is recorded as set Set A. In the set formed in the embodiment of the present application, each IPv4 and IPv6 pair is an element, and the processing of the set is performed on a pair of elements.
[0296] Step 505: extract the corresponding last hop address information from the IPv4 address segment and the IPv6 address segment.
[0297] Step 506: Perform conversion and comparison on the address information of the last hop to determine whether the address of the last hop is the same. That is, receive the output of step 505, perform conversion and comparison on the last hop information to determine whether the address of the last hop is the same. If they are the same, execute the subsequent process; otherwise, end or perform the judgment on the next address pair.
[0298] Step 507: Get the IPv4 and IPv6 pairs with the same address of the last hop to form a set Set B. The IPv4 and IPv6 corresponding to the last hop determined to be the same are taken as the IPv4 and IPv6 pairs with the same last hop attributes. The set of these IPv4 and IPv6 pairs with the same last hop attributes is recorded as set Set B.
[0299] Step 508: Acquire the response information of the commonly used ports for the IPv4 address segment and the IPv6 address segment. That is, acquire the response information of the commonly used ports for the IP addresses in the IPv4 address segment and the IPv6 address segment. The commonly used ports may include but are not limited to ports 80, 8080, etc. Specifically, the get method may be used.
[0300] Step 509: Extract the returned port response information. That is, the result of step 508 is processed accordingly to extract the corresponding port response information.
[0301] Step 510: compare the commonly used port response information to determine whether the port response information is the same. That is, receive the output of step 509, compare the same commonly used port information, and determine whether the response information is the same. If they are the same, execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0302] Step 511: Get the IPv4 and IPv6 pairs with the same common port response to form a set Set C. The IPv4 and IPv6 pairs with the same common port response are regarded as the IPv4 and IPv6 pairs with the same common port response attribute. The set of these IPv4 and IPv6 pairs with the same common port response attribute is recorded as set Set C.
[0303] The above steps 502 to 504, steps 505 to 507, and steps 508 to 510 are executed in parallel.
[0304] Step 512, perform set operations, find the intersection of SetB and SetC, and then find the union with SetA to obtain the final SetA∪(SetB∩SetC), denoted as SetD, that is, obtain the IPv4 and IPv6 pairs of the same device.
[0305] Step 513: Perform a full port scan of 0-65535 for the IPv4 and IPv6 pairs in SetD. That is, perform a full port scan of 0-65535 for the elements in the set SetD. Specifically, nmap and other methods may be used.
[0306] Step 514: Get the response information Xi returned corresponding to each port i of the IPv4 and IPv6 pairs, where i=1, 2, 3, ... 65535.
[0307] Step 515: Compare the response information Xi returned by port i to determine whether Xi is the same. That is, receive the output of step 514, compare the response information Xi returned to determine whether they are the same.
[0308] Step 516: If Xi is different, an early warning is issued and the port i is listed.
[0309] Step 517: If Xi is the same, no warning is given.
[0310] exist Figure 5 In the illustrated embodiment, in step 512, SetD may also be obtained in the following manner:
[0311] That is, find the union of SetA and SetB, find the union of SetA and SetC, and then find the intersection of the two unions, (SetA∪SetC)∩(SetA∪SetC), and we get SetD. Figure 5 The principle described is the same.
[0312] 2. In the following embodiments, the IPv4 address set and the IPv6 address set are processed by the second method to obtain a fifth IP address set; the IPv4 address set and the IPv6 address set are processed by the third method to obtain a sixth IP address set; the intersection of the fifth IP address set and the sixth IP address set is used as the IP address set to be processed. Among them, the second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address. Figure 6 As shown, the method may include:
[0313] Step 601: Obtain IPv4 and IPv6 address segments.
[0314] Here, the IPv4 and IPv6 address segments can be obtained based on the large address segments of the organization or administrative area, or the large address segments of the park.
[0315] Step 602: Extract the corresponding last hop address information from the IPv4 address segment and the IPv6 address segment.
[0316] Step 603: Perform conversion and comparison on the address information of the last hop to determine whether the address of the last hop is the same. That is, receive the output of step 602, perform conversion and comparison on the last hop information to determine whether the address of the last hop is the same. If they are the same, execute the subsequent process; otherwise, end or perform the judgment on the next address pair.
[0317] Step 604: Get the IPv4 and IPv6 pairs with the same address of the last hop. The IPv4 and IPv6 corresponding to the last hop determined to be the same are regarded as the IPv4 and IPv6 pairs with the same last hop attributes. The set of these IPv4 and IPv6 pairs with the same last hop attributes is recorded as set SetB.
[0318] Step 605: Acquire the response information of the commonly used ports for the IPv4 address segment and the IPv6 address segment. That is, acquire the response information of the commonly used ports for the IP addresses in the IPv4 address segment and the IPv6 address segment. The commonly used ports may include but are not limited to ports 80, 8080, etc. Specifically, the get method may be used.
[0319] Step 606: Extract the returned port response information. That is, the result of step 605 is processed accordingly to extract the corresponding port response information.
[0320] Step 607: compare the commonly used port response information to determine whether the port response information is the same. That is, receive the output of step 606, compare the same commonly used port information, and determine whether the response information is the same. If they are the same, execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0321] Step 608: Get the IPv4 and IPv6 pairs with the same common port response. The IPv4 and IPv6 pairs with the same common port response attributes are regarded as the IPv4 and IPv6 pairs with the same common port response attributes. The set of these IPv4 and IPv6 pairs with the same common port response attributes is recorded as Set C.
[0322] Step 609, perform set operation, find the intersection of SetB and SetC, and obtain the final SetB∩SetC, recorded as SetD, that is, obtain the IPv4 and IPv6 pairs of the same device.
[0323] Step 610: Perform a full port scan of 0-65535 for the IPv4 and IPv6 pairs in SetD. That is, perform a full port scan of 0-65535 for the elements in SetD. Specifically, nmap and other methods may be used.
[0324] Step 611: Get the response information Xi returned corresponding to each port i of the IPv4 and IPv6 pairs, where i=1, 2, 3, ... 65535.
[0325] Step 612: Compare the response information Xi returned by port i to determine whether Xi is the same. That is, receive the output of step 611, compare the response information Xi returned to determine whether they are the same.
[0326] Step 613: If Xi is different, a warning is issued and the port i is listed.
[0327] Step 614: If Xi is the same, no warning is given.
[0328] 3. In the following embodiments, the IPv4 address set and the IPv6 address set are processed by the first method to obtain a fourth IP address set; the IPv4 address set and the IPv6 address set are processed by the third method to obtain a sixth IP address set; the union of the fourth IP address set and the sixth IP address set is used as the IP address set to be processed. Among them, the first method is to analyze the asset fingerprint information of the IP address; the third method is to analyze the response information of the port corresponding to the IP address. Figure 7 As shown, the method may include:
[0329] Step 701: Obtain IPv4 and IPv6 address segments.
[0330] Here, the IPv4 and IPv6 address segments can be obtained based on the large address segments of the organization or administrative area, or the large address segments of the park.
[0331] Step 702: Acquire asset fingerprint information for the IPv4 address segment and the IPv6 address segment.
[0332] Specifically, you can use nmap, get, telnet and other methods to obtain asset fingerprint related information of IPv4 and IPv6 address segments.
[0333] From the obtained original asset fingerprint related information, the asset fingerprint information corresponding to the IPv4 address and the IPv6 address is extracted, including but not limited to OS information, banner information, host name information, etc., and recorded as a [OS|banner|hostname] tuple.
[0334] Step 703: compare the asset fingerprint information of the IPv4 address segment and the IPv6 address segment to determine whether the asset fingerprint information is the same. If they are the same, execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0335] Here, the asset fingerprint information is compared, that is, the above-mentioned multi-tuple is compared, so as to determine whether the asset fingerprint information is the same. The comparison method here can adopt a text comparison method, a character comparison method or other comparison methods.
[0336] Step 704: After comparison, the IPv4 and IPv6 pairs with the same asset fingerprint information are obtained to form a set Set A. The IPv4 and IPv6 addresses corresponding to the same tuples are regarded as the IPv4 and IPv6 pairs with the same asset fingerprint information.
[0337] The set of IPv4 and IPv6 pairs with the same asset fingerprint information is recorded as set Set A. In the set formed in the embodiment of the present application, each IPv4 and IPv6 pair is an element, and the processing of the set is performed on a pair of elements.
[0338] Step 705: Acquire the response information of the commonly used ports for the IPv4 address segment and the IPv6 address segment. That is, acquire the response information of the commonly used ports for the IP addresses in the IPv4 address segment and the IPv6 address segment. The commonly used ports may include but are not limited to ports 80, 8080, etc. Specifically, the get method may be used.
[0339] Step 706: Extract the corresponding returned port response information. That is, the result of step 705 is processed accordingly to extract the corresponding port response information.
[0340] Step 707: compare the commonly used port response information to determine whether the port response information is the same. That is, receive the output of step 706, compare the same commonly used port information, and determine whether the response information is the same. If they are the same, execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0341] Step 708: Get the IPv4 and IPv6 pairs with the same common port response attributes to form a set Set C. The IPv4 and IPv6 pairs with the same common port response attributes are determined as the IPv4 and IPv6 pairs with the same common port response attributes. The set of these IPv4 and IPv6 pairs with the same common port response attributes is recorded as set Set C.
[0342] Step 709, perform set operation, find the union of SetA and SetC, and obtain the final SetA∪SetC, denoted as SetD, that is, obtain the IPv4 and IPv6 pairs of the same device.
[0343] Step 710: Perform a full port scan of 0-65535 for the IPv4 and IPv6 pairs in SetD. That is, perform a full port scan of 0-65535 for the elements in SetD. Specifically, nmap and other methods may be used.
[0344] Step 711: Get the response information Xi returned corresponding to each port i of the IPv4 and IPv6 pairs, where i=1, 2, 3, ... 65535.
[0345] Step 712: Compare the response information Xi returned by port i to determine whether Xi is the same. That is, receive the output of step 214, compare the response information Xi returned to determine whether they are the same.
[0346] Step 713: If Xi is different, a warning is issued and the port i is listed.
[0347] Step 714: If Xi is the same, no warning is given.
[0348] 4. In the following embodiments, the IPv4 address set and the IPv6 address set are processed by the first method to obtain a fourth IP address set; the IPv4 address set and the IPv6 address set are processed by the second method to obtain a fifth IP address set; and the union of the fourth IP address set and the fifth IP address set is used as the IP address set to be processed. Figure 8 As shown, the method may include:
[0349] Step 801: Obtain IPv4 and IPv6 address segments.
[0350] Here, the IPv4 and IPv6 address segments can be obtained based on the large address segments of the organization or administrative area, or the large address segments of the park.
[0351] Step 802: Acquire asset fingerprint information for the IPv4 address segment and the IPv6 address segment.
[0352] Specifically, you can use nmap, get, telnet and other methods to obtain asset fingerprint related information of IPv4 and IPv6 address segments.
[0353] From the obtained original asset fingerprint related information, the asset fingerprint information corresponding to the IPv4 address and the IPv6 address is extracted, including but not limited to OS information, banner information, host name information, etc., and recorded as a [OS|banner|hostname] tuple.
[0354] Step 803: compare the asset fingerprint information of the IPv4 address segment and the IPv6 address segment to determine whether the asset fingerprint information is the same. If they are the same, execute the subsequent process; otherwise, end or proceed to the next address pair determination.
[0355] Here, the asset fingerprint information is compared, that is, the above-mentioned multi-tuple is compared, so as to determine whether the asset fingerprint information is the same. The comparison method here can adopt a text comparison method, a character comparison method or other comparison methods.
[0356] Step 804: After comparison, the IPv4 and IPv6 pairs with the same asset fingerprint information are obtained to form a set Set A. The IPv4 and IPv6 addresses corresponding to the same tuples are regarded as the IPv4 and IPv6 pairs with the same asset fingerprint information.
[0357] The set of IPv4 and IPv6 pairs with the same asset fingerprint information is recorded as set Set A. In the set formed in the embodiment of the present application, each IPv4 and IPv6 pair is an element, and the processing of the set is performed on a pair of elements.
[0358] Step 805: extract the corresponding last hop address information from the IPv4 address segment and the IPv6 address segment.
[0359] Step 806: Perform conversion and comparison on the address information of the last hop to determine whether the address of the last hop is the same. That is, receive the output of step 805, perform conversion and comparison on the last hop information to determine whether the address of the last hop is the same. If they are the same, execute the subsequent process; otherwise, end or perform the judgment on the next address pair.
[0360] Step 807: Get the IPv4 and IPv6 pairs with the same address of the last hop to form a set Set B. The IPv4 and IPv6 corresponding to the last hop determined to be the same are taken as the IPv4 and IPv6 pairs with the same last hop attributes. The set of these IPv4 and IPv6 pairs with the same last hop attributes is recorded as Set B.
[0361] Step 808: Perform set operations to obtain the union of SetA and SetB, that is, SetA∪SetB, denoted as SetD, that is, obtain the IPv4 and IPv6 pairs of the same device.
[0362] Step 809: Perform a full port scan of 0-65535 for the IPv4 and IPv6 pairs in SetD. That is, perform a full port scan of 0-65535 for the elements in the set SetD. Specifically, nmap and other methods may be used.
[0363] Step 810: Get the response information Xi returned corresponding to each port i of the IPv4 and IPv6 pairs, where i=1, 2, 3, ... 65535.
[0364] Step 811: Compare the response information Xi returned by port i to determine whether Xi is the same. That is, receive the output of step 810, compare the response information Xi returned to determine whether they are the same.
[0365] Step 812: If Xi is different, an early warning is issued and the port i is listed.
[0366] Step 813: If Xi is the same, no warning is given.
[0367] In the embodiment of the present application, an analysis and early warning mechanism for the IPv4 and IPv6 dual-stack protection strategy of the device and the system itself is implemented, which is conducive to timely discovery of problems existing in the IPv4 and IPv6 dual-stack protection strategy, and then better improvement and reinforcement of the security protection strategy, reducing the risk of security attacks.
[0368] The present application also provides a strategy analysis device. Fig. 9 , the strategy analysis device 900 includes:
[0369] A first acquisition module 901 is used to respectively acquire an IPv4 address set and an IPv6 address set; a first preprocessing module 902 is used to preprocess the IPv4 address set and the IPv6 address set to obtain a to-be-processed IP address set; wherein the to-be-processed IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address; a second acquisition module 903 is used to, for a first IP address pair in the to-be-processed IP address set, perform a full port scan on the first IPv4 address and the first IPv6 address in the first IP address pair, respectively, to obtain a first port scan result corresponding to the first IPv4 address and a second port scan result corresponding to the first IPv6 address; an early warning analysis module 904 is used to perform an early warning analysis based on the first port scan result and the second port scan result;
[0370] The preprocessing method includes one or more of the following:
[0371] Analyze the asset fingerprint information of the IP address;
[0372] Analyze the last hop of the routing path corresponding to the IP address;
[0373] Analyze the response information of the port corresponding to the IP address.
[0374] Wherein, the first preprocessing module comprises:
[0375] A first processing submodule, configured to process the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0376] A second processing submodule, configured to process the first IP address set in a second manner to obtain a second IP address set;
[0377] A third processing submodule, configured to process the second IP address set in a third manner to obtain a third IP address set, and use the third IP address set as the IP address set to be processed;
[0378] The first method, the second method, and the third method are any one of the preprocessing methods, and the first method, the second method, and the third method are different from each other.
[0379] Wherein, the first preprocessing module includes:
[0380] A fourth processing submodule, configured to process the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0381] a fifth processing submodule, configured to process the first IP address set in a second manner to obtain a second IP address set, and use the second IP address set as the IP address set to be processed;
[0382] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address, or the second method is to analyze the response information of the port corresponding to the IP address.
[0383] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0384] When the first manner, the second manner, or the third manner is to analyze the asset fingerprint information of the IP address, for the second IP address pair in the IP address set obtained by analyzing the asset fingerprint information of the IP address, the asset fingerprint information of the IPv4 address in the second IP address pair is completely or partially the same as the asset fingerprint information of the IPv6 address in the second IP address pair;
[0385] When the first manner, the second manner, or the third manner is to analyze the last hop of the routing path corresponding to the IP address, for a third IP address pair in the IP address set obtained by analyzing the last hop of the routing path corresponding to the IP address, the address of the last hop of the routing path corresponding to the IPv4 address in the third IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the third IP address pair;
[0386] When the first method, the second method or the third method is to analyze the response information of the port corresponding to the IP address, for the fourth IP address pair in the IP address set obtained by analyzing the response information of the port corresponding to the IP address, the response information of the target port corresponding to the IPv4 address in the fourth IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the third IP address pair.
[0387] Wherein, the first preprocessing module includes:
[0388] a sixth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0389] a seventh processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0390] an eighth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0391] The ninth processing submodule is used to obtain the to-be-processed IP address set by using the fourth IP address set, the fifth IP address set, and the sixth IP address set.
[0392] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the ninth processing submodule is used to obtain the to-be-processed IP address set by using the fourth IP address set, the fifth IP address set, and the sixth IP address set in any one of the following ways:
[0393] Obtaining the intersection of the fifth IP address set and the sixth IP address set; obtaining the union of the intersection and the fourth IP address set, and using the union as the IP address set to be processed;
[0394] Obtain a first union of the fourth IP address set and the fifth IP address set, and obtain a second union of the fourth IP address set and the sixth IP address set; obtain an intersection of the first union and the second union, and use the intersection as the IP address set to be processed.
[0395] The first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the first preprocessing module includes:
[0396] a tenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0397] an eleventh processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0398] The twelfth processing submodule is used to use the union of the fourth IP address set and the fifth IP address set as the to-be-processed IP address set.
[0399] Among them, the first method is to analyze the asset fingerprint information of the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the first preprocessing module includes:
[0400] A thirteenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0401] A fourteenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0402] The fifteenth processing submodule is used to use the union of the fourth IP address set and the sixth IP address set as the to-be-processed IP address set.
[0403] The second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the first preprocessing module includes:
[0404] A sixteenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0405] A seventeenth processing submodule, configured to process the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0406] The eighteenth processing submodule is used to use the intersection of the fifth IP address set and the sixth IP address set as the to-be-processed IP address set.
[0407] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0408] For the fifth IP address pair in the fourth IP address set, the asset fingerprint information of the IPv4 address in the fifth IP address pair is completely identical or partially identical to the asset fingerprint information of the IPv6 address in the fifth IP address pair;
[0409] For the sixth IP address pair in the fifth IP address set, the address of the last hop of the routing path corresponding to the IPv4 address in the sixth IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the sixth IP address pair;
[0410] For the seventh IP address pair in the sixth IP address set, the response information of the target port corresponding to the IPv4 address in the seventh IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the seventh IP address pair.
[0411] Wherein, the second acquisition module includes:
[0412] a scanning submodule, configured to perform an i-th port scan on the first IPv4 address and the first IPv6 address respectively, wherein i is an integer and 1≤i≤65535;
[0413] The acquisition submodule is used to respectively obtain the first response information returned by the i-th port to the first IPv4 address and the second response information returned to the first IPv6 address.
[0414] The warning analysis module is used to determine that a warning is required when the first response information and the second response information are different.
[0415] The device provided in the embodiment of the present application can execute the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0416] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0417] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0418] The present application also provides a strategy analysis device. Fig.10 , the strategy analysis device includes: a processor 1001 and a transceiver 1002.
[0419] The processor 1001 is used for:
[0420] Get the IPv4 address set and IPv6 address set respectively;
[0421] Preprocessing the IPv4 address set and the IPv6 address set to obtain a to-be-processed IP address set; wherein the to-be-processed IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0422] For a first IP address pair in the set of IP addresses to be processed, perform full port scans on the first IPv4 address and the first IPv6 address in the first IP address pair, respectively, to obtain a first port scan result corresponding to the first IPv4 address and a second port scan result corresponding to the first IPv6 address;
[0423] Performing early warning analysis according to the first port scanning result and the second port scanning result;
[0424] The preprocessing method includes one or more of the following:
[0425] Analyze the asset fingerprint information of the IP address;
[0426] Analyze the last hop of the routing path corresponding to the IP address;
[0427] Analyze the response information of the port corresponding to the IP address.
[0428] The processor 1001 is used for:
[0429] Processing the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0430] Processing the first IP address set in a second manner to obtain a second IP address set;
[0431] Processing the second IP address set in a third manner to obtain a third IP address set, and using the third IP address set as the IP address set to be processed;
[0432] The first method, the second method, and the third method are any one of the preprocessing methods, and the first method, the second method, and the third method are different from each other.
[0433] The processor 1001 is used for:
[0434] Processing the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set;
[0435] Processing the first IP address set in a second manner to obtain a second IP address set, and using the second IP address set as the IP address set to be processed;
[0436] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address, or the second method is to analyze the response information of the port corresponding to the IP address.
[0437] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0438] When the first manner, the second manner, or the third manner is to analyze the asset fingerprint information of the IP address, for the second IP address pair in the IP address set obtained by analyzing the asset fingerprint information of the IP address, the asset fingerprint information of the IPv4 address in the second IP address pair is completely or partially the same as the asset fingerprint information of the IPv6 address in the second IP address pair;
[0439] When the first manner, the second manner, or the third manner is to analyze the last hop of the routing path corresponding to the IP address, for a third IP address pair in the IP address set obtained by analyzing the last hop of the routing path corresponding to the IP address, the address of the last hop of the routing path corresponding to the IPv4 address in the third IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the third IP address pair;
[0440] When the first method, the second method or the third method is to analyze the response information of the port corresponding to the IP address, for the fourth IP address pair in the IP address set obtained by analyzing the response information of the port corresponding to the IP address, the response information of the target port corresponding to the IPv4 address in the fourth IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the third IP address pair.
[0441] The processor 1001 is used for:
[0442] Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0443] Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0444] Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0445] The to-be-processed IP address set is obtained by using the fourth IP address set, the fifth IP address set, and the sixth IP address set.
[0446] Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address;
[0447] The processor 1001 is configured to obtain the to-be-processed IP address set by using the fourth IP address set, the fifth IP address set, and the sixth IP address set in any one of the following ways:
[0448] Obtaining the intersection of the fifth IP address set and the sixth IP address set; obtaining the union of the intersection and the fourth IP address set, and using the union as the IP address set to be processed;
[0449] Obtain a first union of the fourth IP address set and the fifth IP address set, and obtain a second union of the fourth IP address set and the sixth IP address set; obtain an intersection of the first union and the second union, and use the intersection as the IP address set to be processed.
[0450] Wherein, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the processor is used to:
[0451] Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0452] Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0453] A union of the fourth IP address set and the fifth IP address set is used as the to-be-processed IP address set.
[0454] The first method is to analyze the asset fingerprint information of the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the processor 1001 is used to:
[0455] The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes:
[0456] Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set;
[0457] Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0458] A union of the fourth IP address set and the sixth IP address set is used as the to-be-processed IP address set.
[0459] The second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address; the processor is used to:
[0460] Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set;
[0461] Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set;
[0462] The intersection of the fifth IP address set and the sixth IP address set is used as the IP address set to be processed.
[0463] Wherein, each IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address;
[0464] For the fifth IP address pair in the fourth IP address set, the asset fingerprint information of the IPv4 address in the fifth IP address pair is completely identical or partially identical to the asset fingerprint information of the IPv6 address in the fifth IP address pair;
[0465] For the sixth IP address pair in the fifth IP address set, the address of the last hop of the routing path corresponding to the IPv4 address in the sixth IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the sixth IP address pair;
[0466] For the seventh IP address pair in the sixth IP address set, the response information of the target port corresponding to the IPv4 address in the seventh IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the seventh IP address pair.
[0467] Wherein, the processor is used for:
[0468] Performing an i-th port scan on the first IPv4 address and the first IPv6 address respectively, where i is an integer and 1≤i≤65535;
[0469] The first response information returned by the i-th port to the first IPv4 address and the second response information returned to the first IPv6 address are respectively obtained.
[0470] The processor 1001 is used for:
[0471] When the first response information and the second response information are different, it is determined that an early warning is required.
[0472] The device provided in the embodiment of the present application can execute the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0473] like Fig.11As shown, it is a schematic diagram of the policy analysis system of an embodiment of the present application. The system includes: a terminal node 1101 with an IPv6 address and an IPv4 address, and a router 1102. Among them, the terminal node component with an IPv6 address and an IPv4 address can be various networked devices such as laptops, desktops, Internet of Things devices, industrial Internet devices, etc. It implements IPv6 in a dual-stack manner, with both IPv4 addresses and IPv6 addresses. The router component is each router in the routing path of the network. It can be one or more. The router realizes the network reachability of the terminal device.
[0474] An embodiment of the present application also provides a communication device, including: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor implements the steps in the strategy analysis method as described above when executing the program.
[0475] The embodiment of the present application also provides a readable storage medium, on which a program is stored. When the program is executed by the processor, each process of the above-mentioned strategy analysis method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
[0476] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0477] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0478] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A strategy analysis method, characterized in that: include: Get the IPv4 address set and IPv6 address set respectively; Preprocessing the IPv4 address set and the IPv6 address set to obtain a to-be-processed IP address set; wherein the to-be-processed IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address; For a first IP address pair in the set of IP addresses to be processed, perform full port scans on the first IPv4 address and the first IPv6 address in the first IP address pair, respectively, to obtain a first port scan result corresponding to the first IPv4 address and a second port scan result corresponding to the first IPv6 address; Performing early warning analysis according to the first port scanning result and the second port scanning result; The preprocessing method includes one or more of the following: Analyze the asset fingerprint information of the IP address; Analyze the last hop of the routing path corresponding to the IP address; Analyze the response information of the port corresponding to the IP address; The performing full port scanning on the first IPv4 address and the first IPv6 address in the first IP address pair respectively to obtain a first port scanning result corresponding to the first IPv4 address and a second port scanning result corresponding to the first IPv6 address includes: Performing an i-th port scan on the first IPv4 address and the first IPv6 address, respectively, where i is an integer and 1≤i≤65535; Respectively obtain first response information returned by the i-th port to the first IPv4 address and second response information returned to the first IPv6 address; The performing early warning analysis according to the first port scanning result and the second port scanning result includes: When the first response information and the second response information are different, it is determined that an early warning is required.
2. The method according to claim 1, characterized in that The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes: Processing the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set; Processing the first IP address set in a second manner to obtain a second IP address set; Processing the second IP address set in a third manner to obtain a third IP address set, and using the third IP address set as the IP address set to be processed; The first method, the second method, and the third method are any one of the preprocessing methods, and the first method, the second method, and the third method are different from each other.
3. The method according to claim 1, characterized in that: The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes: Processing the IPv4 address set and the IPv6 address set in a first manner to obtain a first IP address set; Processing the first IP address set in a second manner to obtain a second IP address set, and using the second IP address set as the IP address set to be processed; Among them, the first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address, or the second method is to analyze the response information of the port corresponding to the IP address.
4. The method according to claim 2 or 3, characterized in that: Each IP address set includes at least one IP address pair, wherein the IP address pair includes an IPv4 address and an IPv6 address; When the first manner, the second manner, or the third manner is to analyze the asset fingerprint information of the IP address, for the second IP address pair in the IP address set obtained by analyzing the asset fingerprint information of the IP address, the asset fingerprint information of the IPv4 address in the second IP address pair is completely or partially the same as the asset fingerprint information of the IPv6 address in the second IP address pair; When the first manner, the second manner, or the third manner is to analyze the last hop of the routing path corresponding to the IP address, for a third IP address pair in the IP address set obtained by analyzing the last hop of the routing path corresponding to the IP address, the address of the last hop of the routing path corresponding to the IPv4 address in the third IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the third IP address pair; When the first method, the second method or the third method is to analyze the response information of the port corresponding to the IP address, for the fourth IP address pair in the IP address set obtained by analyzing the response information of the port corresponding to the IP address, the response information of the target port corresponding to the IPv4 address in the fourth IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the third IP address pair.
5. The method according to claim 1, characterized in that The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes: Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set; Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set; Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set; The to-be-processed IP address set is obtained by using the fourth IP address set, the fifth IP address set, and the sixth IP address set.
6. The method according to claim 5, characterized in that The first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address; The to-be-processed IP address set is obtained by using the fourth IP address set, the fifth IP address set, and the sixth IP address set in any of the following ways: Obtaining the intersection of the fifth IP address set and the sixth IP address set; obtaining the union of the intersection and the fourth IP address set, and using the union as the IP address set to be processed; Obtain a first union of the fourth IP address set and the fifth IP address set, and obtain a second union of the fourth IP address set and the sixth IP address set; obtain an intersection of the first union and the second union, and use the intersection as the IP address set to be processed.
7. The method according to claim 1, characterized in that The first method is to analyze the asset fingerprint information of the IP address; the second method is to analyze the last hop of the routing path corresponding to the IP address; The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes: Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set; Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set; A union of the fourth IP address set and the fifth IP address set is used as the to-be-processed IP address set.
8. The method according to claim 1, characterized in that: The first method is to analyze the asset fingerprint information of the IP address; the third method is to analyze the response information of the port corresponding to the IP address; The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes: Processing the IPv4 address set and the IPv6 address set by using the first method to obtain a fourth IP address set; Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set; A union of the fourth IP address set and the sixth IP address set is used as the to-be-processed IP address set.
9. The method according to claim 1, characterized in that: The second method is to analyze the last hop of the routing path corresponding to the IP address; the third method is to analyze the response information of the port corresponding to the IP address; The preprocessing of the IPv4 address set and the IPv6 address set to obtain the IP address set to be processed includes: Processing the IPv4 address set and the IPv6 address set by using the second method to obtain a fifth IP address set; Processing the IPv4 address set and the IPv6 address set by using the third method to obtain a sixth IP address set; The intersection of the fifth IP address set and the sixth IP address set is used as the IP address set to be processed.
10. The method according to any one of claims 5 to 9, characterized in that: Each IP address set includes at least one IP address pair, wherein the IP address pair includes an IPv4 address and an IPv6 address; For the fifth IP address pair in the fourth IP address set, the asset fingerprint information of the IPv4 address in the fifth IP address pair is completely identical or partially identical to the asset fingerprint information of the IPv6 address in the fifth IP address pair; For the sixth IP address pair in the fifth IP address set, the address of the last hop of the routing path corresponding to the IPv4 address in the sixth IP address pair is the same as the address of the last hop of the routing path corresponding to the IPv6 address in the sixth IP address pair; For the seventh IP address pair in the sixth IP address set, the response information of the target port corresponding to the IPv4 address in the seventh IP address pair is the same as the response information of the target port corresponding to the IPv6 address in the seventh IP address pair.
11. A strategy analysis device, characterized in that: include: A first acquisition module is used to respectively acquire an IPv4 address set and an IPv6 address set; A first preprocessing module, configured to preprocess the IPv4 address set and the IPv6 address set to obtain a to-be-processed IP address set; wherein the to-be-processed IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address; A second acquisition module is used to perform a full port scan on the first IPv4 address and the first IPv6 address in the first IP address pair in the set of IP addresses to be processed, to obtain a first port scan result corresponding to the first IPv4 address and a second port scan result corresponding to the first IPv6 address; An early warning analysis module, used for performing early warning analysis according to the first port scanning result and the second port scanning result; The preprocessing method includes one or more of the following: Analyze the asset fingerprint information of the IP address; Analyze the last hop of the routing path corresponding to the IP address; Analyze the response information of the port corresponding to the IP address; Wherein, the second acquisition module includes: a scanning submodule, configured to perform an i-th port scan on the first IPv4 address and the first IPv6 address respectively, wherein i is an integer and 1≤i≤65535; an acquisition submodule, used to respectively obtain first response information returned by the i-th port to the first IPv4 address and second response information returned to the first IPv6 address; The warning analysis module is used to determine that a warning is required when the first response information and the second response information are different.
12. A strategy analysis device, characterized in that: include: processors and transceivers; Wherein, the processor is used for: Get the IPv4 address set and IPv6 address set respectively; Preprocessing the IPv4 address set and the IPv6 address set to obtain a to-be-processed IP address set; wherein the to-be-processed IP address set includes at least one IP address pair, and the IP address pair includes an IPv4 address and an IPv6 address; For a first IP address pair in the set of IP addresses to be processed, perform full port scans on the first IPv4 address and the first IPv6 address in the first IP address pair, respectively, to obtain a first port scan result corresponding to the first IPv4 address and a second port scan result corresponding to the first IPv6 address; Performing early warning analysis according to the first port scanning result and the second port scanning result; The preprocessing method includes one or more of the following: Analyze the asset fingerprint information of the IP address; Analyze the last hop of the routing path corresponding to the IP address; Analyze the response information of the port corresponding to the IP address; The performing full port scanning on the first IPv4 address and the first IPv6 address in the first IP address pair respectively to obtain a first port scanning result corresponding to the first IPv4 address and a second port scanning result corresponding to the first IPv6 address includes: Performing an i-th port scan on the first IPv4 address and the first IPv6 address, respectively, where i is an integer and 1≤i≤65535; Respectively obtain first response information returned by the i-th port to the first IPv4 address and second response information returned to the first IPv6 address; The performing early warning analysis according to the first port scanning result and the second port scanning result includes: When the first response information and the second response information are different, it is determined that an early warning is required.
13. A communication device, comprising: A transceiver, a memory, a processor and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the strategy analysis method as described in any one of claims 1 to 10.
14. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps in the strategy analysis method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Detection method for IPv4 firewall bypassing IPv6
CN109150655A
Method and device for determining risk of IPv6 address
CN111343295A
