CN116846568A - A network attack detection method and related equipment - Google Patents
A network attack detection method and related equipment Download PDFInfo
- Publication number
- CN116846568A CN116846568A CN202210295319.6A CN202210295319A CN116846568A CN 116846568 A CN116846568 A CN 116846568A CN 202210295319 A CN202210295319 A CN 202210295319A CN 116846568 A CN116846568 A CN 116846568A
- Authority
- CN
- China
- Prior art keywords
- content
- detected
- morpheme
- target
- correlation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1408—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
- H04L63/1425—Traffic logging, e.g. anomaly detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/221—Parsing markup language streams
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/142—Network analysis or design using statistical or mathematical methods
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/145—Network analysis or design involving simulating, designing, planning or modelling of a network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Mathematical Analysis (AREA)
- Multimedia (AREA)
- Computing Systems (AREA)
- Mathematical Optimization (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Pure & Applied Mathematics (AREA)
- Algebra (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer And Data Communications (AREA)
Abstract
本申请公开了一种网络攻击检测方法,该方法包括:获取网络数据对应的待检测内容;根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得待检测内容对应的至少一个目标语素;计算至少一个目标语素中的每个目标语素与预设语料的第一相关性;根据每个目标语素对应的第一相关性,获得网络攻击检测结果。通过该网络攻击检测方法,可以提升对网络攻击的检测准确率。
This application discloses a network attack detection method. The method includes: obtaining the content to be detected corresponding to the network data; transforming at least one morpheme in the content to be detected according to the grammatical structure of the content to be detected, and obtaining at least one morpheme corresponding to the content to be detected. A target morpheme; calculate the first correlation between each target morpheme in at least one target morpheme and the preset corpus; obtain a network attack detection result based on the first correlation corresponding to each target morpheme. Through this network attack detection method, the detection accuracy of network attacks can be improved.
Description
技术领域Technical field
本申请涉及网络安全技术领域,具体涉及一种网络攻击检测方法以及相关设备。This application relates to the field of network security technology, specifically to a network attack detection method and related equipment.
背景技术Background technique
随着网络技术的不断发展,网络信息安全也受到了越来越多的重视。With the continuous development of network technology, network information security has also received more and more attention.
目前,一种常见的网络攻击的方式是黑客通过网页后门(webshell)来获得服务器的操作权限,从而控制服务器来执行诸如上传下载文件、查看数据库、执行任意程序命令等操作。Currently, a common method of network attack is for hackers to obtain the operating permissions of the server through a web backdoor (webshell), thereby controlling the server to perform operations such as uploading and downloading files, viewing databases, and executing arbitrary program commands.
而传统的网络攻击检测方式通常是识别网络数据中是否包含“assert”、“eval”等函数名称来确定是否受到了网络攻击。然而这一检测方式难以识别不包含明显的攻击函数的攻击命令,因此难以识别黑客通过混淆、绕过和加密等方法改变后的webshell代码,导致网络攻击的检测准确率较低。The traditional network attack detection method usually identifies whether the network data contains function names such as "assert" and "eval" to determine whether there is a network attack. However, this detection method is difficult to identify attack commands that do not contain obvious attack functions. Therefore, it is difficult to identify the webshell code modified by hackers through obfuscation, bypassing, encryption, etc., resulting in a low detection accuracy of network attacks.
发明内容Contents of the invention
本申请提供一种网络攻击检测方法,以提升对网络攻击的检测准确率。本申请还提供了相应的装置、设备、计算机可读存储介质和计算机程序产品等。This application provides a network attack detection method to improve the detection accuracy of network attacks. This application also provides corresponding devices, equipment, computer-readable storage media, computer program products, etc.
本申请第一方面提供一种网络攻击检测方法,该方法包括:获取网络数据对应的待检测内容;根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得待检测内容对应的至少一个目标语素;计算至少一个目标语素中的每个目标语素与预设语料的第一相关性;根据每个目标语素对应的第一相关性,获得网络攻击检测结果。The first aspect of this application provides a network attack detection method. The method includes: obtaining the content to be detected corresponding to the network data; transforming at least one morpheme in the content to be detected according to the grammatical structure of the content to be detected, and obtaining the content corresponding to the content to be detected. at least one target morpheme; calculate the first correlation between each target morpheme in the at least one target morpheme and the preset corpus; and obtain the network attack detection result based on the first correlation corresponding to each target morpheme.
在第一方面中,在获取网络数据对应的待检测内容之后,可以根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得待检测内容对应的至少一个目标语素,这样,可以根据待检测内容的语法结构,识别待检测内容中通过混淆、绕过等方式处理后的内容并进行变换,获得至少一个目标语素。然后,可以计算至少一个目标语素中的每个目标语素与预设语料的第一相关性,再根据每个目标语素对应的第一相关性,获得网络攻击检测结果,从而充分利用诸如攻击语料等预设语料信息来检测变换还原后获得的语素是否与网络攻击行为相关,以获得较为准确的网络攻击检测结果。In the first aspect, after obtaining the content to be detected corresponding to the network data, at least one morpheme in the content to be detected can be transformed according to the grammatical structure of the content to be detected, and at least one target morpheme corresponding to the content to be detected is obtained. In this way, According to the grammatical structure of the content to be detected, the content in the content to be detected that has been processed by obfuscation, bypassing, etc. can be identified and transformed to obtain at least one target morpheme. Then, the first correlation between each target morpheme in at least one target morpheme and the preset corpus can be calculated, and then the network attack detection result can be obtained based on the first correlation corresponding to each target morpheme, thereby making full use of attack corpus, etc. Preset corpus information is used to detect whether the morphemes obtained after transformation and restoration are related to network attack behaviors, so as to obtain more accurate network attack detection results.
在第一方面的一种可能的实现方式中,上述步骤:获取网络数据对应的待检测内容,包括:获取网络数据的元数据,元数据包括请求报文信息、响应报文信息以及统一资源定位系统URL中的一种或多种;根据元数据,获得待检测内容。In a possible implementation of the first aspect, the above step: obtaining the content to be detected corresponding to the network data includes: obtaining metadata of the network data. The metadata includes request message information, response message information and unified resource location. One or more of the system URLs; obtain the content to be detected based on metadata.
该种可能的实现方式中,请求报文信息包括请求报文头和/或请求报文体,响应报文信息包括响应报文头和/或响应报文体。随着网络技术的不断发展,用户所产生的网络数据的数据量通常较大,导致从网络数据中识别网络攻击的难度较大。而该种可能的实现方式中,考虑到网络攻击的相关信息通常隐含于网络数据的元数据中,因此,从网络数据的元数据中获取待检测内容。由于元数据的数据量通常较小,因此,从元数据中可以较为高效快速地获取网络数据对应的待检测内容。In this possible implementation, the request message information includes a request message header and/or a request message body, and the response message information includes a response message header and/or a response message body. With the continuous development of network technology, the amount of network data generated by users is usually large, making it difficult to identify network attacks from network data. In this possible implementation, considering that information related to network attacks is usually hidden in the metadata of network data, the content to be detected is obtained from the metadata of network data. Since the amount of metadata is usually small, the content to be detected corresponding to the network data can be obtained more efficiently and quickly from the metadata.
在第一方面的一种可能的实现方式中,上述步骤:根据元数据,获得待检测内容,包括:从元数据中,提取键值对数据,键值对数据用于指示键对应的值;根据键值对数据中的值,获得待检测内容。In a possible implementation of the first aspect, the above steps: obtaining the content to be detected according to the metadata, including: extracting key-value pair data from the metadata, and the key-value pair data is used to indicate the value corresponding to the key; Obtain the content to be detected based on the value in the key-value pair data.
该种可能的实现方式中,网络攻击的相关信息常常包含于元数据中的赋值信息中,因此,可以从元数据中,提取键值对数据,然后从键值对数据中提取可能涉及网络攻击的赋值信息,从而获得待检测内容。In this possible implementation, information related to network attacks is often included in the assignment information in the metadata. Therefore, the key-value pair data can be extracted from the metadata, and then the key-value pair data may be extracted from the key-value pair data that may involve network attacks. Assignment information to obtain the content to be detected.
在第一方面的一种可能的实现方式中,上述步骤:根据待检测内容的语法结构,对待检测内容中的至少一个语素进行转换,获得待检测内容对应的至少一个目标语素,包括:根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得第一信息;根据第一信息中的语素的类型,从第一信息中确定候选语素;根据候选语素,获得至少一个目标语素。In a possible implementation of the first aspect, the above steps: convert at least one morpheme in the content to be detected according to the grammatical structure of the content to be detected, and obtain at least one target morpheme corresponding to the content to be detected, including: according to the content to be detected Detect the grammatical structure of the content, transform at least one morpheme in the content to be detected, and obtain the first information; determine the candidate morpheme from the first information according to the type of the morpheme in the first information; obtain at least one target morpheme based on the candidate morpheme .
该种可能的实现方式中,可以基于语法树解析技术等方法,解析待检测内容,确定待检测内容的语法结构,识别待检测内容中的句子成分以及句子成分之间的关联关系。根据待检测内容的语法结构,可以基于待检测内容中的变量的调用关系和/或编码信息等对待检测内容中的至少一个语素进行变换,获得第一信息。然后,可以通过词法分析(lexicalanalysis)等方式,确定第一信息中的语素的类型,例如,可以从第一信息中识别变量以及对应的变量类型、参数以及对应的参数类型、操作符以及对应的操作符类型等。In this possible implementation, methods such as syntax tree parsing technology can be used to parse the content to be detected, determine the grammatical structure of the content to be detected, and identify the sentence components in the content to be detected and the correlation between the sentence components. According to the grammatical structure of the content to be detected, the first information can be obtained by transforming at least one morpheme in the content to be detected based on the calling relationship and/or encoding information of variables in the content to be detected. Then, the type of the morpheme in the first information can be determined through lexical analysis or other methods. For example, variables and corresponding variable types, parameters and corresponding parameter types, operators and corresponding parameters can be identified from the first information. Operator types, etc.
在获得第一信息中的语素的类型之后,可以根据第一信息中的语素的类型,从第一信息中确定候选语素。其中,可以根据第一信息中的语素的类型,从第一信息中筛选出与网络攻击相关的类型。例如,可以从第一信息中筛选出变量以及String类型的参数等。After obtaining the type of the morpheme in the first information, candidate morphemes may be determined from the first information according to the type of the morpheme in the first information. Wherein, types related to network attacks can be screened out from the first information according to the types of morphemes in the first information. For example, variables and String type parameters can be filtered out from the first information.
在获得候选语素之后,可以将候选语素作为目标语素,也可以对候选语素进行进一步处理,以获得目标语素。举例来说,某些候选语素还存在字符串拆分、截断重组等变形处理,则可以对该候选语素进行重组,从而还原为变形处理之前的语素,再将还原为变形处理之前的语素作为目标语素。例如,对于候选语素'ass'.'ert',可以基于语义信息进行重组,获得“assert”以作为目标语素。After obtaining the candidate morpheme, the candidate morpheme can be used as the target morpheme, or the candidate morpheme can be further processed to obtain the target morpheme. For example, if some candidate morphemes also undergo deformation processing such as string splitting, truncation and reorganization, the candidate morpheme can be reorganized to restore it to the morpheme before the deformation processing, and then the restoration to the morpheme before the deformation processing is used as the target morpheme. For example, for the candidate morpheme 'ass'.'ert', it can be reorganized based on the semantic information to obtain "assert" as the target morpheme.
在第一方面的一种可能的实现方式中,该方法还包括:根据至少一个预设关键词,确定至少一个目标语素中每个目标语素对应的权重;上述步骤:根据每个目标语素对应的第一相关性,获得网络攻击检测结果,包括:根据每个目标语素对应的第一相关性以及每个目标语素对应的权重,获得网络攻击检测结果。In a possible implementation of the first aspect, the method further includes: determining a weight corresponding to each target morpheme in at least one target morpheme according to at least one preset keyword; the above step: according to the weight corresponding to each target morpheme Obtaining network attack detection results based on the first correlation includes: obtaining network attack detection results based on the first correlation corresponding to each target morpheme and the weight corresponding to each target morpheme.
该种可能的实现方式中,预设关键词通常包括用于网络攻击的一些关键语素(例如用于网络攻击的函数名称以及参数名称等),因此,通过匹配目标语素和预设关键词来确定目标语素的权重,可以很大程度上体现目标语素在网络攻击对应的代码中的重要程度,从而可以基于该权重,较为准确地进行网络攻击检测。In this possible implementation, the preset keywords usually include some key morphemes used in network attacks (such as function names and parameter names used in network attacks, etc.). Therefore, the target morphemes are determined by matching the target morphemes and the preset keywords. The weight of the target morpheme can largely reflect the importance of the target morpheme in the code corresponding to the network attack, so that network attack detection can be carried out more accurately based on the weight.
在第一方面的一种可能的实现方式中,上述步骤:根据每个目标语素对应的第一相关性以及每个目标语素对应的权重,获得网络攻击检测结果,包括:根据每个目标语素对应的第一相关性以及每个目标语素对应的权重,获得待检测内容对应的第二相关性;根据第二相关性与待检测内容对应的权重之和的比值,获得网络攻击检测结果。In a possible implementation of the first aspect, the above steps: obtaining a network attack detection result according to the first correlation corresponding to each target morpheme and the weight corresponding to each target morpheme, including: according to the corresponding first correlation of each target morpheme The first correlation and the weight corresponding to each target morpheme are used to obtain the second correlation corresponding to the content to be detected; the network attack detection result is obtained based on the ratio of the second correlation to the sum of the weights corresponding to the content to be detected.
该种可能的实现方式中,针对每个预设语料,可以计算至少一个目标语素中的每个目标语素与该预设语料的第一相关性,再根据至少一个目标语素中的每个目标语素与该预设语料的第一相关性,获得待检测内容与该预设语料的第二相关性,从而根据待检测内容与每个预设语料的第二相关性,获得网络攻击检测结果。其中,可以根据第二相关性与待检测内容对应的权重之和的比值,获得网络攻击检测结果。通过这一方式,可以对不常见内容或者无法通过关键函数进行识别的内容进行较为准确的检测。In this possible implementation, for each preset corpus, the first correlation between each target morpheme in at least one target morpheme and the preset corpus can be calculated, and then based on each target morpheme in at least one target morpheme The first correlation with the preset corpus is used to obtain the second correlation between the content to be detected and the preset corpus, so that the network attack detection result is obtained based on the second correlation between the content to be detected and each preset corpus. Among them, the network attack detection result can be obtained according to the ratio of the second correlation and the sum of weights corresponding to the content to be detected. In this way, uncommon content or content that cannot be identified through key functions can be more accurately detected.
在第一方面的一种可能的实现方式中,第一相关性是基于相应目标语素与相应预设语料中的语素的最高相似度以及目标比值而确定,目标比值用于描述相应预设语料的长度与待检测内容的长度的差异。In a possible implementation of the first aspect, the first correlation is determined based on the highest similarity between the corresponding target morpheme and the morpheme in the corresponding preset corpus and the target ratio. The target ratio is used to describe the corresponding preset corpus. The difference between the length and the length of the content to be detected.
该种可能的实现方式中,相应目标语素与相应预设语料中的语素的最高相似度是指相应目标语素与相应预设语料中的每个语素的相似度中,最高的相似度。通过该最高相似度,可以反映该目标语素在该预设语料中的出现概率,若该最高相似度较高,则说明该目标语素在该预设语料中出现的概率较大,该目标语素与该预设语料较为相关。目标比值用于描述相应预设语料的长度与待检测内容的长度的差异,可见通过该目标比值,可以一定程度上反映相应预设语料与待检测内容的差异。因此,该种可能的实现方式中,将最高相似度和目标比值均作为第一相关性的影响因素,可以避免出现虽然预设语料中的个别语素与目标语素相似,但预设语料的整体内容与待检测内容差异较大而导致的检测错误的情况。In this possible implementation, the highest similarity between the corresponding target morpheme and the morpheme in the corresponding preset corpus refers to the highest similarity among the similarities between the corresponding target morpheme and each morpheme in the corresponding preset corpus. The highest similarity can reflect the probability of the target morpheme appearing in the preset corpus. If the highest similarity is high, it means that the target morpheme has a greater probability of appearing in the preset corpus. The target morpheme is similar to This default corpus is more relevant. The target ratio is used to describe the difference between the length of the corresponding preset corpus and the length of the content to be detected. It can be seen that the target ratio can reflect the difference between the corresponding preset corpus and the content to be detected to a certain extent. Therefore, in this possible implementation method, both the highest similarity and the target ratio are used as influencing factors of the first correlation, which can avoid the situation that although individual morphemes in the preset corpus are similar to the target morpheme, the overall content of the preset corpus Detection errors caused by large differences with the content to be detected.
在第一方面的一种可能的实现方式中,该方法还包括:输出网络攻击检测结果,网络攻击检测结果中包含基于至少一个目标语素得到的代码信息。In a possible implementation of the first aspect, the method further includes: outputting a network attack detection result, where the network attack detection result includes code information obtained based on at least one target morpheme.
该种可能的实现方式中,若将待检测内容作为通过指定的变形方式对代码信息处理后得到的内容,则基于至少一个目标语素得到的代码信息可以认为是通过指定的变形方式处理之前的内容,也可以理解为基于变形方式对待检测内容进行还原后的内容。这样,该代码信息能够反映执行网络攻击的实际函数、参数和/或其他未经变形处理的信息。In this possible implementation, if the content to be detected is regarded as the content obtained after processing the code information through the specified transformation method, then the code information obtained based on at least one target morpheme can be considered as the content before processing through the specified transformation method. , can also be understood as the content after the content to be detected is restored based on the deformation method. In this way, the code information can reflect the actual functions, parameters and/or other untransformed information used to perform the cyber attack.
输出网络攻击检测结果可以有以下两种方式中的一种或多种:1、通过计算机设备向其他设备输出该网络攻击检测结果;2、通过计算机设备显示网络攻击检测结果。The network attack detection results can be output in one or more of the following two ways: 1. Output the network attack detection results to other devices through computer equipment; 2. Display the network attack detection results through computer equipment.
本申请第二方面提供一种网络攻击检测装置,该装置具有实现上述第一方面或第一方面任意一种可能实现方式的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块,例如获取模块、处理模块、计算模块以及检测模块。A second aspect of this application provides a network attack detection device, which has the function of implementing the method of the above-mentioned first aspect or any possible implementation of the first aspect. This function can be implemented by hardware, or it can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, such as an acquisition module, a processing module, a calculation module and a detection module.
本申请第三方面提供一种计算机设备,该计算机设备包括至少一个处理器、存储器以及存储在存储器中并可在处理器上运行的计算机执行指令,当计算机执行指令被处理器执行时,处理器执行如上述第一方面或第一方面任意一种可能的实现方式的方法。A third aspect of the present application provides a computer device. The computer device includes at least one processor, a memory, and computer-executable instructions stored in the memory and executable on the processor. When the computer-executed instructions are executed by the processor, the processor Execute the method of the above first aspect or any possible implementation of the first aspect.
本申请第四方面提供一种存储一个或多个计算机执行指令的计算机可读存储介质,当计算机执行指令被处理器执行时,处理器执行如上述第一方面或第一方面任意一种可能的实现方式的方法。A fourth aspect of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes any of the above-mentioned first aspects or possible methods of the first aspect. Ways to implement it.
本申请第五方面提供一种存储一个或多个计算机执行指令的计算机程序产品,当计算机执行指令被处理器执行时,处理器执行如上述第一方面或第一方面任意一种可能的实现方式的方法。A fifth aspect of the present application provides a computer program product that stores one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes the above-mentioned first aspect or any possible implementation of the first aspect. Methods.
本申请第六方面提供了一种芯片系统,该芯片系统包括处理器,用于支持计算机设备实现上述第一方面或第一方面任意一种可能的实现方式中所涉及的功能。在一种可能的设计中,芯片系统还可以包括存储器,存储器用于保存计算机设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。A sixth aspect of the present application provides a chip system. The chip system includes a processor and is used to support the computer device to implement the functions involved in the above-mentioned first aspect or any possible implementation manner of the first aspect. In a possible design, the chip system may also include a memory, which is used to store necessary program instructions and data for the computer device. The chip system may be composed of chips, or may include chips and other discrete devices.
其中,第二方面至第六方面或者其中任一种可能实现方式所带来的技术效果可参见第一方面或第一方面的相关可能实现方式所带来的技术效果,此处不再赘述。Among them, the technical effects brought by the second to sixth aspects or any one of the possible implementation methods may be referred to the technical effects brought by the first aspect or the related possible implementation methods of the first aspect, which will not be described again here.
附图说明Description of the drawings
图1a是本申请实施例提供的系统框架的一示例性示意图;Figure 1a is an exemplary schematic diagram of the system framework provided by the embodiment of the present application;
图1b是本申请实施例提供的系统框架的另一示例性示意图;Figure 1b is another exemplary schematic diagram of the system framework provided by the embodiment of the present application;
图1c是本申请实施例提供的系统框架的又一示例性示意图;Figure 1c is another exemplary schematic diagram of the system framework provided by the embodiment of the present application;
图2是本申请实施例提供的网络攻击检测方法的一示例性示意图;Figure 2 is an exemplary schematic diagram of a network attack detection method provided by an embodiment of the present application;
图3是本申请实施例提供的语素变换过程的一示例性示意图;Figure 3 is an exemplary schematic diagram of the morpheme transformation process provided by the embodiment of the present application;
图4是本申请实施例提供的语素变换过程的另一示例性示意图;Figure 4 is another exemplary schematic diagram of the morpheme conversion process provided by the embodiment of the present application;
图5是本申请实施例提供的网络攻击检测装置的一实施例示意图;Figure 5 is a schematic diagram of an embodiment of a network attack detection device provided by an embodiment of the present application;
图6是本申请实施例提供的计算机设备的一结构示意图。FIG. 6 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Persons of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”或其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。In this application, "at least one" refers to one or more, and "plurality" refers to two or more. "And/or" describes the relationship between associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the related objects are in an "or" relationship. "At least one of the following" or similar expressions thereof refers to any combination of these items, including any combination of single or plural items. The terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms so used are interchangeable under appropriate circumstances, and are merely a way of distinguishing objects with the same attributes in describing the embodiments of the present application. Furthermore, the terms "include" and "having" and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, product or apparatus comprising a series of elements need not be limited to those elements, but may include not explicitly other elements specifically listed or inherent to such processes, methods, products or equipment.
对于通过网页后门(webshell)等方式来进行的网络攻击,传统的网络攻击检测方式通常是识别网络数据中是否包含“assert”、“eval”等函数名称来确定是否受到了网络攻击。然而这一检测方式难以识别不包含明显的攻击函数的攻击命令,因此难以识别黑客通过混淆、绕过和加密等方法改变后的webshell代码,导致网络攻击的检测准确率较低。For network attacks through web backdoors (webshells) and other methods, traditional network attack detection methods usually identify whether the network data contains function names such as "assert" and "eval" to determine whether there is a network attack. However, this detection method is difficult to identify attack commands that do not contain obvious attack functions. Therefore, it is difficult to identify the webshell code modified by hackers through obfuscation, bypassing, encryption, etc., resulting in a low detection accuracy of network attacks.
对此,本申请实施例提供一种网络攻击检测方法,以提升对网络攻击的检测准确率。In this regard, embodiments of the present application provide a network attack detection method to improve the detection accuracy of network attacks.
本申请实施例可以应用于计算机设备。The embodiments of the present application can be applied to computer equipment.
该计算机设备的类型可以有多种。示例性地,该计算机设备可以为终端设备,也可以为云端设备。The computer equipment can be of many types. For example, the computer device may be a terminal device or a cloud device.
在一种示例中,该计算机设备为云端设备。云端设备可以为服务器、服务器集群、虚拟机(virtual machine)或者容器(container)。云端设备可以具有数据存储和计算的能力,并可以为用户提供网络攻击检测相关的云服务。In one example, the computer device is a cloud device. Cloud devices can be servers, server clusters, virtual machines or containers. Cloud devices can have data storage and computing capabilities, and can provide users with cloud services related to network attack detection.
其中,需要进行网络攻击检测的用户的类型在此不做限制。示例性地,云端设备可以为企业用户提供网络攻击检测相关的云服务,也可以为个人用户提供网络攻击检测相关的云服务。Among them, the types of users who need to perform network attack detection are not limited here. For example, the cloud device can provide cloud services related to network attack detection for enterprise users, and can also provide cloud services related to network attack detection for individual users.
其中,不同的用户对应的用户设备的类型以及信息交互方式可以有多种。Among them, there may be multiple types of user equipment and information interaction methods corresponding to different users.
例如,用户可以为企业用户。该用户对应有企业网络,该企业网络的具体功能和设备拓扑结构在此不做限定,示例性地,企业网络可以包含网络设备、终端以及服务器等。而采集设备可以是用户网络的外部设备,采集设备通过指定的通信方式与企业网络所关联的一个或多个设备(例如企业网络中的网络设备)进行连接,从而获得用户对应的网络数据,然后可以由采集设备将网络数据发送至云端设备,或者,由采集设备获取网络数据对应的待检测内容,再将待检测内容发送至云端设备,以进行网络攻击检测。如图1a所示,为本申请实施例的一种示例性的系统框架示意图。其中,采集设备102从企业网络103获取网络数据。云端设备101可以与采集设备102进行信息交互,以获得网络数据或者网络数据对应的待检测内容。For example, the user can be an enterprise user. This user corresponds to an enterprise network. The specific functions and device topology of the enterprise network are not limited here. For example, the enterprise network may include network devices, terminals, servers, etc. The collection device can be an external device of the user network. The collection device connects with one or more devices associated with the enterprise network (such as network devices in the enterprise network) through designated communication methods to obtain the user's corresponding network data, and then The collection device can send the network data to the cloud device, or the collection device can obtain the content to be detected corresponding to the network data, and then send the content to be detected to the cloud device for network attack detection. As shown in Figure 1a, it is a schematic diagram of an exemplary system framework according to an embodiment of the present application. Among them, the collection device 102 obtains network data from the enterprise network 103. The cloud device 101 can interact with the collection device 102 to obtain network data or content to be detected corresponding to the network data.
又如,用户可以为个人用户,此时,该个人用户可以对应的用户设备可以包括个人终端。该个人终端可以与互联网进行连接,并产生网络数据,然后,该个人终端可以将该网络数据发送至云端设备,或者,由该个人终端获取网络数据对应的待检测内容,再将待检测内容发送至云端设备,以进行网络攻击检测。如图1b所示,为本申请实施例的另一种示例性地系统框架示意图。其中,个人终端112与互联网连接,并产生网络数据,云端设备111可以与个人终端112连接,以从个人终端112获得网络数据或者网络数据对应的待检测内容。For another example, the user may be an individual user. In this case, the user equipment corresponding to the individual user may include a personal terminal. The personal terminal can be connected to the Internet and generate network data. Then, the personal terminal can send the network data to the cloud device, or the personal terminal can obtain the content to be detected corresponding to the network data and then send the content to be detected. to cloud devices for network attack detection. As shown in Figure 1b, it is a schematic diagram of another exemplary system framework according to the embodiment of the present application. Among them, the personal terminal 112 is connected to the Internet and generates network data. The cloud device 111 can be connected to the personal terminal 112 to obtain network data or content to be detected corresponding to the network data from the personal terminal 112 .
而在另一示例中,该计算机设备可以为终端设备。此时,该终端设备可以是用户所使用的设备,该终端设备可以基于终端设备所涉及的网络数据,对终端设备本身进行网络攻击检测。In another example, the computer device may be a terminal device. At this time, the terminal device may be a device used by the user, and the terminal device may perform network attack detection on the terminal device itself based on the network data involved in the terminal device.
示例性地,该终端设备可以是手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端、增强现实(augmented reality,AR)终端、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、以物联网(internet of things,IoT)中的无线终端等。For example, the terminal device may be a mobile phone (mobile phone), a tablet computer (pad), a computer with wireless transceiver functions, a virtual reality (VR) terminal, an augmented reality (AR) terminal, or an industrial control device. Wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, and transportation safety wireless terminals, wireless terminals in smart cities, wireless terminals in smart homes, wireless terminals in the Internet of Things (IoT), etc.
如图1c所示,为本申请实施例的又一种示例性的系统框架示意图。其中,计算机设备113可以获得计算机设备本身的网络数据,并基于网络数据进行网络攻击检测。As shown in Figure 1c, it is a schematic diagram of another exemplary system framework according to the embodiment of the present application. Among them, the computer device 113 can obtain the network data of the computer device itself, and perform network attack detection based on the network data.
下面,对本申请实施例中所涉及的网络攻击检测方法进行介绍。Next, the network attack detection method involved in the embodiment of this application is introduced.
本申请实施例的一种网络攻击检测方法包括图2中的步骤201-204。A network attack detection method according to the embodiment of the present application includes steps 201-204 in Figure 2.
步骤201,获取网络数据对应的待检测内容。Step 201: Obtain the content to be detected corresponding to the network data.
本申请实施例中,网络数据指用户设备通过网络进行传输的数据。例如,该网络数据可以包括用户对应的网络设备所传输的数据、用户对应的个人终端、服务器所发送或接收的数据中的一种或多种。In the embodiment of this application, network data refers to data transmitted by user equipment through the network. For example, the network data may include one or more of data transmitted by the user's corresponding network device, data sent or received by the user's corresponding personal terminal, and the server.
本申请实施例中,获取网络数据对应的待检测内容的方式可以有多种,在此不做限制。In the embodiments of this application, there are many ways to obtain the content to be detected corresponding to the network data, which are not limited here.
在一种示例中,执行本申请实施例的计算机设备为云端设备,则可以是云端设备获取用户设备的网络数据之后,根据获取到的网络数据,获取待检测内容;或者,可以是用户设备或者用户设备对应的采集设备采集网络数据之后,根据采集到的网络数据,获取待检测内容并将该待检测内容发送至云端设备。而在另一种示例中,执行本申请实施例的计算机设备为用户设备,则可以是用户设备根据采集到的网络数据,获得待检测内容。In one example, the computer device executing the embodiment of the present application is a cloud device. After the cloud device obtains the network data of the user device, it may obtain the content to be detected based on the obtained network data; or it may be the user device or After the collection device corresponding to the user equipment collects network data, it obtains the content to be detected based on the collected network data and sends the content to be detected to the cloud device. In another example, the computer device that executes the embodiment of the present application is a user device, and the user device may obtain the content to be detected based on the collected network data.
采集网络数据的一种示例性方式可以是:用户对应的网络设备、终端设备或者服务器中的指定端口的数据流被复制并传输至采集设备或者用户设备中,从而在不影响用户对网络数据的正常处理的情况下,获得用户的网络数据。An exemplary way of collecting network data may be: the data stream of a designated port in the user's corresponding network device, terminal device or server is copied and transmitted to the collection device or user device, so as not to affect the user's access to network data. Under normal processing, the user's network data is obtained.
该待检测内容可以为网络数据中的一部分信息。例如,可以是网络数据中指定类型的信息,具有指定标识的信息或者关于指定协议的信息等等。The content to be detected may be part of the information in the network data. For example, it can be information of a specified type in network data, information with a specified identifier, or information about a specified protocol, etc.
在一些实施例中,获取网络数据对应的待检测内容,包括:In some embodiments, obtaining content to be detected corresponding to network data includes:
获取网络数据的元数据,元数据包括请求报文信息、响应报文信息以及统一资源定位系统URL中的一种或多种;Obtain metadata of network data. Metadata includes one or more of request message information, response message information, and Uniform Resource Locator System URL;
根据元数据,获得待检测内容。According to the metadata, the content to be detected is obtained.
其中,网络数据的元数据(metadata)指用于描述网络数据的数据。该元数据包括请求报文信息、响应报文信息以及统一资源定位系统(uniform resource locator,URL)中的一种或多种。请求报文信息包括请求报文头和/或请求报文体,响应报文信息包括响应报文头和/或响应报文体。Among them, the metadata of network data refers to the data used to describe network data. The metadata includes one or more of request message information, response message information, and uniform resource locator (URL). The request message information includes a request message header and/or a request message body, and the response message information includes a response message header and/or a response message body.
随着网络技术的不断发展,用户所产生的网络数据的数据量通常较大,导致从网络数据中识别网络攻击的难度较大。而本申请实施例中,考虑到网络攻击的相关信息通常隐含于网络数据的元数据中,因此,从网络数据的元数据中获取待检测内容。由于元数据的数据量通常较小,因此,从元数据中可以较为高效快速地获取网络数据对应的待检测内容。With the continuous development of network technology, the amount of network data generated by users is usually large, making it difficult to identify network attacks from network data. In the embodiment of the present application, considering that information related to network attacks is usually hidden in the metadata of network data, the content to be detected is obtained from the metadata of network data. Since the amount of metadata is usually small, the content to be detected corresponding to the network data can be obtained more efficiently and quickly from the metadata.
在一些实施例中,根据元数据,获得待检测内容,包括:In some embodiments, content to be detected is obtained based on metadata, including:
从元数据中,提取键值对数据,键值对数据用于指示键对应的值;From the metadata, extract key-value pair data, which is used to indicate the value corresponding to the key;
根据键值对数据中的值,获得待检测内容。Obtain the content to be detected based on the value in the key-value pair data.
本申请实施例中,网络攻击的相关信息常常包含于元数据中的赋值信息中,因此,可以从元数据中,提取键值对数据,然后从键值对数据中提取可能涉及网络攻击的赋值信息,从而获得待检测内容。In the embodiments of this application, information related to network attacks is often included in the assignment information in metadata. Therefore, key-value pair data can be extracted from the metadata, and then assignments that may involve network attacks can be extracted from the key-value pair data. information to obtain the content to be detected.
举例来说,在一种示例中,网络数据的元数据中的请求报文体包含如下内容:For example, in one example, the request message body in the metadata of the network data contains the following content:
data=<?php@eval($_POST[admin]);?>data=<? php@eval($_POST[admin]);? >
可以理解,该部分内容为一组键值对,其中,可以识别出“data”为键,而“<?php@eval($_POST[admin]);?>”为“data”的赋值信息,也即是作为键值对数据中的值,此时,可以从上述请求报文体中,提取“<?php@eval($_POST[admin]);?>”作为待检测内容。It can be understood that the content of this part is a set of key-value pairs, in which "data" can be identified as the key, and "<?php@eval($_POST[admin]);?>" is the assignment information of "data". That is, as the value in the key-value pair data, at this time, "<?php@eval($_POST[admin]);?>" can be extracted from the above request message body as the content to be detected.
而在另一种示例中,网络数据的元数据中的URL包含以下内容:In another example, the URL in the metadata of the network data contains the following content:
http://192.168.2.11/?s=index/\think\template\driver\file/write&cacheFile=r obots1.php&content=<?php@eval($_POST[admin]);?>http://192.168.2.11/? s=index/\think\template\driver\file/write&cacheFile=robots1.php&content=<? php@eval($_POST[admin]);? >
其中,包括键值对数据“content=<?php@eval($_POST[admin]);?>”,从中提取出“content”对应的值“<?php@eval($_POST[admin]);?>”以作为待检测内容。Among them, it includes the key-value pair data "content=<?php@eval($_POST[admin]);?>", from which the value corresponding to "content" is extracted "<?php@eval($_POST[admin]); ?>" as the content to be detected.
步骤202,根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得待检测内容对应的至少一个目标语素。Step 202: Transform at least one morpheme in the content to be detected according to the grammatical structure of the content to be detected, and obtain at least one target morpheme corresponding to the content to be detected.
目前,传统的网络攻击检测方式通常是识别网络数据中是否包含“assert”、“eval”等函数名称来确定是否受到了网络攻击。At present, the traditional network attack detection method usually identifies whether the network data contains function names such as "assert" and "eval" to determine whether there is a network attack.
而为了与网络攻击检测方式进行对抗,黑客常常通过混淆、绕过、字符串截断重组和/或编码加密等变形方式来改变代码,使得攻击代码不包含明显的攻击函数。In order to compete with network attack detection methods, hackers often change the code through deformation methods such as obfuscation, bypass, string truncation and reorganization, and/or encoding and encryption, so that the attack code does not contain obvious attack functions.
基于此,本申请实施例中,可以根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,以对待检测内容进行还原,其中,若将待检测内容作为通过变形方式处理后的内容,则对待检测内容中的至少一个语素进行变换得到的是通过变形方式处理之前的内容。Based on this, in the embodiments of the present application, at least one morpheme in the content to be detected can be transformed according to the grammatical structure of the content to be detected, so as to restore the content to be detected. Wherein, if the content to be detected is treated as a deformed content, then at least one morpheme in the content to be detected is transformed to obtain the content before processing through the deformation method.
本申请实施例中,示例性地,可以基于语法树解析技术等方法,解析待检测内容,确定待检测内容的语法结构,识别待检测内容中的句子成分以及句子成分之间的关联关系,并且,可以通过解析得到的语法树(syntax tree)来描述待检测内容的语法结构,从而根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得待检测内容对应的至少一个目标语素。In the embodiment of the present application, for example, based on methods such as syntax tree parsing technology, the content to be detected can be parsed, the grammatical structure of the content to be detected can be determined, the sentence components in the content to be detected and the correlation between the sentence components can be identified, and , the syntax tree obtained by parsing can be used to describe the grammatical structure of the content to be detected, so that at least one morpheme in the content to be detected is transformed according to the grammatical structure of the content to be detected, and at least one target corresponding to the content to be detected is obtained. morpheme.
待检测内容涉及的变形方式可能有一种或多种,并且,当变形方式不止一种时,各种变形方式可能在同一语素上层层叠加。因此,本申请实施例中,根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换的具体过程也可以有多种情况,具体可以基于实际场景中待检测内容所涉及的变形方式、元素的类型以及代码结构等来确定。示例性地,可以基于待检测内容中的变量的调用关系和/或编码信息等对待检测内容中的至少一个语素进行变换。The content to be detected may involve one or more deformation methods, and when there is more than one deformation method, various deformation methods may be superimposed on the same morpheme. Therefore, in the embodiment of the present application, according to the grammatical structure of the content to be detected, the specific process of transforming at least one morpheme in the content to be detected can also be in various situations, and the specific process can be based on the transformation method involved in the content to be detected in the actual scene. , element type and code structure, etc. to determine. For example, at least one morpheme in the content to be detected may be transformed based on the calling relationship and/or encoding information of variables in the content to be detected.
例如,在一种示例中,待检测内容所涉及的变形方式在同一语素上层层叠加,其中,黑客可以对“assert”进行字符串拆分,再对拆分后的'ass'.'ert'通过变量调用进行变形。那么,本申请实施例中,对待检测内容中的至少一个语素进行变换的方式可以包括:基于待检测内容中的变量调用关系进行一次变换,再基于语义信息进行重组,对一次变换后的内容中的'ass'.'ert'进行重组,获得目标语素“assert”。For example, in one example, the deformations involved in the content to be detected are superimposed on the same morpheme. In this case, a hacker can split the string of "assert" and then split the string of 'ass'.'ert' Transformation via variable calls. Then, in the embodiment of the present application, the method of transforming at least one morpheme in the content to be detected may include: performing a transformation based on the variable calling relationship in the content to be detected, and then reorganizing based on the semantic information. 'ass'.'ert' is reorganized to obtain the target morpheme "assert".
在另一种示例中,待检测内容中包含编码信息,对待检测内容中的至少一个语素进行变换的方式还可以包括:根据待检测内容中的编码信息,对待检测内容中的至少一个语素进行解码,以还原为通过编码处理之前的内容。举例来说,在待检测内容中,识别到关键词base64_decode,则可以理解待检测内容中有部分内容通过base64编码进行加密,因此,可以基于base64编码的相关解码技术,对该部分内容进行解码,从而实现对该部分内容的变换。In another example, the content to be detected contains coding information, and the method of transforming at least one morpheme in the content to be detected may also include: decoding at least one morpheme in the content to be detected according to the coding information in the content to be detected. , to revert to what it was before it was processed through encoding. For example, if the keyword base64_decode is recognized in the content to be detected, it can be understood that part of the content to be detected is encrypted through base64 encoding. Therefore, this part of the content can be decoded based on the relevant decoding technology of base64 encoding. This enables the transformation of this part of the content.
需要说明的是,本示例中,识别待检测内容中是否包含编码的相关信息的步骤可以对待检测内容进行语法结构解析的步骤之前,此时,可以对待检测内容中被编码的信息进行解码还原之后,再进行语法结构解析;或者,也可以是对待检测内容进行语法结构解析之后,若在待检测内容的某一句子成分中,识别到编码的相关信息,则可以基于相应的解码技术,对该句子成分中的内容进行解码还原。It should be noted that in this example, the step of identifying whether the content to be detected contains encoding-related information can be performed before the step of parsing the grammatical structure of the content to be detected. At this time, the encoded information in the content to be detected can be decoded and restored. , and then analyze the grammatical structure; or, after analyzing the grammatical structure of the content to be detected, if the relevant information of the encoding is identified in a certain sentence component of the content to be detected, the corresponding decoding technology can be used to The content in the sentence components is decoded and restored.
此外,本申请实施例中,还可以进一步识别出变换后的元素的类型,并对变换后的语素进行筛选和重组等处理,以获得目标元素。In addition, in the embodiment of the present application, the type of the transformed element can be further identified, and the transformed morphemes can be filtered and reorganized to obtain the target element.
在一些实施例中,根据待检测内容的语法结构,对待检测内容中的至少一个语素进行转换,获得待检测内容对应的至少一个目标语素,包括:In some embodiments, at least one morpheme in the content to be detected is converted according to the grammatical structure of the content to be detected, and at least one target morpheme corresponding to the content to be detected is obtained, including:
根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得第一信息;According to the grammatical structure of the content to be detected, at least one morpheme in the content to be detected is transformed to obtain the first information;
根据第一信息中的语素的类型,从第一信息中确定候选语素;Determine the candidate morpheme from the first information according to the type of the morpheme in the first information;
根据候选语素,获得至少一个目标语素。According to the candidate morpheme, at least one target morpheme is obtained.
示例性地,可以基于待检测内容中的变量的调用关系和/或编码信息对待检测内容中的至少一个语素进行变换。For example, at least one morpheme in the content to be detected may be transformed based on the calling relationship and/or encoding information of the variables in the content to be detected.
本申请实施例中,可以通过词法分析(lexical analysis)等方式,确定第一信息中的语素的类型,例如,可以从第一信息中识别变量以及对应的变量类型、参数以及对应的参数类型、操作符以及对应的操作符类型等。In the embodiment of the present application, the type of morpheme in the first information can be determined through lexical analysis or other methods. For example, variables and corresponding variable types, parameters and corresponding parameter types, can be identified from the first information. Operators and corresponding operator types, etc.
在获得第一信息中的语素的类型之后,可以根据第一信息中的语素的类型,从第一信息中确定候选语素。其中,可以根据第一信息中的语素的类型,从第一信息中筛选出与网络攻击相关的类型。例如,可以从第一信息中筛选出变量以及String类型的参数等。After obtaining the type of the morpheme in the first information, candidate morphemes may be determined from the first information according to the type of the morpheme in the first information. Wherein, types related to network attacks can be screened out from the first information according to the types of morphemes in the first information. For example, variables and String type parameters can be filtered out from the first information.
在获得候选语素之后,可以将候选语素作为目标语素,也可以对候选语素进行进一步处理,以获得目标语素。举例来说,某些候选语素还存在字符串拆分、截断重组等变形处理,则可以对该候选语素进行重组,从而还原为变形处理之前的语素,再将还原为变形处理之前的语素作为目标语素。例如,对于候选语素'ass'.'ert',可以基于语义信息进行重组,获得“assert”以作为目标语素。After obtaining the candidate morpheme, the candidate morpheme can be used as the target morpheme, or the candidate morpheme can be further processed to obtain the target morpheme. For example, if some candidate morphemes also undergo deformation processing such as string splitting, truncation and reorganization, the candidate morpheme can be reorganized to restore it to the morpheme before the deformation processing, and then the restoration to the morpheme before the deformation processing is used as the target morpheme. For example, for the candidate morpheme 'ass'.'ert', it can be reorganized based on the semantic information to obtain "assert" as the target morpheme.
下面举例进行具体介绍。The following examples will be introduced in detail.
在一种示例中,如图3所示,对于待检测内容A:In an example, as shown in Figure 3, for content A to be detected:
"<?php$c='ass'.'ert';"<?php$c='ass'.'ert';
${c}($_POST[4]);${c}($_POST[4]);
?>"? >"
可以基于语法树解析技术,解析待检测内容A,通过解析后得到的语法树来描述待检测内容A的语法结构,识别待检测内容A中的句子成分以及句子成分之间的关联关系。The content A to be detected can be parsed based on syntax tree parsing technology, and the syntax tree obtained after parsing can be used to describe the grammatical structure of the content A to be detected, and the sentence components in the content A to be detected and the correlation between the sentence components can be identified.
基于待检测内容A对应的语法树,可以识别出待检测内容A中的变量的调用关系,从而对待检测内容A中的语素进行变换。Based on the syntax tree corresponding to the content A to be detected, the calling relationship of the variables in the content A to be detected can be identified, so that the morphemes in the content A to be detected can be transformed.
具体地,在待检测内容A中识别出变量c对应的赋值'ass'.'ert',并且变量c在待检测内容A中的“${c}($_POST[4])”中被调用,通过对待检测内容A中的变量c进行赋值替换,获得变换后的内容“${'ass'.'ert'}($_POST[4])”,并将变换后的内容“${'ass'.'ert'}($_POST[4])”作为第一信息A。Specifically, the assignment 'ass'.'ert' corresponding to the variable c is identified in the content A to be detected, and the variable c is called in "${c}($_POST[4])" in the content A to be detected , by assigning and replacing the variable c in the content A to be detected, the transformed content "${'ass'.'ert'}($_POST[4])" is obtained, and the transformed content "${'ass '.'ert'}($_POST[4])" as the first information A.
在获得第一信息A之后,可以通过词法分析(lexical analysis)等方式,确定第一信息中的语素的类型。如图3所示的示例中,第一信息A中,'ass'.'ert'是String类型,“$_POST”为变量,4是整型。After obtaining the first information A, the type of the morpheme in the first information can be determined through lexical analysis or other methods. In the example shown in Figure 3, in the first information A, 'ass'.'ert' is a String type, "$_POST" is a variable, and 4 is an integer.
根据第一信息A中的语素的类型,从第一信息A中筛选出与网络攻击相关的类型包括String类型和变量,那么,可以从第一信息A中筛选出'ass'.'ert'、“$_POST”。基于语义信息确定'ass'.'ert'涉及字符串拆分的变形方式,因此,可以对'ass'.'ert'进行重组,获得“assert”,并将“assert”以及从第一信息A中筛选出的“$_POST”作为目标语素A。According to the type of morphemes in the first information A, the types related to network attacks are filtered out from the first information A, including String type and variables. Then, 'ass'.'ert', "$_POST". Determining 'ass'.'ert' based on semantic information involves the deformation method of string splitting. Therefore, 'ass'.'ert' can be reorganized to obtain "assert", and "assert" and "assert" can be obtained from the first information A "$_POST" filtered out is used as the target morpheme A.
而在另一种示例中,如图4所示,对于待检测内容B:In another example, as shown in Figure 4, for content B to be detected:
可以确定待检测内容B中有部分内容通过base64编码进行加密,因此,可以基于base64编码的相关解码技术,对该部分内容进行解码,从而实现对该部分内容的变换。It can be determined that part of the content B to be detected is encrypted through base64 encoding. Therefore, this part of the content can be decoded based on the relevant decoding technology of base64 encoding, thereby realizing transformation of this part of the content.
这样,基于待检测内容B的语法结构以及解码后的信息,可以获得待检测内容B对应的第一信息B:In this way, based on the syntax structure of the content B to be detected and the decoded information, the first information B corresponding to the content B to be detected can be obtained:
eval($_POST['cmd'])eval($_POST['cmd'])
通过词法分析(lexical analysis)等方式确定第一信息B中的语素的类型。其中,第一信息B中,“eval”为函数名称,“cmd”为String类型的参数,“$_POST”为变量,均与网络攻击相关,因此,可以将“eval”、“$_POST”以及“‘cmd’”作为目标语素B。The type of morpheme in the first information B is determined through lexical analysis or other methods. Among them, in the first information B, "eval" is the function name, "cmd" is a String type parameter, and "$_POST" is a variable, all of which are related to network attacks. Therefore, "eval", "$_POST" and "'cmd'" is used as the target morpheme B.
步骤203,计算至少一个目标语素中的每个目标语素与预设语料的第一相关性。Step 203: Calculate the first correlation between each target morpheme in at least one target morpheme and the preset corpus.
本申请实施例中,预设语料为预先采集到的网络攻击预料。预设预料可以预先存储于数据库中。In the embodiment of this application, the preset corpus is pre-collected network attack predictions. Preset predictions can be stored in the database in advance.
本申请实施例中,将诸如“assert”、“eval”等用于网络攻击的函数和/或其他涉及网络攻击的参数称为关键语素。In the embodiment of this application, functions used for network attacks such as "assert" and "eval" and/or other parameters related to network attacks are called key morphemes.
预设语料可以是基于专家经验以及历史网络数据而获得的。示例性地,可以从网页后门(webshell)的脚本文件中,提取木马对应的脚本,从而获得预设语料。The preset corpus can be obtained based on expert experience and historical network data. For example, the script corresponding to the Trojan can be extracted from the script file of the web backdoor (webshell) to obtain the preset corpus.
预设语料的具体内容在此不做限制。示例性地,数据库中包含的预设语料可以包括含有“assert”、“eval”等用于网络攻击的函数或者参数的语料,也可以包括通过混淆、绕过、字符串截断重组、变量替换、编码加密等各种变形方式对用于网络攻击的函数或者参数进行处理所得到的语料,此外,还可以包括一些不常见的网络攻击对应的语料以及不涉及关键语素的网络攻击对应的语料。The specific content of the preset corpus is not limited here. For example, the preset corpus contained in the database may include corpus containing functions or parameters used for network attacks such as "assert" and "eval", or may include obfuscation, bypass, string truncation and reorganization, variable replacement, The corpus obtained by processing functions or parameters used in network attacks through various deformation methods such as encoding and encryption. In addition, it can also include corpus corresponding to some uncommon network attacks and corpus corresponding to network attacks that do not involve key morphemes.
如表1所示,数据库中,可以包含以下内容:As shown in Table 1, the database can contain the following content:
表1:数据库中的预设语料Table 1: Default corpus in the database
可以理解的是,表1中仅为预设语料的一些示例性内容,而不是对预设语料的具体限制。It can be understood that Table 1 is only some exemplary contents of the preset corpus, rather than specific limitations on the preset corpus.
预设语料的数量在此不做限制。The number of preset corpus is not limited here.
示例性地,预设语料的数量为多个,则计算至少一个目标语素中的每个目标语素与预设语料的第一相关性可以是:For example, if the number of preset corpus is multiple, then calculating the first correlation between each target morpheme in at least one target morpheme and the preset corpus can be:
针对每个预设语料,计算至少一个目标语素中的每个目标语素与该预设语料的第一相关性。For each preset corpus, a first correlation between each target morpheme in at least one target morpheme and the preset corpus is calculated.
其中,计算至少一个目标语素中的每个目标语素与预设语料的第一相关性的方式可以有多种。例如,可以通过涉及相关性计算的搜索算法计算目标语素与预设语料的第一相关性;或者,可以通过词嵌入模型、词频-逆文本频率(term frequency-inversedocument frequency,TF-IDF)算法等比对语句相似性的算法来计算目标语素与预设语料的第一相关性;或者,也可以通过基于变换器的双向编码器表征(bidirectional encoderrepresentations from transformers,BERT)模型等文本分类模型来计算目标语素与预设语料的第一相关性,还可以通过其他概率统计算法来计算目标语素与预设语料的第一相关性。There may be multiple ways of calculating the first correlation between each target morpheme in at least one target morpheme and the preset corpus. For example, the first correlation between the target morpheme and the preset corpus can be calculated through a search algorithm involving correlation calculation; or, the first correlation between the target morpheme and the preset corpus can be calculated through a word embedding model, term frequency-inverse document frequency (TF-IDF) algorithm, etc. An algorithm that compares sentence similarity to calculate the first correlation between the target morpheme and the preset corpus; alternatively, the target can also be calculated through a text classification model such as the bidirectional encoder representations from transformers (BERT) model. The first correlation between the morpheme and the preset corpus can also be calculated through other probability and statistical algorithms to calculate the first correlation between the target morpheme and the preset corpus.
步骤204,根据每个目标语素对应的第一相关性,获得网络攻击检测结果。Step 204: Obtain a network attack detection result based on the first correlation corresponding to each target morpheme.
根据每个目标语素对应的第一相关性,可以获得待检测内容关于预设语料的相关性,从而确定待检测内容包含网络攻击行为的可能性,也即是说待检测内容包含网络攻击行为的概率(下面称为攻击概率),从而获得网络攻击检测结果。According to the first correlation corresponding to each target morpheme, the correlation of the content to be detected with respect to the preset corpus can be obtained, thereby determining the possibility that the content to be detected contains network attack behavior, that is to say, the probability that the content to be detected contains network attack behavior probability (hereinafter referred to as attack probability), thereby obtaining network attack detection results.
其中,该攻击概率高于预设概率阈值时,可以认为待检测内容包含网络攻击,也即是说,检测到针对网络数据对应的用户遭到了网络攻击。Among them, when the attack probability is higher than the preset probability threshold, it can be considered that the content to be detected contains a network attack, that is to say, it is detected that the user corresponding to the network data has been attacked by the network.
本申请实施例中,在获取网络数据对应的待检测内容之后,可以根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得待检测内容对应的至少一个目标语素,这样,可以根据待检测内容的语法结构,识别待检测内容中通过混淆、绕过等方式处理后的内容并进行变换,获得至少一个目标语素。然后,可以计算至少一个目标语素中的每个目标语素与预设语料的第一相关性,再根据每个目标语素对应的第一相关性,获得网络攻击检测结果,从而充分利用诸如攻击语料等语料信息来检测变换还原后获得的语素是否与网络攻击行为相关,以获得较为准确的网络攻击检测结果。In the embodiment of the present application, after obtaining the content to be detected corresponding to the network data, at least one morpheme in the content to be detected can be transformed according to the grammatical structure of the content to be detected, and at least one target morpheme corresponding to the content to be detected is obtained. In this way, According to the grammatical structure of the content to be detected, the content in the content to be detected that has been processed by obfuscation, bypassing, etc. can be identified and transformed to obtain at least one target morpheme. Then, the first correlation between each target morpheme in at least one target morpheme and the preset corpus can be calculated, and then the network attack detection result can be obtained based on the first correlation corresponding to each target morpheme, thereby making full use of attack corpus, etc. Corpus information is used to detect whether the morphemes obtained after transformation and restoration are related to network attack behaviors, so as to obtain more accurate network attack detection results.
在一些实施例中,方法还包括:In some embodiments, the method further includes:
根据至少一个预设关键词,确定至少一个目标语素中每个目标语素对应的权重;Determine the weight corresponding to each target morpheme in at least one target morpheme based on at least one preset keyword;
根据每个目标语素对应的第一相关性,获得网络攻击检测结果,包括:Based on the first correlation corresponding to each target morpheme, network attack detection results are obtained, including:
根据每个目标语素对应的第一相关性以及每个目标语素对应的权重,获得网络攻击检测结果。According to the first correlation corresponding to each target morpheme and the weight corresponding to each target morpheme, the network attack detection result is obtained.
本申请实施例中,预设关键词为预先采集到的网络攻击相关的关键词,例如“assert”、“eval”等较明显体现网络数据中存在网络攻击行为的函数名称。预设关键词可以存储于数据库中。预设关键词的数量在此不做限定。通常来说,预设关键词的数量为多个。In the embodiment of this application, the preset keywords are pre-collected keywords related to network attacks, such as "assert", "eval" and other function names that clearly reflect the existence of network attack behaviors in network data. Preset keywords can be stored in the database. The number of preset keywords is not limited here. Generally speaking, the number of preset keywords is multiple.
对于每一个目标语素,可以通过相似度算法,计算该目标语素分别与各个预设关键词的相似度。示例性地,该相似度算法可以为编辑距离(edit distance)、N-Gram算法等。For each target morpheme, the similarity between the target morpheme and each preset keyword can be calculated through a similarity algorithm. For example, the similarity algorithm can be edit distance (edit distance), N-Gram algorithm, etc.
基于该目标语素分别与各个预设关键词的相似度,可以确定该目标语素的权重。Based on the similarity between the target morpheme and each preset keyword, the weight of the target morpheme can be determined.
例如,在一种示例中,可以将该目标语素分别与各个预设关键词的相似度中,最高的相似度作为该目标语素的权重。For example, in one example, the highest similarity among the similarities between the target morpheme and each preset keyword can be used as the weight of the target morpheme.
而在另一种示例中,若该目标语素与某一预设关键词的相似度大于预设相似度阈值,则认为目标语素与该预设关键词匹配成功,此时,可以将该目标语素的权重设定为高权重值,例如设定为1,或者,还可以根据相匹配的预设关键词对应的预设权重,确定该目标语素对应的权重;而若该目标语素与所有预设关键词的相似度均不大于预设相似度阈值,则认为目标语素与所有预设关键词均不匹配,并将该目标语素的权重设定为低权重值,例如设定为0或者0.3。In another example, if the similarity between the target morpheme and a certain preset keyword is greater than the preset similarity threshold, it is considered that the target morpheme matches the preset keyword successfully. At this time, the target morpheme can be The weight of is set to a high weight value, for example, 1, or the weight corresponding to the target morpheme can also be determined based on the preset weight corresponding to the matching preset keyword; and if the target morpheme matches all preset If the similarity of the keywords is not greater than the preset similarity threshold, it is considered that the target morpheme does not match all the preset keywords, and the weight of the target morpheme is set to a low weight value, such as 0 or 0.3.
本申请实施例中,预设关键词通常包括用于网络攻击的一些关键语素(例如用于网络攻击的函数名称以及参数名称等),因此,通过匹配目标语素和预设关键词来确定目标语素的权重,可以很大程度上体现目标语素在网络攻击对应的代码中的重要程度,从而可以基于该权重,较为准确地进行网络攻击检测。In the embodiment of this application, the preset keywords usually include some key morphemes used in network attacks (such as function names and parameter names used in network attacks, etc.). Therefore, the target morpheme is determined by matching the target morpheme and the preset keywords. The weight can largely reflect the importance of the target morpheme in the code corresponding to the network attack, so that network attack detection can be carried out more accurately based on this weight.
在一些实施例中,根据每个目标语素对应的第一相关性以及每个目标语素对应的权重,获得网络攻击检测结果,包括:In some embodiments, network attack detection results are obtained based on the first correlation corresponding to each target morpheme and the weight corresponding to each target morpheme, including:
根据每个目标语素对应的第一相关性以及每个目标语素对应的权重,获得待检测内容对应的第二相关性;According to the first correlation corresponding to each target morpheme and the weight corresponding to each target morpheme, the second correlation corresponding to the content to be detected is obtained;
根据第二相关性与待检测内容对应的权重之和的比值,获得网络攻击检测结果。According to the ratio of the second correlation and the sum of weights corresponding to the content to be detected, the network attack detection result is obtained.
其中,计算至少一个目标语素中的每个目标语素与预设语料的第一相关性可以包括:Wherein, calculating the first correlation between each target morpheme in the at least one target morpheme and the preset corpus may include:
针对每个预设语料,计算至少一个目标语素中的每个目标语素与该预设语料的第一相关性。For each preset corpus, a first correlation between each target morpheme in at least one target morpheme and the preset corpus is calculated.
那么,根据每个目标语素对应的第一相关性,获得网络攻击检测结果可以包括:Then, based on the first correlation corresponding to each target morpheme, obtaining the network attack detection results can include:
针对每个预设语料,根据至少一个目标语素中的每个目标语素与该预设语料的第一相关性,获得待检测内容与该预设语料的第二相关性;For each preset corpus, obtain a second correlation between the content to be detected and the preset corpus based on the first correlation between each target morpheme in at least one target morpheme and the preset corpus;
根据待检测内容与每个预设语料的第二相关性,获得网络攻击检测结果。According to the second correlation between the content to be detected and each preset corpus, the network attack detection result is obtained.
本申请实施例中,待检测内容对应的权重指待检测内容对应的目标语素的权重,待检测内容对应的权重之和指待检测内容对应的目标语素的权重之和。In the embodiment of this application, the weight corresponding to the content to be detected refers to the weight of the target morphemes corresponding to the content to be detected, and the sum of the weights corresponding to the content to be detected refers to the sum of the weights of the target morphemes corresponding to the content to be detected.
通过这一方式,可以对不常见内容或者无法通过关键函数进行识别的内容进行较为准确的检测。In this way, uncommon content or content that cannot be identified through key functions can be more accurately detected.
例如,若某一待检测内容中,目标语素对应的权重均较低,可见,目标语素中没有包含关键函数等易于识别网络攻击的关键语素。在大多数情况下,此时,该待检测内容对应的第二相关性通常也较低,也即是说,在大多数情况下,该待检测内容包含网络攻击的可能性较低。For example, if the weights corresponding to the target morphemes in a certain content to be detected are all low, it can be seen that the target morphemes do not contain key morphemes such as key functions that are easy to identify network attacks. In most cases, at this time, the second correlation corresponding to the content to be detected is usually low, that is to say, in most cases, the possibility that the content to be detected contains a network attack is low.
而在另一些情况下,可能有一些网络攻击并不包含关键语素,或者并不常见,但基于专家经验,可以预先收集这些不包含关键语素或者不常见的网络攻击对应的语料,以及不常见的攻击方式对应的语料以作为预设语料,并存储到数据库中。In other cases, there may be some network attacks that do not contain key morphemes or are uncommon. However, based on expert experience, corpus corresponding to these network attacks that do not contain key morphemes or are uncommon, as well as uncommon ones, can be collected in advance. The corpus corresponding to the attack method is used as the default corpus and stored in the database.
此时,目标语素与相应的预设语料的第一相关性较高,虽然由于权重较低,导致相应的第二相关性不高,但该第二相关性与待检测内容对应的权重之和的比值通常也较高,因此,可以认为相应的网络攻击发生概率依然较高。可见,根据第二相关性与待检测内容对应的权重之和的比值,获得网络攻击检测结果,不仅可以准确地检测包含关键语素的网络攻击,还可以准确地检测不包含关键语素或者不常见的网络攻击,从而可以保证网络攻击检测的准确性。此外,通过维护数据库中的预设语料,基于专家经验而及时更新这些不包含关键语素的网络攻击对应的语料,以及不常见的攻击方式对应的语料,可以提升本申请实施例中的网络攻击检测方法的泛化性。At this time, the first correlation between the target morpheme and the corresponding preset corpus is high. Although the corresponding second correlation is not high due to the low weight, the sum of the weight corresponding to the second correlation and the content to be detected is The ratio of is usually higher, therefore, it can be considered that the probability of occurrence of the corresponding network attack is still high. It can be seen that by obtaining network attack detection results based on the ratio of the second correlation and the sum of weights corresponding to the content to be detected, not only can network attacks that contain key morphemes be accurately detected, but also network attacks that do not contain key morphemes or are uncommon can be accurately detected. Network attacks, thus ensuring the accuracy of network attack detection. In addition, by maintaining the preset corpora in the database and timely updating the corpora corresponding to network attacks that do not contain key morphemes based on expert experience, as well as the corpora corresponding to uncommon attack methods, network attack detection in the embodiments of the present application can be improved. Generalizability of the method.
在一些实施例中,第一相关性是基于相应目标语素与相应预设语料中的语素的最高相似度以及目标比值而确定,目标比值用于描述相应预设语料的长度与待检测内容的长度的差异。In some embodiments, the first correlation is determined based on the highest similarity between the corresponding target morpheme and the morpheme in the corresponding preset corpus and the target ratio. The target ratio is used to describe the length of the corresponding preset corpus and the length of the content to be detected. difference.
本申请实施例中,相应目标语素与相应预设语料中的语素的最高相似度是指相应目标语素与相应预设语料中的每个语素的相似度中,最高的相似度。通过该最高相似度,可以反映该目标语素在该预设语料中的出现概率,若该最高相似度较高,则说明该目标语素在该预设语料中出现的概率较大,该目标语素与该预设语料较为相关。其中,示例性地,可以通过编辑距离(edit distance)、N-Gram算法等相似度算法计算目标语素与相应预设语料中的每个语素的相似度。In the embodiment of the present application, the highest similarity between the corresponding target morpheme and the morpheme in the corresponding preset corpus refers to the highest similarity among the similarities between the corresponding target morpheme and each morpheme in the corresponding preset corpus. The highest similarity can reflect the probability of the target morpheme appearing in the preset corpus. If the highest similarity is high, it means that the target morpheme has a greater probability of appearing in the preset corpus. The target morpheme is similar to This default corpus is more relevant. For example, the similarity between the target morpheme and each morpheme in the corresponding preset corpus can be calculated through similarity algorithms such as edit distance (edit distance) and N-Gram algorithm.
目标比值用于描述相应预设语料的长度与待检测内容的长度的差异。示例性地,该目标比值可以是预设语料的长度与待检测内容的长度中的较大值与较小值的比值,也可以是预设语料的长度与待检测内容的长度中的较小值与较大值的比值。通过该目标比值,可以一定程度上反映相应预设语料与待检测内容的差异。The target ratio is used to describe the difference between the length of the corresponding preset corpus and the length of the content to be detected. For example, the target ratio may be the ratio of the larger value to the smaller value of the length of the preset corpus and the length of the content to be detected, or it may be the smaller of the length of the preset corpus and the length of the content to be detected. The ratio of the value to the larger value. Through this target ratio, the difference between the corresponding preset corpus and the content to be detected can be reflected to a certain extent.
本申请实施例中,将最高相似度和目标比值均作为第一相关性的影响因素,可以避免出现虽然预设语料中的个别语素与目标语素相似,但预设语料的整体内容与待检测内容差异较大而导致的检测错误的情况。In the embodiment of the present application, both the highest similarity and the target ratio are used as influencing factors of the first correlation, which can avoid the situation that although individual morphemes in the preset corpus are similar to the target morpheme, the overall content of the preset corpus is different from the content to be detected. Large differences lead to detection errors.
下面以一个具体示例,对本申请实施例进行示例性说明。The following uses a specific example to illustrate the embodiments of the present application.
在本示例中,可以对于待检测内容Q,根据待检测内容Q中的目标语素qi以及预设语料d,可以计算该待检测内容Q与预设语料d之间的第二相关性Score(Q,d),具体地,可以基于以下第一公式计算第二相关性Score(Q,d):In this example, for the content Q to be detected, according to the target morpheme q i in the content Q to be detected and the preset corpus d, the second correlation Score ( Q,d), specifically, the second correlation Score(Q,d) can be calculated based on the following first formula:
Score(Q,d)=∑Wi·R(qi,d)Score(Q,d)=∑W i ·R(q i ,d)
其中,Score(Q,d)为待检测内容Q与预设语料d之间的第二相关性,Wi为目标语素qi对应的权重,R(qi,d)为目标语素qi与预设语料d的第一相关性。Among them, Score(Q,d) is the second correlation between the content Q to be detected and the preset corpus d, Wi is the weight corresponding to the target morpheme qi, and R(q i ,d) is the target morpheme qi and the preset corpus d. The first correlation of corpus d.
第一相关性R(qi,d)可以基于以下第二公式进行计算:The first correlation R(q i ,d) can be calculated based on the following second formula:
其中,为目标比值,其中,dl为预设语料的长度,ql为待检测内容Q的长度,max(dl,ql)为dl和ql中的较大值,min(dl,ql)为dl和ql中的较小值,K1、b分别为可配置的调节因子,K1、b的具体取值可以预先基于经验进行配置。in, is the target ratio, where dl is the length of the preset corpus, ql is the length of the content Q to be detected, max(dl,ql) is the larger value of dl and ql, min(dl,ql) is the larger value of dl and ql The smaller value of K1 and b are configurable adjustment factors respectively, and the specific values of K1 and b can be configured in advance based on experience.
可以理解的是,目标比值接近1或者等于1时,说明预设语料d与待检测内容Q的长度较为接近;而目标比值与1的差距较大,则说明预设语料d与待检测内容Q的长度差异较大,通常来说,此时,相应预设语料与待检测内容的具体内容的差异也可能较大。It can be understood that when the target ratio is close to 1 or equal to 1, it means that the length of the preset corpus d and the content to be detected Q are relatively close; while the gap between the target ratio and 1 is large, it means that the length of the preset corpus d and the content to be detected Q The difference in length is large. Generally speaking, at this time, the difference between the specific content of the corresponding preset corpus and the content to be detected may also be large.
此时,在计算第一相关性R(qi,d)的过程中,不仅考虑到了目标语素与预设语料之间的相关性,还考虑到了待检测内容整体长度与预设语料整体长度的相似性,避免出现虽然预设语料中的个别语素与目标语素相似,但预设语料的整体内容与待检测内容差异较大而导致的检测错误的情况,保证的网络攻击检测的准确性。At this time, in the process of calculating the first correlation R( qi ,d), not only the correlation between the target morpheme and the preset corpus is taken into consideration, but also the relationship between the overall length of the content to be detected and the overall length of the preset corpus is taken into consideration. Similarity avoids detection errors caused by large differences between the overall content of the preset corpus and the content to be detected, although individual morphemes in the preset corpus are similar to the target morpheme, ensuring the accuracy of network attack detection.
本示例中,可以基于上述第一公式和第二公式计算待检测内容Q与数据库中的每个预设语料之间的第二相关性,从而根据待检测内容Q与数据库中的每个预设语料之间的第二相关性,获得网络攻击检测结果。In this example, the second correlation between the content to be detected Q and each preset corpus in the database can be calculated based on the above first and second formulas, so that the content Q to be detected and each preset corpus in the database can be calculated. The second correlation between corpora is used to obtain network attack detection results.
例如,可以从待检测内容Q与数据库中的每个预设语料之间的第二相关性中确定最高的第二相关性,若该最高的第二相关性高于指定的相关性阈值,则可以认为该待检测内容涉及网络攻击。For example, the highest second correlation can be determined from the second correlation between the content Q to be detected and each preset corpus in the database. If the highest second correlation is higher than the specified correlation threshold, then It can be considered that the content to be detected involves network attacks.
或者,还可以根据第二相关性与待检测内容对应的权重之和的比值,获得网络攻击检测结果。Alternatively, the network attack detection result can also be obtained based on the ratio of the second correlation and the sum of weights corresponding to the content to be detected.
具体地,可以根据待检测内容Q的第二相关性Score,基于以下第三公式,计算待检测内容涉及网络攻击的概率Prob:Specifically, the probability Prob that the content to be detected involves a network attack can be calculated based on the second correlation Score of the content to be detected Q and based on the following third formula:
其中,Prob指待检测内容涉及网络攻击的概率,即攻击概率,Score指待检测内容Q的第二相关性,∑Wi指待检测内容Q对应的权重之和,也即是待检测内容Q对应的目标语素的权重之和。Among them, Prob refers to the probability that the content to be detected involves a network attack, that is, the attack probability, Score refers to the second correlation of the content to be detected Q, and ∑W i refers to the sum of weights corresponding to the content to be detected Q, that is, the content to be detected Q The sum of the weights of the corresponding target morphemes.
根据第二相关性与待检测内容对应的权重之和的比值,获得网络攻击检测结果,不仅可以准确地检测包含关键语素的网络攻击,还可以准确地检测不包含关键语素或者不常见的网络攻击,从而可以保证网络攻击检测的准确性。此外,通过维护数据库中的预设语料,基于专家经验而及时更新这些不包含关键语素的网络攻击对应的语料,以及不常见的攻击方式对应的语料,可以提升本申请实施例中的网络攻击检测方法的泛化性。According to the ratio of the second correlation and the sum of weights corresponding to the content to be detected, the network attack detection result is obtained, which can not only accurately detect network attacks that contain key morphemes, but also accurately detect network attacks that do not contain key morphemes or are uncommon. , thus ensuring the accuracy of network attack detection. In addition, by maintaining the preset corpora in the database and timely updating the corpora corresponding to network attacks that do not contain key morphemes based on expert experience, as well as the corpora corresponding to uncommon attack methods, network attack detection in the embodiments of the present application can be improved. Generalizability of the method.
在一些实施例中,该方法还包括:In some embodiments, the method further includes:
输出网络攻击检测结果,网络攻击检测结果中包含基于至少一个目标语素得到的代码信息。Output the network attack detection result, which contains code information based on at least one target morpheme.
本申请实施例中,若将待检测内容作为通过指定的变形方式对代码信息处理后得到的内容,则基于至少一个目标语素得到的代码信息可以认为是通过指定的变形方式处理之前的内容,也可以理解为基于变形方式对待检测内容进行还原后的内容。In the embodiment of the present application, if the content to be detected is regarded as the content obtained after processing the code information through the specified transformation method, then the code information obtained based on at least one target morpheme can be considered as the content before processing through the specified transformation method, or It can be understood as the content that is restored based on the deformation method.
举例来说,在一种示例中,某一待检测内容包括以下内容:For example, in one example, a certain content to be detected includes the following content:
<?php$ant=base64_decode("YXNzZXJ0");$ant($_POST['ant']);?><? php$ant=base64_decode("YXNzZXJ0");$ant($_POST['ant']);? >
基于该待检测内容对应的至少一个目标语素得到的代码信息可以包括以下内容:The code information obtained based on at least one target morpheme corresponding to the content to be detected may include the following content:
<?php"assert"($_POST['ant']);?><? php"assert"($_POST['ant']);? >
此时,该代码信息通常没有被黑客通过诸如混淆、绕过、字符串截断重组、变量替换、编码加密等各种变形方式进行处理,能够反映执行网络攻击的实际函数、参数和/或其他未经变形处理的信息。At this time, the code information is usually not processed by hackers through various transformation methods such as obfuscation, bypass, string truncation and reorganization, variable replacement, encoding and encryption, etc., and can reflect the actual functions, parameters and/or other unknown functions used to perform network attacks. Transformed information.
本申请实施例中,输出网络攻击检测结果可以有以下两种方式中的一种或多种:In this embodiment of the present application, network attack detection results may be output in one or more of the following two ways:
1、执行本申请实施例的计算机设备向其他设备输出该网络攻击检测结果。1. The computer device executing the embodiment of the present application outputs the network attack detection result to other devices.
示例性地,该其他设备可以为网络数据对应的用户的用户设备,此时,该计算机设备可以为云端设备。云端设备向用户设备发送网络攻击检测结果,以指示相关用户的网络攻击检测情况,并可以由用户设备进行存储和显示。For example, the other device may be the user device of the user corresponding to the network data. In this case, the computer device may be a cloud device. The cloud device sends network attack detection results to the user device to indicate the network attack detection status of the relevant user, and can be stored and displayed by the user device.
或者,该其他设备可以为该计算机设备外接的显示设备,此时,可以通过该外接的显示设备显示网络攻击检测结果。Alternatively, the other device can be a display device external to the computer device. In this case, the network attack detection result can be displayed through the external display device.
2、执行本申请实施例的计算机设备显示网络攻击检测结果。2. The computer device executing the embodiment of the present application displays the network attack detection result.
该示例中,该计算机设备可以为终端设备,并且,该计算机设备可以包含显示设备,从而可以通过计算机设备的显示设备显示网络攻击检测结果。In this example, the computer device may be a terminal device, and the computer device may include a display device, so that the network attack detection result may be displayed through the display device of the computer device.
示例性地,显示网络攻击检测结果时,可以显示待检测内容、指示是否为网络攻击的信息(例如,指示是否为网络攻击事件的结论信息和/或网络攻击发生概率)以及代码信息中的一种或多种。For example, when displaying the network attack detection result, one of the content to be detected, information indicating whether it is a network attack (for example, conclusion information indicating whether it is a network attack event and/or probability of network attack occurrence), and code information may be displayed. Kind or variety.
例如,在一种示例中,在显示网络攻击检测结果时,显示界面中可以包含以下内容:For example, in one example, when displaying network attack detection results, the display interface may include the following content:
待检测内容:<?php$ant=base64_decode("YXNzZXJ0");$ant($_POST['ant']);?>;Content to be tested: <? php$ant=base64_decode("YXNzZXJ0");$ant($_POST['ant']);? >;
检测结果:攻击事件;Detection results: attack event;
攻击概率:1.0;Attack probability: 1.0;
还原代码:<?php"assert"($_POST['ant']);?>。Restore code: <? php"assert"($_POST['ant']);? >.
其中,检测结果可以指示是否为网络攻击事件的结论,还原代码可以包括基于至少一个目标语素得到的代码信息。The detection result may indicate whether it is a conclusion of a network attack event, and the restored code may include code information obtained based on at least one target morpheme.
这样,通过包含还原后的代码信息的网络攻击检测结果,用户可以了解到网络攻击所采用的实际函数等代码信息,帮助用户和相关开发人员了解网络攻击的具体情况,为后续的网络安全维护提供数据支持。In this way, through the network attack detection results containing the restored code information, users can understand the actual functions used in network attacks and other code information, helping users and relevant developers understand the specific situation of network attacks, and providing information for subsequent network security maintenance. data support.
以上,本申请实施例从多个方面介绍了网络攻击检测方法,下面结合附图,介绍本申请的网络攻击检测装置。As above, the embodiments of the present application have introduced the network attack detection method from multiple aspects. The network attack detection device of the present application will be introduced below with reference to the accompanying drawings.
如图5所示,本申请实施例提供一种网络攻击检测装置50,该装置50可以应用于上述任一实施例中的计算机设备。As shown in Figure 5, this embodiment of the present application provides a network attack detection device 50, which can be applied to the computer equipment in any of the above embodiments.
该装置50包括:The device 50 includes:
获取模块501,用于获取网络数据对应的待检测内容;The acquisition module 501 is used to obtain the content to be detected corresponding to the network data;
处理模块502,用于根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得待检测内容对应的至少一个目标语素;The processing module 502 is configured to transform at least one morpheme in the content to be detected according to the grammatical structure of the content to be detected, and obtain at least one target morpheme corresponding to the content to be detected;
计算模块503,用于计算至少一个目标语素中的每个目标语素与预设语料的第一相关性;The calculation module 503 is used to calculate the first correlation between each target morpheme in at least one target morpheme and the preset corpus;
检测模块504,用于根据每个目标语素对应的第一相关性,获得网络攻击检测结果。The detection module 504 is used to obtain network attack detection results based on the first correlation corresponding to each target morpheme.
可选地,获取模块501用于:Optionally, the acquisition module 501 is used for:
获取网络数据的元数据,元数据包括请求报文信息、响应报文信息以及统一资源定位系统URL中的一种或多种;Obtain metadata of network data. Metadata includes one or more of request message information, response message information, and Uniform Resource Locator System URL;
根据元数据,获得待检测内容。According to the metadata, the content to be detected is obtained.
可选地,获取模块501用于:Optionally, the acquisition module 501 is used for:
从元数据中,提取键值对数据,键值对数据用于指示键对应的值;From the metadata, extract key-value pair data, which is used to indicate the value corresponding to the key;
根据键值对数据中的值,获得待检测内容。Obtain the content to be detected based on the value in the key-value pair data.
可选地,处理模块502用于:Optionally, the processing module 502 is used to:
根据待检测内容的语法结构,对待检测内容中的至少一个语素进行变换,获得第一信息;According to the grammatical structure of the content to be detected, at least one morpheme in the content to be detected is transformed to obtain the first information;
根据第一信息中的语素的类型,从第一信息中确定候选语素;Determine the candidate morpheme from the first information according to the type of the morpheme in the first information;
根据候选语素,获得至少一个目标语素。According to the candidate morpheme, at least one target morpheme is obtained.
可选地,装置50还包括权重模块505;Optionally, the device 50 also includes a weight module 505;
权重模块505用于:Weight module 505 is used for:
根据至少一个预设关键词,确定至少一个目标语素中每个目标语素对应的权重;Determine the weight corresponding to each target morpheme in at least one target morpheme based on at least one preset keyword;
检测模块504用于:The detection module 504 is used for:
根据每个目标语素对应的第一相关性以及每个目标语素对应的权重,获得网络攻击检测结果。According to the first correlation corresponding to each target morpheme and the weight corresponding to each target morpheme, the network attack detection result is obtained.
可选地,检测模块504用于:Optionally, the detection module 504 is used to:
根据每个目标语素对应的第一相关性以及每个目标语素对应的权重,获得待检测内容对应的第二相关性;According to the first correlation corresponding to each target morpheme and the weight corresponding to each target morpheme, the second correlation corresponding to the content to be detected is obtained;
根据第二相关性与待检测内容对应的权重之和的比值,获得网络攻击检测结果。According to the ratio of the second correlation and the sum of weights corresponding to the content to be detected, the network attack detection result is obtained.
可选地,第一相关性是基于相应目标语素与相应预设语料中的语素的最高相似度以及目标比值而确定,目标比值用于描述相应预设语料的长度与待检测内容的长度的差异。Optionally, the first correlation is determined based on the highest similarity between the corresponding target morpheme and the morpheme in the corresponding preset corpus and the target ratio. The target ratio is used to describe the difference between the length of the corresponding preset corpus and the length of the content to be detected. .
可选地,装置50还包括输出模块506;Optionally, the device 50 also includes an output module 506;
输出模块506用于输出网络攻击检测结果,网络攻击检测结果中包含基于至少一个目标语素得到的代码信息。The output module 506 is configured to output network attack detection results, where the network attack detection results include code information obtained based on at least one target morpheme.
图6所示,是本申请实施例提供的计算机设备60的一种可能的逻辑结构示意图。该计算机设备60用于实现上述任一实施例中所涉及的计算机设备的功能。该计算机设备60包括:存储器601、处理器602、通信接口603以及总线604。其中,存储器601、处理器602、通信接口603通过总线604实现彼此之间的通信连接。FIG. 6 is a schematic diagram of a possible logical structure of the computer device 60 provided by the embodiment of the present application. The computer device 60 is used to implement the functions of the computer device involved in any of the above embodiments. The computer device 60 includes: a memory 601, a processor 602, a communication interface 603 and a bus 604. Among them, the memory 601, the processor 602, and the communication interface 603 implement communication connections between each other through the bus 604.
存储器601可以是只读存储器(read only memory,ROM)、静态存储设备、动态存储设备或者随机存取存储器(random access memory,RAM)。存储器601可以存储程序,当存储器601中存储的程序被处理器602执行时,处理器602和通信接口603用于执行上述的网络攻击检测方法实施例的步骤201-204等。The memory 601 may be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 601 can store programs. When the program stored in the memory 601 is executed by the processor 602, the processor 602 and the communication interface 603 are used to perform steps 201-204 and so on of the above-mentioned network attack detection method embodiment.
处理器602可以采用中央处理器(central processing unit,CPU)、微处理器、应用专用集成电路(application specific integrated circuit,ASIC)、图形处理器(graphics processing unit,GPU)、数字信号处理器(digital signal processing,DSP)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件或者其任意组合,用于执行相关程序,以实现上述实施例中的网络攻击检测装置中的获取模块、处理模块、计算模块以及检测模块等所需执行的功能,或者执行本申请方法实施例的网络攻击检测方法实施例的步骤201-204等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器601,处理器602读取存储器601中的信息,结合其硬件执行上述的网络攻击检测方法实施例的步骤201-204等。The processor 602 may be a central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or a digital signal processor (Digital Signal Processor). signal processing (DSP), off-the-shelf programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components or any combination thereof, for executing relevant programs to achieve the above The acquisition module, processing module, calculation module and detection module in the network attack detection device in the embodiment need to perform functions, or perform steps 201-204 of the network attack detection method embodiment of the method embodiment of the present application. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field. The storage medium is located in the memory 601, and the processor 602 reads the information in the memory 601, and performs steps 201-204 and so on of the above-mentioned network attack detection method embodiment in conjunction with its hardware.
通信接口603使用例如但不限于收发器一类的收发装置,来实现计算机设备60与其他设备或通信网络之间的通信。The communication interface 603 uses a transceiver device such as but not limited to a transceiver to implement communication between the computer device 60 and other devices or communication networks.
总线604可实现在计算机设备60各个部件(例如,存储器601、处理器602以及通信接口603)之间传送信息的通路。总线604可以是外设部件互连标准(Peripheral ComponentInterconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。Bus 604 may implement a path for transferring information between various components of computer device 60 (eg, memory 601, processor 602, and communication interface 603). The bus 604 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in Figure 6, but it does not mean that there is only one bus or one type of bus.
在本申请的另一实施例中,还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当设备的处理器执行该计算机执行指令时,设备执行上述图6中的处理器所执行的步骤。In another embodiment of the present application, a computer-readable storage medium is also provided. Computer-executable instructions are stored in the computer-readable storage medium. When the processor of the device executes the computer-executed instructions, the device executes the above-mentioned steps in Figure 6 The steps performed by the processor.
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;当设备的处理器执行该计算机执行指令时,设备执行上述图6中的处理器所执行的步骤。In another embodiment of the present application, a computer program product is also provided. The computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; when the processor of the device executes the computer-executed instructions When , the device performs the steps performed by the processor in Figure 6 above.
在本申请的另一实施例中,还提供一种芯片系统,该芯片系统包括处理器,该处理器用于实现上述图6的处理器所执行的步骤。在一种可能的设计中,芯片系统还可以包括存储器,存储器,用于保存数据写入的装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。In another embodiment of the present application, a chip system is also provided. The chip system includes a processor, and the processor is configured to implement the steps performed by the processor in FIG. 6 . In a possible design, the chip system may also include a memory, a memory, a device for storing data writing, necessary program instructions and data. The chip system may be composed of chips, or may include chips and other discrete devices.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
在本申请实施例所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the embodiments of this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separate. A component shown as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请实施例各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Functions may be stored in a computer-readable storage medium when implemented in the form of software functional units and sold or used as independent products. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .
以上,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此。The above are only specific implementation modes of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto.
Claims (18)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210295319.6A CN116846568A (en) | 2022-03-24 | 2022-03-24 | A network attack detection method and related equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210295319.6A CN116846568A (en) | 2022-03-24 | 2022-03-24 | A network attack detection method and related equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116846568A true CN116846568A (en) | 2023-10-03 |
Family
ID=88172974
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210295319.6A Pending CN116846568A (en) | 2022-03-24 | 2022-03-24 | A network attack detection method and related equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116846568A (en) |
-
2022
- 2022-03-24 CN CN202210295319.6A patent/CN116846568A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP4099170B1 (en) | Method and apparatus of auditing log, electronic device, and medium | |
| WO2024215532A1 (en) | Response generation using a retrieval augmented ai model | |
| WO2020143620A1 (en) | Method for displaying block chain data, block chain browser, user node and medium | |
| WO2021017735A1 (en) | Smart contract formal verification method, electronic apparatus and storage medium | |
| CN107506256B (en) | Method and device for monitoring crash data | |
| CN111984719A (en) | Data calling method, device, equipment and storage medium based on data source | |
| CN108090351A (en) | For handling the method and apparatus of request message | |
| CN115051863B (en) | Abnormal flow detection method and device, electronic equipment and readable storage medium | |
| US8676791B2 (en) | Apparatus and methods for providing assistance in detecting mistranslation | |
| CN114742051A (en) | Log processing method, device, computer system and readable storage medium | |
| CN114826628A (en) | Data processing method and device, computer equipment and storage medium | |
| CN117332039B (en) | Text detection method, device, equipment and storage medium | |
| US11727702B1 (en) | Automated indexing and extraction of information in digital documents | |
| CN114880498B (en) | Event information display method and device, equipment and medium | |
| CN115048533A (en) | Knowledge graph construction method and device, electronic equipment and readable storage medium | |
| CN115858276A (en) | Data processing method, data configuration device and computer equipment | |
| CN112528339A (en) | Data desensitization method based on Cach é database and electronic equipment | |
| CN116846568A (en) | A network attack detection method and related equipment | |
| CN118551384A (en) | WebShell detection method based on machine learning | |
| CN117726393A (en) | Order data query method and device, electronic equipment and storage medium | |
| CN117609992A (en) | Data disclosure detection method, device and storage medium | |
| CN117992742A (en) | Method, device and storage medium for detecting smart contract vulnerabilities | |
| CN116701456A (en) | A data analysis method and related equipment | |
| CN116204671A (en) | Image searching method and device | |
| CN115834183A (en) | Flow detection method and device, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |