Network attack result detection method, device, computing device and storage medium
By identifying network traffic and using machine learning algorithms to detect attack results, the problem of low detection accuracy and false negatives in the existing technology is solved, and accurate identification of diverse attack events is achieved.
Patent Information
- Application Number
- CN202111664312.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The accuracy of network attack result detection in the existing technology is not high, user-defined responses cannot be identified, resulting in false negatives, and there is a lack of unified standards.
By identifying the network traffic to be detected, response data is obtained and detection features are extracted, and input into the trained attack result prediction model for processing. Machine learning algorithms are used to detect attack results and avoid relying on fixed features.
It improves the accuracy of network attack result detection, reduces false negatives, and can identify diverse attack events.
Smart Images

Figure CN114338202B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and in particular to a method, device, computing equipment and storage medium for detecting network attack results. Background Art
[0002] Cyber attacks refer to any type of offensive action against computer information systems, infrastructure, computer networks or personal computer devices. For computers and computer networks, destroying, exposing, modifying, making software or services nonfunctional, stealing or accessing data from any computer without authorization are all considered attacks on computers and computer networks.
[0003] However, in the process of implementing the present invention, the inventors discovered that the related art can only match known fixed feature responses by identifying the attack result status based on signature detection, but the response to a network attack is closely related to the actual application business, and there is no fixed pattern or unified standard to define the attack result. User-defined responses often cannot be identified through fixed features, resulting in low accuracy in detecting network attack results and missed reporting of network attacks. Summary of the invention
[0004] In view of the above problems, the present invention is proposed to provide a method, apparatus, computing device and storage medium for detecting network attack results that overcome the above problems or at least partially solve the above problems.
[0005] According to one aspect of the present invention, a method for detecting network attack results is provided, comprising:
[0006] Identify whether the network traffic to be detected is attack event traffic;
[0007] If yes, obtain the response data of the network traffic to be detected;
[0008] Extract detection features based on response data, input the detection features into the trained attack result prediction model for processing, and obtain the attack results of the network traffic to be detected;
[0009] Among them, the attack result prediction model is obtained by training the attack traffic samples.
[0010] Optionally, before the method is executed, it further includes:
[0011] Acquire attack traffic samples, and mark attack results of the attack traffic samples to obtain marking results;
[0012] Extract sample features of the attack traffic samples, and construct a training sample set based on the sample features of the attack traffic samples and the labeling results;
[0013] The training sample set is trained to obtain the attack result prediction model.
[0014] Optionally, training the training sample set to obtain the attack result prediction model further includes:
[0015] Extract sample features and labeling results of attack traffic samples from the training sample set;
[0016] Input the sample features of the attack traffic sample into the initial prediction model for training to obtain the corresponding initial prediction results;
[0017] According to the initial prediction results and labeling results, the weight parameters of the initial prediction model are updated and training is performed again;
[0018] The above steps are executed repeatedly until the iteration end condition is met, and the attack result prediction model is obtained.
[0019] Optionally, the detection features and sample features include at least one of the following: response body length, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body.
[0020] Optionally, before the method is executed, it further includes:
[0021] The network traffic to be detected is obtained from the specified port through traffic mirroring.
[0022] Optionally, identifying whether the network traffic to be detected is attack traffic further includes:
[0023] By performing pattern string matching processing on the network traffic to be detected, it is determined whether the network traffic to be detected is attack event traffic based on the matching result.
[0024] Optionally, the attack events include: weak password attack events and file upload attack events.
[0025] According to another aspect of the present invention, there is provided a device for detecting network attack results, comprising:
[0026] An attack identification module, adapted to identify whether the network traffic to be detected is attack event traffic;
[0027] A response extraction module, adapted to obtain response data of the network traffic to be detected if the network traffic to be detected is attack event traffic;
[0028] The result detection module is suitable for extracting detection features according to the response data, inputting the detection features into the trained attack result prediction model for processing, and obtaining the attack results of the network traffic to be detected; wherein the attack result prediction model is obtained by training the attack traffic samples.
[0029] Optionally, the device further comprises:
[0030] Sample acquisition module: suitable for acquiring attack traffic samples, marking the attack results of the attack traffic samples, and obtaining marking results; extracting sample features of the attack traffic samples, and constructing a training sample set according to the sample features of the attack traffic samples and the marking results;
[0031] The model training module is suitable for training the training sample set to obtain the attack result prediction model.
[0032] Optionally, the model training module is further adapted to:
[0033] Extract sample features and labeling results of attack traffic samples from the training sample set;
[0034] Input the sample features of the attack traffic sample into the initial prediction model for training to obtain the corresponding initial prediction results;
[0035] According to the initial prediction results and labeling results, the weight parameters of the initial prediction model are updated and training is performed again;
[0036] The above steps are executed repeatedly until the iteration end condition is met, and the attack result prediction model is obtained.
[0037] Optionally, the detection feature includes at least one of the following features of the response data of the network traffic to be detected: the length of the response body, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body;
[0038] The sample features include at least one of the following features in the response data of the attack traffic sample: response body length, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body.
[0039] Optionally, the traffic acquisition module is adapted to acquire the network traffic to be detected from a designated port by means of traffic mirroring.
[0040] Optionally, the attack identification module is further adapted to: perform pattern string matching processing on the network traffic to be detected, and determine whether the network traffic to be detected is attack event traffic according to the matching result.
[0041] Optionally, the attack events include: weak password attack events and file upload attack events.
[0042] According to another aspect of the present invention, there is provided a computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0043] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned method for detecting network attack results.
[0044] According to another aspect of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to execute operations corresponding to the above-mentioned method for detecting network attack results.
[0045] According to the network attack result detection method, device, computing device and storage medium of the present invention, it is determined whether the network traffic to be detected is the attack event traffic; if so, the response data of the network traffic to be detected is obtained; the detection features are extracted according to the response data, and the detection features are input into the trained attack result prediction model for processing to obtain the attack result of the network traffic to be detected; wherein the attack result prediction model is obtained by training the attack traffic samples. This method uses machine learning algorithms to detect the attack results of attack events, avoids relying on fixed features, can improve the detection accuracy of attack results, and avoids the omission of attack events due to the inability to identify the attack results due to the variety of forms.
[0046] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0048] Figure 1 A flow chart of a method for detecting network attack results provided by an embodiment of the present invention is shown;
[0049] Figure 2 A flow chart showing a method for detecting network attack results provided by another embodiment of the present invention is shown;
[0050] Figure 3 A schematic diagram showing the structure of a device for detecting network attack results provided by an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of the structure of a computing device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0052] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0053] Figure 1 A flow chart of a method for detecting network attack results provided by an embodiment of the present invention is shown. Figure 1 As shown, the method comprises the following steps:
[0054] Step S110, identifying whether the network traffic to be detected is attack event traffic.
[0055] The real network traffic to be detected is obtained from the designated network port, and it is preliminarily identified whether the network traffic to be detected is attack event traffic.
[0056] Specifically, the characteristic fields of different types of attack events are collected in advance. After obtaining the network traffic to be detected, the pattern string matching method is used to identify whether the data of the network traffic to be detected contains fields that meet the attack characteristics. If so, it is determined to be attack event traffic. For example, if the network traffic is login request traffic and the login password is "888888", the password meets the weak password characteristics, and the network traffic can be determined to be attack event traffic.
[0057] Attack events include: weak password attack events, file upload attack events, etc. Regarding weak password attack events, weak passwords are generally system default passwords or simple passwords, which are very easy to be guessed by attackers. Attackers can easily enter the web backend through weak passwords, thereby achieving the purpose of controlling the website; file upload attack refers to a high-risk vulnerability in which an attacker uploads a malicious executable file to the server for execution, and ultimately obtains control authority over the website. Of course, the present invention does not limit the specific categories of attack events.
[0058] Step S120: If the network traffic to be detected is attack event traffic, obtain response data of the network traffic to be detected.
[0059] If the network traffic to be detected is identified as attack event traffic, response data of the network traffic to be detected is obtained. For example, if the network traffic to be detected is web request traffic, the response data is response data in response to the web request.
[0060] Step S130, extracting detection features according to the response data, inputting the detection features into a trained attack result prediction model for processing, and obtaining the attack results of the network traffic to be detected.
[0061] Among them, the attack result prediction model is obtained by training with attack traffic samples, and the attack result prediction model is pre-trained by machine learning.
[0062] The response data of the network traffic to be detected is parsed by protocol to obtain fields such as response code, response header, and response body. The detection features are extracted based on these fields and input into the pre-trained attack result prediction model for processing. The attack result prediction model outputs the attack result of the network traffic to be detected, that is, the attack result of this attack event.
[0063] According to the network attack result detection method provided by this embodiment, the attack result prediction model is obtained by training the attack traffic sample in a machine learning manner to identify whether the network traffic to be detected is the attack event traffic. If so, the detection features are extracted according to the response data of the network traffic to be detected, and the detection features are processed using the pre-trained attack result prediction model. This method uses a machine learning algorithm to detect the attack results of an attack event, avoids relying on fixed features, can improve the detection accuracy of the attack results, and avoids the underreporting of attack events due to the inability to identify the attack results due to the variety of forms.
[0064] Figure 2 A flow chart of a method for detecting network attack results provided by another embodiment of the present invention is shown. Figure 2 As shown, the method comprises the following steps:
[0065] Step S210, acquiring an attack traffic sample, marking the attack result of the attack traffic sample, obtaining a marking result, and extracting a sample feature of the attack traffic sample.
[0066] A large number of attack traffic samples are obtained, and the attack results of the attack traffic samples are marked. Specifically, for attack traffic samples with successful attack results, a success label is marked therefor; for attack traffic samples with failed attack results, a failure label is marked therefor; for attack traffic samples with unknown attack results, an unknown label is marked therefor; and sample features of the attack traffic samples are extracted, including: response body length, whether the response header contains a specified field, the value and length of the specified field, the http protocol response code, and the frequency of the part of speech of specific words in the response body; wherein the specific words in the response body refer to words or phrases that can directly or indirectly represent whether the request result is successful or not, and the frequency of the part of speech of the specific words includes the total frequency of each word whose part of speech represents a successful request and the total frequency of each word whose part of speech represents a failed request, such as "Welcome back", "Incorrect login name or login password", "Login failed", "Login successful", etc. in the login prompt information.
[0067] Among them, the attack traffic samples include: weak password attack event traffic samples and file upload attack event traffic samples; for weak password attack events, sample features include: response body length, whether the response header contains the "Set-Cookie" field, Set-Cookie value length, http protocol response code (such as 200, 404, etc.), the frequency of specific word parts of speech in the response body, such as the frequency of positive and negative words in the login status code and login prompt information, positive words include words that represent successful requests, and negative words include words that fail requests; for file upload attack events, the sample features of attack traffic include: response body length, response code, the frequency of specific word parts of speech in the response body, and the length of specific words. The following examples are given to illustrate.
[0068] For example, the request header data of the weak password attack event traffic sample includes:
[0069] POST / user / Users / login.html HTTP / 1.1
[0070] …
[0071] mobile=admin&password=888888
[0072] Among them, the login password is 888888, which meets the weak password characteristics, that is, weak password attack traffic. The following table 1 shows the response data, sample characteristics and sample characteristic values of the traffic sample. Among them, according to the response data, it can be seen that the weak password attack is successful, so the traffic sample is labeled as successful.
[0073] Table 1
[0074]
[0075]
[0076] For example, the request header data of the file upload attack traffic sample includes:
[0077] POST / sysweb / upload HTTP / 1.1
[0078] …
[0079] Content-Disposition:form-data; name="file";
[0080] filename=.. / .. / applications / test.jsp
[0081] …
[0082] Table 2 shows the response data, sample features, and sample feature values of the traffic sample. According to the response data, the attack result is a failure to upload the file, so the traffic sample is labeled as failed.
[0083] Table 2
[0084]
[0085]
[0086] Step S220, constructing a training sample set according to the sample characteristics and labeling results of the attack traffic samples, training the training sample set, and obtaining an attack result prediction model.
[0087] Among them, the training step of the attack result prediction model may include: extracting sample features and marking results of attack traffic samples from the training sample set; inputting the sample features of the attack traffic samples into the initial prediction model for training to obtain the corresponding initial prediction results; updating the weight parameters of the initial prediction model according to the initial prediction results and the marking results, and then training again; looping and iterating the above steps until the iteration end condition is met to obtain the attack result prediction model. Specifically, the loss between the initial prediction result and the marking result can be calculated to obtain the loss function, and the back propagation operation is performed according to the loss function, and the weight parameters of the initial prediction model are updated through the operation results. The iteration end condition may include: the number of iterations reaches the iteration number threshold; and / or the output value of the loss function is less than the loss threshold; and / or the detection accuracy reaches a predetermined value. After the iteration end condition is met, the iterative processing is stopped to obtain a trained attack result prediction model.
[0088] Step S230, obtaining the network traffic to be detected from the designated port through traffic mirroring.
[0089] The network traffic of the specified port is forwarded through traffic mirroring to obtain the network traffic to be detected on the specified port.
[0090] Step S240 , performing pattern string matching processing on the network traffic to be detected, and determining whether the network traffic to be detected is attack event traffic according to the matching result.
[0091] The characteristic fields of different types of attack events are collected in advance to form a characteristic field set. The network traffic to be detected is matched with the characteristic fields of the attack event by pattern string matching to determine whether the network traffic to be detected contains the characteristic fields of the attack event. If it does, the network traffic to be detected is determined to be the attack event traffic, and then the type of attack event to which the network traffic to be detected belongs can also be determined. On the contrary, if the network traffic to be detected does not contain the characteristic fields of the attack event, it is not the attack event traffic.
[0092] Step S250, if the network traffic to be detected belongs to attack event traffic, obtain the response data of the network traffic to be detected, extract the detection features according to the response data, input the detection features into the trained attack result prediction model for processing, and obtain the attack result of the network traffic to be detected.
[0093] If the network traffic to be detected belongs to the attack event traffic, the response data of the network traffic to be detected is parsed by protocol to obtain fields such as response code, response header, response body, etc., and detection features are extracted based on these fields. The detection features correspond to the above-mentioned sample features.
[0094] For weak password attack events, the extracted detection features include: response body length, whether the response header contains the "Set-Cookie" field, Set-Cookie value length, http protocol response code (such as 200, 404, etc.), and the frequency of the part of speech of specific words in the response body; for file upload attack events, the extracted detection features include: response body length, response code, the frequency of the part of speech of specific words in the response body, and the length of specific words.
[0095] Then, the detection features are input into the attack result prediction model for processing, and the attack result prediction model outputs the attack result of the attack event.
[0096] Step S260: If the attack result of the network traffic to be detected is a successful attack, an alarm message is output.
[0097] If the attack result of the network traffic to be detected is a successful attack, an alarm message of successful attack is output for display, or the alarm message can also be output to a corresponding early warning terminal so that relevant personnel can be informed of the emergency situation in time.
[0098] In an optional manner, if the attack result of the network traffic to be detected is unknown, a prompt message is output so that relevant personnel can further review the network traffic to be detected.
[0099] In a specific example of a weak web password attack, the response body of the attack event traffic specifically includes: {"msg":"Incorrect password","status":1006,"data":null}. The detection vectors of the above dimensions are extracted from the response payload of the attack event traffic, and the detection features are input into the attack result prediction model. It can be identified that the attack result of the attack event traffic is a login failure. However, using the existing detection method may result in a false alarm because the fixed feature status:100 is identified and 1006 is not processed as a complete unit. Therefore, in an embodiment of the present invention, detection features of multiple dimensions are extracted, and the attack result is identified based on the trained attack result prediction model combined with the detection features of multiple dimensions, which can reduce the number of false alarms.
[0100] According to the network attack result detection method provided in this embodiment, the method identifies attack results based on a machine learning algorithm, uses attack sample traffic to train an attack result prediction model, and predicts the attack results of the network traffic to be detected through the attack result prediction model. This can improve the detection accuracy of the attack results and reduce the underreporting of attack results due to the inability to accurately identify them due to their diverse forms.
[0101] Figure 3 The schematic diagram of the structure of the network attack result detection device provided by the embodiment of the present invention is shown as follows: Figure 3 As shown, the device comprises:
[0102] An attack identification module 31, adapted to identify whether the network traffic to be detected is attack event traffic;
[0103] A response extraction module 32, adapted to obtain response data of the network traffic to be detected if the network traffic to be detected is attack event traffic;
[0104] The result detection module 33 is suitable for extracting detection features according to the response data, inputting the detection features into a trained attack result prediction model for processing, and obtaining the attack results of the network traffic to be detected; wherein the attack result prediction model is obtained by training the attack traffic samples.
[0105] In an optional manner, the device further includes:
[0106] Sample acquisition module: obtains attack traffic samples, marks the attack results of the attack traffic samples, and obtains marking results; extracts sample features of the attack traffic samples, and constructs a training sample set based on the sample features of the attack traffic samples and the marking results;
[0107] The model training module is suitable for training the training sample set to obtain the attack result prediction model.
[0108] In an optional manner, the model training module is further adapted to:
[0109] Extract sample features and labeling results of attack traffic samples from the training sample set;
[0110] Input the sample features of the attack traffic sample into the initial prediction model for training to obtain the corresponding initial prediction results;
[0111] According to the initial prediction results and labeling results, the weight parameters of the initial prediction model are updated and training is performed again;
[0112] The above steps are executed repeatedly until the iteration end condition is met, and the attack result prediction model is obtained.
[0113] In an optional manner, the detection feature includes at least one of the following features of the response data of the network traffic to be detected: the length of the response body, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body;
[0114] The sample features include at least one of the following features in the response data of the attack traffic sample: response body length, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body.
[0115] In an optional manner, the traffic acquisition module is adapted to acquire the network traffic to be detected from a designated port by means of traffic mirroring.
[0116] In an optional manner, the attack identification module 31 is further adapted to:
[0117] By performing pattern string matching processing on the network traffic to be detected, it is determined whether the network traffic to be detected is attack event traffic based on the matching result.
[0118] In an optional manner, the attack events include: weak password attack events and file upload attack events.
[0119] Through the above method, the attack results of attack events are detected using machine learning algorithms, avoiding reliance on fixed features, which can improve the detection accuracy of attack results and avoid underreporting of attack events due to the inability to identify attack results due to their diverse forms.
[0120] An embodiment of the present invention provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for detecting network attack results in any of the above method embodiments.
[0121] The executable instructions may be specifically used to cause the processor to perform the following operations:
[0122] Identify whether the network traffic to be detected is attack event traffic;
[0123] If yes, obtain the response data of the network traffic to be detected;
[0124] Extract detection features based on response data, input the detection features into the trained attack result prediction model for processing, and obtain the attack results of the network traffic to be detected;
[0125] Among them, the attack result prediction model is obtained by training the attack traffic samples.
[0126] In an optional manner, the executable instruction causes the processor to perform the following operations:
[0127] Acquire attack traffic samples, and mark attack results of the attack traffic samples to obtain marking results;
[0128] Extract sample features of the attack traffic samples, and construct a training sample set based on the sample features of the attack traffic samples and the labeling results;
[0129] The training sample set is trained to obtain the attack result prediction model.
[0130] In an optional manner, the executable instruction causes the processor to perform the following operations:
[0131] Extract sample features and labeling results of attack traffic samples from the training sample set;
[0132] Input the sample features of the attack traffic sample into the initial prediction model for training to obtain the corresponding initial prediction results;
[0133] According to the initial prediction results and labeling results, the weight parameters of the initial prediction model are updated and training is performed again;
[0134] The above steps are executed repeatedly until the iteration end condition is met, and the attack result prediction model is obtained.
[0135] In an optional manner, the detection feature includes at least one of the following features of the response data of the network traffic to be detected: the length of the response body, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body;
[0136] The sample feature includes at least one of the following features in the response data of the attack traffic sample: response body length, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body.
[0137] In an optional manner, the executable instructions enable the processor to perform the following operations: obtaining the network traffic to be detected from the designated port by means of traffic mirroring.
[0138] In an optional manner, the executable instructions enable the processor to perform the following operations: performing pattern string matching processing on the network traffic to be detected, and determining whether the network traffic to be detected is attack event traffic according to the matching result.
[0139] In an optional manner, the attack events include: weak password attack events and file upload attack events.
[0140] Through the above method, the attack results of attack events are detected using machine learning algorithms, avoiding reliance on fixed features, which can improve the detection accuracy of attack results and avoid underreporting of attack events due to the inability to identify attack results due to their diverse forms.
[0141] Figure 4 The schematic diagram of the structure of the computing device embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computing device.
[0142] like Figure 4 As shown, the computing device may include: a processor (processor) 402 , a communications interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0143] The processor 402, the communication interface 404, and the memory 406 communicate with each other via the communication bus 408. The communication interface 404 is used to communicate with other devices such as a client or other server network elements. The processor 402 is used to execute the program 410, which can specifically execute the relevant steps in the above-mentioned embodiment of the detection method for the network attack result of the computing device.
[0144] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0145] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0146] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0147] The program 410 may be specifically configured to enable the processor 402 to perform the following operations:
[0148] Identify whether the network traffic to be detected is attack event traffic;
[0149] If yes, obtain the response data of the network traffic to be detected;
[0150] Extract detection features based on response data, input the detection features into the trained attack result prediction model for processing, and obtain the attack results of the network traffic to be detected;
[0151] Among them, the attack result prediction model is obtained by training the attack traffic samples.
[0152] In an optional manner, the program 410 enables the processor 402 to perform the following operations:
[0153] Acquire attack traffic samples, and mark attack results of the attack traffic samples to obtain marking results;
[0154] Extract sample features of the attack traffic samples, and construct a training sample set based on the sample features of the attack traffic samples and the labeling results;
[0155] The training sample set is trained to obtain the attack result prediction model.
[0156] In an optional manner, the program 410 enables the processor 402 to perform the following operations:
[0157] Extract sample features and labeling results of attack traffic samples from the training sample set;
[0158] Input the sample features of the attack traffic sample into the initial prediction model for training to obtain the corresponding initial prediction results;
[0159] According to the initial prediction results and labeling results, the weight parameters of the initial prediction model are updated and training is performed again;
[0160] The above steps are executed repeatedly until the iteration end condition is met, and the attack result prediction model is obtained.
[0161] In an optional manner, the detection feature includes at least one of the following features of the response data of the network traffic to be detected: the length of the response body, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body;
[0162] The sample feature includes at least one of the following features in the response data of the attack traffic sample: response body length, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body.
[0163] In an optional manner, the program 410 enables the processor 402 to perform the following operations: obtaining the network traffic to be detected from the designated port by means of traffic mirroring.
[0164] In an optional manner, the executable instructions enable the processor to perform the following operations: performing pattern string matching processing on the network traffic to be detected, and determining whether the network traffic to be detected is attack event traffic according to the matching result.
[0165] In an optional manner, the attack events include: weak password attack events and file upload attack events.
[0166] Through the above method, the attack results of attack events are detected using machine learning algorithms, avoiding reliance on fixed features, which can improve the detection accuracy of attack results and avoid underreporting of attack events due to the inability to identify attack results due to their diverse forms.
[0167] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description made to specific languages above is for disclosing the best mode of the present invention.
[0168] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0169] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0170] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0171] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0172] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0173] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A method for detecting network attack results, comprising: Identify whether the network traffic to be detected is attack event traffic; Among them, the characteristic fields of different types of attack events are collected in advance, and the pattern string matching processing is performed on the network traffic to be detected to determine whether the data of the network traffic to be detected contains the characteristic fields of the attack event. If it does, it is determined that the network traffic to be detected belongs to the attack event traffic; If yes, obtaining response data of the network traffic to be detected; Extracting detection features according to the response data, inputting the detection features into a trained attack result prediction model for processing, and obtaining the attack result of the network traffic to be detected; The attack result prediction model is obtained by training attack traffic samples; the response data is parsed by protocol to obtain multiple fields, and detection features are extracted based on the multiple fields, wherein the multiple fields include: response code, response header, and response body.
2. The method according to claim 1, wherein: Before the method is performed, it further comprises: Acquire an attack traffic sample, and mark the attack result of the attack traffic sample to obtain a marking result; Extracting sample features of the attack traffic samples, and constructing a training sample set according to the sample features of the attack traffic samples and the marking results; The training sample set is trained to obtain the attack result prediction model.
3. The method according to claim 2, wherein: The training of the training sample set to obtain the attack result prediction model further includes: Extracting sample features and labeling results of attack traffic samples from the training sample set; Inputting the sample features of the attack traffic sample into the initial prediction model for training to obtain the corresponding initial prediction results; According to the initial prediction result and the marking result, the weight parameters of the initial prediction model are updated and training is performed again; The above steps are iteratively executed until the iteration end condition is met to obtain the attack result prediction model.
4. The method according to claim 3, wherein: The detection feature includes at least one of the following features of the response data of the network traffic to be detected: the length of the response body, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body; The sample feature includes at least one of the following features in the response data of the attack traffic sample: response body length, whether the response header contains a specified field, the length of the specified field, the http protocol response code, and the frequency of the part of speech of a specific word in the response body.
5. The method according to any one of claims 1 to 4, wherein: Before the method is performed, it further comprises: The network traffic to be detected is obtained from the specified port through traffic mirroring. By performing pattern string matching processing on the network traffic to be detected, it is determined whether the network traffic to be detected is attack event traffic according to the matching result.
6. The method according to claim 5, wherein: The attack events include: weak password attack events and file upload attack events.
7. A device for detecting network attack results, comprising: The attack identification module is suitable for identifying whether the network traffic to be detected is attack event traffic; wherein, the characteristic fields of different types of attack events are collected in advance, and the characteristic fields of attack events are determined by performing pattern string matching processing on the network traffic to be detected, and if so, the network traffic to be detected is determined to be attack event traffic; A response extraction module, adapted to obtain response data of the network traffic to be detected if the network traffic to be detected is attack event traffic; The result detection module is suitable for extracting detection features according to the response data, inputting the detection features into a trained attack result prediction model for processing, and obtaining the attack results of the network traffic to be detected; wherein the attack result prediction model is obtained by training attack traffic samples; performing protocol parsing on the response data to obtain multiple fields, and extracting detection features according to the multiple fields, wherein the multiple fields include: response code, response header, and response body.
8. A computing device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method for detecting network attack results according to any one of claims 1 to 6.
9. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute an operation corresponding to the method for detecting network attack results according to any one of claims 1 to 6.
Citation Information
Patent Citations
Network attack identification method and device as well as computer readable storage medium
CN107483458A
Network security detecting method and device
CN107666468A
Network attack identification method and system
CN108683687A
Network attack detection method and system based on artificial intelligence
CN108881265A
Attack behavior detection method, device and equipment and readable storage medium
CN112953895A
