A Web honeypot response generation method based on global comparison algorithm

A Web honeypot response template is constructed through a global comparison algorithm, and real Web service data is used to generate a highly simulated HTTP response. This solves the shortcomings of traditional Web honeypots in fingerprint attacks and response updates, and significantly improves the concealment and response of the honeypot. flexibility.

CN118368145BActive Publication Date: 2024-10-11SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410789070.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-10-11
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

Traditional web honeypots are difficult to resist fingerprint attacks, and when responding to content updates, they are separated from the real-time feedback of the real service, affecting the deception effect.

Method used

Use a global comparison algorithm to build a Web honeypot response template, design update rules for variable fields, and generate highly simulated HTTP responses through real Web service data to enhance the honeypot's response simulation capabilities.

Benefits of technology

It significantly reduces the risk of attackers' fingerprint attacks on honeypots, improves the concealment and security of honeypots, and improves the flexibility and emulation of responses by dynamically adjusting the variable fields in the template.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118368145B_ABST
    Figure CN118368145B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating a Web honeypot response based on a global comparison algorithm, which belongs to the technical field of network security. The method comprises: collecting HTTP session data and performing preprocessing to construct an HTTP session dictionary; using a global comparison algorithm to compare the HTTP request-response chain based on the HTTP session dictionary, and determining variable fields according to the comparison and matching results; constructing a Web honeypot response template based on the variable fields and the HTTP request-response chain; the honeypot receives an external HTTP request and determines the request type, and generates a Web honeypot response based on the request type and the Web honeypot response template. The present invention uses real Web service data as a benchmark for the response, thereby avoiding the common fingerprint features of open source honeypots, significantly reducing the risk of fingerprint attacks by attackers against honeypots, and enhancing the concealment and security of honeypots.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network security, and in particular to a method for generating a Web honeypot response based on a global comparison algorithm. Background Art

[0002] Honeypot is a deception defense technology that sets up a fake service to attract attackers and divert the attacker's attention from the real target to the deception environment to protect the real service from attack. Web honeypot refers to a honeypot that simulates a Web service. It simulates the web interface of the target service to attract attackers to launch Web attacks and records the attacker's interactive behavior, so as to understand the attacker's technical means and intentions.

[0003] Traditional Web honeypots usually have specific fingerprints and are difficult to defend against fingerprint attacks by attackers. Fingerprint attacks are an effective tool for detecting and marking honeypots. Attackers can use fingerprint attacks to detect honeypots. In a typical fingerprint attack, the attacker actively collects the response information of the target host and matches these responses with the existing honeypot fingerprint library. If the response is found to contain features that match the honeypot fingerprint, the target is determined to be a honeypot. For example, the HTTP response can be analyzed to see if there is a " <h2>Blog Comments< / h2> ” to identify the Glastopf honeypot, while the common open source Hfish honeypot can also be bypassed by detecting the “static / x.js” feature in the HTTP response.

[0004] In order to reduce fingerprint attacks, Web honeypots can respond with data sets from real services. Since the data from real services are authentic and diverse, they usually do not carry the fingerprint characteristics of honeypots. However, the disadvantage of this approach is that the data set returns to an offline state, that is, the data set is separated from the real-time feedback of the real service. Therefore, the honeypot needs to ensure the simulation of the response content and flexibly change the values ​​of some fields that need to be updated. For example, the values ​​of fields such as date and time and device readings need to be flexibly changed to deceive attackers to the greatest extent.

[0005] Therefore, a technology that can improve the Web response simulation capability is urgently needed in traditional Web honeypot technology. Summary of the invention

[0006] In view of the above problems, the present invention provides a method for generating a Web honeypot response based on a global comparison algorithm. By using the global comparison algorithm, a response template of a Web honeypot is constructed, and an update rule of a variable field is designed to generate a highly simulated HTTP response, thereby enhancing the simulation capability of the Web honeypot response. The method comprises:

[0007] Constructing a blank HTTP session dictionary, collecting and preprocessing HTTP session data to obtain an HTTP session dictionary, wherein the HTTP session dictionary stores an HTTP request-response chain in a key-value pair storage form;

[0008] Based on the HTTP session dictionary, a global comparison algorithm is used to compare several HTTP request-response chains, and variable fields are determined according to the comparison and matching results;

[0009] Building a Web honeypot response template based on the variable fields and the HTTP request-response chain;

[0010] The honeypot receives an external HTTP request and determines the request type, and generates a Web honeypot response based on the request type and the Web honeypot response template.

[0011] Optionally, collect HTTP session data including:

[0012] Collect interaction data between Web services and users, and organize the interaction data into corresponding HTTP session data based on Web services; wherein the users include ordinary users and malicious attackers.

[0013] Optionally, the process of preprocessing the HTTP session data specifically includes:

[0014] Arranging HTTP request session clusters based on the HTTP session data, wherein the HTTP request session clusters are composed of a plurality of HTTP request response clusters;

[0015] A request matching algorithm is used to extract the requests and corresponding responses of the HTTP request session cluster.

[0016] Optionally, the request matching algorithm specifically includes:

[0017] Input a single HTTP request response cluster, and determine whether the HTTP request string in the single HTTP request response cluster belongs to the key of the HTTP session dictionary;

[0018] If it does not belong to the key of the HTTP session dictionary, use the HTTP string as the key of the HTTP session dictionary, and add the HTTP response string corresponding to the current HTTP request as the value to the HTTP session dictionary;

[0019] If it is a key belonging to the HTTP session dictionary, it is determined whether the current HTTP request is a static file type request. If it is a static file type request, it is skipped directly. If it is not a static file type request, the HTTP response string corresponding to the current HTTP request is added as a value to the value described by the current key.

[0020] Optionally, based on the HTTP session dictionary, a global comparison algorithm is used to compare multiple HTTP request-response chains, and a process of determining variable fields according to the comparison and matching results specifically includes:

[0021] Calculate the initial score matrix for the HTTP response string sequence;

[0022] Filling a score matrix based on the calculation results of the initialization score matrix;

[0023] Performing path backtracking calculation on the score matrix to obtain a backtracking score matrix;

[0024] Variable fields are looked up based on the traceback score matrix.

[0025] Optionally, the process of calculating the initialization score matrix for the HTTP response string sequence specifically includes:

[0026] Input two response string sequences of the same HTTP request, the response string sequences are and , and Represent the length of sequence X and sequence Y respectively, and Characters representing sequences X and Y, where ;

[0027] Construct a two-dimensional score matrix for the response string sequence ,in Representation sequence , The best score of the character matching the corresponding subscript;

[0028] Bundle Initialize to an all-zero matrix, set the initialization to get the matrix :

[0029] .

[0030] Optionally, the process of filling the score matrix based on the calculation result of the initialization score matrix specifically includes:

[0031] For the elements of the two-dimensional score matrix Perform recursive calculations from the upper left corner to the lower right corner of the two-dimensional score matrix to calculate the values ​​in the diagonal, horizontal, and vertical directions:

[0032] By comparing the diagonal Initialize the score matrix with The value of horizontal Add the gap penalty value and the vertical Add the value of the gap penalty and take the maximum value of the three as The calculation process is repeated until a complete two-dimensional matrix is ​​generated. :

[0033] ;

[0034] The value of the gap penalty is 0.

[0035] Optionally, performing path backtracking calculation on the score matrix to obtain the backtracking score matrix specifically includes:

[0036] Backtrack along the path from the bottom right corner to the top left corner from the best score to get the sequence , The global optimal matching result;

[0037] Assume the optimal matching result is ,like and If the two characters are the same, they are traced back from the lower right corner to the upper left corner according to the diagonal principle; if they are different, they are moved one character to the left and compared again until the characters are completely matched. The backtracking process is:

[0038] .

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] The present invention provides a response generation method for a Web honeypot, which has the following two advantages:

[0041] (1) Compared with other Web honeypots that use fake services to respond, the present invention uses real Web service data as the basis for the response, thereby avoiding the common fingerprint features of open source honeypots, significantly reducing the risk of attackers conducting fingerprint attacks on honeypots, and enhancing the concealment and security of honeypots.

[0042] (2) The method of the present invention can reduce the degree of dependence on the real service response mechanism. It only needs to reasonably set the update rules of the variable fields in the template and dynamically adjust them in combination with the response template, thereby improving the simulation and flexibility of the Web honeypot response. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 A method step diagram of an embodiment of the present invention;

[0045] Figure 2 This is a flow chart of HTTP session data collection and storage according to an embodiment of the present invention;

[0046] Figure 3 This is a flow chart of the HTTP request matching algorithm according to an embodiment of the present invention;

[0047] Figure 4 This is a diagram showing the HTTP session dictionary according to an embodiment of the present invention;

[0048] Figure 5 It is an algorithm flow chart of extracting variable fields of HTTP response based on the Needleman-Wunsch algorithm of the global algorithm in the embodiment of the present invention and an example diagram of HTTP response comparison;

[0049] Figure 6 This is an example diagram of response comparison in an embodiment of the present invention;

[0050] Figure 7 It is a partial response sequence alignment score matrix of an embodiment of the present invention;

[0051] Figure 8 An example diagram of extracting variable fields of HTTP response according to an embodiment of the present invention;

[0052] Fig. 9 A schematic diagram of a variable field set and update rules according to an embodiment of the present invention;

[0053] Fig.10 A schematic diagram of constructing an HTTP request-response template library for an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0055] The definitions of the terms used in this invention are as follows:

[0056] 1. HTTP request response cluster: A single HTTP request and its response are considered as an HTTP request response cluster.

[0057] 2. HTTP session cluster: HTTP sessions initiated within 30 minutes with the same source IP and port are considered as the same session and named as HTTP session cluster.

[0058] 3.HTTP response chain: Multiple responses to the same HTTP request are considered as an HTTP response chain.

[0059] 4.HTTP request-response chain: A single HTTP request and its corresponding HTTP response chain are named HTTP request-response chain.

[0060] The present invention provides a method for generating a Web honeypot response based on a global comparison algorithm, such as Figure 1 As shown, the method includes:

[0061] Step 1: construct a blank HTTP session dictionary, collect HTTP session data and perform preprocessing to obtain an HTTP session dictionary, wherein the HTTP session dictionary stores an HTTP request-response chain in the form of key-value pairs;

[0062] like Figure 2 As shown in FIG. 1 , collecting HTTP session data specifically includes: collecting interaction data between real Web servers and users, where users include ordinary users, malicious attackers, etc. By deploying mainstream Web services, such as WordPress services, on cloud servers, and maintaining a 30-day operation time facing the Internet. During this period, the real interaction data of these Web services is collected in the background, and these data are organized into corresponding HTTP session data by Web service. Finally, the HTTP session data is stored in the database.

[0063] The process of preprocessing HTTP session data specifically includes: organizing HTTP request session clusters based on the HTTP session data, the HTTP request session clusters consisting of multiple HTTP request response clusters; and extracting requests and corresponding responses of the HTTP request session clusters using a request matching algorithm.

[0064] First, the first step is to organize the HTTP request and response clusters belonging to the same session in each service. Each HTTP session cluster consists of a series of HTTP request and response clusters, and the HTTP request and response clusters are sorted according to the order of request time. By organizing the HTTP session data set through the above processing logic, the HTTP session cluster of each service can be obtained.

[0065] Then, the second step is to further process these HTTP session clusters. In the sorted HTTP session clusters, it can be observed that there are responses to the same HTTP request in different sessions. Most of these responses are replies to different attackers or the same request initiated at different times. In order to extract these requests and corresponding responses, the present invention designs an HTTP request matching algorithm. The algorithm aims to filter out the same HTTP request and all its corresponding responses, and combine these responses to form an HTTP response chain. Finally, the HTTP request URL+Method string is stored in the dictionary as the key and the HTTP response chain string as the value, and the HTTP session dictionary of each service is output. The specific process of the HTTP request matching algorithm is as follows. Figure 3 shown.

[0066] Before processing the HTTP request-response cluster, a blank dictionary is first constructed to store the HTTP request-response chain of each service, and then the HTTP request-response clusters of these services are processed one by one. The processing flow is as follows:

[0067] 1. For each HTTP request response cluster, first determine whether the string belongs to the dictionary key. The string is the URL+Method of the HTTP request.

[0068] 2. If it does not belong to the dictionary key, it means that the current HTTP request is not included in the dictionary, and further dictionary addition work is done, using the string as the dictionary key, and the key is determined by the URL+Method of the HTTP request. At the same time, the HTTP response string corresponding to this request is added to the value corresponding to the key.

[0069] 3. If it is a dictionary key, determine whether the HTTP request is a static file type request. Static file types include JS, CSS, PNG, etc.

[0070] 4. If it is a static file type request, skip it, because the response content of the static file type can be regarded as unchanged, and there is no need to search for variable fields. Including a static file type request and its response in the dictionary can meet the needs.

[0071] 5. If the request is not a static file type, it means that the request is a dynamic resource type. Dynamic resource types include registration requests, login requests, etc., then continue to add the response of this request to the value corresponding to the key.

[0072] After the above process, the HTTP session dictionary storing the HTTP request-response chain in the form of key-value pairs is finally output. The specific structure of the obtained HTTP session dictionary is as follows Figure 4As shown in the figure, req-n in the HTTP session dictionary represents the nth HTTP request, and rsp-m represents the mth HTTP response corresponding to the HTTP request.

[0073] Step 2: Based on the HTTP session dictionary, use a global comparison algorithm to compare the HTTP request-response chain, and determine the variable fields according to the comparison and matching results.

[0074] Based on the HTTP session dictionary, the HTTP request-response chain is compared using a global comparison algorithm, and the process of determining the variable field according to the comparison and matching results specifically includes: calculating an initialization score matrix for the HTTP response string sequence; filling the score matrix based on the calculation result of the initialization score matrix; calculating the path backtracking of the score matrix to obtain a backtracking score matrix; and searching for the variable field based on the backtracking score matrix.

[0075] After constructing the HTTP session dictionary for each service, analyze the HTTP request-response chain in the HTTP session dictionary. In the HTTP session dictionary, there are two types of HTTP request-response chains: static file type and dynamic resource type. The response content of static file type requests is usually fixed and there is no need to find variable fields. Therefore, only the variable fields are extracted from the responses to dynamic resource type requests.

[0076] The problem of how to extract variable fields in HTTP responses has certain similarities with the sequence alignment problem in bioinformatics. Both are essentially content-based difference analysis problems. Difference analysis technology is a method of extracting matching information by comparing the differences between different objects, and has been applied in the field of IoT security and privacy analysis. Since the content of an HTTP response can be regarded as a string sequence, the present invention will draw on the sequence alignment idea in bioinformatics to extract variable fields. Specifically, the string sequences of two HTTP responses are compared by a sequence alignment algorithm to obtain the optimal matching results of the two string sequences. Subsequently, the difference between the two HTTP responses is extracted based on the matching results, and the difference is classified and sorted according to the characteristics of the difference, and finally the variable fields are determined.

[0077] According to the scope of sequence alignment, sequence alignment algorithms can be divided into local alignment algorithms and global alignment algorithms. Among them, the Smith-Waterman algorithm and the Needleman-Wunsch algorithm are the two most representative sequence alignment algorithms, which are respectively suitable for searching similar characters between sequences in a local range and a global range. Compared with the Smith-Waterman algorithm, the Needleman-Wunsch algorithm can process long sequences more efficiently, providing a feasible solution for the comparison between long sequences. Since the HTTP response usually contains a large number of characters, forming a long sequence, and variable fields may appear at any position in the response, it is necessary to use a global alignment to identify these fields. Based on this, the present invention performs global level character matching on two HTTP responses through the Needleman-Wunsch algorithm to accurately extract variable fields.

[0078] The present invention designs an algorithm for extracting variable fields of HTTP responses based on Needleman-Wunsch. The process of the algorithm is as follows: Figure 5 The implementation of the algorithm is divided into four steps: initializing the score matrix, filling the score matrix, backtracking the score matrix, and finding the variable field. The specific implementation is as follows:

[0079] 1. Initialize the score matrix. First, input two response string sequences of the same HTTP request. Suppose the two response sequences are and ,in and Represent the lengths of the two sequences respectively. and Then the characters representing these two sequences ( ). Then a two-dimensional score matrix is ​​constructed for these two sequences. ,in Representation sequence , The best score for the character matching the subscript. Initialize to all zero matrix and set the score function As shown in formula (1).

[0080] (1)

[0081] in, is a two-character match ( ) of the matching score, and is the mismatch score of the two characters. yes or Gap penalty for inserting a gap, Indicates the use of the symbol "-" as A vacant seat.

[0082] 2. Fill the score matrix. The process of filling the score matrix is ​​to The recursive calculation process recursively calculates from the upper left corner of the matrix to the lower right corner, and calculates the values ​​in the diagonal, horizontal and vertical directions. Specifically, by comparing the values ​​on the diagonal Add the score function The value of horizontal Add the gap penalty value and the vertical Add the value of the gap penalty and take the maximum value of these three as Repeat this calculation process until a complete two-dimensional matrix is ​​generated. . Convert this calculation process into formula (2).

[0083] (2)

[0084] Here, the value of the gap penalty is set to 0.

[0085] 3. Backtrack the score matrix. At this point, all elements of the score matrix have been assigned scores, and the last element of the matrix is ​​the sequence , The best score for the character matching the corresponding subscript, so by backtracking from the best score along the path from the lower right corner to the upper left corner, we can get the sequence , The global optimal matching result. Suppose the optimal matching result is ,like and If the two characters are the same, then we will start from the lower right corner and gradually backtrack to the upper left corner according to the diagonal principle; if they do not match, we will move one character to the left and compare again until the characters completely match. This backtracking process can be converted into formula (3).

[0086] (3)

[0087] in, Represents filling with the character "-" .

[0088] 4. Search for variable fields. Get the best matching result ,Will with sequence , Compare characters one by one and record the difference characters. Compare the contexts of these difference characters to find the variable fields.

[0089] Since the string sequence of the HTTP response is relatively long, if the entire sequence is input to extract the difference characters, the algorithm complexity will be too large. Therefore, the present invention proposes a method for processing the HTTP response in segments.

[0090] First, the HTTP response is divided into a response header and a response body. Then, the response header and the response body are extracted and processed respectively to reduce the complexity of the algorithm. The format and fields of the response header are relatively fixed. Usually, only the content of the response time field will change. Therefore, no special processing is performed, and the entire response header is directly converted into a single string sequence for comparison. As for the response body, the "\r\n" line break character is used as a segmentation mark to segment the response body into multiple string sequences. Therefore, the two response bodies that need to be compared are segmented into sequences, and the string sequence comparison operations at corresponding positions are performed on the obtained multiple string sequences. For example, the present invention assumes that the two response sequences are X and Y. Figure 6 The response X and response Y are segmented, and the string sequence containing Temperature is compared to obtain the score matrix of the comparison of the two sequences, as shown in Figure 7 As shown. The comparison results of the two sequences can be obtained from the score matrix, as shown in formula (4). According to the space symbol "-", the subscript of the difference character is found, and it is found that "24" and "9" of the two sequences are different, so the Temperature field can be considered as a variable field.

[0091] (4)

[0092] According to the above extraction logic, the variable fields of response X and response Y are extracted. The extraction results are as follows: Figure 8 As shown, from the extraction results, it can be found that the contents of the three fields Date, Temperature, and Tilt are different and will undergo logical changes, so these three fields are determined to be variable fields.

[0093] according to Figure 5 The algorithm process processes the HTTP session dictionary of each service and obtains the variable field set of the dynamic resource type request response. After analyzing it, it is summarized into three categories: time information class, system information class, and random information class, and the update rules of these fields in response are summarized, such as Fig. 9 As shown. The present invention refers to these fields that need to change as variable fields. Obviously, these variable fields will become the key points for attackers to identify the honeypot, so they need to be reasonably updated in each response. Otherwise, the deception performance of the honeypot may be reduced, increasing the probability of being identified by the attacker.

[0094] Step 3: Building a Web honeypot response template based on the variable fields and the HTTP request-response chain.

[0095] After extracting the variable fields, the response chain in the HTTP session dictionary is converted into a response template. Specifically, for the HTTP request-response chain of the static file type, it is kept as it is, and the response chain of each request is directly regarded as a response template; while for the HTTP request-response chain of the dynamic resource type, the variable fields of the response chain are regarded as template fields, while other contents are kept unchanged, and these contents are integrated into a whole, so that the response chain of each request is converted into a unified response template with the template field as the core. In this way, the HTTP request-response chain in the HTTP session dictionary of each Web service is converted into a response template, so as to construct the HTTP request-response template library of the honeypot, such as Fig.10 shown.

[0096] Step 4: The honeypot receives an external HTTP request and determines the request type, and generates a Web honeypot response based on the request type and the Web honeypot response template.

[0097] When the honeypot receives an external HTTP request, it first determines the type of HTTP request, then queries the HTTP request-response template library to match the HTTP request, and finally responds. Specifically, if the HTTP request is determined to be a static file type, the HTTP response of the matched request is directly replied; if the HTTP request is determined to be a dynamic resource type, the response template of the matched request only needs to be dynamically updated according to the update rules of the variable fields to generate a complete HTTP response, and then the HTTP response is replied to the external visitor.

[0098] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A method for generating Web honeypot responses based on a global comparison algorithm, characterized in that: The method comprises: Constructing a blank HTTP session dictionary, collecting and preprocessing HTTP session data to obtain an HTTP session dictionary, wherein the HTTP session dictionary stores an HTTP request-response chain in a key-value pair storage form; Based on the HTTP session dictionary, a global comparison algorithm is used to compare several HTTP request-response chains, and variable fields are determined according to the comparison and matching results; The process of determining the variable fields specifically includes: Calculate the initial score matrix for the HTTP response string sequence; Filling a score matrix based on the calculation results of the initialization score matrix; Performing path backtracking calculation on the score matrix to obtain a backtracking score matrix; Finding variable fields based on the traceback score matrix; Building a Web honeypot response template based on the variable fields and the HTTP request-response chain; The honeypot receives an external HTTP request and determines the request type, and generates a Web honeypot response based on the request type and the Web honeypot response template.

2. The method for generating a Web honeypot response based on a global comparison algorithm according to claim 1, characterized in that: Collecting HTTP session data specifically includes: Collect interaction data between Web services and users, and organize the interaction data into corresponding HTTP session data based on Web services; wherein the users include ordinary users and malicious attackers.

3. The method for generating a Web honeypot response based on a global comparison algorithm according to claim 2, characterized in that: The process of preprocessing the HTTP session data specifically includes: Arranging HTTP request session clusters based on the HTTP session data, wherein the HTTP request session clusters are composed of a plurality of HTTP request response clusters; A request matching algorithm is used to extract the requests and corresponding responses of the HTTP request session cluster.

4. The method for generating a Web honeypot response based on a global comparison algorithm according to claim 3 is characterized in that: The request matching algorithm specifically includes: Input a single HTTP request response cluster, and determine whether the HTTP request string in the single HTTP request response cluster belongs to the key of the HTTP session dictionary; If it does not belong to the key of the HTTP session dictionary, use the HTTP string as the key of the HTTP session dictionary, and add the HTTP response string corresponding to the current HTTP request as the value to the HTTP session dictionary; If it is a key belonging to the HTTP session dictionary, it is determined whether the current HTTP request is a static file type request. If it is a static file type request, it is skipped directly. If it is not a static file type request, the HTTP response string corresponding to the current HTTP request is added as a value to the value described by the current key.

5. The method for generating a Web honeypot response based on a global comparison algorithm according to claim 1, characterized in that: The process of calculating the initialization score matrix for the HTTP response string sequence specifically includes: Input two response string sequences of the same HTTP request, the response string sequences are and , and Represent the length of sequence X and sequence Y respectively, and Characters representing sequences X and Y, where , ; Construct a two-dimensional score matrix for the response string sequence , where the elements of the two-dimensional score matrix The value represents the sequence , The best score of the character matching corresponding to the subscript; Bundle Initialize to all zero matrix, set the initial score matrix : ; in, Indicates the use of the symbol "-" as A vacant seat.

6. The method for generating a Web honeypot response based on a global comparison algorithm according to claim 5, characterized in that: The process of filling the score matrix based on the calculation result of the initialization score matrix specifically includes: For the elements of the two-dimensional score matrix Perform recursive calculations from the upper left corner to the lower right corner of the two-dimensional score matrix to calculate the values ​​in the diagonal, horizontal, and vertical directions: By comparing the diagonal Plus the initialization score matrix The value of horizontal Add the gap penalty value and the vertical Add the value of the gap penalty and take the maximum value of the three as The calculation process is repeated until a complete two-dimensional score matrix is ​​generated. : ; The value of the gap penalty is 0.

7. The method for generating a Web honeypot response based on a global comparison algorithm according to claim 6, characterized in that: The process of performing path backtracking calculation on the score matrix to obtain the backtracking score matrix specifically includes: Backtrack along the path from the bottom right corner to the top left corner from the best score to get the sequence , The global optimal matching result; Assume the optimal matching result is ,like and If the two characters are the same, they are traced back from the lower right corner to the upper left corner according to the diagonal principle; if they are different, they are moved one character to the left and compared again until the characters are completely matched. The backtracking process is: 。