ICMP hidden tunnel detection method based on game network flow characteristics
By extracting and modeling the ICMP communication data, combining the generative adversarial network and the XGBoost algorithm, the problem of abnormal samples scarcity in ICMP hidden tunnel detection is solved, and the detection effect is achieved with high accuracy and robustness is solved, and the existing The problem of high false alarm rate in technology.
Patent Information
- Application Number
- CN202410943587.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-15
AI Technical Summary
The prior art has problems with high false alarm rate and low detection accuracy when detecting ICMP hidden tunnels in gaming networks. This is mainly due to the scarce abnormal sample data and the difficulty of analyzing ICMP traffic, which makes it impossible to effectively identify hidden tunnels.
By extracting and modeling ICMP communication data, supplementing abnormal sample data using a generative adversarial network model, and combining the XGBoost algorithm, an efficient ICMP hidden tunnel detection method is constructed, feature data tables are extracted, and feature engineering is performed, and XGBoost model is trained to implement Accurate detection.
It realizes high accuracy, robustness and interpretability of ICMP hidden tunnel detection, reduces false positive rate, improves detection accuracy and recognition capabilities, and is suitable for gaming network environments.
Smart Images

Figure CN118972096A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network traffic feature detection, and in particular to an ICMP covert tunnel detection method based on game network traffic features. Background Art
[0002] Network security is an important issue in today's information society, and the gaming industry, as a huge industry chain, also needs to take a series of network security protection measures to protect the security and stability of the gaming system. With the continuous improvement of attack and defense technologies in recent years, more and more attackers on the network use tunneling technology to conceal attack characteristics and invade the intranet of the gaming system by bypassing security protection equipment. The Internet Control Message Protocol (ICMP) is one of the indispensable gaming network communication protocols and is usually used to detect network connectivity. Based on the role of the protocol, network devices such as firewalls and intrusion detection usually do not intercept ICMP protocol-related traffic. Therefore, attackers can encapsulate sensitive information in the payload of ICMP, build ICMP covert tunnels, evade detection by firewalls and intrusion detection systems, and leak information from internal and external networks, which seriously threatens the information security of gaming networks.
[0003] At present, in gaming networks, there are often custom device systems that self-construct ICMP Ping to detect network connectivity. In order to discover and avoid the risks brought by ICMP covert tunnels, the industry uses conventional detection methods to detect and discover ICMP covert tunnels by checking whether the ICMP content data and length comply with the ICMP protocol standard. The transmission identifier and transmission content are obtained by parsing the acquired ICMP traffic message to determine whether the transmission content is messy. If the transmission content is messy, determine whether the request content and response content corresponding to the target transmission identifier are the same. If the request content and response content corresponding to the target transmission identifier are not the same, determine the covert channel communication behavior based on the target transmission identifier.
[0004] If the ICMP protocol is completely disabled in order to avoid the risk of ICMP covert tunnels, it will be impossible to quickly and easily troubleshoot network problems, which is difficult to implement and deploy in a real production environment. The above method of determining whether there is an ICMP covert tunnel by parsing the acquired ICMP traffic message needs to determine whether the transmission content is messy after parsing the transmission identifier and transmission content, but the threshold for determining whether the content is messy is difficult to determine. Therefore, normal transmission content may be judged as messy and abnormal transmission content may be judged as not messy, which affects the accuracy of subsequent judgments on whether there is a covert channel. Using conventional detection methods to check whether the ICMP content data and length comply with the ICMP protocol standard is time-consuming and labor-intensive, has high requirements on equipment performance, and has a high false alarm rate.
[0005] Machine learning technology has been successfully applied to speech recognition, image recognition and other fields, and has achieved good results. However, there are currently few cases where machine learning can be successfully applied in the network security industry, mainly because it is difficult to obtain large amounts of abnormal samples. In the ICMP tunnel detection scenario, the industry also has the problem of scarcity of abnormal sample data, which results in the training model not being able to fit the actual production environment, a high false alarm rate for ICMP tunnel detection, and inaccurate detection results.
[0006] Therefore, to address the above issues, an ICMP covert tunnel detection method based on the characteristics of game network traffic is needed. Summary of the invention
[0007] The purpose of the present invention is to provide an ICMP hidden tunnel detection method based on game network traffic characteristics. The present invention extracts and models features of ICMP communication data, and uses a generative adversarial network model to supplement abnormal sample data, thereby solving the problem of low accuracy of the training model caused by the scarcity of abnormal samples, and combining the advantages of the XGBoost algorithm to achieve effective detection of ICMP hidden tunnels. The detection efficiency of the present invention is more efficient, and the accurate ICMP hidden tunnel traffic detection method achieves higher recognition accuracy and portability.
[0008] The present invention is achieved in that:
[0009] The present invention provides an ICMP covert tunnel detection method based on game network traffic characteristics, which is specifically performed in the following steps:
[0010] S1: parse the game network traffic data, extract the ICMP protocol traffic in the traffic data, simulate the ICMP covert tunnel, mark the ICMP covert tunnel, parse the fields to be analyzed according to the protocol format, and generate structured data;
[0011] Parse the fields to be analyzed according to the protocol format. Specifically, extract the icmp data packets and simulated ICMP covert tunnel data packets according to the icmp protocol. Use the flow extraction tool library flowcontainer to directly import the extract function to obtain structured data.
[0012] S2: Receive the distributed ICMP protocol traffic, extract ICMP related type data, decompose the payload field by bytes to generate a string, construct feature engineering and generate a feature data table; the fields of the feature data table include source IP, destination IP, source port, destination port, protocol, the number of packets whose payload is not empty, the number of all IP data packets, the number of packets whose upstream payload is not empty, the number of packets whose downstream payload is not empty, the maximum upstream payload length, the total upstream payload length, the maximum downstream payload length, the total downstream payload length, the average payload length, the maximum upstream IP packet length, the maximum downstream IP packet length, the average IP packet length, the start time, the end time, the session flow duration, the total payload length, and the total IP packet length.
[0013] S3: The data in the data set are digitized and normalized, and then the processed data set is divided into a training set and a test set, ICMP covert tunnel is simulated and samples are marked; Min-Max is used for normalization, and the original data is linearly transformed so that the result value is mapped to [0–1], as shown in formula (1);
[0014] x*=(x-min) / (max-min) Formula (1)
[0015] Among them, max is the maximum value of the sample data, and min is the minimum value of the sample data.
[0016] S4: Use the generative adversarial network to perform data expansion on a small number of simulated ICMP covert tunnel samples in the data sample to make their proportion in the data set balanced;
[0017] S5: Randomly mix the normal traffic data class and the covert tunnel traffic class, randomly extract the normal traffic: covert tunnel traffic at a ratio of 1:1, reconstruct the training set, and train and generate an XGBoost model for covert tunnel detection;
[0018] The process of training the XGBoost model is to minimize the weighted binary classification error, as shown in formula (2);
[0019] E=Σwi(yi-f(xi))*2 Formula (2)
[0020] Among them, i represents the sample index, wi is the sample weight, yi is the sample label, and f(xi) is the model prediction value.
[0021] S6: The structured data results are transferred into the trained XGBoost model to obtain the classification results output by the model;
[0022] S7: Evaluate the model using accuracy, ACC, recall, RE, precision, PR, and F1-score, F1, and continuously optimize the model. The final configuration model parameters include [{'objective':'binary:logitraw','learning_rate':0.05,'max_depth':5,'n_estimators':200,'reg_alpha':0.005,'gamma':0.05}], and the corresponding model evaluation indicators are tested on multiple data sets to obtain the best results.
[0023] Furthermore, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, the method described in any one of the above is implemented.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] 1. High accuracy: XGBoost is based on weak classifiers (decision trees) and gradually improves the performance of the model through iteration. It can effectively capture the nonlinear relationship in game network data, has low bias and high generalization ability, and thus achieves high-accuracy prediction results.
[0026] 2. Flexibility of feature engineering: The basic feature dataset of game network traffic is the basis of ICMP covert tunnel detection. In order to ensure the reliability and strong scalability of detection, the basic features are required to fully describe the characteristics of game network traffic. However, due to the real-time requirements of covert tunnel detection and the computing power of existing computers, the selection of basic features cannot extract all traffic information, but must select it. XGBoost can automatically handle missing values and outliers, and effectively combine and select features. It provides a wealth of feature importance evaluation indicators to help users identify the most important features and optimize feature engineering.
[0027] 3. Robustness: XGBoost has strong robustness and a certain tolerance for noise and outliers. It controls the complexity of the model through regularization technology and pruning strategies, avoids overfitting, and improves the stability and generalization ability of the model.
[0028] 4. Explainability: XGBoost provides rich model explanation capabilities, which can output feature importance rankings, node splitting methods, and explanations of model predictions, helping users understand the decision-making process of the model and provide explainable results for business problems.
[0029] 5. Using the XGBoost algorithm for ICMP covert tunnel detection in the gaming network environment is a more efficient and accurate ICMP covert tunnel traffic detection method that can achieve higher recognition accuracy and portability. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It is understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 is a flow chart of the method of the present invention;
[0032] Figure 2 It is a screenshot of the data packet code obtained by the present invention;
[0033] Figure 3 It is a screenshot of extracting an icmp data packet list according to the icmp protocol of the present invention;
[0034] Figure 4 It is a screenshot of the simulated icmp covert tunnel data packet list of the present invention;
[0035] Figure 5 The present invention uses the flow extraction tool library flowcontainer to directly import the extract function to obtain a structured data screenshot;
[0036] Figure 6 This is a screenshot of constructing feature engineering and generating a feature data table in the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but is only a selected embodiment of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] See also Figure 1-6 The present invention provides an ICMP hidden tunnel detection method based on the game network traffic characteristics, which is specifically performed in the following steps:
[0039] S1: parse the game network traffic data, extract the ICMP protocol traffic in the traffic data, simulate the ICMP covert tunnel, mark the ICMP covert tunnel, parse the fields to be analyzed according to the protocol format, and generate structured data;
[0040] like Figure 2-Figure 4 , parse the fields to be analyzed according to the protocol format, specifically extract icmp data packets and simulated ICMP covert tunnel data packets according to the icmp protocol, and use the traffic extraction tool library flowcontainer to directly import the extract function to obtain structured data.
[0041] S2: Figure 5 , receive the distributed ICMP protocol traffic, extract ICMP related type data, decompose the payload field by bytes to generate a string, construct feature engineering and generate a feature data table; the fields of the feature data table include source IP, destination IP, source port, destination port, protocol, the number of packets whose payload is not empty, the number of all IP data packets, the number of packets whose upstream payload is not empty, the number of packets whose downstream payload is not empty, the maximum payload length of the upstream, the total payload length of the upstream, the maximum payload length of the downstream, the total payload length of the downstream, the average payload length, the maximum IP packet length of the upstream, the maximum IP packet length of the downstream, the average IP packet length, the start time, the end time, the session flow duration, the total payload length, and the total IP packet length, as shown in Table 1.
[0042] Table 1 Characteristic data table
[0043] Source IP src_ip Destination IP dst_ip Source Port srcport Destination Port dstport protocol proto The number of packets whose payload is not empty payload_num The number of all IP packets packet_num The number of packets whose upstream payload is not empty up_payload_num The number of packets whose downlink payload is not empty down_payload_num Maximum upstream payload length up_max_payload_length Total upstream payload length up_sum_payload_length Maximum downlink payload length down_max_payload_length Total downlink payload length down_sum_payload_length Average load length ave_payload_length Maximum length of an upstream IP packet up_max_ip_packets_length Maximum length of downstream IP packets down_max_ip_packets_length Average IP packet length ave_ip_packets_length Start time start_timestamp End Time end_timestamp Session flow duration time_delta Total load length payload_length Total IP packet length packet_length
[0044] S3: The data in the data set are digitized and normalized, and then the processed data set is divided into a training set and a test set, ICMP covert tunnel is simulated and samples are marked; Min-Max is used for normalization, and the original data is linearly transformed so that the result value is mapped to [0–1], as shown in formula (1);
[0045] x*=(x-min) / (max-min) Formula (1)
[0046] Among them, max is the maximum value of the sample data, and min is the minimum value of the sample data.
[0047] S4: Use the generative adversarial network to perform data expansion on a small number of simulated ICMP covert tunnel samples in the data sample to make their proportion in the data set balanced;
[0048] S5: Randomly mix the normal traffic data class and the covert tunnel traffic class, randomly extract the normal traffic: covert tunnel traffic at a ratio of 1:1, reconstruct the training set, and train and generate an XGBoost model for covert tunnel detection;
[0049] The process of training the XGBoost model is to minimize the weighted binary classification error, as shown in formula (2);
[0050] E=Σwi(yi-f(xi))*2 Formula (2)
[0051] Among them, i represents the sample index, wi is the sample weight, yi is the sample label, and f(xi) is the model prediction value.
[0052] S6: The structured data results are transferred into the trained XGBoost model to obtain the classification results output by the model;
[0053] S7: Evaluate the model using accuracy, ACC, recall, RE, precision, PR, and F1-score, F1, and continuously optimize the model. The final configuration model parameters include [{'objective':'binary:logitraw','learning_rate':0.05,'max_depth':5,'n_estimators':200,'reg_alpha':0.005,'gamma':0.05}], and the corresponding model evaluation indicators are tested on multiple data sets to obtain the best results.
[0054] In this embodiment, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, the method described in any one of the above is implemented.
[0055] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention has various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An ICMP covert tunnel detection method based on game network traffic characteristics, Features: Please follow the steps below: S 1 : Parse the game network traffic data, extract the ICMP protocol traffic in the traffic data, simulate the ICMP covert tunnel, mark the ICMP covert tunnel, parse the fields to be analyzed according to the protocol format, and generate structured data; S 2 : Receive the distributed ICMP protocol traffic, extract ICMP related type data, decompose the payload field by bytes to generate a string, build feature engineering and generate a feature data table; S 3 : The data in the data set is digitized and normalized, and then the processed data set is divided into a training set and a test set, ICMP covert tunnel is simulated and samples are marked; S 4 :Use the generative adversarial network to expand the data of a small number of simulated ICMP covert tunnel samples in the data sample to make their proportion in the data set balanced; S 5 : Randomly mix the normal traffic data class and the hidden tunnel traffic class, randomly extract the normal traffic: hidden tunnel traffic at a ratio of 1:1, reconstruct the training set, and train and generate the XGBoost model for hidden tunnel detection; S 6 : Transfer the structured data results into the trained XGBoost model to obtain the classification results output by the model; S 7 : Carry out model evaluation, use accuracy accuracy, ACC, recall rate recall, RE, precision rate precision, PR and classifier accuracy score F1-score, F1 to evaluate the model and continuously optimize the model.
2. According to claim 1, a method for detecting ICMP hidden tunnels based on game network traffic characteristics, It is characterized in that In step S 1 In the code, the fields to be analyzed are parsed according to the protocol format. Specifically, the icmp data packets and simulated ICMP covert tunnel data packets are extracted according to the icmp protocol. The flow extraction tool library flowcontainer is used to directly import the extract function to obtain structured data.
3. According to claim 1, a method for detecting ICMP hidden tunnels based on game network traffic characteristics, Features: In step S 2 The fields of the feature data table include source IP, destination IP, source port, destination port, protocol, number of packets whose payload is not empty, number of all IP data packets, number of packets whose upstream payload is not empty, number of packets whose downstream payload is not empty, maximum upstream payload length, total upstream payload length, maximum downstream payload length, total downstream payload length, average payload length, maximum upstream IP packet length, maximum downstream IP packet length, average IP packet length, start time, end time, session flow duration, total payload length, and total IP packet length.
4. According to claim 1, a method for detecting ICMP hidden tunnels based on game network traffic characteristics, Features: In step S 3 In the process, Min-Max is used for normalization, and the original data is linearly transformed so that the result value is mapped to the range [0–1], as shown in formula (1); x*=(x-min) / (max-min) Formula (1) Among them, max is the maximum value of the sample data, and min is the minimum value of the sample data.
5. According to claim 1, a method for detecting ICMP hidden tunnels based on game network traffic characteristics, Features: In step S 5 In the process of training the XGBoost model, the process of minimizing the weighted binary classification error is as shown in formula (2); E=Σwi(yi-f(xi))*2 Formula (2) Among them, i represents the sample index, wi is the sample weight, yi is the sample label, and f(xi) is the model prediction value.
6. According to claim 1, a method for detecting ICMP hidden tunnels based on game network traffic characteristics, Features: In step S 7 In the final configuration model parameters include [{'objective':'binary:logitraw','learning_rate':0.05,'max_depth':5,'n_estimators':200,'reg_alpha':0.005,'gamma': 0.05}], and its corresponding model evaluation index was tested on multiple data sets to obtain the optimal results.
7. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by the main controller, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
ICMP tunnel detection method based on machine learning
CN112118154A
Integrated learning device and method for ICMP hidden tunnel detection in industrial control network
CN114124834A
Network game QoE detection method based on network flow
CN115314407A
Malicious encrypted traffic detection method and system in network information system scene
CN117749499A
Cited By
Identifying method and device for ICMP tunnel and computer program product
CN120238346A
