HTTP detection method, system, device and computer storage medium

By extracting and calculating the preset rule score of the URL, the problem of HTTP detection accuracy is solved, the accuracy of HTTP detection is improved, and the false positive rate is reduced.

CN114650158BActive Publication Date: 2024-10-22SANGFOR TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011519748.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-21
Publication Date
2024-10-22
Estimated Expiration
2040-12-21

AI Technical Summary

Technical Problem

When existing HTTP detection methods detect URL security, there is a problem that the detection results do not match the actual security, which affects the detection accuracy.

Method used

By obtaining the URL to be detected, extract the target rules that meet the preset rules, calculate the preset score of each rule, determine the target score, and then determine the security detection result of the URL, and use multiple preset rule types and score ranges to divide the risk level , improve detection accuracy.

Benefits of technology

It has improved the accuracy of HTTP detection. Through comprehensive analysis and score calculation of multiple preset rules, it can accurately evaluate the security of URL and HTTP and reduce the false positive rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114650158B_ABST
    Figure CN114650158B_ABST
Patent Text Reader

Abstract

The present application discloses an HTTP detection method, system, device and computer storage medium, which obtains a URL to be detected in a device to be detected; extracts a target rule from at least one URL to be detected, and the target rule satisfies a preset rule; calculates a target score of the target rule based on a preset score of each rule in the preset rule; determines a security detection result of the URL to be detected based on the target score; wherein the types of preset rules include: download time outside a preset time period, direct request IP domain download, destination IP matching a malicious IP library, destination IP matching an overseas IP, non-preset HTTP port download, downloaded data length not within a preset length range, random domain name, random file name, access cycle changes by multiples, access cycle changes by fixed minutes, HFS server download, downloaded file content does not match the suffix name, and access cycle changes by arithmetic difference. The detection accuracy of HTTP is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and more specifically, to an HTTP detection method, system, device and computer storage medium. Background Art

[0002] HTTP (Hypertext Transfer Protocol) is a simple request-response protocol. HTTP usually runs on top of TCP (Transmission Control Protocol). HTTP specifies what messages a client may send to a server and what responses it may get. Because HTTP makes development and deployment straightforward, it is widely used in communications.

[0003] However, in the application process of HTTP, attackers may use HTTP to attack other devices, such as attacking the client, attacking the server, etc., which poses a threat to the safe use of HTTP. In order to protect the security of HTTP, the URL (Uniform Resource Locator) corresponding to HTTP can be detected to determine whether the URL is safe or not, and then determine whether the HTTP is safe or not.

[0004] However, in the process of detecting the URL, there may be a situation where the detected security result does not match the actual security of the URL, which affects the accuracy of HTTP detection.

[0005] In summary, how to improve the accuracy of HTTP detection is a problem that currently needs to be solved urgently by those skilled in the art. Summary of the invention

[0006] The purpose of this application is to provide an HTTP detection method, which can solve the technical problem of how to improve the accuracy of HTTP detection to a certain extent. This application also provides an HTTP detection system, device and computer-readable storage medium.

[0007] In order to achieve the above objectives, this application provides the following technical solutions:

[0008] An HTTP detection method, comprising:

[0009] Get at least one URL to be detected;

[0010] Extracting a target rule from the at least one URL to be detected, wherein the target rule satisfies a preset rule;

[0011] Calculating a target score for the target rule based on a preset score for each of the preset rules;

[0012] Determine a security detection result of the URL to be detected based on the target score;

[0013] Among them, the types of preset rules include: the time for downloading the resource corresponding to the URL is outside the preset time period, directly requesting the IP domain to download the resource corresponding to the URL, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, downloading through the non-preset HTTP port of the URL corresponding resource server, the data length of the downloaded URL corresponding resource is not within the preset length range, the domain name of the URL is random, the file name of the URL corresponding resource is random, the period of accessing the URL corresponding resource changes by multiples, the period of accessing the URL corresponding resource changes by fixed minutes, the URL corresponding resource is downloaded through the HFS server, the file content of the downloaded URL corresponding resource does not match the suffix name, and the period of accessing the URL corresponding resource changes in an arithmetic progression.

[0014] Preferably, the preset rules include first-category rules, second-category rules and third-category rules. The first-category rules include that the time of downloading the resource corresponding to the URL is outside the preset time period, the resource corresponding to the URL is directly requested to download from the IP domain, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, and the download is made through the non-preset HTTP port of the resource server corresponding to the RUL; the second-category rules include that the data length of the resource corresponding to the downloaded URL is not within the preset length range, the domain name of the URL is random, the file name of the resource corresponding to the URL is random, the period of accessing the resource corresponding to the URL changes by multiples, and the period of accessing the resource corresponding to the URL changes by fixed minutes; the third-category rules include that the resource corresponding to the URL is downloaded through the HFS server, the file content of the resource corresponding to the downloaded URL does not match the suffix name, and the period of accessing the resource corresponding to the URL changes in an arithmetic progression;

[0015] The preset score of each rule in the preset rules includes: the preset score of each rule in the first category of rules is a first score value; the preset score of each rule in the second category of rules is a second score value; the preset score of each rule in the third category of rules is a third score value; and the third score value is greater than the second score value, and the second score value is greater than the first score value.

[0016] Preferably, the calculating the target score of the target rule based on the preset score of each rule in the preset rules includes:

[0017] Determining a first quantity value of the target rules belonging to the first category of rules;

[0018] determining a second quantity value of the target rules belonging to the second category of rules;

[0019] Determining a third quantity value of the target rule belonging to the third category of rules;

[0020] The sum of the product of the first quantity value and the first score value, the product of the second quantity value and the second score value, and the product of the third quantity value and the third score value is taken as the target score.

[0021] Preferably, determining the security detection result of the URL to be detected based on the target score includes:

[0022] If the target score is within the first score range, determining the security detection result indicating that the danger level of the URL to be detected is the first danger level;

[0023] If the target score is within the second score range, determining the security detection result indicating that the danger level of the URL to be detected is the second danger level;

[0024] If the target score is within the third score range, determining the security detection result indicating that the danger level of the URL to be detected is the third danger level;

[0025] Among them, the minimum score value of the third score range is greater than the maximum score value of the second score range, the minimum score value of the second score range is greater than the maximum score value of the first score range; and the third danger level is more dangerous than the second danger level, and the second danger level is more dangerous than the first danger level.

[0026] Preferably, the third score value is 1, the second score value is 0.5, and the third score value is 0.25;

[0027] The first score range is (1, 1.5), the second score range is (1.5, 2), and the third score range is (2, ∞).

[0028] Preferably, after determining the security detection result of the URL to be detected based on the target score, the method further includes:

[0029] If the security detection result is the third risk level, a security event is generated.

[0030] Preferably, the URL to be detected is located on the device to be detected, and the method further includes:

[0031] Counting the number of URLs to be detected whose security detection results in the devices to be detected are the third risk level;

[0032] Determine whether the quantity value is greater than a preset quantity;

[0033] If the quantity value is greater than the preset quantity, the device to be detected is marked as a trapped device.

[0034] An HTTP detection system, comprising:

[0035] The acquisition module is used to obtain the URL to be detected;

[0036] An extraction module, used to extract the preset rules satisfied by the URL to be detected from the preset rules to obtain target rules;

[0037] A calculation module, configured to calculate a target score of the target rule based on a preset score of each rule in the preset rules;

[0038] A determination module, configured to determine a security detection result of the URL to be detected based on the target score;

[0039] Among them, the types of preset rules include: the time for downloading the resource corresponding to the URL is outside the preset time period, directly requesting the IP domain to download the resource corresponding to the URL, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, downloading through the non-preset HTTP port of the URL corresponding resource server, the data length of the downloaded URL corresponding resource is not within the preset length range, the domain name of the URL is random, the file name of the URL corresponding resource is random, the period of accessing the URL corresponding resource changes by multiples, the period of accessing the URL corresponding resource changes by fixed minutes, the URL corresponding resource is downloaded through the HFS server, the file content of the downloaded URL corresponding resource does not match the suffix name, and the period of accessing the URL corresponding resource changes in an arithmetic progression.

[0040] An HTTP detection device, comprising:

[0041] Memory for storing computer programs;

[0042] A processor is used to implement the steps of any of the above-mentioned HTTP detection methods when executing the computer program.

[0043] 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-mentioned HTTP detection methods are implemented.

[0044] The present application provides an HTTP detection method, in which the preset rules satisfied by the URL to be detected are extracted to obtain the target rules, thereby achieving the purpose of analyzing and screening the URL to be detected according to the preset rules. Since there are many types of preset rules and each rule can reflect the security of a part of the URL, the target rule can comprehensively reflect the security of the URL to be detected; since the strength of the security of the URL reflected by each rule is different, it is necessary to calculate the target score of the target rule based on the preset score of each rule in the preset rules, and determine the security detection result of the URL to be detected based on the target score, so that the security of the URL to be detected can be accurately evaluated with the help of the preset rules, and then the security of HTTP can be accurately evaluated, thereby improving the detection accuracy of HTTP. The present application provides an HTTP detection system, device and computer-readable storage medium, which also solves the corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] 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.

[0046] Figure 1 A first flow chart of an HTTP detection method provided in an embodiment of the present application;

[0047] Figure 2 A schematic diagram of the structure of an HTTP detection system provided in an embodiment of the present application;

[0048] Figure 3 A schematic diagram of the structure of an HTTP detection device provided in an embodiment of the present application;

[0049] Figure 4 Another structural schematic diagram of an HTTP detection 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 first flow chart of an HTTP detection method provided in an embodiment of the present application.

[0052] An HTTP detection method provided in an embodiment of the present application may include:

[0053] Step S101: Obtain the URL to be detected in the device to be detected.

[0054] In actual applications, you can first obtain the URL to be detected in the device to be detected. The device to be detected refers to a device whose security is unknown and needs to be detected, such as a server to be detected, a client to be detected, etc. The URL to be detected refers to a URL on the device to be detected whose security is unknown and needs to be detected.

[0055] In a specific application scenario, the execution subject of the HTTP detection method in this application can directly collect the URL to be detected in the device to be detected in real time, or it can first obtain the HTTP log in the device to be detected, and then parse the URL to be detected in the HTTP log; and the obtained URL to be detected can be multiple.

[0056] Step S102: extracting a target rule from at least one URL to be detected, wherein the target rule satisfies a preset rule.

[0057] In actual applications, after obtaining the URL to be detected in the device to be detected, at least one preset rule satisfied by the URL to be detected can be extracted from the preset rules to obtain the target rule; the preset rule refers to the rule that reflects the security of the URL, and each rule in the preset rule reflects the security of a part of the URL, and the target rule is the rule satisfied by the URL to be detected in the preset rules, so the target rule can reflect the security of the URL to be detected.

[0058] It should be pointed out that among the preset rules, the process of extracting the preset rules satisfied by the URL to be detected and obtaining the target rules is equivalent to uniformly extracting the rules that the URL to be detected satisfies and can reflect the security of the URL. Therefore, in the subsequent process of performing security detection on the URL to be detected according to the target rules, it is equivalent to performing security analysis on the URL to be detected based on the rules that the URL to be detected satisfies and can reflect the security of the URL, which can ensure the accuracy of the security analysis of the URL to be detected.

[0059] Step S103: Calculate a target score of a target rule based on a preset score of each rule in the preset rules.

[0060] Step S104: Determine the security detection result of the URL to be detected based on the target score; wherein the types of preset rules include: the time for downloading the resource corresponding to the URL is outside the preset time period, directly requesting the IP (Internet Protocol) domain to download the resource corresponding to the URL, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, downloading through a non-preset HTTP port of the URL corresponding resource server, the data length of the downloaded URL corresponding resource is not within the preset length range, the domain name of the URL is random, the file name of the URL corresponding resource is random, the cycle of accessing the URL corresponding resource changes by multiples, the cycle of accessing the URL corresponding resource changes by fixed minutes, the URL corresponding resource is downloaded through an HFS (Hierarchical File System) server, the file content of the downloaded URL corresponding resource does not match the suffix name, and the cycle of accessing the URL corresponding resource changes in an arithmetic progression.

[0061] In actual applications, since each rule in the preset rules reflects the security of the URL to different degrees, for example, some rules reflect the low security of the URL, and some rules reflect the high security of the URL, the security of the URL to be detected reflected by the target rule can be flexibly tested according to the strength of the URL security reflected by each rule. For example, the target score of the target rule can be calculated based on the preset score of each rule in the preset rules, and then the security test result of the URL to be detected can be determined based on the target score.

[0062] In a specific application scenario, in the process of calculating the target score of the target rule based on the preset score of each rule in the preset rules, the sum of the preset scores of all rules in the target rule can be used as the target score, or the average of the preset scores of all rules in the target rule can be used as the target score, etc. Of course, there may be other methods for calculating the target score of the target rule, which is not limited in this application.

[0063] It should be pointed out that the preset score of each rule in the preset rules can be determined by the strength of the URL security reflected by the rule. For example, the preset score of the rule reflecting higher URL security is lower, and the preset score of the rule reflecting lower URL security is higher. Then, when determining the security detection result of the URL to be detected based on the target score, if the target score is higher, the security of the URL to be detected can be determined to be lower, and the target score is lower, the security of the URL to be detected can be determined to be higher; correspondingly, if the preset score of the rule reflecting higher URL security is higher, and the preset score of the rule reflecting lower URL security is lower, then, when determining the security detection result of the URL to be detected based on the target score, if the target score is higher, the security of the URL to be detected can be determined to be higher, and the target score is lower, the security of the URL to be detected can be determined to be lower.

[0064] In addition, it should be pointed out that when the URL meets the following rules: the time for downloading the resource corresponding to the URL is outside the preset time period, the IP domain is directly requested to download the resource corresponding to the URL, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, the URL is downloaded through the non-preset HTTP port of the resource server corresponding to the URL, the data length of the downloaded resource corresponding to the URL is not within the preset length range, the domain name of the URL is random, the file name of the resource corresponding to the URL is random, the cycle of accessing the resource corresponding to the URL changes by multiples, the cycle of accessing the resource corresponding to the URL changes by fixed minutes, the resource corresponding to the URL is downloaded through the HFS server, the file content of the downloaded resource corresponding to the URL does not match the suffix name, and the cycle of accessing the resource corresponding to the URL changes in an arithmetic progression, it indicates that the URL may be a dangerous URL, so the preset The rule types are set to: the time for downloading the resource corresponding to the URL is outside the preset time period, the IP domain is directly requested to download the resource corresponding to the URL, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, the download is made through the non-preset HTTP port of the URL corresponding resource server, the data length of the downloaded URL corresponding resource is not within the preset length range, the domain name of the URL is random, the file name of the URL corresponding resource is random, the period of accessing the URL corresponding resource changes by multiples, the period of accessing the URL corresponding resource changes by fixed minutes, the URL corresponding resource is downloaded through the HFS server, the file content of the downloaded URL corresponding resource does not match the suffix name, and the period of accessing the URL corresponding resource changes in an arithmetic progression. Of course, corresponding rules can also be set in the preset rules as needed, and this application is not limited here.

[0065] Furthermore, it should be pointed out that when judging whether the URL to be detected satisfies the requirement that the time for downloading the resource corresponding to the URL is outside the preset time period, it is necessary to obtain the time for the device to be detected to download the corresponding resource through the URL to be detected, and judge whether the time for downloading the corresponding resource is outside the preset time period. If so, it is judged that the URL to be detected satisfies this rule, and if not, it is judged that the URL to be detected does not satisfy this rule; when judging whether the URL to be detected satisfies the requirement that the resource corresponding to the URL is directly requested to be downloaded from the IP domain, it is necessary to judge whether the download address of the URL to be detected is directly the IP address. If so, it is judged that the URL to be detected satisfies this rule, and if not, it is judged that the URL to be detected does not satisfy this rule; when judging whether the URL to be detected satisfies the requirement that the destination IP of the URL matches the malicious IP library, it is necessary to determine the destination IP of the URL to be detected, that is, the IP of the resource server corresponding to the URL to be detected, and judge whether the destination IP belongs to the malicious IP library. If so, it is judged that the URL to be detected satisfies this rule, and if not, it is judged that the URL to be detected does not satisfy this rule; when judging whether the URL to be detected satisfies the requirement that the destination IP of the URL matches the overseas IP, it is necessary to determine the destination IP of the URL to be detected, and judge whether the destination IP belongs to the overseas IP. If so, it is judged that the URL to be detected satisfies this rule, and if not, it is judged that the URL to be detected satisfies this rule. The URL does not satisfy this rule; when judging whether the URL to be detected satisfies downloading through the non-preset HTTP port of the resource server corresponding to the URL, it is necessary to obtain the HTTP download port provided by the resource server corresponding to the URL to be detected, and judge whether the HTTP download port is a non-preset HTTP download port. If so, it is determined that the URL to be detected satisfies the rule; if not, it is determined that the URL to be detected does not satisfy the rule. The non-preset HTTP download port may be an uncommon HTTP download port, etc.; when judging whether the URL to be detected satisfies the data length of the resource corresponding to the URL to be downloaded is not within the preset length range, the data length of the corresponding resource downloaded from the resource server corresponding to the URL to be detected can be obtained, and it is determined whether the data length is within the preset length range. If so, it is determined that the URL to be detected satisfies this rule; if not, it is determined that the URL to be detected does not satisfy this rule; when judging whether the URL to be detected satisfies the random domain name of the URL, it can be judged whether the domain name of the URL to be detected satisfies the preset domain name random requirement. If so, it is determined that the URL to be detected satisfies this rule; if not, it is determined that the URL to be detected does not satisfy this rule. The preset domain name random requirement can be determined according to actual needs. For example, the preset domain name random requirement may be that the domain name is randomly composed of meaningless letters, etc.;When judging whether the URL to be detected satisfies the random file name of the resource corresponding to the URL, the corresponding resource of the URL to be detected can be determined, and it can be judged whether the corresponding resource of the URL to be detected meets the preset random file name requirement. If so, it is judged that the URL to be detected satisfies this rule, if not, it is judged that the URL to be detected does not meet this rule. The preset random file name requirement can be determined according to actual needs. For example, the preset random file name requirement can be that the file name is randomly composed of meaningless letters, etc.; when judging whether the URL to be detected satisfies the period of accessing the resource corresponding to the URL to change in multiples, it is necessary to obtain the access time of the device to be detected accessing the corresponding resource in the corresponding resource server through the URL to be detected within the preset time length, and judge whether the access time changes by multiples. If so, it is judged that the URL to be detected satisfies this rule, if not, it is judged that the URL to be detected does not meet this rule; when judging whether the URL to be detected satisfies the period of accessing the resource corresponding to the URL to change according to fixed minutes, it is necessary to obtain the access time of the device to be detected accessing the corresponding resource in the corresponding resource server through the URL to be detected within the preset time length, and judge whether the access time changes according to fixed minutes. If yes, it is determined that the URL to be detected satisfies this rule; if no, it is determined that the URL to be detected does not satisfy this rule; when judging whether the URL to be detected satisfies the download of the resource corresponding to the URL through the HFS server, it can be determined whether the URL to be detected carries the HFS download mark. If yes, it is determined that the URL to be detected satisfies this rule; if no, it is determined that the URL to be detected does not satisfy this rule; when judging whether the URL to be detected satisfies the download of the URL corresponding to the resource, the resource file downloaded by the device to be detected from the corresponding resource server through the URL to be detected is obtained, and it is determined whether the content of the resource file matches the suffix name. If no, it is determined that the URL to be detected satisfies this rule; if yes, it is determined that the URL to be detected does not satisfy this rule; when judging whether the URL to be detected satisfies the period of accessing the resource corresponding to the URL according to arithmetic progression, it is necessary to obtain the access time of the device to be detected accessing the corresponding resource on the corresponding resource server through the URL to be detected within the preset time length, and it is determined whether the access time changes according to arithmetic progression. If yes, it is determined that the URL to be detected satisfies this rule; if no, it is determined that the URL to be detected does not satisfy this access rule. ;

[0066] The present application provides an HTTP detection method, which extracts the preset rules satisfied by the URL to be detected from the preset rules to obtain the target rules, thereby achieving the purpose of analyzing and screening the URL to be detected according to the preset rules. Since there are many types of preset rules and each rule can reflect the security of a part of the URL, the target rule can comprehensively reflect the security of the URL to be detected. Since the strength of the security of the URL reflected by each rule is different, it is necessary to subsequently calculate the target score of the target rule based on the preset score of each rule in the preset rules, and determine the security detection result of the URL to be detected based on the target score, so that the security of the URL to be detected can be accurately evaluated with the help of the preset rules, and then the security of HTTP can be accurately evaluated, thereby improving the detection accuracy of HTTP.

[0067] In an HTTP detection method provided by an embodiment of the present application, since the strength of the rules in the preset rules reflecting the security of the URL may be the same, the rules in the preset rules can be classified according to the strength of the URL security reflected by the rules, the preset scores of each rule are determined according to the classified rules, and the URL to be detected is processed according to the classified rules. For example, the preset rules may include a first type of rules, a second type of rules and a third type of rules. The first type of rules include that the time for downloading the resource corresponding to the URL is outside the preset time period, directly requesting the IP domain to download the resource corresponding to the URL, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, and downloading through the non-preset HTTP port of the URL corresponding resource server; the second type of rules include that the data length of the resource corresponding to the downloaded URL is not within the preset length range, the domain name of the URL is random, the file name of the resource corresponding to the URL is random, the period of accessing the resource corresponding to the URL changes by multiples, and the period of accessing the resource corresponding to the URL changes by fixed minutes; the third type of rules include that the resource corresponding to the URL is downloaded through the HFS server, the file content of the downloaded resource corresponding to the URL does not match the suffix name, and the period of accessing the resource corresponding to the URL changes in an arithmetic progression;

[0068] Correspondingly, the preset score of each rule in the preset rules includes: the preset score of each rule in the first category of rules is a first score value; the preset score of each rule in the second category of rules is a second score value; the preset score of each rule in the third category of rules is a third score value; and the third score value is greater than the second score value, and the second score value is greater than the first score value.

[0069] It should be pointed out that since the technical solution of the present application divides the preset rules into first-category rules, second-category rules and third-category rules, the classification of the preset rules is realized, which facilitates the systematic management of the preset rules and the subsequent use of the preset rules, and can improve the efficiency of detecting the URL to be detected based on the preset rules.

[0070] In an HTTP detection method provided in an embodiment of the present application, based on the preset score of each rule in the preset rules, the process of calculating the target score of the target rule can be specifically as follows: determining a first quantity value of the target rule belonging to the first category of rules; determining a second quantity value of the target rule belonging to the second category of rules; determining a third quantity value of the target rule belonging to the third category of rules; and taking the sum of the product value of the first quantity value and the first score value, the product value of the second quantity value and the second score value, and the product value of the third quantity value and the third score value as the target score.

[0071] That is, in the technical solution of the present application, the number of target rules belonging to the first category of rules, the second category of rules and the third category of rules can be determined respectively first, and then the product of the number of target rules of each category and the preset score of the rule of that category can be directly used as the score of the target rule hitting the rule of that category. For example, the product value of the first quantity value and the first score value represents the score of the target rule hitting the first category of rules, the product value of the second quantity value and the second score value represents the score of the target rule hitting the second category of rules, and the product value of the third quantity value and the third score value represents the score of the target rule hitting the third category of rules. Finally, the three product values ​​are added together to obtain the target score of the target rule, which makes the process of obtaining the target score simple and orderly, and can speed up the efficiency of obtaining the target score.

[0072] In an HTTP detection method provided by an embodiment of the present application, in order to facilitate understanding of the danger situation of a URL to be detected, the danger level of the URL to be detected can be divided based on a target score, so that the danger level of the URL to be detected can be known according to the security detection result, that is, the process of determining the security detection result of the URL to be detected based on the target score can be specifically as follows: if the target score is within a first score range, a security detection result representing that the danger level of the URL to be detected is a first danger level is determined; if the target score is within a second score range, a security detection result representing that the danger level of the URL to be detected is a second danger level is determined; if the target score is within a third score range, a security detection result representing that the danger level of the URL to be detected is a third danger level is determined; wherein the minimum score value of the third score range is greater than the maximum score value of the second score range, and the minimum score value of the second score range is greater than the maximum score value of the first score range; and the danger level of the third danger level is higher than the second danger level, and the danger level of the second danger level is higher than the first danger level.

[0073] That is, in the technical solution of the present application, by dividing the score ranges corresponding to the various levels of danger levels of the URL to be detected, the danger level of the URL to be detected can be determined according to the relationship between the target score and the score ranges corresponding to the various levels of danger levels, and the corresponding security detection results can be obtained. This realizes the division of the danger levels of the URL to be detected, improves the detection accuracy of the URL to be detected, and makes it possible to directly know the danger level of the URL to be detected based on the security detection results in the future, thereby improving the efficiency of obtaining the detection results of the URL to be detected.

[0074] In an HTTP detection method provided in an embodiment of the present application, in order to improve the accuracy of HTTP detection, the third score value may be 1, the second score value may be 0.5, and the third score value may be 0.25;

[0075] The first score range may be (1, 1.5), the second score range may be (1.5, 2), and the third score range may be (2, ∞).

[0076] In order to facilitate the description of the effects of the values ​​of each parameter provided in this application, the server and the like are tested according to the parameter values ​​provided in this application, and the test results are shown in Table 1.

[0077] Table 1 HTTP detection results

[0078]

[0079]

[0080] In Table 1, the number of false positive clients refers to the number of clients that have false positives when detecting according to the HTTP detection method provided in this application. It can be seen from Table 1 that the various parameter values ​​provided in this application can reduce the false positive rate and increase the detection accuracy.

[0081] In an HTTP detection method provided in an embodiment of the present application, after determining the security detection result of the URL to be detected based on the target score, the URL to be detected corresponding to the security detection result representing the third danger level can also be marked as a dangerous URL; and a security event is generated based on the dangerous URL.

[0082] That is, in the technical solution provided by the present application, the URL to be detected corresponding to the security detection result with the highest danger level, that is, the third danger level, can be marked as a dangerous URL, so that the dangerous URL can be identified according to the mark later, and a security event can be generated based on the dangerous URL, so that the dangerous URL can be traced back according to the security event later. This is equivalent to generating a security event if the security detection result is the third danger level.

[0083] It should be noted that the type of information included in a security event can be determined according to actual needs. For example, a security event may include information about the dangerous URL itself, information about the target rule corresponding to the dangerous URL, and the like.

[0084] In an HTTP detection method provided in an embodiment of the present application, after marking the URL to be detected corresponding to the security detection result representing the third danger level as a dangerous URL, the number of URLs to be detected whose security detection results are the third danger level in the device to be detected can also be counted; it is determined whether the number is greater than a preset number; if the number is greater than the preset number, the device to be detected is marked as a compromised device.

[0085] That is, in the technical solution provided by the present application, by comparing the relationship between the real-time number of dangerous URLs in the device to be detected and the preset number, it can be determined whether the device to be detected is a compromised device, thereby realizing the security judgment of the device to be detected and facilitating the analysis of the security of the device to be detected.

[0086] It should be noted that the value of the preset number can be flexibly adjusted according to actual needs.

[0087] See also Figure 2 , Figure 2 A schematic diagram of the structure of an HTTP detection system provided in an embodiment of the present application.

[0088] An HTTP detection system provided in an embodiment of the present application may include:

[0089] The acquisition module 101 is used to acquire at least one URL to be detected;

[0090] An extraction module 102 is used to extract a target rule from at least one URL to be detected, wherein the target rule satisfies a preset rule;

[0091] A calculation module 103, configured to calculate a target score of a target rule based on a preset score of each rule in the preset rules;

[0092] A determination module 104, configured to determine a security detection result of the URL to be detected based on the target score;

[0093] Among them, the types of preset rules include: the time for downloading the resource corresponding to the URL is outside the preset time period, directly requesting the IP domain to download the resource corresponding to the URL, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, downloading through the non-preset HTTP port of the URL corresponding resource server, the data length of the downloaded URL corresponding resource is not within the preset length range, the domain name of the URL is random, the file name of the URL corresponding resource is random, the period of accessing the URL corresponding resource changes by multiples, the period of accessing the URL corresponding resource changes by fixed minutes, the URL corresponding resource is downloaded through the HFS server, the file content of the downloaded URL corresponding resource does not match the suffix name, and the period of accessing the URL corresponding resource changes in an arithmetic progression.

[0094] In an HTTP detection system provided by an embodiment of the present application, preset rules may include first-category rules, second-category rules and third-category rules. The first-category rules include that the time for downloading resources corresponding to a URL is outside a preset time period, that the IP domain is directly requested to download resources corresponding to a URL, that the destination IP of the URL matches a malicious IP library, that the destination IP of the URL matches an overseas IP, and that the URL is downloaded through a non-preset HTTP port of a resource server corresponding to the URL; the second-category rules include that the data length of the resource corresponding to the downloaded URL is not within a preset length range, that the domain name of the URL is random, that the file name of the resource corresponding to the URL is random, that the period for accessing the resource corresponding to the URL changes by multiples, and that the period for accessing the resource corresponding to the URL changes by fixed minutes; the third-category rules include that the resource corresponding to the URL is downloaded through an HFS server, that the file content of the resource corresponding to the downloaded URL does not match the suffix name, and that the period for accessing the resource corresponding to the URL changes in an arithmetic progression;

[0095] The preset score of each rule in the preset rules may include: the preset score of each rule in the first category of rules is a first score value; the preset score of each rule in the second category of rules is a second score value; the preset score of each rule in the third category of rules is a third score value; and the third score value is greater than the second score value, and the second score value is greater than the first score value.

[0096] An HTTP detection system provided by an embodiment of the present application, the calculation module can be specifically used to: determine a first quantity value of a target rule belonging to a first category of rules; determine a second quantity value of a target rule belonging to a second category of rules; determine a third quantity value of a target rule belonging to a third category of rules; and use the sum of the product value of the first quantity value and the first score value, the product value of the second quantity value and the second score value, and the product value of the third quantity value and the third score value as the target score.

[0097] An HTTP detection system provided by an embodiment of the present application, a determination module can be specifically used to: if a target score is within a first score range, determine a security detection result representing that the danger level of the URL to be detected is a first danger level; if the target score is within a second score range, determine a security detection result representing that the danger level of the URL to be detected is a second danger level; if the target score is within a third score range, determine a security detection result representing that the danger level of the URL to be detected is a third danger level; wherein the minimum score value of the third score range is greater than the maximum score value of the second score range, and the minimum score value of the second score range is greater than the maximum score value of the first score range; and the third danger level is more dangerous than the second danger level, and the second danger level is more dangerous than the first danger level.

[0098] In an HTTP detection system provided by an embodiment of the present application, the third score value may be 1, the second score value may be 0.5, and the third score value may be 0.25;

[0099] The first score range may be (1, 1.5), the second score range may be (1.5, 2), and the third score range may be (2, ∞).

[0100] An HTTP detection system provided in an embodiment of the present application may further include:

[0101] The generating unit is used to generate a security event if the security detection result is the third danger level.

[0102] An HTTP detection system provided in an embodiment of the present application, wherein the URL to be detected is located on the device to be detected, may further include:

[0103] A counting unit, used for counting the number of URLs to be detected whose security detection results are the third risk level in the devices to be detected;

[0104] The judging unit is used to judge whether the quantity value is greater than a preset quantity; if the quantity value is greater than the preset quantity, the device to be detected is marked as a trapped device.

[0105] The present application also provides an HTTP detection device and a computer-readable storage medium, both of which have the corresponding effects of an HTTP detection method provided in an embodiment of the present application. Figure 3 , Figure 3 A schematic diagram of the structure of an HTTP detection device provided in an embodiment of the present application.

[0106] An HTTP detection 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 steps of the HTTP detection method described in any of the above embodiments are implemented.

[0107] See also Figure 4 , another HTTP detection 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 HTTP detection 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.

[0108] 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 steps of the HTTP detection method described in any of the above embodiments are implemented.

[0109] 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, non-volatile readable storage media, or any other form of storage medium known in the technical field.

[0110] For the description of the relevant parts of the HTTP detection system, device 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 HTTP detection 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.

[0111] 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.

[0112] 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. An HTTP detection method, characterized in that: include: Get at least one URL to be detected; Extracting a target rule from the at least one URL to be detected, wherein the target rule satisfies a preset rule; Calculating a target score for the target rule based on a preset score for each of the preset rules; Determine a security detection result of the URL to be detected based on the target score; Among them, the preset rules include first-category rules, second-category rules and third-category rules. The first-category rules include: the time for downloading the resource corresponding to the URL is outside the preset time period, directly requesting the IP domain to download the resource corresponding to the URL, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, and downloading through the non-preset HTTP port of the URL corresponding resource server; the second-category rules include that the data length of the resource corresponding to the downloaded URL is not within the preset length range, the domain name of the URL is random, the file name of the resource corresponding to the URL is random, the cycle of accessing the resource corresponding to the URL changes by multiples, and the cycle of accessing the resource corresponding to the URL changes by fixed minutes; the third-category rules include that the resource corresponding to the URL is downloaded through the HFS server, the file content of the downloaded resource corresponding to the URL does not match the suffix name, and the cycle of accessing the resource corresponding to the URL changes in an arithmetic progression; The preset score of each rule in the preset rules includes: the preset score of each rule in the first category of rules is a first score value; the preset score of each rule in the second category of rules is a second score value; the preset score of each rule in the third category of rules is a third score value; and the third score value is greater than the second score value, and the second score value is greater than the first score value; Wherein, determining the security detection result of the URL to be detected based on the target score includes: If the target score is within the first score range, determining the security detection result indicating that the danger level of the URL to be detected is the first danger level; If the target score is within the second score range, determining the security detection result indicating that the danger level of the URL to be detected is the second danger level; If the target score is within the third score range, determining the security detection result indicating that the danger level of the URL to be detected is the third danger level; The minimum score value of the third score range is greater than the maximum score value of the second score range, and the minimum score value of the second score range is greater than the maximum score value of the first score range; and the third danger level is more dangerous than the second danger level, and the second danger level is more dangerous than the first danger level; Wherein, the URL to be detected is located in the device to be detected, and the method further includes: Counting the number of URLs to be detected whose security detection results in the devices to be detected are the third risk level; Determine whether the quantity value is greater than a preset quantity; If the quantity value is greater than the preset quantity, the device to be detected is marked as a trapped device.

2. The method according to claim 1, characterized in that The calculating the target score of the target rule based on the preset score of each rule in the preset rules includes: Determining a first quantity value of the target rules belonging to the first category of rules; determining a second quantity value of the target rules belonging to the second category of rules; Determining a third quantity value of the target rule belonging to the third category of rules; The sum of the product of the first quantity value and the first score value, the product of the second quantity value and the second score value, and the product of the third quantity value and the third score value is taken as the target score.

3. The method according to claim 2, characterized in that The third score value is 1, the second score value is 0.5, and the third score value is 0.25; The first score range is (1, 1.5), the second score range is (1.5, 2), and the third score range is (2, ∞).

4. The method according to claim 3, characterized in that After determining the security detection result of the URL to be detected based on the target score, the method further includes: If the security detection result is the third risk level, a security event is generated.

5. An HTTP detection system, characterized in that: include: An acquisition module, used to acquire at least one URL to be detected; An extraction module, used to extract a target rule from the at least one URL to be detected, wherein the target rule satisfies a preset rule; A calculation module, configured to calculate a target score of the target rule based on a preset score of each rule in the preset rules; A determination module, configured to determine a security detection result of the URL to be detected based on the target score; Among them, the preset rules include first-category rules, second-category rules and third-category rules. The first-category rules include: the time for downloading the resource corresponding to the URL is outside the preset time period, directly requesting the IP domain to download the resource corresponding to the URL, the destination IP of the URL matches the malicious IP library, the destination IP of the URL matches the overseas IP, and downloading through the non-preset HTTP port of the URL corresponding resource server; the second-category rules include that the data length of the resource corresponding to the downloaded URL is not within the preset length range, the domain name of the URL is random, the file name of the resource corresponding to the URL is random, the cycle of accessing the resource corresponding to the URL changes by multiples, and the cycle of accessing the resource corresponding to the URL changes by fixed minutes; the third-category rules include that the resource corresponding to the URL is downloaded through the HFS server, the file content of the downloaded resource corresponding to the URL does not match the suffix name, and the cycle of accessing the resource corresponding to the URL changes in an arithmetic progression; The preset score of each rule in the preset rules includes: the preset score of each rule in the first category of rules is a first score value; the preset score of each rule in the second category of rules is a second score value; the preset score of each rule in the third category of rules is a third score value; and the third score value is greater than the second score value, and the second score value is greater than the first score value; Wherein, the determination module is used to: if the target score is within a first score range, determine the security detection result representing that the danger level of the URL to be detected is the first danger level; if the target score is within a second score range, determine the security detection result representing that the danger level of the URL to be detected is the second danger level; if the target score is within a third score range, determine the security detection result representing that the danger level of the URL to be detected is the third danger level; wherein the minimum score value of the third score range is greater than the maximum score value of the second score range, and the minimum score value of the second score range is greater than the maximum score value of the first score range; and the third danger level is more dangerous than the second danger level, and the second danger level is more dangerous than the first danger level; The URL to be detected is located on the device to be detected, and further includes: A statistical unit, used for counting the number of URLs to be detected whose security detection results in the devices to be detected are the third risk level; The judging unit is used to judge whether the quantity value is greater than a preset quantity; if the quantity value is greater than the preset quantity, the device to be detected is marked as a trapped device.

6. An HTTP detection device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the HTTP detection method according to any one of claims 1 to 4 when executing the computer program.

7. 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 HTTP detection method according to any one of claims 1 to 4 are implemented.