Access message processing method, electronic equipment, storage medium and program product
By introducing redirection control operations and transit website warning mechanisms in DPI devices, the problem that the existing technology cannot handle suspected abnormal web pages is solved, effective interception of suspicious websites and user risk warnings are achieved, and the risk of malicious website attacks is reduced.
Patent Information
- Application Number
- CN202410978002.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The existing traffic interception/warning system cannot effectively handle suspected abnormal web pages, resulting in the inability to prevent users from accessing potential malicious websites, and the types of control functions of DPI devices cannot handle suspected risk web pages.
By introducing redirection control operations in the DPI device, redirection messages are sent to the user, guide the user to visit the transit website to receive warning information, and detect the second access message after receiving the warning information, determine whether to release it, and combine the transit website to The user sends an alert message, allowing the user to choose to continue or stop access.
Effectively prevent the user from accessing suspicious websites, reduce the risk of malicious website attacks, and make up for the defect that DPI devices cannot handle suspected abnormal web pages.
Smart Images

Figure CN119071013A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an access message processing method, electronic equipment, storage medium and program product. Background Art
[0002] At present, the traffic interception / early warning system is mainly implemented in two ways. One is to install software or plug-ins on the terminal to detect browser browsing behavior, and the other is to use special equipment (such as Deep Packet Inspection (DPI) equipment) to capture network traffic for identification. The method of using DPI equipment to identify abnormal websites only supports the processing of normal URLs and abnormal URLs. There is no processing mechanism for suspected abnormal websites. That is, when a user visits a normal web page, DPI performs normal forwarding actions and does not process; when a user visits an abnormal web page, DPI performs a blocking operation to prohibit the user's access. Due to the limitations on the types of processing actions in the control function of the DPI device, when the upper-level system believes that a certain type of web page is suspected to have certain risks, if the DPI device still processes the traffic according to the control strategy of the abnormal web page, the web page will be inaccessible. Summary of the invention
[0003] In view of this, embodiments of the present application provide an access message processing method, an electronic device, a storage medium, and a program product.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] On the one hand, an embodiment of the present invention provides an access message processing method, which is applied to a first network, and the method includes:
[0006] Matching the traffic control rule on the received first access message of the user;
[0007] If the first access message matches the first flow control rule, a redirect message is sent to the user, the redirect message is used to guide the user to visit a transit website, and the transit website is used to send a warning message to the user after receiving the user's access, and the warning message indicates that the user is visiting a suspicious website;
[0008] receiving a second access message to the suspicious website sent by the user after receiving the warning information;
[0009] The second access message is detected to obtain a detection result; the detection result indicates whether the second access message is released.
[0010] In the above scheme, the second access message includes the URL of the transit website, and one or more of the identifier and the check code of the first flow control rule, the check code includes the device identifier of the device where the first access message is located when the first access message hits the first flow control rule, and / or the timestamp when the first access message hits the first flow control rule, and the detecting of the second access message includes:
[0011] Determine whether the second access message matches a second flow control rule, where the second flow control rule is a whitelist rule, and the whitelist rule is that a setting field in the second access message includes the URL of the transit website;
[0012] Correspondingly, the detecting the second access message further includes one or more of the following:
[0013] Acquire a traffic feature corresponding to the first traffic control rule based on the identifier of the first traffic control rule, and determine whether the second access message matches the traffic feature;
[0014] Determine whether the deep data packet inspection DPI device corresponding to the device identifier is an intra-domain device, and / or determine whether the timestamp is within a set time interval.
[0015] In the above solution, when the URL of the transit website matches the whitelist rule, if the second access message satisfies one or more of the following conditions, the second access message is allowed to pass:
[0016] The second access message matches the traffic feature;
[0017] The DPI device corresponding to the device identifier is an intra-domain device, and / or the timestamp is within a set time interval.
[0018] In the above solution, after detecting the second access message, the method further includes:
[0019] In the case where the second access message hits the second flow control rule, the identifier of the second flow control rule, the identifier of the first flow control rule and the operation type corresponding to the first flow control rule are associated and recorded in the setting record table, and the corresponding rule hit count is updated;
[0020] In the case where the second access message does not hit the second flow control rule, the identifier of the first flow control rule and the operation type corresponding to the first flow control rule are associated and recorded in the setting record table, and the corresponding rule hit count is updated;
[0021] The setting record table is reported to an upper-layer system so that the upper-layer system updates the flow control rule based on the setting record table.
[0022] In the above solution, after reporting the setting record table to the upper system, the method further includes:
[0023] The update information of the first flow control rule sent by the upper-layer system is received, and the upper-layer system is used to determine whether to update the first flow control rule based on the number of rule hits in the setting record table.
[0024] In the above scheme, the redirection message includes: the access URL, the URL of the transit website, the identifier of the first traffic control rule and a verification code, the verification code includes the device identifier of the device when the first access message hits the first traffic control rule, and / or the timestamp when the first access message hits the first traffic control rule.
[0025] In the above solution, the warning information is a warning page, and the warning page includes options of continuing access and stopping access.
[0026] An embodiment of the present application also provides an electronic device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor is used to execute the steps in the above-mentioned access message processing method when running the computer program.
[0027] An embodiment of the present application further provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned access message processing method are implemented.
[0028] An embodiment of the present application also provides a computer program product, including a computer program, which implements the steps in the above-mentioned access message processing method when executed by a processor.
[0029] The embodiment of the present application matches the traffic control rules for the first access message received from the user. If the first access message matches the first traffic control rule, a redirect message is sent to the user. The redirect message is used to guide the user to visit the transit website. The transit website is used to send a warning message to the user after receiving the user's access. The warning message indicates that the user is visiting a suspicious website. The second access message to the suspicious website sent by the user after receiving the warning message is received, and the second access message is detected to obtain a detection result. The detection result indicates whether the second access message is released. The embodiment of the present application redirects the access to the suspicious website, and sends a warning message to the user in combination with the transit website, so that the user can choose to continue to visit or no longer visit the suspicious website, which makes up for the defect that the current DPI device cannot handle suspected abnormal web pages, and can effectively prevent the user end from accessing suspicious websites and reduce the risk of users being attacked by malicious websites. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A flowchart of a method for processing access messages provided in an embodiment of the present application;
[0031] Figure 2 It is a schematic diagram of the format of a flow control rule provided by an embodiment of the present invention;
[0032] Figure 3 This is a schematic diagram of an information statistics format of a setting record table provided by an embodiment of the present invention;
[0033] Figure 4 A schematic diagram of a setting record table provided in an embodiment of the present application;
[0034] Figure 5 It is a structural diagram of a strategy control system provided by an embodiment of the present invention;
[0035] Figure 6 is a schematic diagram of the structure of another strategy control system provided by an embodiment of the present invention;
[0036] Figure 7 This is a flowchart of processing a suspected abnormal web page provided by an embodiment of the present invention;
[0037] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Currently, the interception / warning system is mainly implemented in two ways: one is to install software or plug-ins on the terminal to detect browser browsing behavior, and the other is to use special equipment (such as DPI equipment) to capture network traffic for identification. Both methods match the URL of the web page visited by the user with the preset rules to determine whether the web page is an abnormal website. If it is confirmed to be an abnormal website, the web page will be intercepted and access will be prohibited; if it is suspected to be an abnormal website, a warning will be given to the user, and the user can choose whether to visit it; if it is a normal website, no processing will be done.
[0040] Although installing interception software or plug-ins on the client to block abnormal web pages can improve network security to a certain extent, its effectiveness is limited by whether users actively install and enable these tools. For terminals that do not install and enable tools, users still face risks when browsing the web.
[0041] The method of using DPI devices to identify abnormal websites only supports processing normal URLs and abnormal URLs. There is no processing mechanism for suspected abnormal websites. That is, when users visit normal web pages, DPI performs normal forwarding actions and does not process them; when users visit abnormal web pages, DPI performs blocking operations and prohibits users from accessing them; when the web pages visited by users are suspected to be risky, the DPI device currently has no appropriate processing actions to handle such traffic.
[0042] It can be seen that when using DPI devices to intercept / warn abnormal web pages, only two types of web addresses are supported: normal web addresses and abnormal web addresses. Due to the limitation of the types of processing actions in the control function of the DPI device, when the upper-level system believes that a certain type of web page is suspected to have certain risks, if the DPI device still processes the traffic according to the control strategy of the abnormal web page, the web page will be inaccessible.
[0043] In view of the shortcomings of the above-mentioned related technologies, an embodiment of the present invention provides an access message processing method, which can make up for the defect that the current DPI device cannot process suspected abnormal web pages. In order to illustrate the technical solution of the present invention, a specific embodiment is used for description below.
[0044] Figure 1 is a schematic diagram of an implementation flow of an access message processing method provided by an embodiment of the present invention, which can be applied to DPI equipment, Figure 1 , the access message processing method includes:
[0045] S101, matching a received first access message of a user with a flow control rule.
[0046] DPI devices are used to enhance the processing capabilities of layer 4-7 protocols. They can parse and identify high-level information according to predefined means and intervene in data flows as needed. DPI has five main logical functions: business identification, data reuse, log generation, analysis and statistics, and flow control.
[0047] Service identification: Service identification refers to the network equipment's service identification of data traffic flowing through the equipment. Traffic is identified based on the service used by the message, application layer protocol, tunnel protocol, message priority, five-tuple, and traffic statistics.
[0048] Traffic control: Based on service identification, traffic with certain characteristics is controlled, including: bandwidth adjustment, packet discarding, priority modification, whitelist setting, etc., or sending interference packets for certain packets to achieve the purpose of disconnection or other specific purposes; unidentified traffic can also be controlled. In addition to relying on the identification ability of DPI, the implementation of the traffic control function also depends on the policy rules issued by the upper-level management system. These rules specify which operations should be performed on each type of traffic, such as forwarding, discarding, speed limiting or modifying priority; DPI devices process the traffic accordingly according to these rules.
[0049] In the embodiment of the present application, the DPI device has a large number of built-in flow control rules, each of which specifies which operation should be performed on the matching flow, such as forwarding, discarding, speed limiting or modifying priority. The flow control rules in the DPI device can be issued by the upper system and can be updated in real time. Among them, the DPI device is deployed in the network to collect and monitor the split optical flow of the user terminal or the DPI is deployed in series in the network.
[0050] refer to Figure 2 , Figure 2 This is a schematic diagram of the format of a flow control rule provided by an embodiment of the present invention, wherein Rule_ID is the identifier of the flow control rule, Priority is the priority of the flow control rule, Operation is the operation performed when the flow control rule is hit, and the remaining fields are all message features.
[0051] This embodiment adds a "redirect" control operation on the basis of retaining the original control operation of the DPI device. The processing of this operation is to construct an http temporary redirect message to a certain website. When the policy is issued, the value is "redirectto xxx". "xxx" can be a website URL or an IP address. The original forwarding, blocking, speed limit, priority modification and other operations of DPI are respectively represented by "Permit", "Deny", "upstream cirxxx pirxxx" / "downstream cirxxx pirxxx" ("xxx" is the speed limit value), "DSCPxxx" / "TOS xxx" ("xxx" is the message priority value), etc.
[0052] like Figure 2 As shown, the rule of Rule_ID=r1 is a redirection control rule. When the host of the message contains A, it is redirected to the B website; the rule of Rule_ID=r2 is a whitelist rule (highest priority). When the referer of the message contains B, the traffic is allowed to pass; the rule of Rule_ID=r6 is a blocking control rule. When the host of the message contains Z, the message is discarded.
[0053] The first access message is the traffic of a user accessing a certain webpage, and the traffic control rule is matched on the first access message.
[0054] S102: If the first access message matches the first traffic control rule, a redirect message is sent to the user, wherein the redirect message is used to guide the user to access a transit website, and the transit website is used to send a warning message to the user after receiving the user's access, wherein the warning message indicates that the user is accessing a suspicious website.
[0055] The first access message matches the first traffic control rule, indicating that the first access message hits the rule of the suspected abnormal website. The first traffic control rule corresponds to a redirection operation, constructing a redirection message and sending it to the user, redirecting the user to the transit website.
[0056] The embodiment of the present application adds a "redirect" control operation on the basis of retaining the original control operation of the DPI device. The processing of this operation is to construct an http temporary redirect message to a certain website (transit website).
[0057] Here, the redirect message may be a 302 response message, and the redirect message includes the URL of the transit website, and may also include information such as the original access address, the identifier (ID) of the first flow control rule, and the like.
[0058] After receiving the redirection message, the user terminal parses the received redirection message, fills the address of the transit website into the host, and accesses the transit website. The transit website sends an early warning message to the user terminal, informing that the web page currently being visited is suspected to be risky.
[0059] For example, the transit website responds to the user terminal with a 200OK message and includes pop-up window content, which may include options for continuing access and stopping access.
[0060] S103: Receive a second access message to the suspicious website sent by the user after receiving the warning information.
[0061] If the user chooses to continue accessing, the user terminal accesses and submits a second access message again. Here, the submitted second access message may contain more information than the first access message, for example, the URL of the transit website, the identifier of the first flow control rule hit last time, and other information.
[0062] S104, detect the second access message to obtain a detection result; the detection result indicates whether to release the second access message.
[0063] Here, the detection of the second access message may be, for example, comparing the source IP addresses of the first access message and the second access message to determine whether they are consistent. If they are inconsistent, the second access message may be a forged message.
[0064] It is also possible to check whether the DPI device identifier carried in the second access message belongs to the DPI device in the domain to determine the legitimacy of the second access message. If not, the second access message may be a forged message.
[0065] It is also possible to query the rule base to obtain the traffic characteristics corresponding to the rule based on the identifier of the first traffic control rule carried by the second access message, and compare it with the second access message to check whether it matches. If it does not match, the second access message may be a forged message.
[0066] It may also be checked whether the timestamp carried by the second access message is within a set time interval.
[0067] The embodiment of the present application matches the traffic control rules for the first access message received from the user. If the first access message matches the first traffic control rule, a redirect message is sent to the user. The redirect message is used to guide the user to visit the transit website. The transit website is used to send a warning message to the user after receiving the user's access. The warning message indicates that the user is visiting a suspicious website. The second access message to the suspicious website sent by the user after receiving the warning message is received, and the second access message is detected to obtain a detection result. The detection result indicates whether the second access message is released. The embodiment of the present application redirects the access to the suspicious website, and sends a warning message to the user in combination with the transit website, so that the user can choose to continue to visit or no longer visit the suspicious website, which makes up for the defect that the current DPI device cannot handle suspected abnormal web pages, and can effectively prevent the user end from accessing suspicious websites and reduce the risk of users being attacked by malicious websites.
[0068] In one embodiment, the second access message includes the URL of the transit website, and one or more of the identifier and the check code of the first traffic control rule, the check code includes the device identifier of the device where the first access message is located when the first access message hits the first traffic control rule, and / or the timestamp when the first access message hits the first traffic control rule, and the detecting of the second access message includes:
[0069] Determine whether the second access message matches a second flow control rule, where the second flow control rule is a whitelist rule, and the whitelist rule is that a setting field in the second access message includes the URL of the transit website;
[0070] Correspondingly, the detecting the second access message further includes one or more of the following:
[0071] Acquire a traffic feature corresponding to the first traffic control rule based on the identifier of the first traffic control rule, and determine whether the second access message matches the traffic feature;
[0072] Determine whether the deep data packet inspection DPI device corresponding to the device identifier is an intra-domain device, and / or determine whether the timestamp is within a set time interval.
[0073] That is to say, the second access message must include the URL of the transit website, and at least one of the identifier and the check code of the first flow control rule can be added to the second access message.
[0074] In one embodiment, if the user chooses to continue accessing, a set field (such as a Referer field) will be automatically added to the second access message. This embodiment adds a verification code to the Referer to increase security, and prevents illegal personnel from tampering with the Referer field to bypass the risk interception warning system by verifying the unique identifier or timestamp of the device for the second access. This embodiment adds a RuleID to the Referer to facilitate associating the user's second visit with the first visit behavior, thereby performing statistical analysis.
[0075] The Referer field contains the URL address of the previous request, that is, the address of the page where the user was before accessing the current page. In this embodiment, the Referer field includes url=B&ruleid=r1&C. Among them, B is the URL of the transit website, r1 is the identifier of the first flow control rule, and C is the verification code. The verification code may include a timestamp (Timestamp) when the first flow control rule is hit, and may also include a unique identification value (DPI_ID) of the DPI device that identifies the message. The identification value of the DPI device can be allocated by the upper-level system or updated regularly and uniformly, and the DPI devices in the same domain can distinguish the authenticity of the identification from each other.
[0076] In one embodiment, the redirection message includes: an access URL, the URL of the transit website, an identifier of the first traffic control rule and a verification code, the verification code including the device identifier of the device when the first access message hits the first traffic control rule, and / or the timestamp when the first access message hits the first traffic control rule.
[0077] For example, the location field of a redirect message follows the following format:
[0078] http: / / {website1}? url={website2}&ruleid={Rule_ID value}&{Verification}
[0079] {website1} is the transit URL, {website2} is the suspicious URL, {Rule_ID value} is the ID value of the first traffic control rule, and {Verification} is the verification code, which can be the unique identification value of the DPI device or a timestamp. If {Rule_ID value} or {Verification} contains special characters, such as spaces or equal signs, hexadecimal representation must be used. The position of {Rule_ID value} or {Verification} can be set flexibly in any order; {Rule_ID value} cannot be left blank, but {Verification} can be left blank.
[0080] In this embodiment, when a message carrying the Referer field passes through the DPI device, Rule_ID and Verification are used to double-check the message to prevent illegal personnel from evading blocking by forging the referer field. If the Referer in the get or post message does not contain the Verification field, only Rule_ID is checked; if the Referer in the get or post message does not contain the Rule_ID and Verification fields, it means that the http request message is not linked to the redirect message constructed by the DPI device, and no verification is required in this case.
[0081] For example, the DPI device first checks whether the second access message hits the second traffic control rule. The second traffic control rule is a whitelist rule. The whitelist rule is whether the set field in the second access message contains the URL of the transit website. If the second access message hits the whitelist rule, the Rule_ID and the verification code are checked respectively, and the traffic is allowed to pass after verification.
[0082] Among them, verify Rule_ID: query the rule base with Rule_ID to obtain the traffic characteristics corresponding to the rule, and compare it with the second access message to check whether it is consistent.
[0083] Verification (verification code), if the DPI device unique identifier (DPI_ID) is used for verification, check whether the ID belongs to the DPI device in the domain to determine the legitimacy of the referer field; if the timestamp (Timestamp) is used for verification, follow the following judgment rules: if the Timestamp is greater than or equal to the current system time, it means that the referer field is a forged field; if the Timestamp is less than the current system time, and the difference between the two is no more than 5 minutes, the referer is determined to be legal and valid; if the Timestamp is less than the current system time, and the difference between the two is more than 5 minutes, it means that the referer has expired (the 5 minutes in the judgment rule is an example and can be set flexibly).
[0084] If any of the above two checks fails, the message will be redirected again or directly intercepted.
[0085] The embodiment of the present application adds a verification code to the referer to increase security, and prevents illegal personnel from tampering with the referer field to bypass the risk interception warning system by verifying the unique device identifier or timestamp of the secondary access. Adding RuleID to the referer makes it easier to associate the user's secondary access with the first access behavior, thereby performing statistical analysis.
[0086] In one embodiment, when the URL of the transit website matches the whitelist rule, the second access message is allowed to pass if the second access message satisfies one or more of the following conditions:
[0087] The second access message matches the traffic feature;
[0088] The DPI device corresponding to the device identifier is an intra-domain device, and / or the timestamp is within a set time interval.
[0089] For example, if the URL of the transit website hits the whitelist rule, and the second access message matches the traffic feature, and the DPI device corresponding to the device identifier is an intra-domain device, the second access message is released and access is allowed.
[0090] In one embodiment, the warning information is a warning page, and the warning page includes options of continuing to access and stopping access, so that the user can choose to continue to access or stop accessing the suspicious website, which makes up for the defect that the current DPI device cannot process suspected abnormal web pages, can effectively prevent the user terminal from accessing suspicious websites, and reduce the risk of users being attacked by malicious websites.
[0091] In one embodiment, after detecting the second access message, the method further includes:
[0092] In the case where the second access message hits the second flow control rule, the identifier of the second flow control rule, the identifier of the first flow control rule and the operation type corresponding to the first flow control rule are associated and recorded in the setting record table, and the corresponding rule hit count is updated;
[0093] In the case where the second access message does not hit the second flow control rule, the identifier of the first flow control rule and the operation type corresponding to the first flow control rule are associated and recorded in the setting record table, and the corresponding rule hit count is updated;
[0094] The setting record table is reported to an upper-layer system so that the upper-layer system updates the flow control rule based on the setting record table.
[0095] DPI devices can feedback user access behavior information to the upper-level system according to trigger conditions or periodically, such as Figure 3 As shown, Figure 3 The present invention provides a schematic diagram of an information statistics format of a setting record table.
[0096] Among them, Rule_ID_1 is the control rule ID of the traffic hit, Rule_ID_2 is the whitelist rule ID of the traffic hit matching condition as the referer field (optional, if not, leave it blank), Operation is the operation performed when the rule is hit, and Times is the number of hits. Note: This table item only records the hits of the rules, and the Operation field only records the processing action when a rule is hit.
[0097] When traffic hits a whitelist rule (determined by whether the priority value is 1), if the match condition of the rule is the Referer field, the whitelist rule ID needs to be filled into Rule_ID_2, and the value of the original ruleid is extracted from the Referer and filled into Rule_ID_1, and the Operation field is filled, and Times increases by 1 each time the rule is hit; when traffic hits a whitelist whose match condition is not the Referer field or hits other control rules, only the Rule_ID_1 field needs to be filled, and the field value is the hit rule ID, and the Operation field is filled, and Times increases by 1 each time it is hit. (The purpose of filling the Operation field in the table is to facilitate the upper-level system to identify the rule type, so as to perform statistical analysis on the table item.)
[0098] For example, in Figure 3 In the example, when the traffic hits the first traffic control rule r1 (the policy priority is not 1), the ID (r1) of the first traffic control rule is recorded in the Rule_ID_1 field, there is no Rule_ID_2, and the action Operation corresponding to the first traffic control rule is redirect, and it hits 10 times in total; when the traffic hits the second traffic control rule r2 (the policy priority is 1), the ID (r2) of the second traffic control rule is recorded in the Rule_ID_2 field, and the ID of the first traffic control rule is filled into Rule_ID_1, Operation is permit, and it hits the whitelist 2 times in total.
[0099] In one embodiment, after reporting the setting record table to the upper system, the method further includes:
[0100] The update information of the first flow control rule sent by the upper-layer system is received, and the upper-layer system is used to determine whether to update the first flow control rule based on the number of rule hits in the setting record table.
[0101] The upper-layer system is used to send traffic control rules to the policy module and update the traffic control rules based on the data fed back by the policy module. For example, the basis for determining whether to update a rule is: continued access rate > threshold, the threshold can be customized to a reasonable value, continued access rate = total number of continued accesses / total number of hits × 100%. For entries in the user access behavior information table whose Operation field is redirect, the upper-layer system needs to calculate the "continued access rate" of this type of traffic. First, for traffic whose Operation value is redirect, its "total number of hits" is the value of the Times field; secondly, according to the Rule_ID_1 value of the entry whose Operation value is redirect, find the Permit entry with the same Rule_ID_1 field value but whose Rule_ID_2 field is not empty. The sum of the Times values of this type of entry is the "total number of continued accesses; finally, the "continued access rate" is calculated based on these two values. Other types of traffic do not involve the "continued access rate", so it does not need to be calculated (but the number of hits of this type of traffic can also be used for other statistical analysis, so the DPI device still needs to report it).
[0102] For example, in Figure 4 In the example, the total hit count of the website with "Host containing A" (r1) is 10, and the number of continued visits is 2, so the continued visit rate of the website is 20%. The total hit count of the website with "Destination IP is Y, Destination Port is N" (r3) is 10, and the number of continued visits is 6, so the continued visit rate of the website is 60%. The Rule_ID_1 field of the other two types of traffic is different from the Rule_ID_1 of the entry with Operation as redirect, so the "continued visit rate" does not need to be calculated.
[0103] If the continued access rate is greater than the threshold, the upper-layer system updates the traffic control rule, for example Figure 4 In the example, the continued access rate of rule r3 is 60%. Assuming the threshold is 50%, rule r3 needs to be updated, and the upper-layer system sends the updated rule to the DPI device.
[0104] The embodiment of the present application introduces a behavior collection and feedback mechanism, which improves the fault tolerance of the risk interception warning system and enables the system to have self-correction capabilities. The upper-level system can optimize the rules in real time based on the feedback of user access behavior to improve the accuracy of the rules.
[0105] Figure 5 FIG. 1 is a schematic diagram of a policy control system provided by an embodiment of the present invention, including three modules: an upper layer system, a policy module and a DPI device. Figure 6As shown in the figure, the policy module receives control policies from different upper-layer systems, and converts these policies in different formats into a unified format and sends them to the DPI devices it manages. The policy here refers to the traffic control rules.
[0106] The specific functions of the above three modules are as follows:
[0107] Policy module: responsible for policy reception / issuance, behavior collection and other functions. The policy module can receive traffic control, whitelist and other policies issued by the upper system (policies can be issued based on traffic characteristics such as IP address, port number, five-tuple, URI, HOST, SNI, etc.), and issue the policies to all DPI devices and transfer stations it manages. The policy module receives user access behavior information fed back by all DPI devices managed by this policy module (the specific behavior information format is explained in the next module), and summarizes the information and feeds it back to the upper system.
[0108] DPI device: responsible for matching traffic control rules, constructing and sending redirection messages, recording user behavior, and double checking messages.
[0109] Upper-level system: responsible for issuing policy rules to the policy module, and updating the policy rules by analyzing the user access behavior data fed back by the policy module.
[0110] This embodiment provides an abnormal web page early warning solution composed of a policy module, a DPI device, an upper system, and a transfer station. The policy module is responsible for functions such as policy template format unification, policy issuance, and user access behavior information collection. The DPI device is responsible for real-time matching of traffic and policy, feedback of user access behavior information, etc. The upper system is responsible for user behavior analysis, policy update, policy issuance, etc. The transfer station is responsible for pushing appropriate pop-up pages according to different original access web pages; in the case that the web page content is not determined to be abnormal, an early warning is issued to the user terminal in the form of a pop-up window, which makes up for the defect that the current DPI device cannot handle suspected abnormal web pages, and can effectively prevent the user terminal from accessing malicious web page domain names, and reduce the risk of users who have not installed interception software being attacked by malicious websites. At present, the existing networks of various operators have deployed DPI devices at each node, basically covering the entire network traffic. The DPI device can monitor the entire network traffic and intercept threats in the network.
[0111] Figure 7 The present invention provides a flowchart of a process for a suspected abnormal web page, including:
[0112] Step 1: The user visits the fraudulent website.
[0113] Step 2: The DPI device finds that the traffic hits the rule of the suspected abnormal website ( Figure 7If the blocking rule xxx is in the header, an HTTP Response redirect message is constructed and the transfer station address is sent to the user terminal through the redirect message.
[0114] The user visits the fraudulent website A. The DPI device (uniquely identified as C1) detects at time C2 that the host in the get / post message contains the keyword A of the suspected fraudulent website, which means that the control policy r1 is hit. The DPI needs to send a 302 temporary redirect message to the user to redirect the user to the transfer station B. The location of the message is B? Url = A & ruleid = r1 & C.
[0115] Step 3: The user terminal accesses the transfer station.
[0116] The user parses the received temporary redirect message, fills the address in location into host, and accesses the transfer station. Figure 7 In, location=K, K=B? Url=A&ruleid=r1&C.
[0117] Step 4: The transfer station sends an abnormal website reminder warning page to the user terminal.
[0118] The transfer station responds to the user terminal with a 200OK message, which includes the pop-up window content.
[0119] Step 5: If the user clicks Continue to Access according to his / her needs, the user terminal will access the original web page again; if the user clicks Stop Access, the access to the website will be closed.
[0120] If the user clicks Continue to visit, the access request to website A is submitted again, and the referer information url=B&ruleid=r1&C is added to the request message.
[0121] Step 6: The DPI device checks whether the traffic hits the whitelist, and verifies the Rule_ID and verification code in the referer. If the verification is successful, the traffic is allowed to pass. The user can access the web page normally.
[0122] The website matches the blocking rule r1, but the referer field in the access message hits the whitelist policy r2, that is, referer contains B; and the verification code C passes the verification: the DPI unique identifier C1 corresponds to the DPI device as an intra-domain device, or the timestamp C2 is legal and valid. After verification, the traffic is allowed to pass.
[0123] Step 7: The DPI device reports the user access behavior information to the policy module. The policy module summarizes the information and reports it to the upper-level system, which analyzes it and updates the policy.
[0124] The embodiment of the present application can implement a flexible interception scheme for suspected abnormal web page access in the form of a pop-up window. This proposal can effectively prevent the user end from accessing malicious web page domain names, reducing the risk of users who have not installed interception software being attacked by malicious websites.
[0125] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0126] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0127] It should be noted that the technical solutions described in the embodiments of the present invention can be arbitrarily combined without conflict.
[0128] In addition, in the embodiments of the present invention, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0129] An embodiment of the present invention provides an access message processing device, the device comprising:
[0130] A matching module, used for matching a received first access message of a user with a flow control rule;
[0131] a sending module, configured to send a redirect message to the user if the first access message matches a first flow control rule, wherein the redirect message is used to guide the user to access a transit website, and the transit website is used to send a warning message to the user after receiving the user's access, wherein the warning message indicates that the user is accessing a suspicious website;
[0132] A receiving module, used for receiving a second access message to the suspicious website sent by the user after receiving the warning information;
[0133] The detection module is used to detect the second access message and obtain a detection result; the detection result indicates whether the second access message is released.
[0134] In one embodiment, the second access message includes the URL of the transit website, and one or more of the identifier and the check code of the first traffic control rule, the check code includes the device identifier of the device where the first access message is located when the first traffic control rule is hit, and / or the timestamp when the first access message hits the first traffic control rule, and the detection module is specifically used to:
[0135] Determine whether the second access message matches a second flow control rule, where the second flow control rule is a whitelist rule, and the whitelist rule is that a setting field in the second access message includes the URL of the transit website;
[0136] Correspondingly, the detection module is further configured to perform one or more of the following:
[0137] Acquire a traffic feature corresponding to the first traffic control rule based on the identifier of the first traffic control rule, and determine whether the second access message matches the traffic feature;
[0138] Determine whether the deep data packet inspection DPI device corresponding to the device identifier is an intra-domain device, and / or determine whether the timestamp is within a set time interval.
[0139] In one embodiment, when the URL of the transit website matches the whitelist rule, the second access message is allowed to pass if the second access message satisfies one or more of the following conditions:
[0140] The second access message matches the traffic feature;
[0141] The DPI device corresponding to the device identifier is an intra-domain device, and / or the timestamp is within a set time interval.
[0142] In one embodiment, the device further comprises:
[0143] A recording module, used for associating and recording the identifier of the second flow control rule, the identifier of the first flow control rule and the operation type corresponding to the first flow control rule in a setting record table when the second access message hits the second flow control rule, and updating the corresponding rule hit count;
[0144] The recording module is further used to associate and record the identifier of the first flow control rule and the operation type corresponding to the first flow control rule in the setting record table when the second access message does not hit the second flow control rule, and update the corresponding rule hit count;
[0145] The reporting module is used to report the setting record table to the upper system, so that the upper system updates the flow control rules based on the setting record table.
[0146] In one embodiment, the device further comprises:
[0147] An update module is used to receive update information of the first flow control rule sent by the upper system, and the upper system is used to determine whether to update the first flow control rule based on the number of rule hits in the setting record table.
[0148] In one embodiment, the redirection message includes: an access URL, the URL of the transit website, an identifier of the first traffic control rule and a verification code, the verification code including the device identifier of the device when the first access message hits the first traffic control rule, and / or the timestamp when the first access message hits the first traffic control rule.
[0149] In one embodiment, the warning information is a warning page, and the warning page includes options of continuing access and stopping access.
[0150] In actual application, the matching module, sending module, receiving module and detection module can be implemented by a processor in an electronic device, such as a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU) or a programmable gate array (FPGA).
[0151] It should be noted that: the access message processing device provided in the above embodiment only uses the division of the above modules as an example when processing access messages. In actual applications, the above processing can be assigned to different modules as needed, that is, the internal structure of the device is divided into different modules to complete all or part of the processing described above. In addition, the access message processing device provided in the above embodiment and the access message processing method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0152] The access message processing device can be in the form of an image file. After the image file is executed, it can be run in the form of a container or a virtual machine to implement the access message processing method described in this application. Of course, it is not limited to the image file form. As long as some software forms that can implement the access message processing method described in this application are within the protection scope of this application.
[0153] Based on the hardware implementation of the above program modules and in order to implement the method of the embodiment of the present application, the embodiment of the present application further provides an electronic device, and the above access message processing method is implemented by a processor of the electronic device.
[0154] Figure 8 FIG. 1 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. The electronic device may be a DPI device, such as Figure 8 As shown, the electronic equipment includes:
[0155] Communication interface 801, capable of exchanging information with other devices such as network devices;
[0156] The processor 802 is connected to the communication interface 801 to implement information exchange with other devices and is used to execute the method provided by one or more technical solutions of the electronic device side when running the computer program. The computer program is stored in the memory 803.
[0157] Of course, in actual application, the various components in the electronic device are coupled together through the bus system 804. It can be understood that the bus system 804 is used to realize the connection and communication between these components. In addition to the data bus, the bus system also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as bus system 804 .
[0158] The memory 803 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.
[0159] In this application, the electronic device can be a single hardware device or a cluster of multiple hardware devices, such as a cloud computing platform. The so-called cloud computing platform is a cluster device that organizes multiple independent electronic device physical hardware resources into pooled resources, which provides the required virtual resources and services to the outside world.
[0160] The memory 803 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.
[0161] It can be understood that the memory 803 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The memory described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memory.
[0162] The method disclosed in the above embodiment of the present application can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the program in the memory and completes the steps of the above method in combination with its hardware.
[0163] In an exemplary embodiment, the embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the processor 802 of the electronic device to complete the steps described in the access message processing method of the embodiment of the present application.
[0164] Optionally, when the processor executes the program, the corresponding processes implemented by the electronic device in each method of the embodiments of the present application are implemented, which will not be described in detail here for the sake of brevity.
[0165] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory storing a computer program, and the computer program can be executed by a processor of an electronic device to complete the steps of the aforementioned method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.
[0166] In the several embodiments provided in the present application, it should be understood that the disclosed devices, electronic devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0167] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0168] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0169] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, disks or optical disks.
[0170] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, electronic device, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0171] It should be noted that the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0172] In addition, in the examples of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0173] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for processing an access message, characterized in that: The method comprises: Matching the traffic control rule on the received first access message of the user; If the first access message matches the first flow control rule, a redirect message is sent to the user, the redirect message is used to guide the user to visit a transit website, and the transit website is used to send a warning message to the user after receiving the user's access, and the warning message indicates that the user is visiting a suspicious website; receiving a second access message to the suspicious website sent by the user after receiving the warning information; The second access message is detected to obtain a detection result; the detection result indicates whether the second access message is released.
2. The method according to claim 1, characterized in that: The second access message includes the URL of the transit website, and one or more of the identifier and the check code of the first flow control rule, the check code includes the device identifier of the device where the first access message is located when the first access message hits the first flow control rule, and / or the timestamp when the first access message hits the first flow control rule, and the detecting of the second access message includes: Determine whether the second access message matches a second flow control rule, where the second flow control rule is a whitelist rule, and the whitelist rule is that a setting field in the second access message includes the URL of the transit website; Correspondingly, the detecting the second access message further includes one or more of the following: Acquire a traffic feature corresponding to the first traffic control rule based on the identifier of the first traffic control rule, and determine whether the second access message matches the traffic feature; Determine whether the deep data packet inspection DPI device corresponding to the device identifier is an intra-domain device, and / or determine whether the timestamp is within a set time interval.
3. The method according to claim 2, characterized in that: When the URL of the transit website matches the whitelist rule, the second access message is allowed to pass if the second access message satisfies one or more of the following conditions: The second access message matches the traffic feature; The DPI device corresponding to the device identifier is an intra-domain device, and / or the timestamp is within a set time interval.
4. The method according to claim 2, characterized in that: After detecting the second access message, the method further includes: In the case where the second access message hits the second flow control rule, the identifier of the second flow control rule, the identifier of the first flow control rule and the operation type corresponding to the first flow control rule are associated and recorded in the setting record table, and the corresponding rule hit count is updated; In the case where the second access message does not hit the second flow control rule, the identifier of the first flow control rule and the operation type corresponding to the first flow control rule are associated and recorded in the setting record table, and the corresponding rule hit count is updated; The setting record table is reported to an upper-layer system so that the upper-layer system updates the flow control rule based on the setting record table.
5. The method according to claim 4, characterized in that: After reporting the setting record table to the upper system, the method further includes: The update information of the first flow control rule sent by the upper-layer system is received, and the upper-layer system is used to determine whether to update the first flow control rule based on the number of rule hits in the setting record table.
6. The method according to claim 1, characterized in that: The redirection message includes: the access URL, the URL of the transit website, the identifier of the first traffic control rule and a verification code, the verification code includes the device identifier of the device when the first access message hits the first traffic control rule, and / or the timestamp when the first access message hits the first traffic control rule.
7. The method according to claim 1, characterized in that: The warning information is a warning page, and the warning page includes options of continuing access and stopping access.
8. An electronic device, characterized in that: include: A processor and a memory for storing a computer program that can be executed on the processor, wherein: The processor is used to execute the steps of the access message processing method according to any one of claims 1 to 7 when running a computer program.
9. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the access message processing method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the access message processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Service control method and device
CN103369494A
Method and device for accessing website for second time and firewall equipment
CN103701779A
Malicious website interception method, malicious website interception device and client
CN106453216A
Data processing method, anti-fraud device and computer-readable storage medium
CN107645507A
Access request redirection method, system and device and storage medium
CN114697380A
