WO2024159955A1 - Network attack detection method and apparatus, electronic device and storage medium - Google Patents
Network attack detection method and apparatus, electronic device and storage medium Download PDFInfo
- Publication number
- WO2024159955A1 WO2024159955A1 PCT/CN2023/139975 CN2023139975W WO2024159955A1 WO 2024159955 A1 WO2024159955 A1 WO 2024159955A1 CN 2023139975 W CN2023139975 W CN 2023139975W WO 2024159955 A1 WO2024159955 A1 WO 2024159955A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- input data
- data
- object navigation
- network attack
- navigation graph
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
Definitions
- the present application belongs to the field of network protection technology, and in particular, relates to network attack detection methods, devices, electronic devices and storage media.
- OGNL Object Graph Navigation Language
- the present application provides a network attack detection method, device, electronic device and storage medium, aiming to solve the problem that there is currently no detection method for the network attack of OGNL expression injection.
- the present application provides a network attack detection method, comprising:
- the input data includes: at least one object navigation graph language expression
- the result data and the injection feature data corresponding to the input data are input into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
- the present application provides a network attack detection device, comprising:
- An input data acquisition module used to acquire input data; the input data includes: at least one object navigation graph language expression;
- a result data acquisition module is used to obtain result data of whether each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression;
- a statistical module used for counting the injection characteristic data in the input data
- the detection module is used to input the result data and the injection feature data corresponding to the input data into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
- the present application provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned network attack detection method when executing the program.
- the present application provides a readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the above-mentioned network attack detection method.
- the result data of whether each object navigation graph language expression in the input data conforms to the grammatical specification of the object navigation graph language expression is obtained, the injection feature data in the input data is counted, the result data and injection feature data corresponding to the input data are input into the preset network attack detection model, and the detection result of whether the input data includes the injection of the object navigation graph language expression is obtained, that is, providing A detection method for the network attack of OGNL expression injection is proposed.
- the result data corresponding to the input data and the injection feature data, which are multi-dimensional data are more correlated with the OGNL expression injection. Therefore, the detection accuracy of OGNL expression injection is higher and the missed detection rate is lower, which can improve the protection capability against OGNL expression injection.
- the above detection is performed as long as the input data is obtained, and the detection is more real-time.
- FIG1 is a flowchart of a method for detecting network attacks according to an embodiment of the present invention
- FIG2 is a flowchart of another method for detecting network attacks provided by an embodiment of the present application.
- FIG3 is a structural diagram of a network attack detection device provided in an embodiment of the present application.
- FIG4 is a schematic diagram of a flow chart of a network attack detection method provided in an embodiment of the present application.
- FIG5 is a schematic diagram of another flow chart of network attack detection provided by an embodiment of the present application.
- FIG6 is a structural diagram of an electronic device provided in an embodiment of the present application.
- FIG1 is a flow chart of the steps of a network attack detection method provided in an embodiment of the present application. Referring to FIG1 , the method may include the following steps.
- Step 101 obtaining input data; the input data includes: at least one object navigation graph language expression.
- the input data may be flow data, etc., used to obtain application services, etc.
- the input data includes at least one OGNL (Object Graph Navigation Language) expression.
- OGNL Object Graph Navigation Language
- the embodiment of the present application does not specifically limit how many OGNL expressions the input data specifically includes.
- OGNL is a powerful expression language used to get and set the properties of Java objects. It aims to provide a higher level of abstraction syntax to navigate Java object graphs. OGNL has three elements: expression, root object, and context. Expression is the core of the entire OGNL. All OGNL operations are performed after the expression is parsed. The expression tells OGNL what to do. Therefore, the expression is actually a string with grammatical meaning. The entire string will specify the type and content of the operation.
- Step 102 obtaining result data of whether each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression.
- An OGNL expression is actually a string with grammatical meaning, and an OGNL expression also has corresponding grammatical specifications. Therefore, this step is to determine whether each OGNL expression in the input data conforms to the grammatical specifications of the OGNL expression, or in other words, to determine the grammatical legality of each OGNL expression in the input data. If each OGNL expression in the input data conforms to the grammatical specifications of the OGNL expression, the result data corresponding to the input data conforms to the grammatical specifications. Otherwise, the result data corresponding to the input data does not conform to the grammatical specifications.
- step 102 may include: when each object navigation graph language expression in the input data generates an abstract syntax tree (AST), determining the result data corresponding to the input data as each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression. In this way, the result data can be simply determined.
- AST abstract syntax tree
- AST is a top-down tree structure, each layer consists of one or more nodes, and each node has a type attribute to indicate the type of the node. If an OGNL expression can form a legal AST tree in a similar top-down manner, it is grammatically legal or grammatically standardized. Otherwise, it is grammatically illegal or grammatically irregular.
- step 102 may include: obtaining result data of whether each OGNL expression in the input data conforms to the grammatical specification specified by Backus-Naur Form (BNF) in OGNL.
- BNF is a formal system used to describe grammar, a typical metalanguage, also known as Backus-Naur form.
- BNF is used to describe the formal paradigm of a language, using building blocks and building rules to describe the grammar of a language.
- BNF paradigm is commonly used in programming languages and text file formats. It can not only strictly express grammatical rules, but also describe grammar that is context-independent. It has the characteristics of simple grammar, clear expression, and convenience for grammatical analysis and compilation.
- BNF expresses grammatical rules
- non-terminal symbols are enclosed in angle brackets.
- the left part of each rule is a non-terminal symbol
- Rules with the same left part can share a left part, and the right parts are separated by vertical "
- the result data of whether each OGNL expression in the input data conforms to the grammatical specification specified by BNF in OGNL can be obtained simply and accurately.
- the aforementioned obtaining of the result data of whether each OGNL expression in the input data conforms to the grammatical specification specified by BNF in OGNL may include: obtaining the result data of whether each OGNL expression in the input data conforms to the grammatical specification specified by BNF in the OGNL expression based on a LALR (Look-Ahead LR) syntax analyzer, and the above result data is easily obtained based on LALR.
- LALR Look-Ahead LR
- the input data may be first segmented to obtain lexical units (tokens), and then the LALR analyzer may be used to determine whether the result data conforms to the grammatical specifications specified by BNF in the OGNL expression.
- Look-Ahead means looking forward, L represents checking the input from left to right, and R represents reverse construction of the rightmost derivation sequence.
- the task of LALR analysis is to analyze whether these sequences can be combined into various grammatical phrases, such as programs, statements, function declaration expressions, etc., based on the token sequence.
- the segmentation step can be based on a finite state automaton to scan and segment the input stream and convert the input data into tokens. These tokens will serve as the input of the subsequent LALR analyzer.
- the above functions can be implemented using the flex tool language and the bison tool language.
- the above two tool languages have good adaptability to the program language and have good tool robustness.
- the flex tool language and the bison tool language cooperate well with each other.
- Step 103 Count the injection feature data in the input data.
- the injection feature data here refers to the feature data in the input data that is related to the network attack of OGNL expression injection.
- step 103 may include: at least one of the following sub-steps.
- Sub-step S1 counting a first total number of all sensitive functions in the input data and a first proportion of a second total number of all functions in the input data.
- the sensitive function may include: a function in OGNL that may cause danger, where the danger may include: sensitive information leakage, data corruption, and execution of any code. If the number of OGNL expression injections is large, the probability of OGNL expression injection as a network attack may be greater. Therefore, using the first proportion as one-dimensional injection feature data can improve the accuracy of OGNL expression injection as a network attack detection.
- a first total number of all sensitive functions in the input data is obtained by counting, and a second total number of all functions in the input data is obtained by counting, and the first total number is divided by the second total number to obtain the first proportion.
- Sub-step S2 counting a second proportion of a third total number of all operators in the input data to a fourth total number of all characters in the input data.
- Operators are closely related to the network attack of OGNL expression injection, so using the second proportion as one-dimensional injection feature data can improve the accuracy of OGNL expression injection network attack detection.
- the third total number of operators in the input data is obtained by counting, and the fourth total number of all characters in the input data is obtained by counting, and the third total number is divided by the fourth total number to obtain the second proportion.
- the operators in the input data include: basic operators and special operators in the input data, that is, all operators in the input data.
- OGNL expressions support Java operations, and the operators in the input data may include: +, -, *, /, %, in, eq, gt, ., @, #, etc.
- Sub-step S3 counting the first total number of all function declarations in each object navigation graph language expression in the input data.
- function declaration is to inform the compilation system of the function name, function type, and parameter type, number, and order so that the system can check it when calling the function (for example, whether the function name is correct, and whether the type and number of actual parameters and formal parameters are consistent).
- the number of all function declarations in each object navigation graph language expression is closely related to the OGNL expression injection network attack. Therefore, using the first total number as one-dimensional injection feature data can improve the accuracy of OGNL expression injection network attack detection.
- obtaining the first total number may include the following steps: counting the third total number of all function declarations in each OGNL expression in the input data, summing all the third total numbers corresponding to the input data to obtain a first sum value, dividing the first sum value by the fifth total number of all object navigation graph language expressions in the input data to obtain the first total number of all function declarations in each OGNL expression in the input data on average, thereby obtaining the first total number simply and accurately.
- Sub-step S4 counting the second total number of all function calls in each object navigation graph language expression in the input data.
- the second total number is used as one-dimensional injection feature data to improve the accuracy of the detection of the network attack of OGNL expression injection.
- obtaining the second total number may include the following steps: counting the fourth total number of all function calls in each OGNL expression in the input data, summing all the fourth total numbers corresponding to the input data to obtain a second sum value, dividing the second sum value by the fifth total number of all OGNL expressions in the input data to obtain the second total number of all function calls in each OGNL expression in the input data, thereby obtaining the first total number in a simple and accurate manner.
- step 103 may include: statistical detection (NeoPI) based on the command execution environment (webshell1), counting the injection feature data in the input data.
- NeoPI statistical features include: coincidence index, file entropy, longest word, malicious features, and compression ratio. These features are closely related to whether the OGNL expression is malicious in the network detection. Using this method to count the injection feature data can improve the accuracy of network detection.
- step 103 may include: when the result data corresponding to the input data is all OGNL expressions in the input data, and all of them conform to the syntax specification of the OGNL expression, counting the injection feature data in the input data; when all of the OGNL expressions in the input data conform to the syntax specification of the OGNL expression, the syntax of the input data is legal, and then counting the injection feature data in the input data, which can reduce invalid workload. Specifically, under normal circumstances, if at least one OGNL expression in the input data does not conform to the syntax specification of the OGNL expression, the input data can be basically considered invalid or illegal, and there is no need to count the injection feature data in the input data.
- Step 104 input the result data and the injection feature data corresponding to the input data into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
- the preset network attack detection model is trained in advance.
- the detection result of whether the input data includes OGNL expression injection can be output.
- the preset network attack detection model includes: a linear regression (Logistic Regression, LR) model.
- the LR model is a model for processing binary classification problems.
- the dependent variable y is divided into positive and negative classes.
- the positive class represents the input data injected with the OGNL expression
- the negative class represents the input data without the hazard of OGNL expression injection.
- the dependent variable y ⁇ 0,1 ⁇ , where 0 represents the negative class and 1 represents the positive class.
- the functional form of the LR model is the following formula (1).
- h ⁇ g( ⁇ T x) Formula (1)
- x represents the result data and injected feature data corresponding to the input data
- ⁇ represents the matrix formed by the weights corresponding to the result data and injected feature data corresponding to the input data
- T represents the transpose of the aforementioned matrix.
- a linear regression model is used to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
- the method is easy to implement, has a fast calculation speed, and has a relatively accurate detection result.
- the result data of whether each object navigation graph language expression in the input data conforms to the grammatical specification of the object navigation graph language expression is obtained, the injection feature data in the input data is counted, the result data and injection feature data corresponding to the input data are input into the preset network attack detection model, and the detection result of whether the input data includes the injection of the object navigation graph language expression is obtained, that is, providing A detection method for the network attack of OGNL expression injection is developed.
- the result data corresponding to the input data and the injection feature data which are multi-dimensional data, are more correlated with OGNL expression injection, so the detection accuracy of OGNL expression injection is higher, the recall rate is also higher, and the missed detection rate is lower, which can improve the protection capability against OGNL expression injection.
- the above detection is performed as long as the input data is obtained, and the detection is more real-time.
- FIG2 is a flowchart of the steps of another network attack detection method provided in an embodiment of the present application. Referring to FIG2 , the method may include the following steps.
- Step 201 obtaining input data; the input data includes: at least one object navigation graph language expression.
- Step 202 obtaining result data of whether each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression.
- Step 203 Count the injection feature data in the input data.
- Steps 201 to 203 may correspond to the aforementioned steps 101 to 103 and can achieve the same or similar beneficial effects. To avoid repetition, they will not be described again here.
- Step 204 Use the acquired historical input data as first sample data to train the preset network attack detection model.
- the preset network attack detection model is obtained by training with historical input data.
- the preset network attack detection model includes: a linear regression model.
- the aforementioned related records can be referred to here, and the same or similar beneficial effects can be achieved. In order to avoid repetition, it will not be repeated here.
- Step 205 input the result data and the injection feature data corresponding to the input data into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
- Step 205 may correspond to the aforementioned step 104 and can achieve the same or similar beneficial effects. To avoid repetition, it will not be described again here.
- Step 206 Use the input data as second sample data to update the preset network attack detection model.
- the aforementioned input data is used as the second sample data to update the preset network attack detection model in real time.
- a rich data source is provided to improve the robustness of the preset network attack detection model.
- the real-time update of the preset network attack detection model parameters can also be easily realized, which is convenient for iterative updates.
- this method can also be combined with cloud platform big data.
- Applications on the public network of cloud platform are more vulnerable to the network attack of OGNL expression injection.
- major enterprises such as banks, insurance companies, and e-commerce retailers have moved to the cloud, and the naked Web (World Wide Web) exposed to power is more vulnerable to the network attack of OGNL expression injection, which leads to security issues such as leakage of personal and corporate confidential data, financial losses, and business interruption, which have a serious impact on various enterprises.
- This method can also be combined with cloud platform big data.
- Cloud platform big data can provide more and richer first sample data, making the trained preset network attack detection model more accurate and more robust.
- cloud platform big data can provide more and richer second sample data, which can conveniently and quickly realize the update and iteration of the preset network attack detection model parameters.
- Figure 3 is a structural diagram of a network attack detection device provided by an embodiment of the present application.
- the present application also provides a network attack detection device, as shown in Figure 3, the device includes: an input data acquisition module 301, used to acquire input data; the input data includes: at least one object navigation graph language expression;
- the result data acquisition module 302 is used to acquire result data of whether each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression;
- a statistics module 303 used for counting the injection characteristic data in the input data
- the detection module 304 is used to input the result data and the injection feature data corresponding to the input data into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
- the statistical module 303 includes at least one of the following sub-modules: a first statistical sub-module, used to count a first total number of all sensitive functions in the input data, which accounts for a first proportion of a second total number of all functions in the input data; a second statistical sub-module, used to count a third total number of all operators in the input data, which accounts for a second proportion of a fourth total number of all characters in the input data; a third statistical sub-module, used to count an average first total number of all function declarations in each object navigation graph language expression in the input data; and a fourth statistical sub-module, used to count an average second total number of all function calls in each object navigation graph language expression in the input data.
- a first statistical sub-module used to count a first total number of all sensitive functions in the input data, which accounts for a first proportion of a second total number of all functions in the input data
- a second statistical sub-module used to count a third total number of all operators in the input data, which accounts
- the statistical module 303 includes: a fifth statistical submodule, which is used to count the injection feature data in the input data based on statistical detection of the command execution environment.
- the statistical module 303 includes: a sixth statistical sub-module, used to count the injection feature data in the input data when the result data is all the object navigation graph language expressions in the input data and they all comply with the grammatical specifications of the object navigation graph language expressions.
- the network attack detection device further includes: a training module, configured to use the acquired historical input data as first sample data to train and obtain the preset network attack detection model.
- a training module configured to use the acquired historical input data as first sample data to train and obtain the preset network attack detection model.
- the network attack detection device further includes: an updating module, configured to update the preset network attack detection model by using the input data as second sample data.
- the preset network attack detection model includes: a linear regression model.
- the result data acquisition module 302 includes: a first result data acquisition sub-module, which is used to determine the result data corresponding to the input data as each object navigation graph language expression in the input data, when each object navigation graph language expression in the input data generates an abstract syntax tree, and each of the object navigation graph language expressions in the input data complies with the grammatical specification of the object navigation graph language expression.
- the result data acquisition module 302 includes: a second result data acquisition submodule, used to obtain result data on whether each of the object navigation graph language expressions in the input data conforms to the grammatical specifications specified by the Backus-Naur form in the object navigation graph language expression.
- the second result data acquisition submodule includes: a result data acquisition unit, used to obtain, based on a LALR syntax analyzer, result data on whether each of the object navigation graph language expressions in the input data conforms to the Backus-Naur form in the object navigation graph language expression and the grammatical specifications specified in it.
- the third statistical submodule includes: a first statistical unit, used to count the third total number of all function declarations in each object navigation graph language expression in the input data; a first summation unit, used to sum all the third total numbers corresponding to the input data to obtain a first sum value; and a first total number acquisition unit, used to divide the first sum value by the fifth total number of all object navigation graph language expressions in the input data to obtain the first total number of all function declarations in each object navigation graph language expression in the input data on average.
- the fourth statistical submodule includes: a second statistical unit, used to count the fourth total number of all function calls in each object navigation graph language expression in the input data; a second summation unit, used to sum all the fourth total numbers corresponding to the input data to obtain a second sum value; and a second total number acquisition unit, used to divide the second sum value by the fifth total number of all object navigation graph language expressions in the input data to obtain the second total number of all function calls in each object navigation graph language expression in the input data on average.
- the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment.
- Fig. 4 is a schematic diagram of a flow chart of a network attack detection provided by an embodiment of the present application.
- Fig. 5 is a schematic diagram of another flow chart of a network attack detection provided by an embodiment of the present application. Referring to Fig. 4, an input data set of a network attack of the type of OGNL expression injection in the cloud platform is annotated.
- the historical input data is scanned and segmented and converted into tokens.
- the obtained token sequence is input into the LALR parser, and according to the grammatical specifications specified by the BNF paradigm of OGNL, it is determined whether the token sequence flow conforms to the grammatical specifications specified by the BNF paradigm of OGNL, and the result data corresponding to the historical input data is obtained.
- the injection feature data in the aforementioned historical input data is obtained through NeoPI statistics. More specifically, this step may include: obtaining a first total number of all sensitive functions in the historical input data through NeoPI statistics, a first proportion of a second total number of all functions in the historical input data, obtaining a third total number of all operators in the historical input data through NeoPI statistics, a second proportion of a fourth total number of all characters in the historical input data, obtaining a first total number of all function declarations in each object navigation graph language expression in the historical input data through NeoPI statistics, and obtaining a second total number of all function calls in each object navigation graph language expression in the historical input data through NeoPI statistics.
- a linear regression model is trained to obtain a preset network attack detection model.
- the upper dotted box or framed portion in FIG4 is mainly the part that trains to obtain the preset network attack detection model.
- the result data corresponding to the input data, the first proportion, the second proportion, the first total number, and the second total number are used to update the previously trained preset network attack detection model.
- the dotted box or the framed portion at the bottom of Figure 4 is mainly the network attack detection, as well as the part of the update iteration of the preset network attack detection model.
- Figure 6 is a structural diagram of an electronic device provided in an embodiment of the present application.
- the present application also provides an electronic device, see Figure 6, including: a processor 901, a memory 902, and a computer program 9021 stored in the memory and executable on the processor, and the processor implements the network attack detection method of the aforementioned embodiment when executing the program.
- the present application also provides a readable storage medium.
- the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the network attack detection method of the aforementioned embodiment.
- modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments.
- the modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination, except that at least some of such features and/or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
- the various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the sorting device according to the present application.
- DSP digital signal processor
- the present application can also be implemented as a device or apparatus program for executing part or all of the methods described herein.
- Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
- the user information (including but not limited to the user's device information, user personal information, etc.) and related data involved in this application are all information authorized by the user or by all parties.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Machine Translation (AREA)
Abstract
Description
本申请要求于2023年01月31日提交中国专利局,申请号为202310047999.4,申请名称为“网络攻击检测方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application filed with the China Patent Office on January 31, 2023, with application number 202310047999.4 and application name “Network Attack Detection Method, Device, Electronic Device and Storage Medium”, all contents of which are incorporated by reference in this application.
本申请属于网络防护技术领域,特别是涉及网络攻击检测方法、装置、电子设备及存储介质。The present application belongs to the field of network protection technology, and in particular, relates to network attack detection methods, devices, electronic devices and storage media.
随着网络的快速发展,网络安全问题日渐严峻,其中,对象导航图语言(Object Graph Navigation Language,OGNL)表达式注入是危害较大的一种网络攻击。攻击者通过OGNL表达式注入可以恶意存取Java对象的任意属性、调用Java对象的方法以及实现类型转换等。With the rapid development of the Internet, network security issues are becoming increasingly serious. Among them, Object Graph Navigation Language (OGNL) expression injection is a more harmful network attack. Attackers can maliciously access any attribute of Java objects, call Java object methods, and implement type conversion through OGNL expression injection.
然而,目前还没有针对OGNL表达式注入这一网络攻击的检测方法,因此,需要针对OGNL表达式注入这一网络攻击提供检测方法。However, there is currently no detection method for the network attack of OGNL expression injection. Therefore, it is necessary to provide a detection method for the network attack of OGNL expression injection.
发明内容Summary of the invention
本申请提供一种网络攻击检测方法、装置、电子设备及存储介质,旨在解决目前还没有针对OGNL表达式注入这一网络攻击的检测方法的问题。The present application provides a network attack detection method, device, electronic device and storage medium, aiming to solve the problem that there is currently no detection method for the network attack of OGNL expression injection.
第一方面,本申请提供一种网络攻击检测方法,包括:In a first aspect, the present application provides a network attack detection method, comprising:
获取输入数据;所述输入数据包括:至少一个对象导航图语言表达式;Acquire input data; the input data includes: at least one object navigation graph language expression;
获取所述输入数据中各个所述对象导航图语言表达式,是否均符合对象导航图语言表达式的语法规范的结果数据;Obtain result data of whether each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression;
统计所述输入数据中的注入特征数据;Counting the injection characteristic data in the input data;
将所述输入数据对应的所述结果数据和所述注入特征数据,输入预设的网络攻击检测模型,得到所述输入数据是否包括对象导航图语言表达式注入的检测结果。The result data and the injection feature data corresponding to the input data are input into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
第二方面,本申请提供一种网络攻击检测装置,包括:In a second aspect, the present application provides a network attack detection device, comprising:
输入数据获取模块,用于获取输入数据;所述输入数据包括:至少一个对象导航图语言表达式;An input data acquisition module, used to acquire input data; the input data includes: at least one object navigation graph language expression;
结果数据获取模块,用于获取所述输入数据中各个所述对象导航图语言表达式,是否均符合对象导航图语言表达式的语法规范的结果数据;A result data acquisition module is used to obtain result data of whether each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression;
统计模块,用于统计所述输入数据中的注入特征数据;A statistical module, used for counting the injection characteristic data in the input data;
检测模块,用于将所述输入数据对应的所述结果数据和所述注入特征数据,输入预设的网络攻击检测模型,得到所述输入数据是否包括对象导航图语言表达式注入的检测结果。The detection module is used to input the result data and the injection feature data corresponding to the input data into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
第三方面,本申请提供一种电子设备,包括:处理器、存储器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述网络攻击检测方法。In a third aspect, the present application provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned network attack detection method when executing the program.
第四方面,本申请提供一种可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述网络攻击检测方法。In a fourth aspect, the present application provides a readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the above-mentioned network attack detection method.
在本申请实施例中,获取输入数据中各个对象导航图语言表达式,是否均符合对象导航图语言表达式的语法规范的结果数据,统计该输入数据中的注入特征数据,将输入数据对应的结果数据和注入特征数据,输入预设的网络攻击检测模型,得到该输入数据是否包括对象导航图语言表达式注入的检测结果,就是提供 了针对OGNL表达式注入这一网络攻击的检测方法。同时,输入数据对应的结果数据和注入特征数据这些多维数据,与OGNL表达式注入相关性更高,则对于OGNL表达式注入的检测准确率较高,漏检测率较低,可以提升对于OGNL表达式注入的防护能力。并且,上述检测只要获取到输入数据就进行,检测实时性较好。In the embodiment of the present application, the result data of whether each object navigation graph language expression in the input data conforms to the grammatical specification of the object navigation graph language expression is obtained, the injection feature data in the input data is counted, the result data and injection feature data corresponding to the input data are input into the preset network attack detection model, and the detection result of whether the input data includes the injection of the object navigation graph language expression is obtained, that is, providing A detection method for the network attack of OGNL expression injection is proposed. At the same time, the result data corresponding to the input data and the injection feature data, which are multi-dimensional data, are more correlated with the OGNL expression injection. Therefore, the detection accuracy of OGNL expression injection is higher and the missed detection rate is lower, which can improve the protection capability against OGNL expression injection. Moreover, the above detection is performed as long as the input data is obtained, and the detection is more real-time.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
图1是本申请实施例提供的一种网络攻击检测方法的步骤流程图;FIG1 is a flowchart of a method for detecting network attacks according to an embodiment of the present invention;
图2是本申请实施例提供的另一种网络攻击检测方法的步骤流程图;FIG2 is a flowchart of another method for detecting network attacks provided by an embodiment of the present application;
图3是本申请实施例提供的一种网络攻击检测装置的结构图;FIG3 is a structural diagram of a network attack detection device provided in an embodiment of the present application;
图4是本申请实施例提供的一种网络攻击检测的流程示意图;FIG4 is a schematic diagram of a flow chart of a network attack detection method provided in an embodiment of the present application;
图5是本申请实施例提供的另一种网络攻击检测的流程示意图;FIG5 is a schematic diagram of another flow chart of network attack detection provided by an embodiment of the present application;
图6是本申请实施例提供的一种电子设备的结构图。FIG6 is a structural diagram of an electronic device provided in an embodiment of the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
图1是本申请实施例提供的一种网络攻击检测方法的步骤流程图,参照图1所示,该方法可以包括如下步骤。FIG1 is a flow chart of the steps of a network attack detection method provided in an embodiment of the present application. Referring to FIG1 , the method may include the following steps.
步骤101,获取输入数据;所述输入数据包括:至少一个对象导航图语言表达式。Step 101, obtaining input data; the input data includes: at least one object navigation graph language expression.
输入数据可以是流量数据等,用于获取应用服务等。输入数据包括有至少一个OGNL(Object Graph Navigation Language,对象导航图语言)表达式。本申请实施例对于输入数据具体包括几个OGNL表达式不作具体限定。The input data may be flow data, etc., used to obtain application services, etc. The input data includes at least one OGNL (Object Graph Navigation Language) expression. The embodiment of the present application does not specifically limit how many OGNL expressions the input data specifically includes.
OGNL是一种功能强大的表达式语言,用来获取和设置java对象的属性,它旨在提供一个更高抽象度语法来对java对象图进行导航。OGNL具有三要素:表达式(Expression)、Root对象和上下文环境(Context),表达式是整个OGNL的核心内容,所有的OGNL操作都是针对表达式解析后进行的,通过表达式来告诉OGNL操作到底要干些什么。因此,表达式其实是一个带有语法含义的字符串,整个字符串将规定操作的类型和内容。OGNL is a powerful expression language used to get and set the properties of Java objects. It aims to provide a higher level of abstraction syntax to navigate Java object graphs. OGNL has three elements: expression, root object, and context. Expression is the core of the entire OGNL. All OGNL operations are performed after the expression is parsed. The expression tells OGNL what to do. Therefore, the expression is actually a string with grammatical meaning. The entire string will specify the type and content of the operation.
步骤102,获取所述输入数据中各个所述对象导航图语言表达式,是否均符合对象导航图语言表达式的语法规范的结果数据。Step 102, obtaining result data of whether each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression.
OGNL表达式其实是一个带有语法含义的字符串,而且,OGNL表达式也具有对应的语法规范,因此,该步骤就是确定该输入数据中的各个OGNL表达式是否符合OGNL表达式的语法规范,或者说,确定输入数据中的各个OGNL表达式的语法合法性。在该输入数据中的各个OGNL表达式均符合OGNL表达式的语法规范,该输入数据对应的结果数据才是符合语法规范,否则,该输入数据对应的结果数据就不符合语法规范。 An OGNL expression is actually a string with grammatical meaning, and an OGNL expression also has corresponding grammatical specifications. Therefore, this step is to determine whether each OGNL expression in the input data conforms to the grammatical specifications of the OGNL expression, or in other words, to determine the grammatical legality of each OGNL expression in the input data. If each OGNL expression in the input data conforms to the grammatical specifications of the OGNL expression, the result data corresponding to the input data conforms to the grammatical specifications. Otherwise, the result data corresponding to the input data does not conform to the grammatical specifications.
可选的,该步骤102可以包括:在该输入数据中各个对象导航图语言表达式,均生成抽象语法树(abstract syntax tree,AST)的情况下,将该输入数据对应的结果数据,确定为该输入数据中各个所述对象导航图语言表达式,均符合对象导航图语言表达式的语法规范,通过该方式,可以简单确定出该结果数据。Optionally, step 102 may include: when each object navigation graph language expression in the input data generates an abstract syntax tree (AST), determining the result data corresponding to the input data as each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression. In this way, the result data can be simply determined.
具体的,AST就是一个自上而下的树形结构,每一层有一个或多个节点组成,每个节点有一个type属性表示节点的类型。如果一个OGNL表达式能够按照类似自上而下组合形成合法AST树的话,就是语法合法或者语法规范,反之,语法不合法或者语法不规范。Specifically, AST is a top-down tree structure, each layer consists of one or more nodes, and each node has a type attribute to indicate the type of the node. If an OGNL expression can form a legal AST tree in a similar top-down manner, it is grammatically legal or grammatically standardized. Otherwise, it is grammatically illegal or grammatically irregular.
可选的,该步骤102可以包括:获取该输入数据中各个OGNL表达式,是否均符合OGNL中巴科斯范式(Backus-Naur Form,BNF)规定的语法规范的结果数据。BNF是用来描述语法的一种形式体系,是一种典型的元语言,又称巴科斯-诺尔形式。BNF用于描述语言的形式范式,使用构建块和构建规则来描述语言的语法。BNF范式通常用于编程语言和文本文件格式。它不仅能严格地表示语法规则,而且所描述的语法是与上下文无关的。它具有语法简单,表示明确,便于语法分析和编译的特点。BNF表示语法规则的方式为:非终结符用尖括号括起。每条规则的左部是一个非终结符,右部是由非终结符和终结符组成的一个符号串,中间一般以、“::=”·分开。具有相同左部的规则可以共用一个左部,各右部之间以直竖“|”隔开。获取该输入数据中各个OGNL表达式,是否均符合OGNL中BNF规定的语法规范的结果数据,可以简单、准确的确定得到该结果数据。Optionally, step 102 may include: obtaining result data of whether each OGNL expression in the input data conforms to the grammatical specification specified by Backus-Naur Form (BNF) in OGNL. BNF is a formal system used to describe grammar, a typical metalanguage, also known as Backus-Naur form. BNF is used to describe the formal paradigm of a language, using building blocks and building rules to describe the grammar of a language. BNF paradigm is commonly used in programming languages and text file formats. It can not only strictly express grammatical rules, but also describe grammar that is context-independent. It has the characteristics of simple grammar, clear expression, and convenience for grammatical analysis and compilation. The way BNF expresses grammatical rules is: non-terminal symbols are enclosed in angle brackets. The left part of each rule is a non-terminal symbol, and the right part is a symbol string composed of non-terminal symbols and terminal symbols, which are generally separated in the middle by, "::=". Rules with the same left part can share a left part, and the right parts are separated by vertical "|". The result data of whether each OGNL expression in the input data conforms to the grammatical specification specified by BNF in OGNL can be obtained simply and accurately.
可选的,前述获取该输入数据中各个OGNL表达式,是否均符合OGNL中BNF规定的语法规范的结果数据,可以包括:基于LALR(Look-Ahead LR)语法分析器,获取该输入数据中各个OGNL表达式,是否均符合OGNL表达式中BNF规定的语法规范的结果数据,基于LALR易于获得上述结果数据。Optionally, the aforementioned obtaining of the result data of whether each OGNL expression in the input data conforms to the grammatical specification specified by BNF in OGNL may include: obtaining the result data of whether each OGNL expression in the input data conforms to the grammatical specification specified by BNF in the OGNL expression based on a LALR (Look-Ahead LR) syntax analyzer, and the above result data is easily obtained based on LALR.
更为具体的,可以是对输入数据,先进行分词获得词法单元(token),后使用LALR分析器,确定是否均符合OGNL表达式中BNF规定的语法规范的结果数据。其中,Look-Ahead表示向前看,L代表对输入进行从左到右的检查,R代表反向构造出最右推导序列。LALR分析的任务是在token序列基础上,分析这些序列能否组合成各类语法短语,如程序、语句、函数声明表达式等等。其中分词步骤可以基于有限状态自动机,对输入流进行扫描分词处理,将输入数据转换成token。这些tokens将作为后续LALR分析器的输入。可以使用flex工具语言和bison工具语言实现上述功能,上述两种工具语言与程序语言具有良好的适配度,且具有很好的工具强壮性,同时flex工具语言和bison工具语言相互配合较好。More specifically, the input data may be first segmented to obtain lexical units (tokens), and then the LALR analyzer may be used to determine whether the result data conforms to the grammatical specifications specified by BNF in the OGNL expression. Among them, Look-Ahead means looking forward, L represents checking the input from left to right, and R represents reverse construction of the rightmost derivation sequence. The task of LALR analysis is to analyze whether these sequences can be combined into various grammatical phrases, such as programs, statements, function declaration expressions, etc., based on the token sequence. Among them, the segmentation step can be based on a finite state automaton to scan and segment the input stream and convert the input data into tokens. These tokens will serve as the input of the subsequent LALR analyzer. The above functions can be implemented using the flex tool language and the bison tool language. The above two tool languages have good adaptability to the program language and have good tool robustness. At the same time, the flex tool language and the bison tool language cooperate well with each other.
步骤103,统计所述输入数据中的注入特征数据。Step 103: Count the injection feature data in the input data.
此处的注入特征数据是指输入数据中与OGNL表达式注入这一网络攻击相关的特征数据。The injection feature data here refers to the feature data in the input data that is related to the network attack of OGNL expression injection.
可选的,步骤103可以包括:下述子步骤中的至少一种。Optionally, step 103 may include: at least one of the following sub-steps.
子步骤S1,统计所述输入数据中的所有敏感函数的第一总数量,占所述输入数据中的所有函数的第二总数量的第一占比。Sub-step S1, counting a first total number of all sensitive functions in the input data and a first proportion of a second total number of all functions in the input data.
该敏感函数可以包括:OGNL中,会引发危险的函数,此处的危险可以包括:敏感信息泄露、数据损坏、执行任一代码中的至少一种。通常情况下敏感函数较 多,则OGNL表达式注入这一网络攻击的概率可能更大,因此将该第一占比作为一维注入特征数据可以提升OGNL表达式注入这一网络攻击检测的准确性。The sensitive function may include: a function in OGNL that may cause danger, where the danger may include: sensitive information leakage, data corruption, and execution of any code. If the number of OGNL expression injections is large, the probability of OGNL expression injection as a network attack may be greater. Therefore, using the first proportion as one-dimensional injection feature data can improve the accuracy of OGNL expression injection as a network attack detection.
具体可以是,统计得到该输入数据中的所有敏感函数的第一总数量,并统计得到该输入数据中的所有函数的第二总数量,用第一总数量,除以该第二总数量,就得到了该第一占比。Specifically, a first total number of all sensitive functions in the input data is obtained by counting, and a second total number of all functions in the input data is obtained by counting, and the first total number is divided by the second total number to obtain the first proportion.
子步骤S2,统计所述输入数据中的所有运算符的第三总数量,占所述输入数据中的所有字符的第四总数量的第二占比。Sub-step S2, counting a second proportion of a third total number of all operators in the input data to a fourth total number of all characters in the input data.
运算符与OGNL表达式注入这一网络攻击息息相关,因此将该第二占比作为一维注入特征数据可以提升OGNL表达式注入这一网络攻击检测的准确性。具体可以是,统计得到该输入数据中的运算符的第三总数量,并统计得到该输入数据中的所有字符的第四总数量,用第三总数量,除以该第四总数量,就得到了该第二占比。该输入数据中的运算符包括:该输入数据中的基本运算符和特殊运算符,即包括该输入数据中的所有运算符。OGNL表达式支持Java运算,该输入数据中的运算符可以包括:+、-、*、/、%、in、eq、gt、.、@、#等。Operators are closely related to the network attack of OGNL expression injection, so using the second proportion as one-dimensional injection feature data can improve the accuracy of OGNL expression injection network attack detection. Specifically, the third total number of operators in the input data is obtained by counting, and the fourth total number of all characters in the input data is obtained by counting, and the third total number is divided by the fourth total number to obtain the second proportion. The operators in the input data include: basic operators and special operators in the input data, that is, all operators in the input data. OGNL expressions support Java operations, and the operators in the input data may include: +, -, *, /, %, in, eq, gt, ., @, #, etc.
子步骤S3,统计所述输入数据中,平均每个对象导航图语言表达式中的所有函数声明的第一总次数。Sub-step S3, counting the first total number of all function declarations in each object navigation graph language expression in the input data.
函数声明的作用是把函数的名字、函数类型以及形参类型、个数和顺序通知编译系统,以便在调用该函数时系统按此进行对照检查(例如函数名是否正确,实参与形参的类型和个数是否一致)。每个对象导航图语言表达式中的所有函数声明的次数与OGNL表达式注入这一网络攻击息息相关,因此将该第一总次数作为一维注入特征数据,可以提升OGNL表达式注入这一网络攻击检测的准确性。The purpose of function declaration is to inform the compilation system of the function name, function type, and parameter type, number, and order so that the system can check it when calling the function (for example, whether the function name is correct, and whether the type and number of actual parameters and formal parameters are consistent). The number of all function declarations in each object navigation graph language expression is closely related to the OGNL expression injection network attack. Therefore, using the first total number as one-dimensional injection feature data can improve the accuracy of OGNL expression injection network attack detection.
可选的,该第一总次数的获得可以包括下述步骤:统计该输入数据中,每个OGNL表达式中的所有函数声明的第三总次数,将该输入数据对应的所有第三总次数求和,得到第一和值,用该第一和值,除以该输入数据中,所有对象导航图语言表达式的第五总数量,得到该输入数据中,平均每个OGNL表达式中的所有函数声明的第一总次数,简便准确得到了该第一总次数。Optionally, obtaining the first total number may include the following steps: counting the third total number of all function declarations in each OGNL expression in the input data, summing all the third total numbers corresponding to the input data to obtain a first sum value, dividing the first sum value by the fifth total number of all object navigation graph language expressions in the input data to obtain the first total number of all function declarations in each OGNL expression in the input data on average, thereby obtaining the first total number simply and accurately.
例如,该输入数据一共包括3个OGNL表达式,各个OGNL表达式中所有函数声明的第三总次数分别为2次、3次、4次,则,该第一和值即为:2+3+4=9,9/3=3。即,该输入数据中,平均每个OGNL表达式中的所有函数声明的第一总次数即为3。For example, the input data includes 3 OGNL expressions in total, and the third total number of all function declarations in each OGNL expression is 2, 3, and 4 respectively, then the first sum is: 2+3+4=9, 9/3=3. That is, in the input data, the first total number of all function declarations in each OGNL expression is 3 on average.
子步骤S4,统计所述输入数据中,平均每个对象导航图语言表达式中的所有函数调用的第二总次数。Sub-step S4, counting the second total number of all function calls in each object navigation graph language expression in the input data.
OGNL表达式中函数调用次数较多,该OGNL表达式中含有OGNL表达式注入这一网络攻击的风险可能也较高,将该第二总次数作为一维注入特征数据,可以提升OGNL表达式注入这一网络攻击检测的准确性。There are many function calls in the OGNL expression, and the risk of the network attack of OGNL expression injection in the OGNL expression may also be high. The second total number is used as one-dimensional injection feature data to improve the accuracy of the detection of the network attack of OGNL expression injection.
可选的,该第二总次数的获得可以包括下述步骤:统计该输入数据中,每个OGNL表达式中的所有函数调用的第四总次数,将该输入数据对应的所有第四总次数求和,得到第二和值,用该第二和值,除以该输入数据中,所有OGNL表达式的第五总数量,得到该输入数据中,平均每个OGNL表达式中的所有函数调用的第二总次数,简便准确得到了该第一总次数。Optionally, obtaining the second total number may include the following steps: counting the fourth total number of all function calls in each OGNL expression in the input data, summing all the fourth total numbers corresponding to the input data to obtain a second sum value, dividing the second sum value by the fifth total number of all OGNL expressions in the input data to obtain the second total number of all function calls in each OGNL expression in the input data, thereby obtaining the first total number in a simple and accurate manner.
例如,该输入数据一共包括3个OGNL表达式,各个OGNL表达式中所有函数调用的第四总次数分别为1次、3次、5次,则,该第二和值即为:1+3+5=9, 9/3=3。即,该输入数据中,平均每个OGNL表达式中的所有函数调用的第二总次数即为3。For example, the input data includes 3 OGNL expressions in total, and the fourth total number of all function calls in each OGNL expression is 1, 3, and 5 respectively, then the second sum is: 1+3+5=9, 9/3=3. That is, in the input data, the second total number of all function calls in each OGNL expression is 3 on average.
可选的,该步骤103可以包括:基于命令执行环境(webshelll)的统计学检测(NeoPI),统计该输入数据中的注入特征数据。NeoPI统计学特征包括:重合指数、文件熵、最长单词、恶意特征、压缩比。这些特征都与OGNL表达式这一网络检测是否有恶意息息相关,采用该方式统计注入特征数据可以提升网络检测的准确性。Optionally, step 103 may include: statistical detection (NeoPI) based on the command execution environment (webshell1), counting the injection feature data in the input data. NeoPI statistical features include: coincidence index, file entropy, longest word, malicious features, and compression ratio. These features are closely related to whether the OGNL expression is malicious in the network detection. Using this method to count the injection feature data can improve the accuracy of network detection.
可选的,该步骤103可以包括:在该输入数据对应的结果数据为该输入数据中所有OGNL表达式,均符合OGNL表达式的语法规范的情况下,统计该输入数据中的注入特征数据,在该输入数据中所有OGNL表达式,均符合OGNL表达式的语法规范的情况下,则,该输入数据的语法合法,然后才统计该输入数据中的注入特征数据,可以减少无效工作量。具体的,通常情况下,若输入数据中至少一个OGNL表达式,不符合OGNL表达式的语法规范的情况下,基本可以认为该输入数据无效或不合法,则无需统计该输入数据中的注入特征数据。Optionally, step 103 may include: when the result data corresponding to the input data is all OGNL expressions in the input data, and all of them conform to the syntax specification of the OGNL expression, counting the injection feature data in the input data; when all of the OGNL expressions in the input data conform to the syntax specification of the OGNL expression, the syntax of the input data is legal, and then counting the injection feature data in the input data, which can reduce invalid workload. Specifically, under normal circumstances, if at least one OGNL expression in the input data does not conform to the syntax specification of the OGNL expression, the input data can be basically considered invalid or illegal, and there is no need to count the injection feature data in the input data.
步骤104,将所述输入数据对应的所述结果数据和所述注入特征数据,输入预设的网络攻击检测模型,得到所述输入数据是否包括对象导航图语言表达式注入的检测结果。Step 104: input the result data and the injection feature data corresponding to the input data into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
该预设的网络攻击检测模型是提前训练好的,在将输入数据对应的结果数据和注入特征数据,输入该预设的网络攻击检测模型,可以输出该输入数据是否包括OGNL表达式注入的检测结果。The preset network attack detection model is trained in advance. When the result data and injection feature data corresponding to the input data are input into the preset network attack detection model, the detection result of whether the input data includes OGNL expression injection can be output.
可选的,该预设的网络攻击检测模型包括:线性回归(Logistic Regression,LR)模型。LR模型是一种处理二分类问题的模型。在输入数据的OGNL表达式注入攻击检测场景中,把因变量y分为正类和负类。其中正类表示是OGNL表达式注入的输入数据,负类表示无OGNL表达式注入危害的输入数据。则因变量y∈{0,1},其中0表示负类,1表示正类。LR模型的函数形式是下述公式(1)。
hθ=g(θTx) 公式(1)Optionally, the preset network attack detection model includes: a linear regression (Logistic Regression, LR) model. The LR model is a model for processing binary classification problems. In the OGNL expression injection attack detection scenario of input data, the dependent variable y is divided into positive and negative classes. The positive class represents the input data injected with the OGNL expression, and the negative class represents the input data without the hazard of OGNL expression injection. Then the dependent variable y∈{0,1}, where 0 represents the negative class and 1 represents the positive class. The functional form of the LR model is the following formula (1).
h θ =g(θ T x) Formula (1)
使得h(x)≥0.5时,预测y=1,而当h(x)<0.5时,预测y=0。其中x代表输入数据对应的结果数据和注入特征数据,θ代表输入数据对应的结果数据和注入特征数据分别对应的权重形成的矩阵,T代表前述矩阵的转置。g(z)代表sigmoid函数,公式为下述公式(2)。
g(z)=1/(1+e-z) 公式(2)When h(x)≥0.5, y=1 is predicted, and when h(x)<0.5, y=0 is predicted. Where x represents the result data and injected feature data corresponding to the input data, θ represents the matrix formed by the weights corresponding to the result data and injected feature data corresponding to the input data, and T represents the transpose of the aforementioned matrix. g(z) represents the sigmoid function, and the formula is the following formula (2).
g(z)=1/(1+e -z ) Formula (2)
所以线性回归模型就是下述公式(3)。
So the linear regression model is the following formula (3).
采用线性回归模型,得到该输入数据是否包括对象导航图语言表达式注入的检测结果,易于实现,且计算速度快,检测结果较为准确。A linear regression model is used to obtain a detection result of whether the input data includes an object navigation graph language expression injection. The method is easy to implement, has a fast calculation speed, and has a relatively accurate detection result.
在本申请实施例中,获取输入数据中各个对象导航图语言表达式,是否均符合对象导航图语言表达式的语法规范的结果数据,统计该输入数据中的注入特征数据,将输入数据对应的结果数据和注入特征数据,输入预设的网络攻击检测模型,得到该输入数据是否包括对象导航图语言表达式注入的检测结果,就是提供 了针对OGNL表达式注入这一网络攻击的检测方法。同时,输入数据对应的结果数据和注入特征数据这些多维数据,与OGNL表达式注入相关性更高,则对于OGNL表达式注入的检测准确率较高,召回率也较高,漏检测率较低,可以提升对于OGNL表达式注入的防护能力。并且,上述检测只要获取到输入数据就进行,检测实时性更好。In the embodiment of the present application, the result data of whether each object navigation graph language expression in the input data conforms to the grammatical specification of the object navigation graph language expression is obtained, the injection feature data in the input data is counted, the result data and injection feature data corresponding to the input data are input into the preset network attack detection model, and the detection result of whether the input data includes the injection of the object navigation graph language expression is obtained, that is, providing A detection method for the network attack of OGNL expression injection is developed. At the same time, the result data corresponding to the input data and the injection feature data, which are multi-dimensional data, are more correlated with OGNL expression injection, so the detection accuracy of OGNL expression injection is higher, the recall rate is also higher, and the missed detection rate is lower, which can improve the protection capability against OGNL expression injection. Moreover, the above detection is performed as long as the input data is obtained, and the detection is more real-time.
图2是本申请实施例提供的另一种网络攻击检测方法的步骤流程图,参照图2所示,该方法可以包括如下步骤。FIG2 is a flowchart of the steps of another network attack detection method provided in an embodiment of the present application. Referring to FIG2 , the method may include the following steps.
步骤201,获取输入数据;所述输入数据包括:至少一个对象导航图语言表达式。Step 201, obtaining input data; the input data includes: at least one object navigation graph language expression.
步骤202,获取所述输入数据中各个所述对象导航图语言表达式,是否均符合对象导航图语言表达式的语法规范的结果数据。Step 202, obtaining result data of whether each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression.
步骤203,统计所述输入数据中的注入特征数据。Step 203: Count the injection feature data in the input data.
步骤201至步骤203可以对应参照前述步骤101至步骤103,且能达到相同或相似的有益效果,为了避免重复,此处不再赘述。Steps 201 to 203 may correspond to the aforementioned steps 101 to 103 and can achieve the same or similar beneficial effects. To avoid repetition, they will not be described again here.
步骤204,将获取的历史输入数据作为第一样本数据,训练得到所述预设的网络攻击检测模型。Step 204: Use the acquired historical input data as first sample data to train the preset network attack detection model.
就是采用历史输入数据训练得到前述预设的网络攻击检测模型。可选的,预设的网络攻击检测模型包括:线性回归模型。此处可以参照前述相关记载,且能达到相同或相似的有益效果,为了避免重复,此处不再赘述。That is, the preset network attack detection model is obtained by training with historical input data. Optionally, the preset network attack detection model includes: a linear regression model. The aforementioned related records can be referred to here, and the same or similar beneficial effects can be achieved. In order to avoid repetition, it will not be repeated here.
步骤205,将所述输入数据对应的所述结果数据和所述注入特征数据,输入预设的网络攻击检测模型,得到所述输入数据是否包括对象导航图语言表达式注入的检测结果。Step 205: input the result data and the injection feature data corresponding to the input data into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
步骤205可以对应参照前述步骤104,且能达到相同或相似的有益效果,为了避免重复,此处不再赘述。Step 205 may correspond to the aforementioned step 104 and can achieve the same or similar beneficial effects. To avoid repetition, it will not be described again here.
步骤206,将所述输入数据作为第二样本数据,更新所述预设的网络攻击检测模型。Step 206: Use the input data as second sample data to update the preset network attack detection model.
将前述输入数据作为第二样本数据,进而实时更新该预设的网络攻击检测模型,一方面有丰富的数据来源提升预设的网络攻击检测模型的鲁棒性,另一方面依托于实时数据更新,也可以便捷实现预设的网络攻击检测模型参数的实时更新,便于迭代更新。The aforementioned input data is used as the second sample data to update the preset network attack detection model in real time. On the one hand, a rich data source is provided to improve the robustness of the preset network attack detection model. On the other hand, relying on real-time data updates, the real-time update of the preset network attack detection model parameters can also be easily realized, which is convenient for iterative updates.
需要说明的是,该方法还可以和云平台大数据结合,位于云平台的公网上的应用更容易遭受OGNL表达式注入这一网络攻击。例如,目前,银行、保险公司、电子商务零售商等各大企业纷纷上云,暴露在功率的裸Web(World Wide Web,全球广域网)更容易遭受OGNL表达式注入这一网络攻击,导致个人和企业机密数据泄露、资金损失、业务中断等安全问题,对各企业造成严重影响。该方法还可以和云平台大数据结合,云平台大数据可以提供更多、更丰富的第一样本数据,使得训练得到的预设的网络攻击检测模型更为准确,鲁棒性更好,而且云平台大数据可以提供更多、更丰富的第二样本数据,可以便捷、快速实现预设的网络攻击检测模型参数的更新迭代等。It should be noted that this method can also be combined with cloud platform big data. Applications on the public network of cloud platform are more vulnerable to the network attack of OGNL expression injection. For example, at present, major enterprises such as banks, insurance companies, and e-commerce retailers have moved to the cloud, and the naked Web (World Wide Web) exposed to power is more vulnerable to the network attack of OGNL expression injection, which leads to security issues such as leakage of personal and corporate confidential data, financial losses, and business interruption, which have a serious impact on various enterprises. This method can also be combined with cloud platform big data. Cloud platform big data can provide more and richer first sample data, making the trained preset network attack detection model more accurate and more robust. In addition, cloud platform big data can provide more and richer second sample data, which can conveniently and quickly realize the update and iteration of the preset network attack detection model parameters.
图3是本申请实施例提供的一种网络攻击检测装置的结构图。本申请还提供了一种网络攻击检测装置,参照图3所示,该装置包括:输入数据获取模块301,用于获取输入数据;所述输入数据包括:至少一个对象导航图语言表达式;Figure 3 is a structural diagram of a network attack detection device provided by an embodiment of the present application. The present application also provides a network attack detection device, as shown in Figure 3, the device includes: an input data acquisition module 301, used to acquire input data; the input data includes: at least one object navigation graph language expression;
结果数据获取模块302,用于获取所述输入数据中各个所述对象导航图语言表达式,是否均符合对象导航图语言表达式的语法规范的结果数据; The result data acquisition module 302 is used to acquire result data of whether each of the object navigation graph language expressions in the input data conforms to the grammatical specification of the object navigation graph language expression;
统计模块303,用于统计所述输入数据中的注入特征数据;A statistics module 303, used for counting the injection characteristic data in the input data;
检测模块304,用于将所述输入数据对应的所述结果数据和所述注入特征数据,输入预设的网络攻击检测模型,得到所述输入数据是否包括对象导航图语言表达式注入的检测结果。The detection module 304 is used to input the result data and the injection feature data corresponding to the input data into a preset network attack detection model to obtain a detection result of whether the input data includes an object navigation graph language expression injection.
可选的,所述统计模块303,包括下述子模块中的至少一种:第一统计子模块,用于统计所述输入数据中的所有敏感函数的第一总数量,占所述输入数据中的所有函数的第二总数量的第一占比;第二统计子模块,用于统计所述输入数据中的所有运算符的第三总数量,占所述输入数据中的所有字符的第四总数量的第二占比;第三统计子模块,用于统计所述输入数据中,平均每个对象导航图语言表达式中的所有函数声明的第一总次数;第四统计子模块,用于统计所述输入数据中,平均每个对象导航图语言表达式中的所有函数调用的第二总次数。Optionally, the statistical module 303 includes at least one of the following sub-modules: a first statistical sub-module, used to count a first total number of all sensitive functions in the input data, which accounts for a first proportion of a second total number of all functions in the input data; a second statistical sub-module, used to count a third total number of all operators in the input data, which accounts for a second proportion of a fourth total number of all characters in the input data; a third statistical sub-module, used to count an average first total number of all function declarations in each object navigation graph language expression in the input data; and a fourth statistical sub-module, used to count an average second total number of all function calls in each object navigation graph language expression in the input data.
可选的,所述统计模块303,包括:第五统计子模块,用于基于命令执行环境的统计学检测,统计所述输入数据中的注入特征数据。Optionally, the statistical module 303 includes: a fifth statistical submodule, which is used to count the injection feature data in the input data based on statistical detection of the command execution environment.
可选的,所述统计模块303,包括:第六统计子模块,用于在所述结果数据为所述输入数据中所有所述对象导航图语言表达式,均符合对象导航图语言表达式的语法规范的情况下,统计所述输入数据中的注入特征数据。Optionally, the statistical module 303 includes: a sixth statistical sub-module, used to count the injection feature data in the input data when the result data is all the object navigation graph language expressions in the input data and they all comply with the grammatical specifications of the object navigation graph language expressions.
可选的,所述网络攻击检测装置还包括:训练模块,用于将获取的历史输入数据作为第一样本数据,训练得到所述预设的网络攻击检测模型。Optionally, the network attack detection device further includes: a training module, configured to use the acquired historical input data as first sample data to train and obtain the preset network attack detection model.
可选的,所述网络攻击检测装置还包括:更新模块,用于将所述输入数据作为第二样本数据,更新所述预设的网络攻击检测模型。Optionally, the network attack detection device further includes: an updating module, configured to update the preset network attack detection model by using the input data as second sample data.
可选的,所述预设的网络攻击检测模型包括:线性回归模型。Optionally, the preset network attack detection model includes: a linear regression model.
可选的,所述结果数据获取模块302,包括:第一结果数据获取子模块,用于在所述输入数据中各个所述对象导航图语言表达式,均生成抽象语法树的情况下,将所述输入数据对应的结果数据,确定为所述输入数据中各个所述对象导航图语言表达式,均符合对象导航图语言表达式的语法规范。Optionally, the result data acquisition module 302 includes: a first result data acquisition sub-module, which is used to determine the result data corresponding to the input data as each object navigation graph language expression in the input data, when each object navigation graph language expression in the input data generates an abstract syntax tree, and each of the object navigation graph language expressions in the input data complies with the grammatical specification of the object navigation graph language expression.
可选的,所述结果数据获取模块302,包括:第二结果数据获取子模块,用于获取所述输入数据中各个所述对象导航图语言表达式,是否均符合对象导航图语言表达式中巴科斯范式,规定的语法规范的结果数据。Optionally, the result data acquisition module 302 includes: a second result data acquisition submodule, used to obtain result data on whether each of the object navigation graph language expressions in the input data conforms to the grammatical specifications specified by the Backus-Naur form in the object navigation graph language expression.
可选的,所述第二结果数据获取子模块,包括:结果数据获取单元,用于基于LALR语法分析器,获取所述输入数据中各个所述对象导航图语言表达式,是否均符合对象导航图语言表达式中巴科斯范式,规定的语法规范的结果数据。Optionally, the second result data acquisition submodule includes: a result data acquisition unit, used to obtain, based on a LALR syntax analyzer, result data on whether each of the object navigation graph language expressions in the input data conforms to the Backus-Naur form in the object navigation graph language expression and the grammatical specifications specified in it.
可选的,所述第三统计子模块,包括:第一统计单元,用于统计所述输入数据中,每个所述对象导航图语言表达式中的所有函数声明的第三总次数;第一求和单元,用于将所述输入数据对应的所有所述第三总次数求和,得到第一和值;第一总次数获取单元,用于用所述第一和值,除以所述输入数据中,所有对象导航图语言表达式的第五总数量,得到所述输入数据中,平均每个对象导航图语言表达式中的所有函数声明的第一总次数。Optionally, the third statistical submodule includes: a first statistical unit, used to count the third total number of all function declarations in each object navigation graph language expression in the input data; a first summation unit, used to sum all the third total numbers corresponding to the input data to obtain a first sum value; and a first total number acquisition unit, used to divide the first sum value by the fifth total number of all object navigation graph language expressions in the input data to obtain the first total number of all function declarations in each object navigation graph language expression in the input data on average.
可选的,所述第四统计子模块,包括:第二统计单元,用于统计所述输入数据中,每个所述对象导航图语言表达式中的所有函数调用的第四总次数;第二求和单元,用于将所述输入数据对应的所有所述第四总次数求和,得到第二和值;第二总次数获取单元,用于用所述第二和值,除以所述输入数据中,所有对象导航图语言表达式的第五总数量,得到所述输入数据中,平均每个对象导航图语言表达式中的所有函数调用的第二总次数。Optionally, the fourth statistical submodule includes: a second statistical unit, used to count the fourth total number of all function calls in each object navigation graph language expression in the input data; a second summation unit, used to sum all the fourth total numbers corresponding to the input data to obtain a second sum value; and a second total number acquisition unit, used to divide the second sum value by the fifth total number of all object navigation graph language expressions in the input data to obtain the second total number of all function calls in each object navigation graph language expression in the input data on average.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单, 相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment.
需要说明的是,本申请实施例中获取的各种信息、数据,均是在得到信息/数据持有方授权的情况下获取的。It should be noted that the various information and data obtained in the embodiments of the present application are obtained with the authorization of the information/data holder.
下面结合具体实施例进一步解释说明本申请。The present application is further explained below with reference to specific embodiments.
图4是本申请实施例提供的一种网络攻击检测的流程示意图。图5是本申请实施例提供的另一种网络攻击检测的流程示意图。参照图4所示,对云平台现有OGNL表达式注入这一类型的网络攻击的输入数据集进行标注。Fig. 4 is a schematic diagram of a flow chart of a network attack detection provided by an embodiment of the present application. Fig. 5 is a schematic diagram of another flow chart of a network attack detection provided by an embodiment of the present application. Referring to Fig. 4, an input data set of a network attack of the type of OGNL expression injection in the cloud platform is annotated.
参照图4、图5所示,对历史输入数据进行扫描分词处理,转换成token。将得到的token序列输入到LALR语法分析器,依据OGNL的BNF范式规定的语法规范,确定token序列流是否均符合OGNL的BNF范式规定的语法规范,得到历史输入数据对应的结果数据。As shown in Figures 4 and 5, the historical input data is scanned and segmented and converted into tokens. The obtained token sequence is input into the LALR parser, and according to the grammatical specifications specified by the BNF paradigm of OGNL, it is determined whether the token sequence flow conforms to the grammatical specifications specified by the BNF paradigm of OGNL, and the result data corresponding to the historical input data is obtained.
参照图4、图5所示,通过NeoPI统计得到前述历史输入数据中的注入特征数据。更为具体的,该步骤可以包括:通过NeoPI统计得到历史输入数据中的所有敏感函数的第一总数量,占该历史输入数据中的所有函数的第二总数量的第一占比,通过NeoPI统计得到该历史输入数据中的所有运算符的第三总数量,占该历史输入数据中的所有字符的第四总数量的第二占比,通过NeoPI统计得到该历史输入数据中,平均每个对象导航图语言表达式中的所有函数声明的第一总次数,通过NeoPI统计得到该历史输入数据中,平均每个对象导航图语言表达式中的所有函数调用的第二总次数。As shown in Figures 4 and 5, the injection feature data in the aforementioned historical input data is obtained through NeoPI statistics. More specifically, this step may include: obtaining a first total number of all sensitive functions in the historical input data through NeoPI statistics, a first proportion of a second total number of all functions in the historical input data, obtaining a third total number of all operators in the historical input data through NeoPI statistics, a second proportion of a fourth total number of all characters in the historical input data, obtaining a first total number of all function declarations in each object navigation graph language expression in the historical input data through NeoPI statistics, and obtaining a second total number of all function calls in each object navigation graph language expression in the historical input data through NeoPI statistics.
参照图4、图5所示,基于历史输入数据对应的结果数据、上述第一占比、第二占比、第一总次数、第二总次数,训练线性回归模型,得到预设的网络攻击检测模型。图4中上方虚线方框或框出的部分主要是训练得到预设的网络攻击检测模型的部分。4 and 5, based on the result data corresponding to the historical input data, the first proportion, the second proportion, the first total number of times, and the second total number of times, a linear regression model is trained to obtain a preset network attack detection model. The upper dotted box or framed portion in FIG4 is mainly the part that trains to obtain the preset network attack detection model.
参照图4、图5所示,获取输入数据,然后对该输入数据执行与历史输入数据相同的操作,直至得到该输入数据对应的结果数据、上述第一占比、第二占比、第一总次数、第二总次数。然后将该输入数据对应的结果数据、上述第一占比、第二占比、第一总次数、第二总次数输入训练好的预设的网络攻击检测模型,得到该输入数据是否包括OGNL表达式注入的检测结果。参照图5所示,将该检测结果上报云平台。在具有OGNL表达式注入的输入数据的条数,大于预设条数的情况下,安全报警。需要说明的是,该预设条数可以根据实际需要设定,本申请对此不作具体限定。Referring to Figures 4 and 5, input data is obtained, and then the same operations as the historical input data are performed on the input data until the result data corresponding to the input data, the above-mentioned first proportion, the second proportion, the first total number of times, and the second total number of times are obtained. Then the result data corresponding to the input data, the above-mentioned first proportion, the second proportion, the first total number of times, and the second total number of times are input into the trained preset network attack detection model to obtain the detection result of whether the input data includes OGNL expression injection. Referring to Figure 5, the detection result is reported to the cloud platform. When the number of input data with OGNL expression injection is greater than the preset number of items, a security alarm is issued. It should be noted that the preset number of items can be set according to actual needs, and this application does not make specific limitations on this.
参照图4所示,以输入数据对应的结果数据、上述第一占比、第二占比、第一总次数、第二总次数更新前述训练好的预设的网络攻击检测模型。图4中下方虚线方框或框出的部分主要是网络攻击检测,以及对于预设的网络攻击检测模型的部分更新迭代的部分。As shown in Figure 4, the result data corresponding to the input data, the first proportion, the second proportion, the first total number, and the second total number are used to update the previously trained preset network attack detection model. The dotted box or the framed portion at the bottom of Figure 4 is mainly the network attack detection, as well as the part of the update iteration of the preset network attack detection model.
图6是本申请实施例提供的一种电子设备的结构图,本申请还提供了一种电子设备,参见图6,包括:处理器901、存储器902以及存储在所述存储器上并可在所述处理器上运行的计算机程序9021,所述处理器执行所述程序时实现前述实施例的网络攻击检测方法。Figure 6 is a structural diagram of an electronic device provided in an embodiment of the present application. The present application also provides an electronic device, see Figure 6, including: a processor 901, a memory 902, and a computer program 9021 stored in the memory and executable on the processor, and the processor implements the network attack detection method of the aforementioned embodiment when executing the program.
本申请还提供了一种可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行前述实施例的网络攻击检测方法。The present application also provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the network attack detection method of the aforementioned embodiment.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本申请也不针对任何特定编程语言。 应当明白,可以利用各种编程语言实现在此描述的本申请的内容,并且上面对特定语言所做的描述是为了披露本申请的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems may also be used together with the teachings based thereon. It is apparent from the above description that the structure required for constructing such systems. In addition, the present application is not directed to any particular programming language either. It should be appreciated that a variety of programming languages may be used to implement the contents of the present application described herein, and the above descriptions made in specific languages are intended to disclose the best implementation of the present application.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本申请的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
类似地,应当理解,为了精简本申请并帮助理解各个发明方面中的一个或多个,在上面对本申请的示例性实施例的描述中,本申请的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本申请要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本申请的单独实施例。Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the following claims, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的替代特征来代替。Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination, except that at least some of such features and/or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
本申请的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本申请的排序设备中的一些或者全部部件的一些或者全部功能。本申请还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序。这样的实现本申请的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the sorting device according to the present application. The present application can also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本申请进行说明而不是对本申请进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本申请可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
本申请所涉及的用户信息(包括但不限于用户的设备信息、用户个人信息等)、相关数据等均为经用户授权或经各方授权后的信息。The user information (including but not limited to the user's device information, user personal information, etc.) and related data involved in this application are all information authorized by the user or by all parties.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本申请的保 护范围之内。The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application shall be included in the protection of the present application. within the scope of protection.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。 The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims (15)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310047999.4A CN115801456B (en) | 2023-01-31 | 2023-01-31 | Network attack detection method, device, electronic device and storage medium |
| CN202310047999.4 | 2023-01-31 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024159955A1 true WO2024159955A1 (en) | 2024-08-08 |
Family
ID=85429343
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/139975 Ceased WO2024159955A1 (en) | 2023-01-31 | 2023-12-19 | Network attack detection method and apparatus, electronic device and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN115801456B (en) |
| WO (1) | WO2024159955A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115801456B (en) * | 2023-01-31 | 2023-06-23 | 天翼云科技有限公司 | Network attack detection method, device, electronic device and storage medium |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107590387A (en) * | 2017-09-04 | 2018-01-16 | 杭州安恒信息技术有限公司 | EL expression formula injection loopholes detection method, device and electronic equipment |
| CN109450846A (en) * | 2018-09-19 | 2019-03-08 | 杭州安恒信息技术股份有限公司 | A kind of EL expression formula injection loophole batch detecting device and detection method |
| US10530809B1 (en) * | 2016-09-15 | 2020-01-07 | Symantec Corporation | Systems and methods for remediating computer stability issues |
| CN113138913A (en) * | 2020-01-17 | 2021-07-20 | 深信服科技股份有限公司 | Java code injection detection method, device, equipment and storage medium |
| CN113645224A (en) * | 2021-08-09 | 2021-11-12 | 杭州安恒信息技术股份有限公司 | Network attack detection method, device, equipment and storage medium |
| KR102449282B1 (en) * | 2022-05-04 | 2022-09-29 | (주) 시큐러스 | Site replication device to enhance website security |
| CN115801456A (en) * | 2023-01-31 | 2023-03-14 | 天翼云科技有限公司 | Network attack detection method and device, electronic equipment and storage medium |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109194606B (en) * | 2018-07-05 | 2022-05-03 | 百度在线网络技术(北京)有限公司 | Attack detection system, method, computer device and storage medium |
| CN110266669B (en) * | 2019-06-06 | 2021-08-17 | 武汉大学 | A method and system for general detection and location of Java Web framework vulnerability attacks |
| CN113472721B (en) * | 2020-03-31 | 2022-12-06 | 华为技术有限公司 | Network attack detection method and device |
-
2023
- 2023-01-31 CN CN202310047999.4A patent/CN115801456B/en active Active
- 2023-12-19 WO PCT/CN2023/139975 patent/WO2024159955A1/en not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10530809B1 (en) * | 2016-09-15 | 2020-01-07 | Symantec Corporation | Systems and methods for remediating computer stability issues |
| CN107590387A (en) * | 2017-09-04 | 2018-01-16 | 杭州安恒信息技术有限公司 | EL expression formula injection loopholes detection method, device and electronic equipment |
| CN109450846A (en) * | 2018-09-19 | 2019-03-08 | 杭州安恒信息技术股份有限公司 | A kind of EL expression formula injection loophole batch detecting device and detection method |
| CN113138913A (en) * | 2020-01-17 | 2021-07-20 | 深信服科技股份有限公司 | Java code injection detection method, device, equipment and storage medium |
| CN113645224A (en) * | 2021-08-09 | 2021-11-12 | 杭州安恒信息技术股份有限公司 | Network attack detection method, device, equipment and storage medium |
| KR102449282B1 (en) * | 2022-05-04 | 2022-09-29 | (주) 시큐러스 | Site replication device to enhance website security |
| CN115801456A (en) * | 2023-01-31 | 2023-03-14 | 天翼云科技有限公司 | Network attack detection method and device, electronic equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115801456A (en) | 2023-03-14 |
| CN115801456B (en) | 2023-06-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9990583B2 (en) | Match engine for detection of multi-pattern rules | |
| CN110059006B (en) | Code auditing method and device | |
| US20070083933A1 (en) | Detection of security vulnerabilities in computer programs | |
| US20200042706A1 (en) | Taint analysis with access paths | |
| CN111818018A (en) | A SQL Injection Attack Detection Method Based on Machine Learning Model | |
| CN102945203A (en) | A code security testing method for mobile Internet applications | |
| CN111382067A (en) | A method and system for generating high-quality seeds in fuzzing testing | |
| CN117744087B (en) | A method for detecting remote code execution vulnerabilities in smart devices based on static analysis | |
| CN115587364B (en) | Firmware vulnerability input point location method and device based on front-end and back-end correlation analysis | |
| CN113312618A (en) | Program vulnerability detection method and device, electronic equipment and medium | |
| CN111756728A (en) | Method and device for vulnerability attack detection | |
| KR102622018B1 (en) | Apparatus for processing cyber security data, method thereof, and a storage storing a computer-implementable program processing cyber security data | |
| CN113961930B (en) | SQL injection vulnerability detection method, device and electronic device | |
| CN115906086A (en) | Method, system and storage medium for detecting webpage backdoor based on code attribute graph | |
| WO2024159955A1 (en) | Network attack detection method and apparatus, electronic device and storage medium | |
| CN114626061B (en) | Webpage Trojan horse detection method and device, electronic equipment and medium | |
| CN111475812B (en) | Webpage backdoor detection method and system based on data executable characteristics | |
| CN113051565A (en) | Malicious script detection method and device, equipment and storage medium | |
| CN115412358B (en) | Network security risk assessment method and device, electronic equipment and storage medium | |
| CN118551384A (en) | WebShell detection method based on machine learning | |
| CN117609992A (en) | Data disclosure detection method, device and storage medium | |
| CN117056347A (en) | SQL statement permanent injection detection method, device, computer equipment and storage medium | |
| US20200242244A1 (en) | Guided security analysis | |
| CN120951341B (en) | Automatic Detection and Protection Early Warning Method and System for Smart Contract Security Vulnerabilities | |
| CN119830303B (en) | Smart contract execution overhead vulnerability detection method, device, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23919517 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |