Semi-supervised malicious domain name detection method and system based on meta-pseudo tag
By constructing a domain name association graph and a meta-pseudo-label framework, the problem of existing technology being unable to detect malicious domain names of isolated nodes and ignoring unlabeled data is solved, and efficient detection of malicious domain names is achieved.
Patent Information
- Application Number
- CN202410715623.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-13
AI Technical Summary
Existing malicious domain name detection methods cannot effectively detect malicious domain names in isolated nodes and ignore potential information in unlabeled data.
A semi-supervised learning method based on meta-pseudo-labels is adopted. By constructing a domain name association graph and using the meta-pseudo-label framework of the teacher network and student network, pseudo-labels are generated and model parameters are optimized, and malicious domain names are detected based on domain name characteristics.
It can detect malicious domain names hidden in isolated nodes, make full use of the information in unlabeled data, and improve the accuracy and generalization ability of malicious domain name detection.
Smart Images

Figure CN118646570A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network security, and in particular relates to a semi-supervised malicious domain name detection method and system based on meta-pseudo-labels. Background Art
[0002] DNS (Domain Name System) is one of the most important infrastructures of the Internet. It can convert easy-to-remember domain names into IP addresses, including a distributed database composed of DNS servers, to locate Internet resources. Due to the important position of DNS in the Internet, it has become an important attack vector for cybercrimes such as spam, phishing and malware. Therefore, malicious domain name detection is one of the hot topics in network security research.
[0003] Existing malicious domain name detection methods include rule-based methods, feature-based methods, and association-based methods.
[0004] The rule-based method is the most traditional and widely used method for detecting malicious domain names. This type of method mainly relies on expert domain knowledge to detect malicious domain names. Sato et al. [1] After analysis, it was found that if two domain names are often requested for resolution by the same user and one of them is a malicious domain name, then the other domain name is likely to be a malicious domain name as well. Grill et al. [2] The study of the principle of Domain-Flux technology found that the infected host can resolve a large number of domain names in a short period of time, but does not access the corresponding number of IPs. The author modeled the ratio between the DNS requests issued by each host and the accessed IPs, used the Fuzz equation and set a threshold to identify malicious domain names, and achieved good results on the test data set. However, this type of method relies heavily on the experience of experts in the field, can only detect a certain type of malicious domain names, and has poor generalization ability.
[0005] Feature-based methods extract domain name features from DNS traffic data, DNS logs, or other DNS-related data, and then build a classifier to classify the domain name. [3] They designed a dynamic and comprehensive DNS evaluation system Notos, and extracted three types of domain name features: network-based features, domain-based features, and evidence-based features. Based on these features and historical malicious data, Notos assigns low reputation scores to malicious domain names and high reputation scores to benign domain names. Experiments show that Notos can even identify malicious domain names that appear on the blacklist one month later. Bilge et al. [4] An online malicious domain name detection system Exposure was proposed, which extracts four types of domain name features, namely time-based, DNS response-based, TTL-based, and domain name text information-based. [5]The FANCI system is proposed to classify non-existent domain names (NXDomain) in DNS traffic into malicious domain names and benign domain names. The system only extracts features from the domain name itself, including 21 features in three categories: structural features of the domain name, linguistic features of the domain name, and statistical features of the domain name. It then uses machine learning methods such as SVM and RF to classify the domain names, and can achieve high accuracy on multiple real networks. Compared with the above-mentioned feature-based malicious domain name detection methods, the FANCI system only requires the text information of the domain name and consumes less training time. Feature-based malicious domain name detection methods require corresponding domain knowledge because they need to extract feature information, and the designed features are easily modified by attackers.
[0006] Association-based methods use the associations between domain names to transform the malicious domain name detection problem into a graph node classification problem. [6] Construct a host-domain bipartite graph, annotate the graph nodes with known malicious domain names and infected hosts, and then use the belief propagation algorithm to calculate the probability that the domain name is a malicious domain name. Khalil [7] It is believed that attackers tend to reuse IP address resources, establish a domain name-IP domain name resolution graph, and use path reasoning algorithms to detect malicious domain names. Due to the limitations of the bipartite graph, DNS scenarios cannot be fully explored. Sun [8] The Deepdom malicious domain name detection system is proposed. The DNS scenario is modeled as a heterogeneous information network, which includes four types of nodes: host, domain name, IP address, and account. A graph convolutional network SHetGCN is designed to learn node embedding and implement node classification. The results of the real CERNET2 dataset show that SHetGCN is better than some current mainstream heterogeneous graph embedding methods. The association-based method can effectively prevent attackers from evading detection by forging features, and has achieved certain detection results. However, this type of method still faces the following two problems:
[0007] 1. Unable to detect malicious domain names hidden in isolated nodes: Figure 1 As shown in the figure, there are many isolated domain name nodes in the real DNS traffic. The association-based malicious domain name detection method deletes them to avoid affecting the knowledge propagation on the graph, which results in the loss of a large amount of domain name information during training and the inability to detect malicious domain names in isolated nodes.
[0008] 2. Ignoring potential information in unlabeled data: When labeling domain names, domain names that appear in the whitelist are labeled as benign domain names, and domain names that appear in the blacklist are labeled as malicious domain names. Since the number of domain names included in the blacklist and whitelist is limited, the labels of most domain names are unknown. The training data of the association-based method relies on the labeled data in the association graph to improve the detection effect of the model, ignoring a large amount of information hidden in the unlabeled data. Summary of the invention
[0009] The purpose of the present invention is to propose a semi-supervised malicious domain name detection method and system based on meta-pseudo-labels, which can detect malicious domain names hidden in isolated nodes.
[0010] The technical solution adopted by the present invention to achieve the above-mentioned purpose is as follows:
[0011] A semi-supervised malicious domain name detection method based on meta pseudo-labels includes the following steps:
[0012] Extract the association between domain names from DNS traffic;
[0013] A domain name association graph is established with the domain names having the above association relationships and the isolated domain names as nodes and the association relationships as edges;
[0014] Extract domain name features and use them as initialization vectors for nodes in the domain name association graph;
[0015] All isolated domain name nodes in the domain name association graph and some benign and malicious domain names with the above association relationships are marked with real labels to obtain gold label nodes;
[0016] The training set is composed of gold-labeled nodes and the remaining unlabeled nodes, which are input into the pseudo-label generator as the teacher network to infer the pseudo-labels on the unlabeled nodes and obtain the pseudo-labeled nodes;
[0017] Input the gold label nodes and pseudo label nodes into the domain name classifier as the student network to predict the benign domain names and malicious domain names;
[0018] By performing cyclic iterative training on the pseudo-label generator and the domain name classifier, the inner loop parameters of the domain name classifier and the outer loop parameters of the pseudo-label generator are optimized;
[0019] Use the trained domain name classifier to detect malicious domain names in network DNS traffic.
[0020] Furthermore, the association relationship between domain names includes query association, resolution association and CNAME association.
[0021] Furthermore, the domain name association graph is pruned to remove nodes and edges corresponding to popular domain names, inactive domain names, and single-point domain names.
[0022] Furthermore, the character features of domain names include three categories: structural features, semantic features and statistical features.
[0023] Furthermore, the pseudo-label generator infers the pseudo-labels of unlabeled nodes based on the adaptive label propagation algorithm ALP.
[0024] Furthermore, the inner loop parameters are updated based on the computational loss of the domain classifier on the pseudo-labeled nodes.
[0025] Furthermore, the outer loop parameters are updated based on the computational loss of the pseudo-label generator on the gold-labeled nodes.
[0026] A semi-supervised malicious domain name detection system based on meta-pseudo-tags comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0027] The present invention has the advantages that:
[0028] 1. The present invention extracts information such as domain names, clients and IP addresses from DNS traffic, and uses the associations between them to construct a semantically rich domain name association graph. The present invention retains isolated domain name nodes in DNS data in the data set, and can detect malicious domain names hidden in isolated nodes.
[0029] 2. In order to make full use of the rich information hidden in unlabeled data, a meta-pseudo-label framework is introduced to perform semi-supervised classification of domain names. The pseudo-label generator in the outer loop uses a large number of unlabeled nodes to encode the structural information in the association graph into pseudo-labels; the domain classifier in the inner loop evaluates the generation effect of the pseudo-labels and feeds them back to the pseudo-label generator. The pseudo-label generator and the domain classifier are updated alternately until the model converges. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a correlation diagram based on DNS traffic.
[0031] Figure 2 It is an overall architecture diagram of a semi-supervised malicious domain name detection method based on meta-pseudo-tags of the present invention.
[0032] Figure 3 is the ROC curve diagram of the present invention and the baseline method.
[0033] Figure 4A It is the confusion matrix diagram of the IpDom method when the label ratio is 10%.
[0034] Figure 4B It is the confusion matrix diagram of DeepDom method when the label ratio is 10%.
[0035] Figure 4C This is the confusion matrix diagram of the SemiDom method when the label ratio is 10%.
[0036] Figure 5 It is a graph of experimental results of the present invention under different label ratios.
[0037] Figure 6It is a diagram of the ablation experiment results of the present invention.
[0038] Figure 7 It is a hyperparameter sensitivity analysis diagram of the present invention. DETAILED DESCRIPTION
[0039] In order to make the various technical features and advantages or technical effects in the above technical solutions of the present invention more obvious and easy to understand, they are described in detail below with reference to the accompanying drawings.
[0040] The embodiment of the present invention provides a semi-supervised malicious domain name detection method based on pseudo-meta tags. The overall framework is as follows: Figure 2 As shown. It includes two parts: domain name association graph construction and semi-supervised classification. In the association graph construction, the present invention constructs the domain name association graph based on DNS traffic, and retains the isolated domain name nodes in the DNS traffic. In the semi-supervised classification, the present invention introduces a meta-pseudo-label framework including a teacher network and a student network to complete semi-supervised malicious domain name detection. Specifically, the present invention extracts information such as domain names, clients and IP addresses from DNS traffic, constructs a semantically rich domain name association graph using the association relationship between them, and retains a large number of isolated domain names that are not associated in the data set. The present invention introduces a meta-pseudo-label framework composed of a teacher network (pseudo-label generator) and a student network (domain name classifier). The pseudo-label generator uses an adaptive label propagation algorithm to infer pseudo-labels on unlabeled nodes in the domain name association graph. The domain name classifier evaluates the effect of pseudo-label generation. The pseudo-label generator adjusts the label propagation strategy based on the feedback of the domain name classifier to generate more accurate pseudo-labels. When converged, the pseudo-label data can effectively enhance the existing label data and help the domain name classifier convert structural features and node attribute features into domain name labels.
[0041] The processing process of the method of the present invention is described in detail as follows:
[0042] 1. Construction of Domain Name Association Graph
[0043] DNS traffic contains rich information such as query request, response, query type, query result, timestamp, etc. Figure 2 As shown in part (a) of FIG. 1 , the present invention extracts query associations, resolution associations, and CNAME associations between domain names, and uses these three associations to construct rich edges between domain name nodes. The specific rules are as follows:
[0044] 1. Query association: If two domain names have been requested by a client, there is an edge between the two domain names. This is because the attacked clients tend to query malicious domain names, while normal users usually request benign domain names.
[0045] 2. Resolution association: If two domain names are resolved to the same IP address, there is an edge between the two domain names. This is because domain names that are resolved to the same IP address are often registered by the same entity, and are either benign or malicious.
[0046] 3. CNAME association: There is a connection between a domain name and its CNAME domain name, and they usually belong to the same category.
[0047] As long as any of the above associations exist between two domain name nodes, an edge between them is constructed. It is worth noting that in real DNS traffic, not all domain names can establish connections with other domain names based on the above three associations, and most domain names are isolated. Unlike other association-based malicious domain name detection methods, in order to be able to detect malicious domain names in isolated nodes, the present invention retains isolated domain name nodes in the data set.
[0048] The real DNS traffic is full of a large number of noise nodes, which provide limited information, generate very few edges in the association graph, and contribute little to the message propagation on the graph. In addition, the existence of these noise nodes also adds additional computational complexity and processing pressure, making the analysis and processing of the association graph more difficult. In order to optimize the structure of the association graph, improve the efficiency and accuracy of information dissemination, and reduce the computational burden, the present invention specifically proposes a pruning strategy for the following three domain names to prune the domain name association graph and remove the relevant nodes and edges of these three domain names.
[0049] 1. Popular domain names: These domain names have been requested by more than T% of clients and tend to be benign domain names, such as the frequently visited query domain name www.baidu.com. Once these popular domain names are maliciously attacked, they will be immediately detected by the security management system, so the possibility that these domain names are malicious domain names is very low.
[0050] 2. Inactive domains: These domains have fewer visits than Q times, generate very few edges in the association graph, and lack valuable information.
[0051] 3. Single-point domain names: These domain names can only be resolved to one IP address, usually some unimportant, temporary or testing domain names.
[0052] After pruning, a semantically rich domain name association graph is obtained. For the domain name nodes on the domain name association graph, the present invention extracts the features of the domain name as the node initialization with reference to FANCI. Specifically, the present invention extracts 21 features as the initialization vector of the domain name, and the dimension of each feature is 41 dimensions. The following table lists the main features, including structural features such as domain name character length, semantic features such as digital ratio, and statistical features such as n-gram frequency distribution.
[0053] Table 1 Domain name feature table
[0054]
[0055] 2. Semi-supervised malicious domain name classification
[0056] like Figure 2 As shown in part (b) of Figure 1, the semi-supervised classification of malicious domain names relies on a meta-pseudo-labeling framework, which includes a pseudo-label generator as a teacher network and a domain classifier as a student network. The pseudo-label generator infers pseudo-labels on unlabeled nodes to guide the domain classifier, and it continuously adjusts its label propagation strategy based on the performance feedback of the student network on labeled nodes. Enhancing the pseudo-label generator's ability to generate pseudo-labels requires the use of training data, in which all isolated nodes in the domain association graph are The malicious and benign domain names of some nodes with associated relationships are manually labeled to obtain nodes with real labels, which are called gold label nodes in this invention. (See Figure 2 The solid red nodes and green nodes in the figure), and the remaining nodes are unlabeled nodes (See Figure 2 The pseudo-label generator predicts the labels of malicious and benign domain names for the unlabeled nodes in the training data and obtains pseudo-labeled nodes (see Figure 2 The dashed red nodes and dashed green nodes in the figure).
[0057] 1. Pseudo label generator (teacher):
[0058] In order to make the label information of domain names more widely used in association graphs, the present invention uses label propagation to learn the structural knowledge of graphs. Label propagation follows the principle of homogeneity, that is, two nodes with edges tend to have similar labels. Specifically, the goal of label propagation is to obtain a smooth predicted label matrix on the graph based on the existing label matrix Y. It makes other nodes near the node have similar soft labels. It can be solved by the following formula:
[0059]
[0060] in, Indicates that the prediction matrix is equal to the initial label matrix, i.e., the true label matrix, in the first round of iteration; k represents the propagation step, and T represents the transfer matrix, which can be any form of normalized connection matrix. After K iterations, the predicted label matrix The label knowledge of the neighborhood within the K-hop range can be captured. In order to adaptively balance the label information of each node from different neighborhoods and enhance the expressive ability of the entire semi-supervised model to learn the real-world DNS domain name association graph, the present invention constructs a pseudo label generator It is based on the adaptive label propagation algorithm ALP [9] To infer the pseudo labels of unlabeled nodes. The propagation strategy (i.e., inferring pseudo labels) can be described as follows:
[0061]
[0062] Among them, γ ik Represents the k-order neighbor node to node v i The influence of , which can be calculated by the following attention mechanism:
[0063]
[0064] in, and are the learnable attention vector and weight matrix respectively, c refers to the number of labels, and n refers to the number of nodes. represents the c-dimensional vector space over the real number field, is a c×c dimensional vector space over the real number field. After K iterations, Learn a smooth prediction label matrix It can adjust the influence of each node on label propagation and capture rich structural information on the graph.
[0065] 2.Domain Classifier (Student):
[0066] In encoding the structural knowledge of the domain name association graph into a prediction label matrix Afterwards, the present invention constructs a domain name classifier f θ Convert the node features of the domain name into node labels. θ The process of predicting labels can be described as:
[0067] P i ,:=f θ (X i ,:)
[0068] Among them, f θ It is a multi-layer perceptron with a softmax function added, X i is the domain name feature composed of gold label nodes and pseudo label nodes, P i is node v i The predicted label of .
[0069] 3. Double-layer optimization of parameters:
[0070] In order to enable the pseudo-label generator to learn a better label propagation strategy, the present invention constructs a double-layer loop to optimize parameters. Ideally, if the quality of the pseudo-labels generated for unlabeled nodes is high enough, they can be used for data enhancement, avoid model overfitting, and improve the generalization ability of the model. At the same time, high-quality pseudo-label data not only encodes the attribute characteristics of the domain name but also carries rich structural knowledge, enabling the domain name classifier to utilize a larger receptive field without reducing detection performance. High-quality pseudo-label data should have the same contribution as gold label data. Therefore, the present invention can derive the following parameter optimization objectives: the pseudo-labels generated by the pseudo-label generator should maximize the performance of the domain name classifier on the gold label nodes. This is a double-layer optimization problem with φ as the outer loop parameter and θ as the inner loop parameter. Specifically, let is the cross entropy loss for node classification. The two-level optimization problem can be expressed as follows:
[0071] Outer loop:
[0072]
[0073] Inner loop:
[0074]
[0075] in, It is the symbol of mathematical expectation, and argmin represents the variable value when the objective function takes the minimum value.
[0076] Considering the computational cost, in order to find the approximate optimal solution θ * (φ), the present invention performs a one-step gradient descent update on θ instead of completely solving the optimization parameters of the inner loop. This approach allows the optimization algorithm to alternately update the parameters of the domain name classifier in the inner loop and the parameters of the pseudo-label generator in the outer loop.
[0077] (1) Inner loop (student) parameter update: For the unlabeled nodes in the domain name association graph The present invention uses the pseudo-label generated by the pseudo-label generator as the "ground-truth" (standard answer). The present invention uses its true label as the “ground-truth” and updates the parameter θ according to the following formula:
[0078]
[0079] Among them, J pseudo (θ, φ) represents the computational loss of the domain classifier on the pseudo-labeled nodes, η θ Represents the learning rate of the domain classifier.
[0080] (2) Outer loop (teacher) parameter update: In order to test the effect of the domain classifier, a batch of gold label nodes are sampled in the dataset and the parameter φ is updated according to the following formula:
[0081]
[0082] Among them, η φ is the learning rate of the outer loop, J gold (θ′(φ)) is the loss calculated by the pseudo-label generator on the gold label node, which is used for backpropagation to calculate the gradient of the domain classifier. To further calculate the gradient of φ, apply the chain rule through θ′ to J according to the following formula gold Differentiate (θ′(φ)):
[0083]
[0084] in, ∈ is a small scalar for the finite difference approximation.
[0085] The training process of the present invention can be expressed as the following algorithm:
[0086]
[0087] After the domain name classifier is trained, it can be used to detect malicious domain names in DNS traffic. The process is basically the same as above, that is, obtaining network DNS traffic, then building a domain name association graph, and then using the trained domain name classifier to classify the nodes in the graph and predict the malicious domain names.
[0088] Experimental test:
[0089] This test used the following data sets, comparison methods, experimental configurations, and evaluation indicators used in subsequent experiments.
[0090] 1) Dataset
[0091] In order to evaluate the performance of the technical solution of the present invention (hereinafter referred to as SemiDom), this test collected real DNS traffic data for fourteen days from August 31, 2020 to September 13, 2020, and constructed a semantically rich association graph according to the association graph construction rules and pruning strategies, and retained the isolated nodes in the data set. The final constructed data set contains 101,023 isolated nodes, 104,583 associated nodes, and 117,990 edges. In order to classify and annotate the domain names in the data set, this test used the whitelist Alexatop 1M to annotate 151,164 benign domain names, and used the third-party authoritative blacklist shown in Table 2 to annotate 54,442 malicious domain names.
[0092] Table 2 Domain blacklist statistics
[0093]
[0094] 2) Comparison method:
[0095] To verify the effectiveness of SemiDom, this test compared it with the following five baseline methods:
[0096] 1.LP
[10] : It is a classic semi-supervised learning method, which believes that similar samples with closer distances in the sample space are more likely to have the same label. LP only uses the structural information of the data set and does not consider the attribute characteristics of the sample.
[0097] 2. GCN
[11] : It is a classic homogeneous graph neural network. It is based on the adjacency matrix and node feature matrix of the graph structure. It learns node representation through aggregation and convolution operations of neighbor node features, thus solving the problem of unstructured data that traditional neural networks cannot handle.
[0098] 3. FANCI: It analyzes the domain name string, extracts a total of 41 domain name features from three aspects: structural features, semantic features, and statistical features, and uses SVM and RM to classify domain names.
[0099] 4.IpDom
[12] :This is a homogeneous graph malicious domain name detection method based on the association between domain names and IP addresses, PDNS features and domain name character features, referred to as IpDom. IpDom establishes meaningful associations in passive DNS data and learns low-dimensional vector representations of domain names through an improved graph embedding algorithm DeepWalk.
[0100] 5. DeepDom: It is one of the most advanced malicious domain name detection methods based on heterogeneous graphs. It represents the DNS scenario as a heterogeneous graph with different entities, uses short random walks based on meta-paths to guide convolution operations, and completes malicious domain name detection by considering both structural features and attribute features.
[0101] 3) Experimental configuration:
[0102] All experiments in this test were run on a GPU configured as Tesla V100 PCIe 16GB, and the server system model was CentOS Linux release 7.8.2003. SemiDom was implemented based on PyTorch version 1.9, and the number of iterations was set to 200. For the pseudo-label generator, the label propagation step K was set to 10 and the learning rate was set to 5×10 -4 For the domain name classifier, the graph neural network is set to 2 layers and the learning rate is set to 1×10-3 . For the graph pruning strategy, Q is set to 5 and T is set to 60. For the feature-based method FANCI, random forest is used as the classifier, the number of decision trees is set to 200, and the maximum depth is 8. For the homogeneous graph-based method IpDom, the resolution relationship between IP addresses and domain names is extracted from DNS traffic to construct a bipartite graph, and the random walk sequence length of DeepWalk is set to 8. For the heterogeneous graph-based method DeepDom, this test considers three meta-paths (domain name-client-domain name, domain name-IP address-domain name, domain name-domain name) to construct a heterogeneous graph. In order to make a fair comparison, the input data of all methods retain the same number of isolated nodes. In order to verify the robustness of SemiDom under different label ratios, all comparison methods conducted three sets of experiments with the label ratio set to 10%, 30%, and 50%.
[0103] 4) Evaluation indicators
[0104] In order to comprehensively and accurately evaluate the performance of the model, this test uses multiple standard indicators, including precision (P), recall (R), and F1 value. These indicators reflect the performance of the model in the classification task from different dimensions, which helps us to have a deeper understanding of the performance characteristics of the model. In addition, in order to intuitively show the classification effect of the model, this test draws the ROC curve and comprehensively evaluates the performance of the binary classification model by calculating the area under the curve AUC. The closer the AUC value is to 1, the better the classification performance of the model; an AUC value of 0.5 means that the classification effect of the model is no different from random classification. For the three association-based malicious domain name classification methods IpDom, DeepDom, and SemiDom, this test introduces the confusion matrix as an evaluation tool. The confusion matrix visualizes the classification of benign and malicious domain names by the model, and the performance of the model in each classification can be intuitively observed. In the confusion matrix, the depth of the color represents the number of samples in the module, the elements on the positive diagonal represent the number of correct classifications by the model (true positives TP and true negatives TN), and the elements on the negative diagonal represent the number of incorrect classifications by the model (false positives FP and false negatives FN). These indicators provide a detailed analysis of the classification results, which helps to deeply understand the performance of the model and provide guidance for subsequent model optimization.
[0105] (III) Positive effects
[0106] Based on the above comparative experiments, the overall performance of each method was analyzed, an ablation experiment was set up to explore the effectiveness of the key components in the present invention, and a hyperparameter sensitivity analysis experiment was performed to determine the optimal parameter settings.
[0107] 1) Overall performance
[0108] For each method, this test uses 10%, 30% and 50% of the training set for three independent experiments. Table 3 shows the experimental results of various methods, among which the best experimental results are marked in bold. Figure 3 Shows the ROC curves of different models when the label ratio is 10%.
[0109] Table 3 Comparison of malicious domain name detection methods
[0110]
[0111] Based on this information, this test can draw the following conclusions:
[0112] 1. Compared with the structure-based LP and feature-based FANCI methods, SemiDom shows significant advantages. This is attributed to the fact that SemiDom can more comprehensively integrate the attribute features and structural knowledge of domain names, thereby achieving more accurate malicious domain name detection.
[0113] 2. Compared with IpDom, SemiDom has better performance. This is because when SemiDom processes real DNS traffic, it retains nodes that are not associated with other DNS entities, thereby effectively detecting malicious domain names hidden in these isolated nodes.
[0114] 3. Compared with GCN and DeepDom, SemiDom shows better performance. This is because GCN and DeepDom mainly rely on a large amount of labeled data to improve the model effect, but ignore the rich information contained in unlabeled data. SemiDom adopts a semi-supervised learning paradigm, which can more effectively utilize these unlabeled data and improve the detection performance of malicious domain names.
[0115] also, Figures 4A-4C The confusion matrix of three association-based malicious domain name detection systems when the label ratio is 10% is shown. The confusion matrix visualizes the misclassification of benign and malicious domain names by each method. When there is less labeled data, SemiDom has the least misclassification among the four methods.
[0116] To further verify the performance of SemiDom, the following analysis was also performed in this test:
[0117] 1. SemiDom detection performance with different label ratios: Figure 5The experimental results of SemiDom under different label ratios are shown. It can be seen that even with only 10% labeled data, SemiDom's performance is significantly better than the baseline method, which verifies that SemiDom has the ability to learn knowledge from unlabeled data. In addition, as the proportion of labeled data increases, SemiDom's classification performance improves, indicating that SemiDom can achieve better detection results on datasets with more labeled data.
[0118] 2. SemiDom detection performance at 50% label ratio: This test also designed a set of experiments, that is, all supervised learning comparison methods were trained on the complete training set, while SemiDom was only trained on 50% of the training set. The comparison results are shown in Table 4. It can be seen that SemiDom can achieve detection results that are superior to other methods using only half of the label data, which fully verifies the effectiveness of SemiDom in semi-supervised scenarios.
[0119] Table 4 Comparison of malicious domain name detection systems
[0120]
[0121] In summary, compared with other methods, SemiDom proposed in the present invention has significant advantages. It comprehensively considers the various associations between domain names and other DNS entities, and constructs a semantically rich domain name association graph, thereby more comprehensively capturing the attributes and structural characteristics of domain names. In addition, when processing real DNS traffic, SemiDom can retain isolated domain name nodes and effectively detect malicious domain names hidden in isolated nodes. This feature makes SemiDom more advantageous in detecting malicious domain names in complex network environments. At the same time, SemiDom uses a semi-supervised learning paradigm for model training, which reduces dependence on large amounts of labeled data and improves the practicability of the method.
[0122] 2) Ablation experiment
[0123] To verify the effectiveness of the design in SemiDom, this test proposes two variants of SemiDom and conducts ablation experiments in a setting with a label ratio of 10%.
[0124] 1. w / o γik: In order to verify the effectiveness of the attention mechanism in the adaptive label propagation algorithm, this test removes the attention parameter γik in the pseudo-label generator and uses the traditional LP algorithm to generate pseudo-labels.
[0125] 2. w / o ALP: In order to verify the enhancement effect of the pseudo-label generator on the domain name classifier, this test removed the pseudo-label generator of SemiDom and used labeled domain name nodes to train the domain name classifier.
[0126] The experimental results are as follows Figure 6 As shown in the figure, when the number of labeled data is limited, SemiDom performs better than w / oγik. This is because the label propagation algorithm with the attention parameter γik can adaptively adjust the label weight of each neighborhood node, thereby inferring more accurate pseudo labels and achieving effective data enhancement. In addition, SemiDom has obvious advantages over w / o ALP. This is because the pseudo-label generator generates pseudo labels for unlabeled nodes, thereby effectively increasing the labeled data, while w / o ALP can only learn limited knowledge from labeled data. Moreover, the pseudo-labels generated based on the labels of adjacent nodes encode the structural information of the domain name association graph, while w / o ALP can only learn the attribute knowledge of the domain name nodes.
[0127] 3) Hyperparameter sensitivity analysis
[0128] The number of label propagation iterations K determines the number of times label information is propagated and updated in the network. This test performs a parameter sensitivity analysis on the number of label propagation iterations K in the pseudo label generator. The test results are as follows: Figure 7 As shown in the figure, the performance of the model is significantly improved as the number of iterations increases from K = 2 to K = 10. However, after reaching K = 10, the performance gain from continuing to increase the number of iterations decreases, accompanied by a slowdown in the model convergence speed and the consumption of more computing resources. Considering the detection effect and training cost of the model, this test sets the number of label propagation iterations for all experiments to K = 10.
[0129] References:
[0130] [1]Sato K,Ishibashi K,Toyono T,et al.Extending black domain name listby using co-occurrence relation between dns queries[J].IEICE transactions oncommunications,2012,95(3):794-802.
[0131] [2]Grill M,Nikolaev I,Valeros V,et al.Detecting DGA malware usingNetFlow[C] / / 2015 IFIP / IEEE International Symposium on Integrated NetworkManagement(IM).IEEE,2015:1304-1309.
[0132] [3]Antonakakis M,Perdisci R,Dagon D,et al.Building a DynamicReputation System for{DNS}[C] / / 19thUSENIX Security Symposium(USENIX Security10).2010.
[0133] [4]Bilge L,Kirda E,Kruegel C,et al.Exposure:Finding malicious domainsusing passive DNSanalysis[C] / / Ndss.2011:1-17.
[0134] [5]Schüppen S,Teubert D,Herrmann P,et al.{FANCI}:Feature-basedAutomated{NXDomain}Classification and Intelligence[C] / / 27th USENIX SecuritySymposium(USENIX Security 18).2018:1165-1181.
[0136] [6]Manadhata P K,Yadav S,Rao P,et al.Detecting malicious domains viagraph inference[C] / / EuropeanSymposium on Research in ComputerSecurity.Springer,Cham,2014:1-18.
[0137] [7]Khalil I,Yu T,Guan B.Discovering malicious domains through passiveDNS data graphanalysis[C] / / Proceedings of the 11th ACM on Asia Conference onComputer and Communications Security.2016:663-674.
[0139] [8]Sun X,Wang Z,Yang J,et al.Deepdom:Malicious domain detection withscalable and heterogeneousgraph convolutional networks[J].Computers&Security,2020,99:102057.
[0140] [9]Ding K,Wang J,Caverlee J,et al.Meta propagation networks for graphfew-shot semi-supervised learning[C] / / Thirty-Sixth AAAI Conference onArtificial Intelligence,AAAI.AAAIPress,2022:6524-6531.
[0142]
[10] Zhu X,Ghahramani Z.Learning from labeled and unlabeled data withlabel propagation[C] / / Citeseer,2002.
[0144]
[11] Kipftn,Welling M.Semi-supervised classification with graphconvolutional networks[C] / / 5thInternational Conference on LearningRepresentations,ICLR 2017,Toulon,France,April 24-26,2017,Conference TrackProceedings.OpenReview.net,2017.
[0145]
[12] He W,Gou G,Kang C,et al.Malicious domain detection via domainrelationship and graph models[C] / / the 38th International PerformanceComputing and Communications Conference(IPCCC).IEEE,2019:1-8.
[0148] Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Appropriate modifications or equivalent substitutions of the technical solutions of the present invention made by ordinary technicians in the field should all be included in the protection scope of the present invention. The protection scope of the present invention shall be based on what is defined in the claims.
Claims
1. A semi-supervised malicious domain name detection method based on meta-pseudo-labels, characterized in that: The following steps are involved: Extract the association between domain names from DNS traffic; A domain name association graph is established with the domain names having the above association relationships and the isolated domain names as nodes and the association relationships as edges; Extract domain name features and use them as initialization vectors for nodes in the domain name association graph; All isolated domain name nodes in the domain name association graph and some benign and malicious domain names with the above association relationships are marked with real labels to obtain gold label nodes; The training set is composed of gold-labeled nodes and the remaining unlabeled nodes, which are input into the pseudo-label generator as the teacher network to infer the pseudo-labels on the unlabeled nodes and obtain the pseudo-labeled nodes; Input the gold label nodes and pseudo label nodes into the domain name classifier as the student network to predict the benign domain names and malicious domain names; By performing cyclic iterative training on the pseudo-label generator and the domain name classifier, the inner loop parameters of the domain name classifier and the outer loop parameters of the pseudo-label generator are optimized; Use the trained domain name classifier to detect malicious domain names in network DNS traffic.
2. The method according to claim 1, characterized in that The association relationship between domain names includes query association, resolution association and CNAME association.
3. The method according to claim 1, characterized in that The domain name association graph is pruned to remove nodes and edges corresponding to popular domain names, inactive domain names, and single-point domain names.
4. The method according to claim 1, characterized in that The character features of domain names include structural features, semantic features and statistical features.
5. The method according to claim 1, characterized in that The pseudo-label generator infers the pseudo-labels of unlabeled nodes based on the adaptive label propagation algorithm ALP.
6. The method according to claim 1, characterized in that The pseudo-label generator infers the expression of the pseudo-label as: Among them, Y is the existing label matrix, and the first type of iteration is the real label matrix; is the predicted label matrix composed of pseudo labels, γ ik is the k-order neighbor node to node v i The influence coefficient of , a is the learnable attention vector, W is the learnable weight matrix, ReLU is the activation function, and K is the number of iterations.
7. The method according to claim 1, characterized in that The inner loop parameters are updated based on the computational loss of the domain classifier on the pseudo-label node, expressed as: Among them, θ is the inner loop parameter, θ′ is the updated inner loop parameter, η θ is the learning rate of the domain classifier, J pseudo (θ, φ) is the computational loss of the domain classifier on the pseudo-label node, φ is the outer loop parameter, is the differential symbol with respect to θ.
8. The method according to claim 7, characterized in that The outer loop parameters are updated based on the computational loss of the pseudo-label generator on the gold label node, expressed as: Among them, φ′ is the updated outer loop parameter, η φ is the learning rate of the outer loop, J gold (θ′(φ)) is the computational loss of the pseudo-label generator on the gold-labeled node, is the differential symbol with respect to φ.
9. The method according to claim 8, characterized in that Apply the chain rule to J through θ′ according to the following expression gold Differentiate (θ′(φ)): where ∈ is a small scalar for the finite difference approximation, is the differential sign with respect to θ′.
10. A semi-supervised malicious domain name detection system based on meta-pseudo-labels, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 9 when executing the computer program.
Citation Information
Cited By
Bearing fault diagnosis method, device and equipment based on graph convolutional network
CN119004240A
