Address discovery method, device, electronic device and storage medium
By obtaining Internet protocol addresses and index information, generating address embedded information and performing knowledge distillation, the problem of low accuracy and low efficiency in sixth-generation Internet address detection is solved, achieving efficient and accurate address discovery, which is suitable for large-scale cyberspace mapping. need.
Patent Information
- Application Number
- CN202410829035.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Existing technologies are difficult to effectively detect and discover active addresses in sixth-generation Internet addresses, especially in large-scale cyberspace mapping. Traditional methods rely on seed set structures, have problems with low accuracy and efficiency, and are overly dependent on manual intervention. .
By obtaining Internet protocol addresses and index information, address embedding information is generated, and based on knowledge distillation technology, embedded representation information is obtained. Address embedding information and embedded representation information are used for address discovery, which reduces dependence on seed sets and improves the accuracy of address discovery. rate and efficiency.
It realizes efficient and accurate discovery of Internet protocol addresses in large-scale network space, reduces dependence on seed sets, improves practicality, reduces manual intervention, and is suitable for large-scale network space mapping needs.
Smart Images

Figure CN118381780B
Abstract
Description
Technical Field
[0001] The present application relates to the field of the Internet, and in particular to an address discovery method, device, electronic device and storage medium. Background Art
[0002] With the development of the Internet, Internet address detection and discovery has always been an important part of cyberspace mapping, and is crucial for network asset assessment and network threat discovery. For the fourth-generation traditional Internet addresses, existing tools (such as ZMap) can detect the full address space in a very short time. However, the sixth-generation Internet address has a huge Internet address space, making the traditional full address space detection method not feasible. In addition, due to the sparsity of active addresses in the sixth-generation Internet address, the random enumeration detection method has the problem of low accuracy. Summary of the invention
[0003] In order to solve the above technical problems, the present application provides an address discovery method, device, electronic device and storage medium.
[0004] In a first aspect, the present application provides an address discovery method, comprising:
[0005] Obtain Internet Protocol addresses and index information of Internet Protocol addresses;
[0006] Generate address embedding information based on the Internet Protocol address and index information;
[0007] Perform knowledge distillation based on address embedding information to obtain embedding representation information;
[0008] Address discovery is performed using address embedding information and embedded representation information to obtain an address discovery result corresponding to an Internet Protocol address.
[0009] Optionally, generating address embedding information according to the Internet Protocol address and the index information includes:
[0010] extracting an address value from the Internet Protocol address and extracting an index value from the index information;
[0011] Combining the address value with the index value to obtain address word information;
[0012] The address embedding information is generated using the address word information.
[0013] Optionally, the using the address embedding information and the embedded representation information to perform address discovery to obtain an address discovery result corresponding to the Internet Protocol address includes:
[0014] Extracting network address embedding information from the address embedding information;
[0015] Determining host address information using the embedded representation information;
[0016] Combining the network address embedding information with the host address information to obtain an Internet Protocol discovery address;
[0017] Based on the Internet Protocol discovery address, the address discovery result is generated.
[0018] Optionally, the adopting the address word information to generate the address embedding information includes:
[0019] Determine the directed graph node corresponding to the address word information as the target node;
[0020] In the directed graph where the target node is located, determine a first neighbor node and a second neighbor node, wherein the first neighbor node is a directed graph node corresponding to a directed edge with the target node as a head node in the directed graph, and the second neighbor node is a directed graph node corresponding to a directed edge with the target node as a tail node in the directed graph;
[0021] Information aggregation is performed according to the target node, the first neighbor node, the second neighbor node, and the directed edge to generate the address embedding information.
[0022] Optionally, before using the address word information to generate the address embedding information, the method further includes:
[0023] Using the address word information as a directed graph node;
[0024] Based on the sequential relationship between the address words, a directed edge is formed;
[0025] The directed graph nodes and the directed edges are used to construct the directed graph.
[0026] Optionally, performing knowledge distillation based on the address embedding information to obtain embedding representation information includes:
[0027] Extracting a preset number of bits of network embedded information from the address embedded information;
[0028] Performing knowledge distillation on the network embedding information to obtain host representation information;
[0029] The host representation information is used as the embedded representation information.
[0030] Optionally, generating address embedding information according to the Internet Protocol address and the index information includes:
[0031] extracting address information from said Internet Protocol address;
[0032] Determine the index value corresponding to each address value in the address information;
[0033] The index information is determined by using the index values corresponding to the respective address values.
[0034] In a second aspect, the present application provides an address discovery device, including:
[0035] An acquisition module, used to acquire an Internet Protocol address and index information of the Internet Protocol address;
[0036] A generating module, used for generating address embedding information according to the Internet Protocol address and the index information;
[0037] A knowledge distillation module, used for performing knowledge distillation based on the address embedding information to obtain embedding representation information;
[0038] A discovery module is used to perform address discovery using the address embedding information and the embedded representation information to obtain an address discovery result corresponding to the Internet Protocol address.
[0039] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0040] Memory, used to store computer programs;
[0041] The processor is used to implement the address discovery method described in any one of the first aspects when executing the program stored in the memory.
[0042] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the address discovery method as described in any one of the first aspects is implemented.
[0043] The embodiment of the present application obtains an Internet Protocol address and index information of the Internet Protocol address to generate address embedding information based on the Internet Protocol address and the index information, and performs knowledge distillation based on the address embedding information to obtain embedding representation information, and then uses the address embedding information and the embedded representation information to perform address discovery to obtain an address discovery result corresponding to the Internet Protocol address, thereby using knowledge distillation to ensure the accuracy of address discovery while also improving the efficiency of address discovery, and solving the problem of low address discovery accuracy in the detection method using random enumeration in the existing related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 A flowchart of an address discovery method provided in an embodiment of the present application;
[0047] Figure 2 A schematic diagram of an application scenario of an address discovery method provided in an embodiment of the present application;
[0048] Figure 3 A schematic diagram of the structure of an address discovery device provided in an embodiment of the present application;
[0049] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 making creative work are within the scope of protection of this application.
[0051] Currently, Internet Protocol version 6 (IPv6) address discovery algorithms are all based on a certain scale of seed sets. Existing discovery methods are usually based on the idea that areas with dense seed addresses are also densely populated with active addresses, and the areas where densely populated active addresses may exist are analyzed from the seed set structure. For example, the DET model constructs a density tree based on the seed address, and each node in the tree represents an address range. Its goal is to maximize the density of the seed addresses contained in the address range represented by the leaf node. 6Hit uses the DHC algorithm to construct a space tree based on the seed address to achieve space division, and uses reinforcement learning to dynamically adjust the detection range to detect more active addresses under a fixed budget according to actual conditions; however, this type of method is too dependent on the seed set structure, and the generated addresses are limited to the area where the addresses in the seed set belong, making the existing IPv6 active address discovery algorithm overly dependent on the space defined by the seed set address. There are at least two problems. On the one hand, only IPv6 addresses within the space defined by the seed set can be discovered. For the space outside the seed set, the algorithm cannot analyze the distribution law of active addresses, so this type of method is not universal; on the other hand, there are a lot of manual intervention processes in the existing methods. The existing methods discover possible active address dense areas by analyzing the seed address structure, while the seed structure analysis method needs to be manually set, such as entropy value analysis, Hamming distance analysis, etc. This process requires a high level of professionalism from the analyst. Therefore, the existing methods of discovering active IPv6 addresses lack practicality and cannot meet the needs of large-scale cyberspace mapping.
[0052] In order to solve the problem that the method of discovering active IPv6 addresses in the prior art lacks practicality and cannot meet the needs of large-scale cyberspace mapping, the embodiment of the present application obtains the Internet Protocol address and the index information of the Internet Protocol address, generates address embedding information based on the Internet Protocol address and the index information, and performs knowledge distillation based on the address embedding information to obtain embedded representation information, and then uses the address embedding information and the embedded representation information to perform address discovery to obtain the address discovery result corresponding to the Internet Protocol address, so that the present application does not need to rely too much on the seed set but performs knowledge distillation based on the Internet Protocol address and the index information, thereby using knowledge distillation to ensure the accuracy of address discovery while improving the efficiency of address discovery, solving the problem of low efficiency of the detection method using random enumeration in the existing related technology, and improving the discovery efficiency of the Internet Protocol address; and because there is no need to rely too much on the seed set and the process of knowledge distillation does not require too much manual intervention, it improves practicality and can also meet the needs of large-scale cyberspace mapping.
[0053] Figure 1 A flowchart of an address discovery method provided in an embodiment of the present application.
[0054] like Figure 1As shown, the present application discloses an embodiment, providing an address discovery method, which may specifically include the following steps:
[0055] Step S110: Acquire the Internet Protocol address and index information of the Internet Protocol address.
[0056] Among them, the Internet Protocol address can be an address such as IPv6 or Internet Communication Protocol Version 4 (IPv4). The Internet Protocol address can be obtained from a preset address seed set or from a preset server. Of course, other acquisition methods can also be used, and this embodiment does not make specific limitations on this. The index information of the Internet Protocol address represents the index used to indicate the address information in the Internet Protocol address. Taking IPv6 as an example, the total length of the IPv6 address is 128 bits, expressed as "X:X:X:X:X:X:X:X", each X represents 4 hexadecimal value characters separated by colons, usually divided into 8 groups, each group is in the form of 4 hexadecimal numbers, and each group of hexadecimal numbers is separated by colons. Specifically, it can be "2001:4b20:0000:0000:000b:eef0:0010:0165". At this time, the index information can represent the index corresponding to each character, that is, the index information can include 0123456789cdefghljklmnopgrstuv, where each index corresponds to each character in the IPv6 address; of course, the above is only an example. In a specific implementation, different index information can be adaptively configured according to different Internet Protocol addresses and specific needs. This embodiment does not make specific limitations on this.
[0057] Step S120: Generate address embedding information according to the Internet Protocol address and index information.
[0058] Specifically, in this embodiment, after obtaining the Internet Protocol address and index information, address embedding information can be generated based on the Internet Protocol address and index information. The address embedding information represents the information of the embedding representation used for knowledge distillation, such as embedding information. In the scenario of Knowledge Distillation (KD), the two terms "Embedding Representation" and "embedding" are usually used interchangeably, and can be used to indicate the conversion of data items (such as words, sentences, images, etc.) into continuous, dense vector forms. These vectors capture the intrinsic characteristics and semantic information of the data items, so that they can be effectively processed and analyzed in low-dimensional space; that is, in this embodiment, data conversion is performed based on the Internet Protocol address and index information to obtain address embedding information.
[0059] Step S130: performing knowledge distillation based on the address embedding information to obtain embedding representation information.
[0060] Specifically, in this embodiment, after generating the address embedding information, knowledge distillation can be performed based on the address embedding information to obtain embedded representation information, wherein the embedded representation information represents the information output after knowledge distillation of the address embedding information, which can be embedded representation information or embedding information. The specific knowledge distillation method can be performed using a neural network model. For example, the address embedding information is input into a pre-trained neural network model, and knowledge distillation is performed through the neural network model to obtain the embedded representation information output by the neural network model.
[0061] In one example, knowledge distillation is performed through the teacher model and the student model. The teacher model can fully learn the IPv6 address pattern rules, but its parameters are too large and the model complexity is high, which leads to low address generation efficiency and low practicality. Therefore, the knowledge of the teacher model can be distilled to the lightweight student model, which not only ensures the generation accuracy but also greatly improves the generation efficiency. Specifically, in each round of generation, the output probability of the teacher model is used as soft targets to guide the training of the student model, so that the output of the student model is close to both soft targets and groundtruth. After training, the student model will learn the knowledge of the teacher model. Finally, the student model is used as the IPv6 active address discovery model to perform the IPv6 active address discovery task. The knowledge distillation process in this embodiment can be to pre-train the large model teacher model through the training set, and then distill the teacher model knowledge to the lightweight student model, and then execute the step S130 to perform knowledge distillation based on the address embedding information. When the embedded representation information is obtained, the address embedding information can be directly input into the lightweight student model, so that the lightweight student model outputs the embedded representation information based on the address embedding information.
[0062] It should be noted that, since the Internet Protocol address can contain multiple characters, and the index information corresponds to the characters in the Internet Protocol address, the index information can contain multiple indexes, that is, the address embedded information generated based on the Internet Protocol address and the index information can be the embedded information corresponding to all the characters in the Internet Protocol address, and in the process of performing knowledge distillation on the address embedded information to obtain the embedded representation information, specifically, part of the address embedded information can be subjected to knowledge distillation. For example, the Internet Protocol address contains network address characters and host address characters. At this time, based on the network address characters, the host address characters, the index information corresponding to the network address characters, and the index information corresponding to the host address characters, the address embedded information containing the network address embedded information and the host network address embedded information is generated. At this time, only the network address embedded information in the address embedded information can be subjected to knowledge distillation to obtain the embedded representation information.
[0063] Step S140: Use the address embedding information and the embedded representation information to perform address discovery, and obtain an address discovery result corresponding to the Internet Protocol address.
[0064] Specifically, in this embodiment, after obtaining the embedded representation information, the address embedded information and the embedded representation information can be used to perform address discovery to obtain an address discovery result corresponding to the Internet Protocol address. The address discovery result represents a new address obtained after address discovery. Of course, the new address can be address discovery failure information, or specific address information, and of course it can also be other results. This embodiment does not make specific limitations on this.
[0065] In a specific example, the process of address discovery can be to extract the first part of the protocol address from the address embedding information, and extract the second part of the protocol address from the embedded representation information, and combine the first part of the protocol address and the second part of the protocol address to obtain a new address, so that there is no need to over-rely on the seed set and the process of knowledge distillation does not require too much manual intervention, which improves practicality and can also meet the needs of large-scale cyberspace mapping; that is, the embodiment of the present application obtains the Internet Protocol address and the index information of the Internet Protocol address, generates the address embedding information based on the Internet Protocol address and the index information, and performs knowledge distillation based on the address embedding information to obtain the embedded representation information, and then uses the address embedding information and the embedded representation information to perform address discovery, and obtains the address discovery result corresponding to the Internet Protocol address, so that the present application does not need to over-rely on the seed set but performs knowledge distillation based on the Internet Protocol address and the index information, thereby using knowledge distillation to ensure the accuracy of address discovery while improving the efficiency of address discovery, solving the problem of low efficiency of the detection method using random enumeration in the existing related technology, and improving the discovery efficiency of the Internet Protocol address; and because there is no need to over-rely on the seed set and the process of knowledge distillation does not require too much manual intervention, it improves practicality and can also meet the needs of large-scale cyberspace mapping.
[0066] In one example, the address discovery process may be to obtain an Internet Protocol address and index information of the Internet Protocol address, generate network address embedding information based on the first 16 network address characters of the Internet Protocol address, and determine the index information corresponding to the first 16 network address characters, and then perform knowledge distillation, that is, the network address embedding information may be input into a lightweight student model, so that the lightweight student model outputs embedded representation information based on the address embedding information; the subsequent address discovery process may be to obtain the last 16 host address characters based on the embedded representation information, combine the last 16 host address characters with the first 16 network address characters, and obtain a new address of 32 bits, that is, obtain the address discovery result corresponding to the Internet Protocol address; of course, the first 16 bits and the last 16 bits of the present application are only examples, and the number of character bits can be customized according to needs during specific implementation, and this embodiment does not make specific limitations on this.
[0067] In an optional embodiment of the present application, step S120 generates address embedded information based on the Internet Protocol address and index information, which may specifically include the following sub-steps: extracting the address value from the Internet Protocol address, and extracting the index value from the index information; combining the address value with the index value to obtain address word information; using the address word information to generate address embedded information.
[0068] In this embodiment, after obtaining the Internet Protocol address and index information, the address value can be extracted from the Internet Protocol address, and the index value can be extracted from the index information, wherein the address value is the value represented by each character in the Internet Protocol address, and the index value represents the value indexed corresponding to each character in the Internet Protocol address in the index information, so that the address value and the index value can be combined to obtain address word information, and the address word information represents information including the address value and the index value. The address value and the index value can be combined by directly combining the address value and the index value to form a new value, or by combining them using a preset algorithm. Of course, other methods can also be used for combination, and this embodiment does not make specific limitations on this; then, the address word information can be used to generate address embedded information, and the specific generation method can be through a neural network, an algorithm, etc.
[0069] like Figure 2 As shown, in one example, taking IPv6 as an example, each character in IPv6 can be specifically "2001:4b20:0000:0000:000b:eef0:0010:0165", where each character represents an address value. At this time, the index information can represent the index corresponding to each character. For example, the address values are 2-0-0-1-4-b-2-0-0-0-0-0-0-0-0-0-0-0-0-0-beef-0-0-0-1-0-0-1-6-5 from left to right. At this time, the index information can be 0-1-2-3-4-5-6-7-8-9-cdefghljklmnopgr stuv, where each index corresponds to the address value of each character in the IPv6 address; the address value is combined with the index value to obtain the address word information, which can be a combination of each address value and the index, and the obtained address word information is 20, 01, 02, 13, 44, b5, 26, 07, 08, 09, 0a, 0b, 0c, 0d, 0e, 0f, 0g, Oh, 0i, bj, ekel, fm, On, 0o, 0p, 1g, 0r, 0s, 1t, 6u, 5v, which contains multiple address words, each of which corresponds to the address value in the Internet Protocol address and the index in the index information, and the corresponding relationship can be a one-to-one correspondence between the three.
[0070] In an optional embodiment of the present application, step S140 uses address embedded information and embedded representation information to perform address discovery to obtain an address discovery result corresponding to the Internet Protocol address, which may specifically include the following sub-steps: extracting network address embedded information from the address embedded information; determining host address information using embedded representation information; combining the network address embedded information with the host address information to obtain an Internet Protocol discovery address; and generating an address discovery result based on the Internet Protocol discovery address.
[0071] In this embodiment, after the embedded representation information is obtained, since the address embedded information and the embedded representation information refer to converting data items (such as words, sentences, images, etc.) into a continuous, dense vector form, data conversion can be performed on the address embedded information and the embedded representation information, that is, the network address embedded information is extracted from the address embedded information, and the host address information is determined using the embedded representation information. The specific process may be to perform data conversion on the address embedded information to obtain an address value, extract the network address value from the address value, use the network address as the network address embedded information, perform feature conversion on the embedded representation information to obtain a host address value, and use the host address value as the host address information; thereby, the network address embedded information and the host address information may be combined to obtain an Internet Protocol discovery address, wherein the combination method may be to combine the network address value corresponding to the network address embedded information with the host address value corresponding to the host address information to obtain a new Internet Protocol address, use the new Internet Protocol address as the Internet Protocol discovery address, and then generate an address discovery result based on the Internet Protocol discovery address. The address discovery result may output the Internet Protocol discovery address, store the Internet Protocol discovery address, etc. This embodiment does not specifically limit this.
[0072] Since the Internet Protocol address in this embodiment can be an address in a preset seed set, address discovery is performed through the address embedding information corresponding to the Internet Protocol address and the embedded representation information corresponding to the address embedding information to generate a new Internet Protocol discovery address, so that this embodiment can generate an address that is no longer in the original preset seed set, which reduces the dependence on the preset seed set and improves the efficiency of address discovery.
[0073] In an optional embodiment of the present application, address word information is used to generate address embedding information, which may specifically include the following sub-steps: determining a directed graph node corresponding to the address word information as a target node; determining a first neighbor node and a second neighbor node in the directed graph where the target node is located, the first neighbor node being a directed graph node corresponding to a directed edge with the target node as a head node in the directed graph, and the second neighbor node being a directed graph node corresponding to a directed edge with the target node as a tail node in the directed graph; performing information aggregation based on the target node, the first neighbor node, the second neighbor node, and the directed edge to generate address embedding information.
[0074] In the process of using address word information to generate address embedding information, this embodiment can obtain a directed graph, and determine the directed graph node corresponding to the address word information in the directed graph, and use the directed graph node as the target node, so as to determine the first neighbor node and the second neighbor node in the directed graph where the target node is located, wherein the first neighbor node is the directed graph node corresponding to the directed edge with the target node as the head node in the directed graph, and the second neighbor node is the directed graph node corresponding to the directed edge with the target node as the tail node in the directed graph. It should be noted that the first neighbor node and the second neighbor node can include directed graph nodes with a distance of one directed edge or two directed edges from the target node, and of course can also be directed graph nodes with multiple directed edges. This embodiment is for This is not specifically limited; then, information aggregation can be performed based on the target node, the first neighbor node, the second neighbor node, and the directed edge to generate address embedding information. Specifically, the node information contained in the target node, the first neighbor node, and the second neighbor node and the edge information contained in the directed edge can be aggregated to generate address embedding information; the specific aggregation method can be designed as a two-order aggregation, the first order aggregation is all first-order neighbors with one directed edge away from the target node, and the second order aggregation is all second-order neighbors with two directed edges away from the target node, wherein the first-order neighbors and the second-order neighbors both contain one or more first neighbor nodes and second neighbor nodes, and the first-order aggregation in the two-order aggregation aggregates all first-order neighbors, and the second-order aggregation aggregates all second-order neighbors. Considering the directionality of directed edges in a directed graph, each order of aggregation includes two types of aggregation functions, which respectively aggregate the neighbor nodes corresponding to the edge with the target node as the head node and the neighbor nodes corresponding to the edge with the target node as the tail node. Since the importance of different neighbor nodes to the target node may be different, the attention mechanism can be incorporated into each type of aggregation function to improve the importance of characterizing neighbor nodes.
[0075] In an optional embodiment of the present application, before using address word information to generate address embedding information, the following sub-steps may be specifically included: using the address word information as a directed graph node; constructing directed edges based on the sequential relationship between address words; and constructing a directed graph using directed graph nodes and directed edges.
[0076] In this embodiment, before using the address word information to generate the address embedding information, a directed graph may be generated. Since the address word information may contain multiple address words, each address word in the address word information may be used as a directed graph node. The address word is composed of an address value and an index value. The address value is a hexadecimal character value in the Internet Protocol address, and the index value corresponds to the address word in the Internet Protocol address. There are 32 address words in the Internet Protocol address, that is, the maximum number of address values that can be composed of address words and index values is 512. Therefore, the constructed directed graph may contain at most 512 directed graph nodes; then, based on the order relationship between the address words, a directed edge of the directed graph is constructed. The directed edge may contain directed edge information. The directed edge information represents information between two directed nodes connected by the directed edge, such as the number of occurrences of the corresponding order relationship in the seed set. The directed edge information may also be used as the weight during the two-order aggregation in the aforementioned embodiment; wherein the order relationship is based on the order relationship of each address value in the address word in the Internet Protocol address sequence, such as 32 address words 2- 0-0-1-4-b-2-0-0-0-0-0-0-0-0-0-0-0-0-0-beef-0-0-0-0-1-0-0-1-6-5, and 32 index values 0-1-2-3-4-5-6-7-8-9-cdefghljklmnopgrstuv will generate 32 address words 20, 01, 02, 13, 44, b5, 26, 07, 08, 09, 0a, 0b, 0c, 0d, 0e, 0f, 0g, Oh, 0i, bj, ek el, fm, On, 0o, 0p, 1g, 0r, 0s, 1t, 6u, 5v. Based on the 32 address words, 32 sequential relations (20,01), (01,02), ..., (1t,6u), (6u,5v) can be generated. According to the sequential relations, the directed edges of the directed graph are constructed. That is, the address words can be used as directed graph nodes, and then according to the sequential relations in the sequences of each Internet Protocol address in the preset seed set, the directed edges of the directed graph are constructed until all Internet Protocol addresses in the seed set are traversed.
[0077] In an optional embodiment of the present application, step S130 performs knowledge distillation based on the address embedded information to obtain embedded representation information, which may specifically include the following sub-steps: extracting a preset number of bits of network embedded information from the address embedded information; performing knowledge distillation on the network embedded information to obtain host representation information; and using the host representation information as embedded representation information.
[0078] In this embodiment, since the address embedding information generated based on the Internet Protocol address and the index information may be the embedding information corresponding to all the characters in the Internet Protocol address, a preset number of bits of network embedding information may be extracted from the address embedding information, wherein the preset number of bits indicates the preset number of characters. For example, the Internet Protocol address contains 32 characters, the first 16 bits of the 32 characters are Internet characters, and the last 16 bits are host address characters. In this case, the preset number of bits may be the first 16 bits, and the embedding information corresponding to the first 16 bits of characters in the address embedding information corresponding to an Internet Protocol address is used as the network embedding information; thereby, the network embedding information is subjected to knowledge distillation to obtain the host representation information. Specifically, a preset neural network model may be used, and the preset neural network model is subjected to knowledge distillation based on the network embedding information to output the host representation information, wherein the host representation information indicates the embedded representation information of the host address, and then the host representation information is used as the embedded representation information, that is, data conversion may be performed based on the embedded representation information to obtain the host address, so that the subsequent steps may be based on the host address corresponding to the embedded representation information and the network address corresponding to the network embedded information. Combined, generate the Internet Protocol discovery address corresponding to the Internet Protocol address; then the Internet Protocol discovery address may be added to the preset seed set to further enrich the breadth of the seed set.
[0079] In one example, the overall preset neural network model training method of this embodiment can be as follows:
[0080] 1) Training of large teacher models based on generation tasks
[0081] In order to fully explore the IPv6 address allocation rules and semantic information, and combine the advantages of large models in processing generative tasks, we consider using large models to learn IPv6 address pattern rules and train them with generative tasks. As the teacher model for the next step of knowledge distillation, this model contains more parameters, which can ensure the adequacy of IPv6 address pattern rule learning.
[0082] Specifically, the seed addresses are first divided into training set, validation set and test set. In terms of address value, each IPv6 address has 32 bits. In the model training stage, the embedding representation corresponding to the first 16 bits of the address in the training set is used as the model input. The loss function is calculated by cross entropy between the last 16 bits of the model output and the true value. The model parameters are updated through back propagation to train the model. Then the model effect is verified through the validation set, and finally the trained model is tested with the test set.
[0083] 2) Student model training and active address discovery based on knowledge distillation
[0084] The Teacher model can fully learn the IPv6 address pattern rules, but its parameters are too large and the model complexity is high, which leads to low address generation efficiency and low practicality. To solve this problem, the knowledge distillation technology is introduced to distill the teacher model knowledge into the lightweight student model, which not only ensures the generation accuracy but also greatly improves the generation efficiency.
[0085] Specifically, in each round of generation, the output probability of the teacher model is used as soft targets to guide the training of the student model, so that the output of the student model is close to both the soft targets and the groundtruth. The trained student model will learn the knowledge of the teacher model. Finally, the student model is used as the IPv6 active address discovery model to perform the IPv6 active address discovery task.
[0086] In one example, knowledge distillation is performed based on address embedding information to obtain embedding representation information. The specific implementation process can be: the embeddings (16×32=512) corresponding to the address embedding information of all possible address words are obtained through a directed graph, and the embedding is the embedding representation corresponding to each address word. Then, in each round of generation, an Internet Protocol address is selected from the seed set, and the 16-bit embedding corresponding to the first 16 network address characters of the Internet Protocol address is determined, and the first 16-bit embedding is input into a preset neural network model. Then, the preset neural network model outputs a 16-bit embedding, and then each output embedding and can be calculated by the Euclidean distance algorithm. Among the 512 address word embeddings, which one is closer? The nearest embedding is used as the address word generated by the current bit. For example, the 16 embeddings corresponding to the first 16 bits of the address word are 2-0-0-1-4-b-2-0-0-0-0-0-0-0-0-0. At this time, the output embeddings corresponding to each embedding can be obtained. Then the distance calculation is performed on the output embedding to obtain the corresponding target address word. At this time, 16 target address words are obtained as the host address and combined with the first 16 bits of the network address corresponding to the first 16 bits of the model input embedding as the generated new address, that is, the Internet Protocol discovery address corresponding to the Internet Protocol address.
[0087] In this embodiment, based on the sequence characteristics and semantic information-rich characteristics of IPv6 addresses, the large model technology is used to fully mine the semantic information of seed addresses, learn the address generation rules, and make up for the low generation efficiency of the large model through knowledge distillation, ensuring the generation accuracy while greatly improving the generation efficiency; in the stage of constructing the large model input-IPv6 address embedding representation, the IPv6 address embedding representation learning method of the directed graph is adopted to improve the initial embedding quality of the address. The generated address is not limited to the space limited by the seed set. Based on the semantics learned by the model, the address generation can be performed in a larger space, which has stronger universality, so that the address discovery accuracy in this embodiment is high. Compared with the structural analysis method, the large model can mine the deep semantic rules of the seed address, and can discover addresses with a higher probability of being active, and it is completely free from human intervention. Whether it is the IPv6 address embedding representation learning stage, the large model training and knowledge distillation stage or the new address generation and discovery stage, they are all carried out automatically, avoiding the impact of human intervention.
[0088] In an optional embodiment of the present application, step S110 generates address embedded information based on the Internet Protocol address and index information, and may specifically include the following sub-steps: extracting address information from the Internet Protocol address; determining the index value corresponding to each address value in the address information; and determining the index information using the index value corresponding to each address value.
[0089] In this embodiment, an Internet Protocol address can be extracted from a preset seed set, and address information can be extracted from the Internet Protocol address. The address information includes multiple address values, such as IPv6 can include 32 address values. An index value corresponding to each address value in the address information is determined. The index value corresponds to the address value one-to-one and is used to index the address value. The index value corresponding to each address value is used to determine the index information. For example, if each address value in the address information is 2-0-0-1-4-b-2-0-0-0-0-0-0-0-0-0-0-0-0-beef-0-0-0-1-0-0-1-6-5, then the index value can be each value in 0-1-2-3-4-5-6-7-8-9-cdefghljklmnopgrstuv, and the index information is 0-1-2-3-4-5-6-7-8-9-cdefghljklmnopgrstuv as a whole.
[0090] The embodiment of the present application obtains an Internet Protocol address and index information of the Internet Protocol address to generate address embedding information based on the Internet Protocol address and the index information, performs knowledge distillation based on the address embedding information to obtain embedding representation information, and then uses the address embedding information and the embedded representation information to perform address discovery to obtain an address discovery result corresponding to the Internet Protocol address, so that the present application does not need to rely too much on a seed set but performs knowledge distillation based on the Internet Protocol address and the index information, thereby using knowledge distillation to ensure the accuracy of address discovery while also improving the efficiency of address discovery, solving the problem of low efficiency of the detection method using random enumeration in the existing related technology, and improving the discovery efficiency of the Internet Protocol address; and because there is no need to rely too much on a seed set and the knowledge distillation process does not require too much manual intervention, it improves practicality while also meeting the needs of large-scale cyberspace mapping.
[0091] like Figure 3 As shown, the present application also discloses an embodiment, providing an address discovery device, including:
[0092] An acquisition module 310, configured to acquire an Internet Protocol address and index information of the Internet Protocol address;
[0093] A generating module 320, for generating address embedding information according to the Internet Protocol address and the index information;
[0094] A knowledge distillation module 330, configured to perform knowledge distillation based on the address embedding information to obtain embedding representation information;
[0095] The discovery module 340 is used to perform address discovery using the address embedding information and the embedded representation information to obtain an address discovery result corresponding to the Internet Protocol address.
[0096] In an optional embodiment of the present application, the generation module 320 may include:
[0097] A first extraction unit, configured to extract an address value from an Internet Protocol address and extract an index value from the index information;
[0098] A first combining unit, used for combining the address value with the index value to obtain address word information;
[0099] The first generating unit is used to generate address embedding information by using address word information.
[0100] In an optional embodiment of the present application, the discovery module 340 may include:
[0101] A second extraction unit, used to extract the network address embedding information from the address embedding information;
[0102] A first determining unit, configured to determine host address information using embedded representation information;
[0103] a second combining unit, configured to combine the network address embedding information with the host address information to obtain an Internet Protocol discovery address;
[0104] The first discovery unit is used to discover an address based on the Internet protocol and generate an address discovery result.
[0105] In an optional embodiment of the present application, the first generating unit may include:
[0106] A first determining subunit is used to determine the directed graph node corresponding to the address word information as a target node;
[0107] A second determining subunit is used to determine a first neighbor node and a second neighbor node in the directed graph where the target node is located, the first neighbor node being a directed graph node corresponding to a directed edge with the target node as a head node in the directed graph, and the second neighbor node being a directed graph node corresponding to a directed edge with the target node as a tail node in the directed graph;
[0108] The aggregation subunit is used to aggregate information according to the target node, the first neighbor node, the second neighbor node and the directed edge to generate address embedding information.
[0109] In an optional embodiment of the present application, the address discovery device may further include:
[0110] A node module, used to treat address word information as directed graph nodes;
[0111] Directed edge module, used to construct directed edges based on the sequential relationship between address words;
[0112] A construction module is used to construct a directed graph using directed graph nodes and directed edges.
[0113] In an optional embodiment of the present application, the knowledge distillation module 330 includes:
[0114] A third extraction unit is used to extract a preset number of bits of network embedded information from the address embedded information;
[0115] A knowledge distillation unit, used to perform knowledge distillation on network embedded information to obtain host representation information;
[0116] The embedded representation unit is used to use the host representation information as embedded representation information.
[0117] In an optional embodiment of the present application, the generation module 320 may include:
[0118] a fourth extraction unit, configured to extract address information from the Internet Protocol address;
[0119] A second determining unit, used to determine an index value corresponding to each address value in the address information;
[0120] The third determining unit is used to determine index information by using index values corresponding to each address value.
[0121] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0122] like Figure 4 As shown, an embodiment of the present application provides an electronic device, including a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440;
[0123] Memory 430, for storing computer programs;
[0124] In one embodiment of the present application, the processor 410, when executing the program stored in the memory 430, implements the address discovery method provided by any of the above method embodiments, by obtaining the Internet Protocol address and the index information of the Internet Protocol address, generating the address embedding information according to the Internet Protocol address and the index information, and performing knowledge distillation based on the address embedding information to obtain the embedding representation information, and then performing address discovery using the address embedding information and the embedding representation information to obtain the address discovery result corresponding to the Internet Protocol address, so that the present application does not need to rely too much on the seed set but performs knowledge distillation based on the Internet Protocol address and the index information, thereby using knowledge distillation to ensure the accuracy of address discovery and improve the efficiency of address discovery, solve the problem of low efficiency of the detection method using random enumeration in the existing related technology, and improve the efficiency of Internet Protocol address discovery; and because there is no need to rely too much on the seed set and the knowledge distillation process does not require too much manual intervention, it improves the practicality and can also meet the needs of large-scale cyberspace mapping. .
[0125] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the address discovery method provided by any of the above method embodiments is implemented, by obtaining an Internet Protocol address and index information of the Internet Protocol address, generating address embedding information based on the Internet Protocol address and the index information, and performing knowledge distillation based on the address embedding information to obtain embedding representation information, and then performing address discovery using the address embedding information and the embedding representation information to obtain an address discovery result corresponding to the Internet Protocol address, so that the present application does not need to rely too much on the seed set but performs knowledge distillation based on the Internet Protocol address and the index information, thereby using knowledge distillation to ensure the accuracy of address discovery while also improving the efficiency of address discovery, solving the problem of low efficiency of the detection method using random enumeration in the existing related technology, and improving the efficiency of Internet Protocol address discovery; and because there is no need to rely too much on the seed set and the process of knowledge distillation does not require too much manual intervention, it improves the practicality and can also meet the needs of large-scale cyberspace mapping. .
[0126] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants 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, the elements defined by the sentence "including a..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0127] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0128] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An address discovery method, characterized in that: include: Obtain Internet Protocol addresses and index information of Internet Protocol addresses; Generate address embedding information based on the Internet Protocol address and index information; Perform knowledge distillation based on address embedding information to obtain embedding representation information; Performing address discovery using the address embedding information and the embedding representation information to obtain an address discovery result corresponding to the Internet Protocol address; The step of generating address embedding information according to the Internet Protocol address and the index information includes: extracting an address value from the Internet Protocol address and extracting an index value from the index information; Combining the address value with the index value to obtain address word information; Using the address word information, generating the address embedding information; The step of adopting the address word information to generate the address embedding information includes: Determine the directed graph node corresponding to the address word information as the target node; In the directed graph where the target node is located, determine a first neighbor node and a second neighbor node, wherein the first neighbor node is a directed graph node corresponding to a directed edge with the target node as a head node in the directed graph, and the second neighbor node is a directed graph node corresponding to a directed edge with the target node as a tail node in the directed graph; Information aggregation is performed according to the target node, the first neighbor node, the second neighbor node, and the directed edge to generate the address embedding information.
2. The address discovery method according to claim 1, characterized in that: The using the address embedding information and the embedding representation information to perform address discovery to obtain an address discovery result corresponding to the Internet Protocol address includes: Extracting network address embedding information from the address embedding information; Determining host address information using the embedded representation information; Combining the network address embedding information with the host address information to obtain an Internet Protocol discovery address; Based on the Internet Protocol discovery address, the address discovery result is generated.
3. The address discovery method according to claim 1, characterized in that: Before using the address word information to generate the address embedding information, the method further includes: Using the address word information as a directed graph node; Based on the sequential relationship between the address words, a directed edge is formed; The directed graph nodes and the directed edges are used to construct the directed graph.
4. The address discovery method according to claim 1, characterized in that: The performing knowledge distillation based on the address embedding information to obtain embedding representation information includes: Extracting a preset number of bits of network embedded information from the address embedded information; Performing knowledge distillation on the network embedding information to obtain host representation information; The host representation information is used as the embedded representation information.
5. The address discovery method according to claim 1, characterized in that: The step of generating address embedding information according to the Internet Protocol address and the index information includes: extracting address information from said Internet Protocol address; Determine the index value corresponding to each address value in the address information; The index information is determined by using the index values corresponding to the respective address values.
6. An address discovery device, characterized in that: include: An acquisition module, used to acquire an Internet Protocol address and index information of the Internet Protocol address; A generating module, used for generating address embedding information according to the Internet Protocol address and the index information; A knowledge distillation module, used for performing knowledge distillation based on the address embedding information to obtain embedding representation information; A discovery module, configured to perform address discovery using the address embedding information and the embedding representation information to obtain an address discovery result corresponding to the Internet Protocol address; The generation module comprises: A first extraction unit, configured to extract an address value from the Internet Protocol address and extract an index value from the index information; A first combining unit, used for combining the address value with the index value to obtain address word information; A first generating unit, configured to generate the address embedding information by using the address word information; The first generating unit comprises: A first determining subunit, configured to determine a directed graph node corresponding to the address word information as a target node; A second determining subunit is used to determine a first neighbor node and a second neighbor node in the directed graph where the target node is located, wherein the first neighbor node is a directed graph node corresponding to a directed edge with the target node as a head node in the directed graph, and the second neighbor node is a directed graph node corresponding to a directed edge with the target node as a tail node in the directed graph; An aggregation subunit is used to aggregate information according to the target node, the first neighbor node, the second neighbor node and the directed edge to generate the address embedding information.
7. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor is used to implement the address discovery method described in any one of claims 1 to 5 when executing a program stored in a memory.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the address discovery method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Information acquisition method, device and equipment and storage medium
CN112087532A
IPv6 address information determination method, apparatus and device, and medium
CN115225613A
IPv6 address detection method and device and electronic equipment
CN116800720A
Scheme for ipv6 address collection using mac information in local link ipv6 environment
KR1020110065975A
Routing table entry processing method and device
WO2021135492A1
