Page detection method and device, electronic equipment and readable storage medium

By inserting detection codes and issuing CSP rules in the application page, and using the CSP control mechanism for security control, the risk of application page data being attacked is solved, and security and user experience are improved.

CN119089437APending Publication Date: 2024-12-06RIVER INFORMATION TECH SHANGHAI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411047244.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively prevent application page data from being attacked by cross-site scripts and data injection attacks, resulting in risks such as data theft and website content pollution.

Method used

Insert detection codes in the application's specified page to detect specific behaviors, and issue pre-configured CSP rules to the application, use the CSP control mechanism to perform security control processing, and dynamically adjust protection logic or CSP rules.

Benefits of technology

It improves the reliability of page detection, enhances the detection capability of CSP, improves the security of application page data access, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089437A_ABST
    Figure CN119089437A_ABST
Patent Text Reader

Abstract

The invention discloses a page detection method and device, electronic equipment and a readable storage medium, and relates to the technical field of page detection, in particular to the technical field of artificial intelligence such as big data and information processing. According to the specific implementation scheme, a detection code is inserted into a specified page of an application to detect a specific behavior of the specified page; a pre-configured CSP rule is issued to the application, so that the application can load the CSP rule; and on the basis of the specific behavior of the specified page detected by executing the detection code by the application, actively violating a CSP rule, and performing security control processing on the application by a control mechanism of the CSP rule triggered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of page detection technology, and specifically to the field of artificial intelligence technology such as big data and information processing. Background Art

[0002] With the in-depth development of the Internet, applications (Application, APP) applied to terminals emerge in an endless stream. When users use applications to access pages, there may be certain types of attacks such as Cross Site Scripting (XSS) attacks and data injection attacks, which may lead to risks such as data theft, website content pollution, and malware distribution.

[0003] Therefore, how to effectively protect the application's page data and prevent it from being attacked is of great significance. Summary of the invention

[0004] The present disclosure provides a page detection method, device, electronic device and readable storage medium.

[0005] According to one aspect of the present disclosure, a page detection method is provided, comprising:

[0006] Inserting detection code into a specified page of the application to detect specific behavior of the specified page;

[0007] Sending pre-configured CSP rules to the application so that the application can load the CSP rules;

[0008] Based on the application executing the detection code to detect a specific behavior of the designated page, actively violating the CSP rule, the control mechanism of the CSP rule is triggered to perform security control processing on the application.

[0009] According to another aspect of the present disclosure, there is provided a page detection device, comprising:

[0010] A code insertion unit, used to insert a detection code into a specified page of an application to detect a specific behavior of the specified page;

[0011] A rule issuing unit, configured to issue a pre-configured CSP rule to the application so that the application can load the CSP rule;

[0012] A security control unit is used to perform security control processing on the application based on the control mechanism of the CSP rule triggered by the application executing the detection code and detecting a specific behavior of the designated page, which actively violates the CSP rule.

[0013] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any possible implementation manner and the aspects described above.

[0017] According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method of the above-mentioned aspect and any possible implementation manner.

[0018] According to yet another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the above-mentioned aspects and any possible implementation method.

[0019] It can be seen from the above technical solution that the embodiment of the present disclosure inserts a detection code into a specified page of an application to detect a specific behavior of the specified page, and sends a pre-configured CSP rule to the application so that the application can load the CSP rule, so that the specific behavior of the specified page can be detected based on the application executing the detection code, and the CSP rule is actively violated. The control mechanism of the CSP rule is triggered to perform security control processing on the application, and the detection code actively violates the preset CSP rule, and the application data of the application is obtained by using the control mechanism of the CSP (for example, a reporting mechanism, etc.), and reliable security control processing of the application is performed, for example, the protection logic or CSP rule is dynamically adjusted, thereby improving the reliability of page detection.

[0020] In addition, the technical solution provided by the present disclosure can effectively enhance the detection capability of CSP.

[0021] In addition, the technical solution provided by the present disclosure can effectively improve the security of application page data access.

[0022] In addition, the technical solution provided by the present disclosure can effectively improve the user experience.

[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. The drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. Among them:

[0025] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0026] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;

[0027] Figure 3 is a schematic diagram according to a third embodiment of the present disclosure;

[0028] Figure 4 It is a block diagram of an electronic device used to implement the page detection method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0030] Obviously, the described embodiments are only part of the embodiments of the present disclosure, but not all of them. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure.

[0031] It should be noted that the terminals involved in the embodiments of the present disclosure may include but are not limited to computers (Personal Computer, PC), mobile phones, personal digital assistants (Personal Digital Assistant, PDA), wireless handheld devices, tablet computers and other smart devices; display devices may include but are not limited to personal computers, televisions and other devices with display functions.

[0032] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0033] There is a large amount of application page data transmitted in the network traffic, for example, content data based on HyperText Markup Language (HTML), etc., which need to be detected and protected. These page data can be data based on HyperText Transfer Protocol (HTTP), or data based on Simple Mail Transfer Protocol (SMTP), or data based on File Transfer Protocol (FTP), or data based on other Internet transmission protocols, which are not particularly limited in this embodiment.

[0034] When users use applications to access pages, they may be vulnerable to certain types of attacks, such as cross-site scripting (XSS) attacks and data injection attacks, which may lead to risks such as data theft, website content contamination, and malware distribution.

[0035] The present disclosure provides a page detection method, which can effectively protect the page data of an application and prevent it from being attacked, so as to improve the security of access to the page data of the application.

[0036] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure, such as Figure 1 shown.

[0037] 101. Insert a detection code into a specified page of an application to detect a specific behavior of the specified page.

[0038] Here, the specific behavior of the specified page detected by the inserted detection code may be abnormal behavior that is not addressed by the protection strategy currently adopted by the application, or may be different behaviors caused by differences in the application's operating environment, or may be normal behavior when a specific time of application operation is reached, or may be any behavior corresponding to a trigger timing that can satisfy a subsequent trigger. This embodiment does not specifically limit this.

[0039] The detection code may be a code written in a scripting language, such as JavaScript code.

[0040] 102. Send a pre-configured Content Security Policy (CSP) rule to the application, so that the application loads the CSP rule.

[0041] 103. Based on the detection of a specific behavior of the designated page by the application executing the detection code, the CSP rule is actively violated, and a control mechanism of the CSP rule is triggered to perform security control processing on the application.

[0042] In this application, the word "specified" in the designated page involved has no special meaning, and is only used to specify the current operation object. Therefore, the designated page is any ordinary page in the application.

[0043] It should be noted that there is no fixed order for executing 101 and 102. 101 may be executed first and then 102, or 102 may be executed first and then 101, or 101 and 102 may be executed simultaneously. This embodiment does not specifically limit this.

[0044] At this point, due to the control mechanism of the CSP rules triggered by the active violation of the CSP rules, it is possible to obtain the application data of the application, such as the application status data, the application operating environment data, etc., and perform reliable security control processing on the application, such as dynamically adjusting the protection logic or CSP rules.

[0045] It should be noted that the execution subject of 101 to 103 may be a server located on the server side, for example, a detection device on the server side.

[0046] It is understandable that the application may be a local program (nativeApp) installed on the local terminal, or may be a webpage program (webApp) of a browser on the local terminal, which is not limited in this embodiment.

[0047] In this way, by inserting a detection code into a designated page of an application to detect a specific behavior of the designated page, and issuing a pre-configured CSP rule to the application so that the application can load the CSP rule, the specific behavior of the designated page can be detected based on the application executing the detection code, and the CSP rule is actively violated. The control mechanism of the CSP rule is triggered to perform security control processing on the application. By actively violating the preset CSP rule through the detection code, the application data of the application is obtained by using the control mechanism of the CSP (for example, a reporting mechanism, etc.), and reliable security control processing of the application is performed, for example, the protection logic or the CSP rule is dynamically adjusted, thereby improving the reliability of page detection.

[0048] Optionally, in a possible implementation of the present embodiment, in 101, the detection code may be specifically inserted into an Internet transfer protocol-based response message of the designated page requested by the application, and then, the Internet transfer protocol-based response message with the detection code inserted may be sent to the application, so that the application can insert the detection code into the designated page.

[0049] Taking HTTP-based page data as an example, two specific methods can be adopted to insert the detection code into the acquired HTTP response message of the designated page requested by the application.

[0050] For example, the detection code may be inserted into an HTTP response message of a designated page requested by the application, and then the HTTP response message with the detection code inserted may be sent to the application so that the application can insert the detection code into the designated page.

[0051] Or, for another example, the detection code may be specifically inserted into the acquired designated page requested by the application, and then the designated page with the detection code inserted therein may be sent to the application.

[0052] Or, for another example, the detection code and the acquired designated page requested by the application are sent to the application, so that the application inserts the detection code into the designated page.

[0053] Optionally, in a possible implementation of this embodiment, in 102, the pre-configured CSP rules may be sent to the application specifically by means of a response message based on an Internet transmission protocol.

[0054] Taking HTTP-based page data as an example, CSP rules can be added to the HTTP response message as part of the response header, for example, Content-Security-Policy-Report-Only:connect-src'self';report-uri / csp-reports.

[0055] Optionally, in a possible implementation of this embodiment, in 103, the operation information of the application obtained by the control mechanism based on the CSP rule may be specifically responded to, and then, security control processing of the application may be performed according to the operation information.

[0056] Specifically, the specified port specified by the port data (e.g., report-uri) in the CSP rule can be used to receive the running information of the application triggered by the application executing the detection code and actively violating the CSP rule, such as the application status data, the application running environment data, etc., and then, security control processing of the application can be performed according to the running information.

[0057] In this application, by inserting detection code in the specified page of the application, abnormal behavior that is not paid attention to by the protection strategy currently adopted by the application can be detected. Based on the detection results, CSP rules can be configured and sent to the application to constrain the behavior of the application.

[0058] In this application, by inserting detection code into the specified page of the application, different behaviors caused by differences in the application's operating environment can be detected. For example, the CSP rules behave differently between different browsers. For example, the form-action instruction will block redirection in the Chrome 63 browser, but will not block redirection in the Firefox 57 browser. Based on the detection results, the application's operating environment can be identified, thereby effectively enhancing the detection capability.

[0059] In the present application, a CSP rule for reporting the application status is pre-configured. By inserting a detection code in a specified page of the application, any behavior corresponding to a trigger timing that can satisfy a subsequent trigger can be detected. For example, when a time such as a specified time or a periodic interval time that requires detection of the application status of the application is reached, the inserted detection code actively violates the pre-configured CSP rule to trigger the reporting mechanism of the CSP rule, and the application status obtained by the application report is reported.

[0060] The following will take HTTP-based page data as an example, and the operation of page request and response through the interaction between the browser and the server as an example to explain the technical solution of the present disclosure in detail. Figure 2 shown.

[0061] 201. The browser sends a page request to the server.

[0062] 202. The detection device intercepts the page request and does not perform any processing.

[0063] 203. The detection device directly forwards the intercepted page request to the server.

[0064] 204. The server returns a page response to the browser according to the page request, wherein the page response carries HTML-based response page content data.

[0065] 205. The detection device intercepts the page response, and inserts the detection code and the pre-configured CSP rule into the page response.

[0066] The detection code is used to detect specific behaviors of the designated page, for example, to periodically detect whether the front-end business interface has been modified.

[0067] 206. The detection device sends a page response with the detection code and pre-configured CSP rules inserted to the browser.

[0068] 207. The browser inserts the detection code into the HTML-based response page content data and loads the CSP rules.

[0069] 208. The browser executes the detection code, detects a specific behavior of the designated page, and actively violates the CSP rule to trigger a reporting mechanism of the CSP rule.

[0070] 209. The browser reports the running information of the application, such as the status data of the application and the running environment data of the application, to the designated port of the detection device specified by the port data (such as report-uri) in the CSP rule.

[0071] At this point, after receiving the reported application operation information, the detection device can perform security control processing on the application according to the application operation information, for example, dynamically adjust the protection logic, dynamically issue CSP rules for preventing specific attack behaviors, etc.

[0072] In this embodiment, a detection code is inserted into a specified page of an application to detect a specific behavior of the specified page, and a pre-configured CSP rule is issued to the application so that the application loads the CSP rule, so that the specific behavior of the specified page can be detected based on the application executing the detection code, and the CSP rule is actively violated. The control mechanism of the CSP rule is triggered to perform security control processing on the application, and the detection code actively violates the preset CSP rule, and the application data of the application is obtained by using the control mechanism of the CSP (for example, a reporting mechanism, etc.), and reliable security control processing of the application is performed, for example, the protection logic or CSP rule is dynamically adjusted, thereby improving the reliability of page detection.

[0073] In addition, the technical solution provided by the present disclosure can effectively enhance the detection capability of CSP.

[0074] In addition, the technical solution provided by the present disclosure can effectively improve the security of application page data access.

[0075] In addition, the technical solution provided by the present disclosure can effectively improve the user experience.

[0076] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0077] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0078] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure, Figure 3 As shown. The page detection device 300 of this embodiment may include a code insertion unit 301, a rule issuing unit 302 and a security control unit 303. Among them, the code insertion unit 301 is used to insert a detection code in a specified page of an application to detect a specific behavior of the specified page; the rule issuing unit 302 is used to issue pre-configured CSP rules to the application so that the application can load the CSP rules; the security control unit 303 is used to perform security control processing on the application based on the control mechanism of the CSP rules triggered by the application executing the detection code to detect a specific behavior of the specified page and actively violating the CSP rules.

[0079] It should be noted that part or all of the page detection device of this embodiment may be a server located on the server side, for example, a detection device on the server side.

[0080] It is understandable that the application may be a local program (nativeApp) installed on the local terminal, or may be a webpage program (webApp) of a browser on the local terminal, which is not limited in this embodiment.

[0081] Optionally, in a possible implementation of this embodiment, the code insertion unit 301 can be specifically used to insert the detection code into an Internet transmission protocol-based response message of the specified page requested by the application; and send the Internet transmission protocol-based response message with the inserted detection code to the application, so that the application can insert the detection code into the specified page.

[0082] Optionally, in a possible implementation of this embodiment, the code insertion unit 301 can be specifically used to insert the detection code into the specified page requested by the application; and send the specified page with the detection code inserted to the application; or send the detection code and the specified page requested by the application to the application, so that the application can insert the detection code into the specified page.

[0083] Optionally, in a possible implementation of this embodiment, the rule issuing unit 302 may be specifically configured to issue the pre-configured CSP rule to the application via a response message based on an Internet transmission protocol.

[0084] Optionally, in a possible implementation of this embodiment, the security control unit 303 can be specifically used to respond to the operation information of the application obtained by the control mechanism based on the CSP rule; and perform security control processing of the application according to the operation information.

[0085] It should be noted that Figure 1 In the corresponding embodiment, the method Figure 2 The detection device in the corresponding embodiment can be implemented by the page detection device provided in this embodiment. Figure 1 and Figure 2 The relevant contents in the embodiments corresponding to any of the figures will not be repeated here.

[0086] In this embodiment, a detection code is inserted into a specified page of an application through a code insertion unit to detect a specific behavior of the specified page, and a rule issuing unit issues a pre-configured CSP rule to the application so that the application can load the CSP rule, so that the security control unit can detect the specific behavior of the specified page based on the application executing the detection code, actively violate the CSP rule, and trigger the control mechanism of the CSP rule to perform security control processing on the application. By detecting that the code actively violates the preset CSP rule, the control mechanism of the CSP (for example, a reporting mechanism, etc.) is used to obtain application data of the application, and reliable security control processing of the application is performed, for example, dynamically adjusting the protection logic or CSP rule, thereby improving the reliability of page detection.

[0087] In addition, the technical solution provided by the present disclosure can effectively enhance the detection capability of CSP.

[0088] In addition, the technical solution provided by the present disclosure can effectively improve the security of application page data access.

[0089] In addition, the technical solution provided by the present disclosure can effectively improve the user experience.

[0090] In the technical solution disclosed herein, the acquisition, storage and application of data based on the Internet transmission protocol are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0091] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0092] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0093] like Figure 4 As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0094] Multiple components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0095] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as a page detection method. For example, in some embodiments, the page detection method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the page detection method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the page detection method in any other appropriate manner (e.g., by means of firmware).

[0096] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0097] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable page detection device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0098] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0099] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0100] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0101] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0102] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0103] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A page detection method, characterized in that: include: Inserting detection code into a specified page of the application to detect specific behavior of the specified page; Sending pre-configured CSP rules to the application so that the application can load the CSP rules; Based on the application executing the detection code to detect a specific behavior of the designated page, actively violating the CSP rule, the control mechanism of the CSP rule is triggered to perform security control processing on the application.

2. The method according to claim 1, characterized in that The inserting of the detection code into the specified page of the application includes: Inserting the detection code into the acquired response message based on the Internet transmission protocol of the designated page requested by the application; A response message based on the Internet transmission protocol in which the detection code is inserted is sent to the application, so that the application can insert the detection code into the designated page.

3. The method according to claim 1, characterized in that The inserting of the detection code into the specified page of the application includes: inserting the detection code into the acquired designated page requested by the application; sending the designated page with the detection code inserted to the application; or The detection code and the acquired designated page requested by the application are sent to the application, so that the application inserts the detection code into the designated page.

4. The method according to claim 1, characterized in that: The sending of the pre-configured CSP rules to the application includes: The pre-configured CSP rules are sent to the application via a response message based on the Internet transmission protocol.

5. The method according to any one of claims 1 to 4, characterized in that The detecting a specific behavior of the designated page based on the application executing the detection code, actively violating the CSP rule, and triggering the control mechanism of the CSP rule to perform security control processing on the application, includes: Operation information of the application obtained in response to a control mechanism based on the CSP rule; The security control processing of the application is performed according to the operation information.

6. A page detection device, characterized in that: include: A code insertion unit, used to insert a detection code into a specified page of an application to detect a specific behavior of the specified page; A rule issuing unit, configured to issue a pre-configured CSP rule to the application so that the application can load the CSP rule; A security control unit is used to perform security control processing on the application based on the control mechanism of the CSP rule triggered by the application executing the detection code and detecting a specific behavior of the designated page, which actively violates the CSP rule.

7. The device according to claim 6, characterized in that The code insertion unit is specifically used for Inserting the detection code into the acquired response message based on the Internet transmission protocol of the designated page requested by the application; as well as A response message based on the Internet transmission protocol in which the detection code is inserted is sent to the application, so that the application can insert the detection code into the designated page.

8. The device according to claim 6, characterized in that The code insertion unit is specifically used for Inserting the detection code into the acquired designated page requested by the application; and sending the designated page with the detection code inserted to the application; or The detection code and the acquired designated page requested by the application are sent to the application, so that the application inserts the detection code into the designated page.

9. The device according to claim 6, characterized in that The rule issuing unit is specifically used for The pre-configured CSP rules are sent to the application via a response message based on the Internet transmission protocol.

10. The device according to any one of claims 6 to 9, characterized in that: The safety control unit is specifically used for Operation information of the application obtained in response to a control mechanism based on the CSP rule; and The security control processing of the application is performed according to the operation information.

11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.

13. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 5.