Malicious domain name detection method and device based on dynamic evolution graph
Through the malicious domain name detection method based on dynamic evolution graph, the characteristics of the domain name request graph are extracted using graph convolutional networks and recurrent neural networks, the detection delay and memory problems in the existing technology are solved, and the rapid detection and early recognition of malicious domain names are realized. .
Patent Information
- Application Number
- CN202210538664.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-17
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing malicious domain name detection technology requires a time window to accumulate sufficient number of domain name access or parsing relationships to perform inference classification, and the dynamic domain name graph evolves over time, resulting in detection delay, and the growth of the graph leads to memory problems, affecting the prediction of graph neural networks. ability.
Using a malicious domain name detection method based on dynamic evolution graph, the domain name request graph is constructed by segmenting DNS traffic into a time snapshot window, and the intermediate representation and time span characteristics of nodes are extracted using graph convolutional networks and recurrent neural networks, combining structure and time dimensions. , malicious domain name detection.
It realizes rapid detection of newly generated malicious domain names, captures the evolution of malicious domain name propagation, reduces memory requirements, improves detection performance and robustness, and can quickly detect malicious domain names in the early stages of malware dissemination.
Smart Images

Figure CN115102714B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer network security, relates to malicious domain name detection technology, and specifically relates to a malicious domain name detection method and device based on a dynamic evolution graph. Background Art
[0002] The flexibility and accessibility of domain names have led to DNS being used in a variety of malware for different purposes: phishing, spam, CC communications, malware propagation, etc. Using graph theory to detect malicious domain names has shown strong advantages, but existing graph detection systems require a time window to accumulate a sufficient number of domain name accesses or resolution relationships before they can perform inference and classification. Moreover, existing graph detection methods for malicious domain names mainly target static graphs, while actual domain name graphs evolve over time. Using a dynamic evolution graph, the present invention can capture the propagation evolution of malicious domain names, thereby enabling faster detection of malicious domain names in the early stages of malware propagation. A key challenge is that the time graph is getting larger and larger, and memory becomes a problem over time. This is especially important for graph neural networks because the graph must fit into memory to make predictions. Therefore, it may be necessary to cut off the history of unnecessary vertices and their edges in the past based on available resources.
[0003] Existing malicious domain name detection technologies can be divided into the following two categories:
[0004] Feature-based methods usually use feature engineering and machine learning to detect DGA domain names. The DGA botnet detection technology proposed by Antonakakis et al., Pleiades, checks the statistical features of NXDomain for clustering (the length of the domain name itself, access frequency, etc.), and then uses statistical multi-classification models and hidden Markov models to label the data set and detect CC domain names respectively. This study relies on the lexical and structural features of the domain name, and is specifically used to find domain names for CC communications.
[0005] Behavior-based methods usually use domain name periodic behavior features, group behavior features, domain name co-occurrence and other network or host association behaviors to detect malicious domain names. At the 2014 ESORICS conference, Manadhata et al. constructed a host domain name bipartite graph of domain name access through server logs, and used the belief propagation algorithm on this graph to predict the probability that a domain name is a malicious domain name. Issa Khali et al. proposed using the co-occurrence of IP addresses resolved by domain names on pages 663-674 of the 2016 AsiaCCS conference, and used loose co-occurrence rules to infer the malicious probability of associated domain names using malicious domain name seeds. Summary of the invention
[0006] The main purpose of the present invention is to propose a malicious domain name detection method and device based on a dynamic evolution graph, which are used to quickly detect malicious domain names.
[0007] The technical contents of the present invention include:
[0008] A malicious domain name detection method based on a dynamic evolution graph, the steps of which include:
[0009] Divide the DNS traffic into different time snapshot windows t to construct T domain name request graphs, where the nodes in the domain name request graph are the requested domain names, and the edges are the relationships between the requested domain names. For the neighborhood structure information of each node, the k-hop neighborhood of the node is used as the receptive field of the graph convolutional network.
[0010] Extract features from the high-order local neighborhood of each node to calculate an intermediate representation of the node in each domain request graph, and calculate a time span feature of each node in the domain request graph at the time snapshot window t based on the receptive field;
[0011] Based on the intermediate representation and time span features, node propagation evolution features are extracted in all domain name request graphs to obtain the final representation of each requested domain name;
[0012] The classification finally indicates that the malicious domain name detection results of each requested domain name are obtained.
[0013] Furthermore, the DNS traffic is divided into different time snapshot windows t to construct T domain name request graphs, including:
[0014] Parse DNS traffic and obtain request records, where the request records include: source client, request domain name and request time;
[0015] According to the request time, the time interval between different domain name requests in each source client is calculated, and the request domain names whose time interval is greater than the first set threshold are divided into different time snapshot windows t;
[0016] Each requested domain name assigned to the time snapshot window t is regarded as a node of the domain name request graph;
[0017] In the time snapshot window t, if two domain names are accessed by the same source client or resolved to the same address, there is an edge connection between the corresponding nodes, and the weight of the edge is obtained by calculating the number of the same source clients or the number of resolved addresses;
[0018] A domain name request graph is constructed based on the nodes and the edges with set weights.
[0019] Furthermore, when resolving DNS traffic, the obtained request domain names are filtered through whitelist filtering, one-time domain name filtering, filtering public service domains, filtering cloud servers, and filtering popular content delivery networks.
[0020] Furthermore, the step of constructing T domain name request graphs based on DNS traffic further includes:
[0021] Calculate the client sharing degree, number of clients and number of queries corresponding to each edge;
[0022] If the client sharing degree is less than the second set threshold, the number of clients is less than the third set threshold, or the number of queries is less than the fourth set threshold, the edge is cut, and an increasing threshold and iterative cutting are used in the cutting process;
[0023] After all the edges in the domain name request graph are processed, the processed domain name request graph is used as the domain name request graph.
[0024] Furthermore, extracting features from the high-order local neighborhood of each node to calculate the intermediate representation of the node in each domain name request graph includes:
[0025] Use multiple stacked graph convolutional networks to build a feature extraction network;
[0026] Establish a domain name request graph collection;
[0027] The domain name request graph set is input into the feature extraction network to obtain an intermediate representation of the nodes in each domain name request graph.
[0028] Furthermore, the extraction of propagation evolution characteristics of the intermediate representations of each node in all domain name request graphs to obtain the final representation of each requested domain name includes:
[0029] Based on the intermediate representation of the node in each domain name request graph, construct a representation sequence of the node in different time snapshot windows t;
[0030] The representation sequence is input into a recurrent neural network to obtain a final representation of each requested domain name.
[0031] Furthermore, the step of calculating the time span feature of each node in each domain name request graph in the time snapshot window t based on the receiving field includes:
[0032] Based on the longest time minus the shortest time of the vertex set of the node set within k hops and the time distribution of k hops, calculate the time distance distribution of k hops in the time snapshot window t;
[0033] The time distance distribution is used as the time span feature of the corresponding node in the time snapshot window t.
[0034] Furthermore, the step of inputting the representation sequence into a recurrent neural network to obtain a final representation of each requested domain name includes:
[0035] The position embedding method is used to capture the sequential information of the time snapshot window t;
[0036] Combine the order information of the time snapshot window t with the neighborhood information of the domain name request graph to obtain a node representation sequence containing order information;
[0037] Based on the node representation sequence containing order information, the final representation of each requested domain name is obtained.
[0038] Furthermore, the method of classifying the final representation includes: using a SOFTMAX classifier.
[0039] A storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.
[0040] An electronic device, characterized in that it comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the above methods.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] 1. It can quickly detect newly generated malicious domain names, and can also obtain good detection performance consistent with other detection systems for malicious domain name detection within a regular time range, especially making the dynamic evolution graph suitable for the memory requirements of large-scale graphs;
[0043] 2. Capable of capturing the evolution of malicious domain names over time, thus enabling faster detection of malicious domain names at an early stage of malware propagation;
[0044] 3. It can detect malicious domain names with higher robustness in both structural neighborhood and temporal neighborhood through unsupervised learning, making it more difficult for adversaries to bypass;
[0045] 4. Use the domain name time evolution graph to capture the propagation evolution of newly generated malicious domain names in two dimensions: structural neighborhood and time neighborhood. This not only uses the local correlation structure information of each domain name node in the time snapshot, but also uses the time evolution characteristics of the node edge as global change information. The subgraph features of specific shapes in the time snapshot can well distinguish the propagation evolution of malicious domain name nodes as the subgraph evolves in each time snapshot. In order to solve the problem that newly registered malicious domain name nodes have few associations with suspicious domain names after they are just registered or at the beginning of the propagation stage, the access is sparse, and there is a lack of useful information to establish effective associations, it combines the node attribute characteristics of the domain name through the two dimensions of structural neighborhood information and time neighborhood, calculates the representation of the node, and learns the potential high-order features of the domain name in different time snapshots;
[0046] 5. Time graphs are getting bigger and bigger, and memory becomes a problem over time. This is especially important for graph neural networks, as the graph must fit into memory to make predictions. Therefore, it may be necessary to cut off the history of unnecessary vertices and their edges in the past, depending on available resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A flow chart of a scalable malicious domain name detection method using a dynamic evolution graph of domain name nodes.
[0048] Figure 2 Schematic diagram of domain name map cropping.
[0049] Figure 3 Schematic diagram of the domain name structure neighborhood information and time evolution feature module of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only specific embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work.
[0051] A scalable malicious domain name detection method using a domain name node dynamic evolution graph includes the following steps:
[0052] (1) Analyze DNS traffic and obtain request information, which includes the source client address, the domain name requested for resolution, and the request time.
[0053] (2) Based on the request information parsed in (1), the DNS traffic is divided into multiple time snapshot windows t using the request time and the time interval.
[0054] (3) Based on the time snapshot window t in (2), a graph is used to represent domain names as nodes, and the relationship between two domain names is represented as an edge. The request order relationship between domain names is used to generate the domain name graph structure under the time snapshot window t. The key feature is that the DNS query activities of the time snapshot window are accumulated in a graph.
[0055] (4) The window size of the time snapshot window t plays a decisive role in the size of the graph. The present invention uses the time difference distribution within the k-hop neighborhood of each node as the K-neighborhood time difference distribution metric. For the neighborhood structure information of each node, the present invention uses the K-hop neighborhood of the node as the receiving field of the GCN, and the node neighborhood features within the K-hop neighborhood are included in the neighborhood structure representation of the node.
[0056] (5) Based on the domain name graph structure in (3), the edges with low correlation are cut so that the resources occupied by large-scale graph calculations are suitable for limited computing resources, thereby obtaining a new domain name graph structure. This process is completed by cutting the edges whose domain name request association relationship (such as client sharing ratio CSR), number of clients or number of queries are less than the response threshold. The key feature is that the DNS query activity of the time snapshot window is accumulated in a graph. Increasing thresholds and iterative cutting are used in the cutting process. The degree of sequential correlation is determined by the client sharing ratio (CSR) between the connected domain names.
[0057]
[0058] Among them, v i 、v j There are two domain names. They are the collections of clients accessing these two domain names respectively.
[0059] (6) Based on the new domain name graph structure in (5), domain name components are extracted, and the GCN graph neural network is used to capture the local structural properties in the snapshot. While retaining the association relationship between domain name requests, each domain name node is represented by the embedding of neighbor nodes.
[0060] (7) The node embedding representation of multiple time snapshot windows t based on (6) represents the node neighborhood representation of the domain name node in different time snapshot windows, and also represents the temporal changes of the graph structure at multiple time steps.
[0061] (8) Based on the embedded representation of the domain name nodes of multiple time snapshot windows t output in (7), a recurrent neural network GRU is used to capture the dynamics and evolutionary characteristics behind multiple time snapshot graph sequences.
[0062] (9) Based on the final dynamic representation of domain name nodes in (8), the present invention uses SOFTMAX to classify domain name nodes, train malicious domain name classifiers, and detect malicious domain names.
[0063] Furthermore, the ideal state of the reception field of GCN in (4) is to cover all vertices in the graph, so that the present invention can obtain the most comprehensive and complete structural neighborhood information of the node, but a larger window size will lead to a larger memory requirement. In order to ensure the comparability of the historical time snapshot and the number of data nodes. Given the temporal distance distribution within the receptive field of the time snapshot graph GCN, this time measure is used as the time span feature of the node in this time window, and also as the feature input in (8), where is the time distribution of k hops in time snapshot g, g is the current time snapshot, N k (u) is the vertex set d of the node set within k hops, k is the k-hop neighborhood, defined in 4, ts min (u), ts min (v) is the maximum time minus the shortest time of the k-hop time distribution.
[0064] Further, (5) as a result of edge removal, the nodes connected by the edge lose their connections. The nodes that lose connection form a connected component. Domain name associations with higher CSRs include high CSRs between entire domain members such as malware; server-driven high CSRs (such as cross-domain access in web content and domain names used for load balancing and content distribution) and client-driven high CSRs (such as domain names regularly connected in programs). Memory is particularly important for graph neural networks because the graph must fit into memory to make predictions. Therefore, it may be necessary to cut off the history of unnecessary vertices and their edges in the past based on available resources. The present invention cuts off the history of unnecessary vertices and their edges through client sharing.
[0065] Furthermore, (5) if the CSR of the edge connecting two domain names is lower than that of other edges, it is considered that the domain names with the edge necklace are not used or accessed by the same client set. In the cutting process, increasing thresholds and iterative cutting are used. Since each different malicious domain name component or benign domain name component has a different edge cutting threshold, the cutting process needs to use different thresholds.
[0066] Furthermore, the output of (7) includes the final dynamic node representation across multiple time steps. This node representation can not only preserve the local structural information around the node, but also capture the evolutionary characteristics of the structure.
[0067] Specifically, the present invention mainly solves the problem of node classification in multiple time snapshot windows of the domain name dynamic graph, but there is a problem that the newly registered malicious domain name node has little association with the suspicious domain name after it is just registered or at the beginning of the propagation stage, the access is sparse, and there is a lack of useful information and it is impossible to establish an effective association. The solution of the present invention, such as Figure 1 As shown below:
[0068] (1) DNS request flow analysis and preprocessing, the specific implementation is as follows:
[0069] a) For all DNS request data, parse the request record (src, domain, time) from the request stream, where src represents the source client of the request, domain is the requested domain name, and time is the request time.
[0070] b) Aggregate DNS requests from the same source client to form a domain name request dataset D of multiple source clients i , Indicates the source client s i In time The domain name requested in where n j is the total number of requested domain names from source client i.
[0071] (2) Cutting of DNS request time snapshot window, such as Figure 2 As shown, the specific implementation is as follows:
[0072] a) For source client s i Domain name request set D i , use the time interval for cutting, and divide the domain name requests from the same source client whose time interval m between different domain name requests is greater than the threshold M into different time snapshot windows t.
[0073] b) Integrate the domain name requests of all source clients belonging to the same time segment into the same time window snapshot to form the domain name request set U = {u1,u2,…,u n},u i ={d1,d2,…,d ni},u i is the number of requests from the i-th source client. i domain names, where n is the number of source clients in time snapshot t.
[0074] (3) Constructing a domain name request graph of time snapshot window t, the specific implementation method is as follows:
[0075] a) Use a graph to represent domain names as nodes and the relationship between two domain names as edges. If two domain names are accessed by the same source client or resolved to the same address in the same time snapshot, there is an edge connection between the corresponding nodes in the graph.
[0076] b) The construction of the graph aggregates the DNS query information on the DNS request flow in a cumulative manner.
[0077] c) The weight of the edge is expressed as the number of request source clients or the number of resolved addresses that the two domain names have the same.
[0078] (4) Domain name graph clipping, the specific implementation method is as follows:
[0079] a) During the domain graph pruning process, edges with low client sharing ratio (CSR) and number of clients or queries less than each threshold are deleted.
[0080] b) Using increasing thresholds and iterative cutting during the cutting process.
[0081] (5) Domain name structure neighborhood information extraction, the specific implementation method is as follows:
[0082] a) Domain structure neighborhood information extraction is to extract features from the high-order local neighborhood of each node to calculate the intermediate node representation of each snapshot.
[0083] b) This module consists of multiple stacked graph convolutional networks (GCNs) to extract features from subgraphs of domain name nodes in different time windows. The input is a collection of domain name node graphs U m ={U1,U2,…,U m}m∈T, the output is the node representation of each time snapshot window In the time snapshot window t, Represents the encoding of the domain name node v in the current local structure neighborhood node.
[0084] (6) Extraction of domain name propagation evolution features, such as Figure 3 As shown, the specific implementation is as follows:
[0085] a) In order to further capture the malicious domain name propagation evolution pattern in multiple time snapshot graphs, the present invention uses a recurrent neural network to extract the propagation evolution features of the intermediate representation of the domain name node extracted in the previous step.
[0086] b) The input of this layer is the representation sequence of a specific node v in different time windows. For each node v, the present invention defines the input as T is the total number of time snapshot windows, and the output layer is a new node representation of node v containing the context representation of each time snapshot window.
[0087] c) Using the position embedding method to capture the snapshot order information of the time snapshot evolution module, {p 1 ,…,p T}, combining the snapshot window order information with the structural neighborhood information to obtain a node representation sequence containing order information
[0088] d) Use a recurrent neural network to finally get the final representation of the node
[0089] (7) Malicious domain name detection, the specific implementation method is as follows:
[0090] a) Use the domain name blacklist to mark malicious domain names in the dataset and construct a training set. Use the SOFTMAX classifier to classify malicious domain name data.
[0091] b) Use the trained neural network classifier to detect the domain name data of the test set and detect malicious domain names.
[0092] The scalable malicious domain name detection system using the domain name dynamic time evolution diagram disclosed by the present invention is deployed and implemented according to the above steps of the method, using C and Python as the background program development language and CSV as the data storage method.
[0093] This system consists of a noise preprocessing module, a domain name time snapshot graph construction module, a domain name structure neighborhood information extraction module, a domain name time evolution module, and a domain name classification training detection module. The specific description is as follows:
[0094] (1) Noise preprocessing module. This module parses DNS traffic and filters the following domain names to improve detection performance and effect: whitelist filtering, one-time domain name filtering, public service domains, cloud servers, and popular content delivery networks.
[0095] (2) Domain name time snapshot graph construction module: This module divides the resolved domain name request sequence into multiple time window data at time intervals, and iteratively accumulates the domain name request sequence data within the event window into a domain name request graph.
[0096] (3) Domain name graph cutting module: This module uses an increasing threshold and iterative cutting method to cut the domain name node edges with weak associations (low client sharing) in the domain name graph.
[0097] (4) Domain name structural neighborhood information extraction module: This module is responsible for calculating the structural neighborhood representation of each domain name node in the stacked single time window through the structural neighborhood node.
[0098] (5) Domain name time evolution module. This module uses the recurrent neural network GRU to capture the propagation evolution of the graph structure over multiple time windows.
[0099] (6) Domain name classification training and detection module. This module is divided into a training module and a detection module. The training module uses the propagation evolution graph of the marked malicious domain name nodes in the DNS request flow as the graph evolution training data of the malicious domain name to train the malicious domain name classifier; the detection module uses the trained classifier to classify unknown domain names.
[0100] In summary, the present invention not only uses the local association structure information of each domain name node in the time snapshot, but also uses the time evolution characteristics of the node edge as the global change information. The subgraph features of specific shapes in the time snapshot can well distinguish the propagation evolution of malicious domain name nodes as the subgraph evolves in each time snapshot. It aims at the problem that newly registered malicious domain name nodes have few associations with suspicious domain names just after being registered or at the beginning of the propagation stage, sparse access, lack of useful information and cannot establish effective associations. It combines the node attribute characteristics of the domain name through the two dimensions of structural neighborhood information and time neighborhood, calculates the representation of the node, and learns the potential high-order features of the domain name in different time snapshots. Use the marked malicious domain names to classify the evolved embedding representation of the nodes and detect malicious domain names.
[0101] Example
[0102] This example uses two days of DNS traffic data from a large ISP network for experiments. DNS data from the ISP recursive server was collected from December 7 to December 8, 2019. 1.5T data volume per day, 800 million data volume per hour, including various types of DNS records. Due to the limitations of storage space and computing resources, the present invention samples 1 / 10 of the ratio every hour, for a total of 4 times. The parameters mainly involved in the system proposed in the present invention mainly include the time snapshot cutting threshold and some hyperparameters of GCN and RNN. The present invention uses the validation set to adjust the hyperparameters and reports the test results under the best result parameters of the validation set. The time snapshot cutting threshold parameter of the present invention is 10 minutes, 30 minutes and 60 minutes as optional parameters. The experiment uses the standard 5-Fold cross-validation method to evaluate the experimental effect. First, the training data set is randomly and evenly divided into 5 parts, of which 3 parts are used as training sets, 1 part is used as a validation set, and the remaining 1 part is used as a test set, and finally the detection effect on the test set is obtained. Repeat this 5 times, and the average result of 5 times is used as the final experimental result of this set of parameters.
[0103] The experimental example compares the detection effects of GAT and NODE2VEC algorithms on the training set data through 5-Fold cross validation under these sets of parameter settings. As shown in Table 1, the model of the present invention can achieve an average true positive rate of 96.72% and an accuracy of 96.94%. NODE2VEC can achieve an average true positive rate of 91.3% and an accuracy of 93.9%. FANCI can achieve an average true positive rate of 91% and an accuracy of 93.9%. Therefore, the classification detection algorithm of the model of the present invention can effectively detect malicious domain names.
[0104] Table 1 Test results
[0105]
[0106]
[0107] Finally, it should be noted that the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
Claims
1. A method for detecting malicious domain names based on a dynamic evolution graph, the steps of which include: Divide the DNS traffic into different time snapshot windows t to construct T domain name request graphs, where the nodes in the domain name request graph are the requested domain names, and the edges are the relationships between the requested domain names. For the neighborhood structure information of each node, the k-hop neighborhood of the node is used as the receptive field of the graph convolutional network. Extract features from the high-order local neighborhood of each node to calculate the intermediate representation of the node in each domain name request graph, and calculate the time span feature of each node in the time snapshot window t in each domain name request graph based on the receiving field; wherein, calculating the time span feature of each node in the time snapshot window t in each domain name request graph based on the receiving field includes: Based on the longest time minus the shortest time of the vertex set of the node set within k hops and the time distribution of k hops, calculate the time distance distribution of k hops in the time snapshot window t; The time distance distribution is used as the time span feature of the corresponding node in the time snapshot window t; Based on the intermediate representation and the time span feature, the node propagation evolution feature is extracted in all domain name request graphs to obtain the final representation of each requested domain name; wherein, based on the intermediate representation and the time span feature, the node propagation evolution feature is extracted in all domain name request graphs to obtain the final representation of each requested domain name, including: Get the intermediate representation sequence of each node v T is the total number of time snapshot windows; Based on the intermediate representation sequence Get the structural neighborhood information of node v containing the context representation of each time snapshot window Using the position embedding method to capture the time snapshot window order information 1 ,…,p T }; The snapshot window sequence information {p 1 ,…,p T } and structural neighborhood information Combined, we get a node representation sequence containing sequential information The nodes with sequential information represent the sequence Input the recurrent neural network to obtain the final representation of each requested domain name The classification finally indicates that the malicious domain name detection results of each requested domain name are obtained.
2. The method according to claim 1, characterized in that The DNS traffic is divided into different time snapshot windows t to construct T domain name request graphs, including: Parse DNS traffic and obtain request records, where the request records include: source client, request domain name and request time; According to the request time, the time interval between different domain name requests in each source client is calculated, and the request domain names whose time interval is greater than the first set threshold are divided into different time snapshot windows t; Each requested domain name assigned to the time snapshot window t is regarded as a node of the domain name request graph; In the time snapshot window t, if two domain names are accessed by the same source client or resolved to the same address, there is an edge connection between the corresponding nodes, and the weight of the edge is obtained by calculating the number of the same source clients or the number of resolved addresses; A domain name request graph is constructed based on the nodes and the edges with set weights.
3. The method according to claim 2, characterized in that When resolving DNS traffic, the requested domain names obtained are filtered through whitelist filtering, one-time domain name filtering, filtering public service domains, filtering cloud servers, and filtering popular content delivery networks.
4. The method according to claim 2, characterized in that The method of dividing the DNS traffic into different time snapshot windows t to construct T domain name request graphs further includes: Calculate the client sharing degree, number of clients and number of queries corresponding to each edge; If the client sharing degree is less than the second set threshold, the number of clients is less than the third set threshold, or the number of queries is less than the fourth set threshold, the edge is cut, and an increasing threshold and iterative cutting are used in the cutting process; After all the edges in the domain name request graph are processed, the processed domain name request graph is used as the domain name request graph.
5. The method according to claim 1, characterized in that The extracting features from the high-order local neighborhood of each node to calculate the intermediate representation of the node in each domain name request graph includes: Use multiple stacked graph convolutional networks to build a feature extraction network; Establish a domain name request graph collection; The domain name request graph set is input into the feature extraction network to obtain an intermediate representation of the nodes in each domain name request graph.
6. The method according to claim 1, characterized in that The method of classifying the final representation includes: using a SOFTMAX classifier.
7. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.
