A Web attack report generation method, device, equipment and computer medium
By identifying the similarity in the Web alarm log to generate a Web attack report, the problems of inefficient and poor accuracy of Web attack report generation in the prior art are solved, and more efficient and accurate report generation is achieved, which is suitable for specific application scenarios.
Patent Information
- Application Number
- CN202011040471.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-28
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-09-28
AI Technical Summary
In the prior art, the generation of Web attack reports is inefficient and has poor accuracy, and cannot be applied to specific application scenarios, resulting in insufficient applicability.
By obtaining the Web alarm log data, similar target Web alarm logs are identified based on word frequency, and target Web attack reports are generated. The target Web attack reports are used to reflect the characteristics of the Web attacks, improving the efficiency and accuracy of the report.
Improves the efficiency and accuracy of web attack reports generation, enhances its applicability, and allows reports to better reflect the characteristics of web attacks.
Smart Images

Figure CN111985192B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and more specifically, to a method, device, equipment and computer medium for generating a Web attack report. Background Art
[0002] With the development of Web (World Wide Web) technology, more and more applications are built based on the Web platform, and Web security has become another hot topic after the security of operating systems and business software. In the application of Web technology, in order to obtain information about Web attacks, it is necessary to generate Web attack reports, such as manually obtaining Web alarm log data, analyzing and comparing Web alarm log data, and generating corresponding Web attack reports.
[0003] However, manually generating Web attack reports is time-consuming, labor-intensive, inefficient, and has poor accuracy, and is not suitable for specific application scenarios.
[0004] In summary, how to improve the applicability of the Web attack report generation method is a problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The purpose of this application is to provide a method for generating a Web attack report, which can solve the technical problem of how to improve the applicability of the method for generating a Web attack report to a certain extent. This application also provides a Web attack report generating device, equipment and computer-readable storage medium.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A method for generating a Web attack report, comprising:
[0008] Obtain Web alarm log data;
[0009] Based on the word frequencies in the Web alarm log data, identifying similar target Web alarm logs in the Web alarm log data;
[0010] A target Web attack report is generated based on the target Web alarm log.
[0011] Preferably, the identifying similar target Web alarm logs in the Web alarm log data based on the word frequencies in the Web alarm log data comprises:
[0012] For any two original Web alarm logs in the Web alarm log data, segment the two original Web alarm logs to obtain initial segmentation data;
[0013] Determining the number of types of the initial word segmentation data;
[0014] Determine a target word frequency based on the number of the initial word segmentation data and the number of types hit by the original Web alarm log;
[0015] Calculate the target similarity value of the two original Web alarm logs based on the target word frequency;
[0016] Determining whether the target similarity value is greater than a first preset similarity value;
[0017] If the target similarity value is greater than the first preset similarity value, the two original Web alarm logs are determined as the target alarm logs.
[0018] Preferably, the word segmentation of the two original Web alarm logs to obtain initial word segmentation data includes:
[0019] Extract features from the two original Web alarm logs according to preset alarm feature types to obtain target features;
[0020] The target feature is segmented to obtain the initial segmentation data.
[0021] Preferably, the determining the number of types of the initial word segmentation data, and the determining the target word frequency based on the initial word segmentation data and the number of types hit by the original Web alarm log, include:
[0022] For each of the target features, determining a first type number of the initial word segmentation data corresponding to the target feature, determining a first quantity of the initial word segmentation data corresponding to the target feature hit by the original Web alarm log, and determining a ratio of the first quantity to the first type number as a word frequency number corresponding to the target feature;
[0023] Taking the word frequencies corresponding to all the target features as the target word frequencies;
[0024] The calculating the target similarity values of the two original Web alarm logs based on the target word frequency includes:
[0025] Determine the weight value of each target feature representing the similarity of the Web alarm log;
[0026] The target similarity value is determined based on the target word frequency and the weight value.
[0027] Preferably, the determining of the weight values of the target features representing the similarity of the Web alarm logs includes:
[0028] Determine a weighted value of each target feature representing a similarity of the Web alarm log;
[0029] The determining the target similarity value based on the target word frequency and the weight value includes:
[0030] A weighted result of the target word frequency and the weighted weight value is determined as the target similarity value.
[0031] Preferably, the preset alarm feature types include: risk level, risk name, attacking IP, attacking port, attacking geographical location, attacked IP, attacked port, attacked geographical location, and protocol type.
[0032] Preferably, generating a target Web attack report based on the target Web alarm log includes:
[0033] Determining a similarity level of the target Web alarm log;
[0034] Based on the target Web alarm log, the target Web attack report having a level corresponding to the similarity level is generated.
[0035] A Web attack report generating device, comprising:
[0036] The first acquisition module is used to obtain Web alarm log data;
[0037] A first identification module, configured to identify similar target Web alarm logs in the Web alarm log data based on word frequencies in the Web alarm log data;
[0038] The first generating module is used to generate a target Web attack report based on the target Web alarm log.
[0039] A Web attack report generating device, comprising:
[0040] Memory for storing computer programs;
[0041] A processor is used to implement the steps of any of the above methods for generating a Web attack report when executing the computer program.
[0042] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods for generating a Web attack report are implemented.
[0043] The present application provides a method for generating a Web attack report, which obtains Web alarm log data; identifies similar target Web alarm logs in the Web alarm log data based on the word frequency in the Web alarm log data; and generates a target Web attack report based on the target Web alarm log. In the present application, similar target Web alarm logs are identified based on the word frequency in the Web alarm log data. Since similar target Web alarm logs reflect the characteristics of Web attacks, if a target Web attack report is generated based on the target Web alarm log, the target Web attack report can be used to reflect the characteristics of Web attacks. Compared with manually generated Web attack reports, the efficiency and accuracy are high and the applicability is good. The Web attack report generation device, equipment and computer-readable storage medium provided in the present application also solve the corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0045] Figure 1 A flowchart of a method for generating a Web attack report provided in an embodiment of the present application;
[0046] Figure 2 This is a flow chart for determining a target Web alarm log in an embodiment of the present application;
[0047] Figure 3 A schematic diagram of the structure of a Web attack report generating device provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of the structure of a Web attack report generating device provided in an embodiment of the present application;
[0049] Figure 5 Another structural schematic diagram of a Web attack report generating device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] 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 only 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.
[0051] See also Figure 1 , Figure 1 A flowchart of a method for generating a Web attack report provided in an embodiment of the present application.
[0052] A method for generating a Web attack report provided in an embodiment of the present application may include the following steps:
[0053] Step S101: Obtain Web alarm log data.
[0054] In actual applications, you can first obtain Web alarm log data, which is the corresponding alarm log data generated in Web attack defense, and can be determined according to actual needs. In specific application scenarios, you can use log collection tools to obtain Web alarm log data.
[0055] It should be pointed out that in this application, in order to analyze Web attacks on a specific IP or a specific website, the Web alarm log data obtained in this application can be the Web alarm log data corresponding to a specific IP or the Web alarm log data corresponding to a specific website, etc.
[0056] Step S102: Based on the word frequencies in the Web alarm log data, similar target Web alarm logs in the Web alarm log data are identified.
[0057] In actual applications, the number of alarm logs in the Web alarm log data may be large. If a single Web alarm log is analyzed to generate a Web attack report, a Web attack report corresponding to each Web attack may be generated, but a single Web attack report cannot reflect the characteristics of the Web attack. In order to enable the Web attack report to reflect the characteristics of the Web attack, a Web attack log can be generated based on similar Web alarm logs in the Web alarm log data. In addition, because the words in similar Web alarm logs are relatively similar, after obtaining the Web alarm log data, similar target Web alarm logs in the Web alarm log data can be identified based on the word frequency in the Web alarm log data. The word frequency is the ratio of the frequency of a word in the Web alarm log to the total number of words.
[0058] Step S103: Generate a target Web attack report based on the target Web alarm log.
[0059] In practical applications, after identifying similar target Web alarm logs in Web alarm log data based on word frequencies in Web alarm log data, a target Web attack report can be generated based on the target Web alarm log to reflect the characteristics of a certain type of Web attack with the help of the target Web attack report.
[0060] In specific application scenarios, Web attack reports can be generated from dimensions such as attack overview (attack IP information, attack target information), attack frequency analysis, attack source IP analysis, attacked target analysis, attack fingerprint analysis, and disposal suggestions. In addition, the target Web attack report can be sent to the management end later so that management personnel can view and apply the target Web attack report with the help of the management end.
[0061] The present application provides a method for generating a Web attack report, which obtains Web alarm log data; identifies similar target Web alarm logs in the Web alarm log data based on the word frequency in the Web alarm log data; and generates a target Web attack report based on the target Web alarm log. In the present application, similar target Web alarm logs are identified based on the word frequency in the Web alarm log data. Since similar target Web alarm logs reflect the characteristics of Web attacks, if a target Web attack report is generated based on the target Web alarm log, the target Web attack report can be used to reflect the characteristics of Web attacks. Compared with manually generated Web attack reports, the method has high efficiency and accuracy and good applicability.
[0062] See also Figure 2 , Figure 2 This is a flow chart for determining the target Web alarm log in an embodiment of the present application.
[0063] In a method for generating a Web attack report provided in an embodiment of the present application, a process of identifying a similar target Web alarm log in the Web alarm log data based on the word frequency in the Web alarm log data may include the following steps:
[0064] Step S201: for any two original Web alarm logs in the Web alarm log data, the two original Web alarm logs are segmented to obtain initial segmentation data.
[0065] In practical applications, in order to calculate the word frequency, for any two original Web alarm logs in the Web alarm log data, the two original Web alarm logs can be first segmented to obtain initial segmentation data. The segmentation method can be based on actual needs, and this application does not make specific limitations here.
[0066] For ease of understanding, assuming that the original Web alarm log A contains the content corresponding to the risk name "[ID: 8010] WEB feature detection (dedecms injection poc)", and the original Web alarm log B contains the content corresponding to the risk name "[ID: 6021] WEB feature detection (thinkphp framework code execution vulnerability)", after the original Web alarm log A is segmented, the initial segmentation data obtained can be: [ID: 8010], WEB feature detection, (dedecms injection poc); after the original Web alarm log B is segmented, the initial segmentation data obtained can be: [ID: 6021], WEB feature detection, (thinkphp framework code execution vulnerability).
[0067] Step S202: Determine the number of types of initial word segmentation data.
[0068] In practical applications, in the process of calculating word frequency, it is necessary to determine the total number of words, that is, the total number of word segments. In this application, the number of types of initial word segmentation data can be used as the total number of times.
[0069] Still taking the above original Web alarm log A and original Web alarm log B as examples, the initial word segmentation of all types of the two alarm logs is: [ID: 8010], [ID: 6021], WEB feature detection, (dedecms injection poc), (thinkphp framework code execution vulnerability), and the total number of types is 5.
[0070] Step S203: Determine the target word frequency based on the number and type of initial word segmentation data hit by the original Web alarm log.
[0071] In practical applications, after determining the sum of the number of types of the initial word segmentation data, the target word frequency can be determined based on the number and type of the initial word segmentation data hit by the original Web alarm log. Specifically, the initial word frequency of each original Web alarm log can be calculated separately, and then the target word frequency can be determined based on the two initial word frequencies. For example, the average of the two initial word frequencies is determined as the target word frequency, and the maximum initial word frequency is determined as the target word frequency, etc. Of course, there may be other methods for determining the target word frequency, which are not specifically limited in this application.
[0072] Still taking the above original Web alarm log A and original Web alarm log B as examples, the hits of the original Web alarm log A in all initial word segmentations are: [ID: 8010] 1, [ID: 6021] 0, WEB feature detection 1, (dedecms injection poc) 1, (thinkphp framework code execution vulnerability) 0, where 1 represents a hit and 0 represents a miss, so the initial word frequency of the original Web alarm log A is: (1+0+1+1+0) / 5=0.6; similarly, the original Web alarm log A has a hit frequency of (1+0+1+1+0) / 5=0.6. The hit status of b alarm log B in all initial word segmentations is: [ID: 8010] 0, [ID: 6021] 1, WEB feature detection 1, (dedecms injection poc) 0, (thinkphp framework code execution vulnerability) 1, where 1 represents a hit and 0 represents a miss, so the initial word frequency of the original Web alarm log B is: (0+1+1+0+1) / 5=0.6; afterwards, 0.6 can be used as the target word frequency of the original Web alarm log A and the original Web alarm log B.
[0073] Step S204: Calculate the target similarity values of the two original Web alarm logs based on the target word frequencies.
[0074] In practical applications, after determining the target word frequency based on the number and type of initial word segmentation data hit by the original Web alarm log, the target similarity value of the two original Web alarm logs can be calculated based on the target word frequency.
[0075] In specific application scenarios, because the types of Web attack information reflected in Web alarm logs may be different, the word segmentation methods of different types of Web alarm logs may be different. If different types of Web alarm logs are segmented in the same way, it may affect the calculation of the target word frequency, and then affect the judgment of subsequent similar target Web alarm logs. In order to avoid this situation, in the process of segmenting the two original Web alarm logs and obtaining the initial word segmentation data, the two original Web alarm logs can be feature extracted according to the preset alarm feature type to obtain the target feature; the target feature is segmented to obtain the initial word segmentation data. Specifically, the two original Web alarm logs can be feature extracted according to the preset alarm feature type by regular matching to obtain the target feature, etc.
[0076] It should be noted that the preset alarm feature types can be determined according to actual needs. For example, the preset alarm feature types may include: risk level, risk name, attack IP, attack port, attack geographic location, attacked IP, attacked port, attacked geographic location, protocol type, etc.
[0077] In a specific application scenario, in the process of determining the number of types of initial word segmentation data and determining the target word frequency based on the initial word segmentation data and the number of types hit by the original Web alarm log, for each target feature, the first number of types of initial word segmentation data corresponding to the target feature is determined, the first number of initial word segmentation data corresponding to the target feature hit by the original Web alarm log is determined, and the ratio of the first number to the first number of types is determined as the word frequency corresponding to the target feature; the word frequency corresponding to all target features is taken as the target word frequency; accordingly, in the process of calculating the target similarity value of two original Web alarm logs based on the target word frequency, the weight value of each target feature representing the similarity of the Web alarm log can be determined; the target similarity value is determined based on the target word frequency and the weight value.
[0078] Specifically, the process of determining the weight value of each target feature representing the similarity of the Web alarm log can be specifically as follows: determining the weighted weight value of each target feature representing the similarity of the Web alarm log; correspondingly, the process of determining the target similarity value based on the target word frequency and the weight value can be specifically as follows: determining the weighted result of the target word frequency and the weighted weight value as the target similarity value.
[0079] For example, if the weighted values of each target feature are shown in Table 1, the target similarity value can be: (risk level*0.5+risk name*0.9+attacking IP*1+attacking port*0.5+attacking geographic location*0.8+attacked IP*1+attacked port*0.5+attacked geographic location0.8+protocol type*0.8+description*0.8+request content*0.8+risk-related information*0.8) / 8.3.
[0080] Table 1 Weighted weight value table of target features
[0081] Target characteristics Weighted weight value Risk Level 0.2 Risk Name 0.9 Attacking IP 1 Attack Port 0.5 Attack location 0.8 Attacked IP 1 Attacked Port 0.5 Geographic location of the attack 0.8 Protocol Type 0.8 describe 0.8 Request content 0.8 Risk-related information 0.8 Total score 8.3
[0082] Step S205: determine whether the target similarity value is greater than a first preset similarity value; if the target similarity value is greater than the first preset similarity value, execute step S206.
[0083] Step S206: Determine the two original Web alarm logs as target alarm logs.
[0084] In actual applications, after calculating the target similarity value of the two original Web alarm logs based on the target word frequency, it can be determined whether the target similarity value is greater than the first preset similarity value; if the target similarity value is greater than the first preset similarity value, the two original Web alarm logs are determined as target alarm logs. The value of the first preset similarity value can be determined according to actual needs, for example, the first preset similarity value can be 0.5, then when the target similarity value is greater than 0.5, the two original Web alarm logs can be determined as target alarm logs.
[0085] In a Web attack report generation method provided in an embodiment of the present application, in the process of generating a target Web attack report based on a target Web alarm log, the similarity level of the target Web alarm log can be determined; based on the target Web alarm log, a target Web attack report with a level corresponding to the similarity level is generated.
[0086] In practical applications, in the process of determining the similarity level of the target Web alarm log, the similarity level of the target Web alarm log can be determined according to the size of the target similarity value. For example, when the target similarity value is greater than the first preset similarity value and less than the second preset similarity value, the similarity level of the target Web alarm log can be determined as 1, and when the target similarity value is greater than the second preset similarity value, the similarity level of the target Web alarm log can be determined as 2, and the second preset similarity value can be 0.8, etc. Correspondingly, in the process of generating a target Web attack report corresponding to the level and the similarity level based on the target Web alarm log, when the similarity level is 1, a target Web attack report of a general event level can be generated, and when the similarity level is 2, a target Web attack report of an important event level can be generated, etc.
[0087] See also Figure 3 , Figure 3 A schematic diagram of the structure of a Web attack report generating device provided in an embodiment of the present application.
[0088] A Web attack report generating device provided in an embodiment of the present application may include:
[0089] The first acquisition module 101 is used to acquire Web alarm log data;
[0090] A first identification module 102, for identifying similar target Web alarm logs in the Web alarm log data based on word frequencies in the Web alarm log data;
[0091] The first generating module 103 is used to generate a target Web attack report based on the target Web alarm log.
[0092] In a Web attack report generation device provided in an embodiment of the present application, the first identification module may include:
[0093] The first word segmentation submodule is used to segment any two original Web alarm logs in the Web alarm log data to obtain initial word segmentation data;
[0094] The first determination submodule is used to determine the number of types of initial word segmentation data; based on the number and type of initial word segmentation data hit by the original Web alarm log, determine the target word frequency;
[0095] The first calculation submodule is used to calculate the target similarity value of two original Web alarm logs based on the target word frequency;
[0096] The first judgment submodule is used to judge whether the target similarity value is greater than a first preset similarity value; if the target similarity value is greater than the first preset similarity value, the two original Web alarm logs are determined as target alarm logs.
[0097] In a Web attack report generation device provided in an embodiment of the present application, the first molecule submodule may include:
[0098] The first extraction unit is used to extract features from the two original Web alarm logs according to a preset alarm feature type to obtain a target feature;
[0099] The first word segmentation unit is used to segment the target feature to obtain initial word segmentation data.
[0100] In a Web attack report generating device provided by an embodiment of the present application, the first determining submodule may include:
[0101] A first determining unit is used to determine, for each target feature, a first type number of initial word segmentation data corresponding to the target feature, determine a first number of initial word segmentation data corresponding to the target feature hit by the original Web alarm log, and determine a ratio of the first number to the first type number as a word frequency number corresponding to the target feature;
[0102] A second determining unit is used to take the word frequencies corresponding to all target features as target word frequencies;
[0103] The first calculation submodule may include:
[0104] The third determining unit is used to determine the weight value of each target feature representing the similarity of the Web alarm log;
[0105] The fourth determining unit is used to determine a target similarity value based on the target word frequency and the weight value.
[0106] In a Web attack report generating device provided by an embodiment of the present application, the third determining unit is specifically used to: determine a weighted weight value of each target feature characterizing a similarity of a Web alarm log;
[0107] The fourth determining unit is specifically used to determine a weighted result of the target word frequency and the weighted weight value as the target similarity value.
[0108] An embodiment of the present application provides a Web attack report generating device, wherein preset alarm feature types include: risk level, risk name, attacking IP, attacking port, attacking geographic location, attacked IP, attacked port, attacked geographic location, and protocol type.
[0109] An embodiment of the present application provides a Web attack report generating device, wherein the first generating module may include:
[0110] a fifth determining unit, configured to determine a similarity level of a target Web alarm log;
[0111] The first generating unit is used to generate a target Web attack report corresponding to a level and a similarity level based on the target Web alarm log.
[0112] The present application also provides a Web attack report generation device and a computer-readable storage medium, both of which have the corresponding effects of the Web attack report generation method provided in the embodiment of the present application. Figure 4 , Figure 4 A schematic diagram of the structure of a Web attack report generating device provided in an embodiment of the present application.
[0113] A Web attack report generating device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented:
[0114] Obtain Web alarm log data;
[0115] Based on the word frequency in the Web alarm log data, identify similar target Web alarm logs in the Web alarm log data;
[0116] Generate a target Web attack report based on the target Web alarm log.
[0117] A Web attack report generating device provided by an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented: for any two original Web alarm logs in Web alarm log data, the two original Web alarm logs are segmented to obtain initial segmentation data; the number of types of the initial segmentation data is determined; based on the number and type of the initial segmentation data hit by the original Web alarm log, a target word frequency is determined; based on the target word frequency, a target similarity value of the two original Web alarm logs is calculated; it is determined whether the target similarity value is greater than a first preset similarity value; if the target similarity value is greater than the first preset similarity value, the two original Web alarm logs are determined as target alarm logs.
[0118] A Web attack report generating device provided in an embodiment of the present application includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: feature extraction is performed on two original Web alarm logs according to preset alarm feature types to obtain target features; and word segmentation is performed on the target features to obtain initial word segmentation data.
[0119] A Web attack report generating device provided by an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented: for each target feature, a first type number of initial word segmentation data corresponding to the target feature is determined, a first number of initial word segmentation data corresponding to the target feature hit by an original Web alarm log is determined, and a ratio of the first number to the first type number is determined as a word frequency corresponding to the target feature; the word frequency corresponding to all target features is used as a target word frequency; a weight value of each target feature representing the similarity of the Web alarm log is determined; and a target similarity value is determined based on the target word frequency and the weight value.
[0120] A Web attack report generating device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented: determining a weighted weight value of each target feature characterizing the similarity of a Web alarm log; and determining a weighted result of a target word frequency and a weighted weight value as a target similarity value.
[0121] A Web attack report generating device provided in an embodiment of the present application includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: the preset alarm feature types include: risk level, risk name, attack IP, attack port, attack geographic location, attacked IP, attacked port, attacked geographic location, and protocol type.
[0122] A Web attack report generating device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented: determining a similarity level of a target Web alarm log; and generating a target Web attack report corresponding to a level and a similarity level based on the target Web alarm log.
[0123] See also Figure 5Another Web attack report generation device provided in the embodiment of the present application may also include: an input port 203 connected to the processor 202, used to transmit commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, used to display the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, used to realize the communication between the Web attack report generation device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication mode adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (HML), universal serial bus (USB), high-definition multimedia interface (HDMI), wireless connection: wireless fidelity technology (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.
[0124] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0125] Obtain Web alarm log data;
[0126] Based on the word frequency in the Web alarm log data, identify similar target Web alarm logs in the Web alarm log data;
[0127] Generate a target Web attack report based on the target Web alarm log.
[0128] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: for any two original Web alarm logs in Web alarm log data, the two original Web alarm logs are segmented to obtain initial segmented data; the number of types of the initial segmented data is determined; based on the number and type of the initial segmented data hit by the original Web alarm log, a target word frequency is determined; based on the target word frequency, a target similarity value of the two original Web alarm logs is calculated; it is determined whether the target similarity value is greater than a first preset similarity value; if the target similarity value is greater than the first preset similarity value, the two original Web alarm logs are determined as target alarm logs.
[0129] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: feature extraction is performed on two original Web alarm logs according to preset alarm feature types to obtain target features; and word segmentation is performed on the target features to obtain initial word segmentation data.
[0130] A computer-readable storage medium is provided in an embodiment of the present application. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the following steps are implemented: for each target feature, a first type number of initial word segmentation data corresponding to the target feature is determined, a first quantity of initial word segmentation data corresponding to the target feature hit by an original Web alarm log is determined, and a ratio of the first quantity to the first type number is determined as a word frequency corresponding to the target feature; the word frequency corresponding to all target features is taken as a target word frequency; a weight value of each target feature representing the similarity of the Web alarm log is determined; and a target similarity value is determined based on the target word frequency and the weight value.
[0131] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: determining a weighted weight value of each target feature characterizing the similarity of a Web alarm log; and determining a weighted result of the target word frequency and the weighted weight value as a target similarity value.
[0132] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: the preset alarm feature types include: risk level, risk name, attack IP, attack port, attack geographic location, attacked IP, attacked port, attacked geographic location, and protocol type.
[0133] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: determining a similarity level of a target Web alarm log; and generating a target Web attack report corresponding to a level and a similarity level based on the target Web alarm log.
[0134] The computer-readable storage medium involved in the present application includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field.
[0135] For the description of the relevant parts of the Web attack report generation device, equipment and computer-readable storage medium provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts in the Web attack report generation method provided in the embodiments of the present application, which will not be repeated here. In addition, the parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0136] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0137] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a Web attack report, characterized in that: include: Obtain Web alarm log data; Based on the word frequencies in the Web alarm log data, identifying similar target Web alarm logs in the Web alarm log data; Generate a target Web attack report based on the target Web alarm log; The step of identifying similar target Web alarm logs in the Web alarm log data based on the word frequencies in the Web alarm log data includes: For any two original Web alarm logs in the Web alarm log data, segment the two original Web alarm logs to obtain initial segmentation data; Determining the number of types of the initial word segmentation data; Determine a target word frequency based on the number of the initial word segmentation data and the number of types hit by the original Web alarm log; Calculate the target similarity value of the two original Web alarm logs based on the target word frequency; Determining whether the target similarity value is greater than a first preset similarity value; If the target similarity value is greater than the first preset similarity value, determining the two original Web alarm logs as the target alarm logs; The determining of the number of types of the initial word segmentation data and the determining of the target word frequency based on the initial word segmentation data and the number of types hit by the original Web alarm log include: For each target feature, determining a first type number of the initial word segmentation data corresponding to the target feature, determining a first quantity of the initial word segmentation data corresponding to the target feature hit by the original Web alarm log, and determining a ratio of the first quantity to the first type number as a word frequency number corresponding to the target feature; the target feature includes a feature obtained by extracting features from the two original Web alarm logs according to a preset alarm feature type; The word frequencies corresponding to all the target features are taken as the target word frequencies.
2. The method according to claim 1, characterized in that: The word segmentation of the two original Web alarm logs to obtain initial word segmentation data includes: Extract features from the two original Web alarm logs according to preset alarm feature types to obtain target features; The target feature is segmented to obtain the initial segmentation data.
3. The method according to claim 2, characterized in that The calculating the target similarity values of the two original Web alarm logs based on the target word frequency includes: Determine the weight value of each target feature representing the similarity of the Web alarm log; The target similarity value is determined based on the target word frequency and the weight value.
4. The method according to claim 3, characterized in that The determining of the weight values of the target features representing the similarity of the Web alarm logs includes: Determine a weighted value of each target feature representing a similarity of the Web alarm log; The determining the target similarity value based on the target word frequency and the weight value includes: A weighted result of the target word frequency and the weighted weight value is determined as the target similarity value.
5. The method according to claim 2, characterized in that: The preset alarm feature types include: risk level, risk name, attacking IP, attacking port, attacking geographical location, attacked IP, attacked port, attacked geographical location, and protocol type.
6. The method according to any one of claims 1 to 5, characterized in that: The generating a target Web attack report based on the target Web alarm log includes: Determining a similarity level of the target Web alarm log; Based on the target Web alarm log, the target Web attack report having a level corresponding to the similarity level is generated.
7. A Web attack report generating device, characterized in that: include: The first acquisition module is used to obtain Web alarm log data; A first identification module, configured to identify similar target Web alarm logs in the Web alarm log data based on word frequencies in the Web alarm log data; A first generating module, configured to generate a target Web attack report based on the target Web alarm log; Wherein, the first identification module includes: A first word segmentation submodule is used to segment any two original Web alarm logs in the Web alarm log data to obtain initial word segmentation data; A first determination submodule is used to determine the number of types of the initial word segmentation data; based on the number of the initial word segmentation data hit by the original Web alarm log and the number of types, determine the target word frequency; A first calculation submodule, configured to calculate a target similarity value of the two original Web alarm logs based on the target word frequency; A first judgment submodule, used to judge whether the target similarity value is greater than a first preset similarity value; if the target similarity value is greater than the first preset similarity value, the two original Web alarm logs are determined as the target alarm logs; Wherein, the first determining submodule includes: A first determination unit is used to determine, for each target feature, a first type number of the initial word segmentation data corresponding to the target feature, determine a first quantity of the initial word segmentation data corresponding to the target feature hit by the original Web alarm log, and determine a ratio of the first quantity to the first type number as a word frequency number corresponding to the target feature; the target feature includes a feature obtained by extracting features from the two original Web alarm logs according to a preset alarm feature type; The second determining unit is used to take the word frequencies corresponding to all the target features as the target word frequencies.
8. A Web attack report generating device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for generating a Web attack report according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a Web attack report according to any one of claims 1 to 6 are implemented.
