Website tamper-proofing method and device, storage medium, and electronic device

By monitoring and identifying operation events of website directory files, determining the permissions of the operation process and rejecting unauthorized operations, the problem of inaccurate tamper-proofing in the existing technology is solved, and more efficient and accurate file protection is achieved.

CN112395537BActive Publication Date: 2024-10-15QI AN XIN SECURITY TECH ZHUHAI CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910755856.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-15
Publication Date
2024-10-15
Estimated Expiration
2039-08-15

AI Technical Summary

Technical Problem

In the existing technology, it is difficult to accurately prevent tampering of website directory files, which makes it difficult to prevent hacker attacks and hinders the maintenance and updates of administrators or automated publishing programs.

Method used

By monitoring the operation events of website directory files, identify and determine whether the operation process has operation permissions, and reject operation events without permissions, including monitoring the dynamic feature sequence of file operations at the kernel layer, and obtaining specified information of operation events such as digital signatures and MD5 value to identify the process and allow or deny permissions on access requests.

Benefits of technology

It improves the efficiency and accuracy of file anti-tampering, ensures the security of website directory files, avoids tampering errors, and allows legal operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395537B_ABST
    Figure CN112395537B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for website tamper prevention, a storage medium, and an electronic device, the method comprising: monitoring operation events for website directory files; identifying the operation process of the operation event; judging whether the operation process has the operation authority for the website directory files; and rejecting the operation event when the operation process does not have the operation authority for the website directory files. The present invention solves the technical problem of inaccurate file tamper prevention in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security, and in particular to a method and device for preventing website tampering, a storage medium, and an electronic device. Background Art

[0002] With the popularization and development of the Internet and network applications, a large number of hacker attacks have followed, especially network attacks against the Internet. Among them, tampering with website directory files is a common method used by hackers to attack websites, and it is difficult to prevent tampering with website directory files in real time.

[0003] In the related technology, for file tampering prevention, the main approach is to set operation permissions for designated directories, and any other process is not allowed to modify files under the protected directory. This method can prevent the use of Web service vulnerabilities to modify files under the designated directory, but it will also prevent administrators or automated publishing programs from maintaining and updating the website normally, resulting in inaccurate judgment of tampering of website directory files.

[0004] With respect to the above-mentioned problems existing in the related technologies, no effective solutions have been found so far. Summary of the invention

[0005] In view of this, the embodiments of the present invention provide a method and device for website tamper prevention, a storage medium, and an electronic device, so as to at least solve the technical problem of inaccurate file tamper prevention in the related art.

[0006] According to one embodiment of the present invention, a method for preventing website tampering is provided, comprising: monitoring operation events on website directory files; identifying the operation process of the operation event; determining whether the operation process has the operation permission of the website directory files; and rejecting the operation event if the operation process does not have the operation permission of the website directory files.

[0007] Optionally, monitoring operation events for website directory files includes: monitoring the file operation dynamic feature sequence of the website directory files at the kernel layer; searching for operation events for requesting to execute the operation events according to the file operation dynamic feature sequence, wherein the operation events include one of the following: file creation request, file modification request, file deletion request, file rename request.

[0008] Optionally, determining whether the operating process has operating permissions for the website directory file includes: determining whether the operating process has a first operating permission, and determining whether the directory location where the website directory file is located has a second operating permission, wherein the first operating permission is used to indicate whether the operating process is allowed to execute the operating event, and the second operating permission is used to indicate whether the directory location where the website directory file is located allows the operating event to occur; when the operating process has the first operating permission and the directory location where the website directory file is located has the second operating permission, it is determined that the operating process has operating permissions for the website directory file; when the operating process has the first operating permission, or the directory location where the website directory file is located has the second operating permission, it is determined that the operating process does not have operating permissions for the website directory file.

[0009] Optionally, identifying the operation process of the operation event includes: obtaining specified information carried by the operation event, wherein the specified information includes at least one of the following: the digital signature of the operation event, the process name of the operation event, and the MD5 value of the operation event; and identifying the operation process based on the specified information.

[0010] Optionally, before monitoring operation events on website directory files, the method also includes: monitoring access requests to the website directory files; identifying an access process of the access request; allowing the access request if the access process has access rights to the website directory files; and rejecting the access request if the access process does not have access rights to the website directory files.

[0011] Optionally, after determining whether the operating process has the operating authority for the website directory file, the method further includes: allowing the operating event if the operating process has the operating authority for the website directory file.

[0012] According to another embodiment of the present invention, there is provided a device for preventing website tampering, comprising: a first monitoring module for monitoring operation events on website directory files; a first identification module for identifying the operation process of the operation event; a judgment module for judging whether the operation process has the operation authority of the website directory files; and a rejection module for rejecting the operation event if the operation process does not have the operation authority of the website directory files.

[0013] Optionally, the first monitoring module includes: a monitoring unit, used to monitor the file operation dynamic feature sequence of the website directory file at the kernel layer; a search unit, used to search for an operation event used to request execution of the operation event based on the file operation dynamic feature sequence, wherein the operation event includes one of the following: a file creation request, a file modification request, a file deletion request, and a file rename request.

[0014] Optionally, the judgment module includes: a judgment unit, used to judge whether the operation process has a first operation permission, and whether the directory location where the website directory file is located has a second operation permission, wherein the first operation permission is used to indicate whether the operation process is allowed to execute the operation event, and the second operation permission is used to indicate whether the directory location where the website directory file is located allows the operation event to occur; a determination unit, used to determine that the operation process has the operation permission for the website directory file if the operation process has the first operation permission and the directory location where the website directory file is located has the second operation permission; and to determine that the operation process does not have the operation permission for the website directory file if the operation process has the first operation permission or the directory location where the website directory file is located has the second operation permission.

[0015] Optionally, the first identification module includes: an acquisition unit, used to acquire specified information carried by the operation event, wherein the specified information includes at least one of the following: the digital signature of the operation event, the process name of the operation event, and the MD5 value of the operation event; and an identification unit, used to identify the operation process based on the specified information.

[0016] Optionally, the device also includes: a second monitoring module, used to monitor access requests to the website directory file; a second identification module, used to identify the access process of the access request; a processing module, used to allow the access request if the access process has access rights to the website directory file; and reject the access request if the access process does not have access rights to the website directory file.

[0017] Optionally, the device further includes: allowing the operation event if the operation process has the operation authority of the website directory file.

[0018] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.

[0019] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0020] Through the present invention, operation events on website directory files are monitored, and it is identified and judged whether the execution subject of the operation event has the operation authority to operate the file. When the execution subject does not have the operation authority, the operation event is rejected, thereby achieving the effect of preventing the website directory files from being tampered with, improving the efficiency and accuracy of file tampering prevention, and thus solving the technical problem of inaccurate file tampering prevention in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0022] Figure 1 It is a hardware structure block diagram of a website anti-tampering method according to an embodiment of the present invention applied to a server;

[0023] Figure 2 is a flow chart of a website tamper-proofing method according to an embodiment of the present invention;

[0024] Figure 3 is a flowchart for determining whether an execution subject has the operation authority for an operation event provided by an embodiment of the present invention;

[0025] Figure 4 The present invention is a structural block diagram of a device for defending against attacks on a website according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Example 1

[0029] The method embodiment provided in the first embodiment of the present application can be executed in a server, a computer, a terminal or a similar computing device. Taking running on a computer as an example, Figure 1 FIG. 1 is a hardware structure diagram of a website anti-tampering method according to an embodiment of the present invention applied to a server. Figure 1 As shown, the computer may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the server may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for website anti-tampering in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0031] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0032] In this embodiment, a method for preventing website tampering is provided. Figure 2 is a flow chart of a website anti-tampering method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0033] Step S202, monitoring operation events on website directory files;

[0034] The operation events in this embodiment at least include file operations such as modification, deletion, creation and renaming of website directory files. The website directory file may be a directory file in a specific directory.

[0035] Step S204, identifying the operation process of the operation event;

[0036] The operation process in this embodiment is an execution subject that executes the operation event, such as a process actively triggered by an administrator, or an automated publishing program, an automatically executed process, etc., but is not limited thereto.

[0037] Step S206, determining whether the operation process has the operation authority for the website directory file;

[0038] Step S208: If the operation process does not have the operation authority for the website directory file, the operation event is rejected.

[0039] Through the above steps, through the present invention, the operation events for the website directory files are monitored, and it is identified and judged whether the execution subject of the operation event has the operation authority to operate the file. When the execution subject does not have the operation authority, the operation event is rejected, thereby achieving the effect of preventing the website directory files from being tampered with, improving the efficiency and accuracy of file tampering prevention, and thus solving the technical problem of inaccurate file tampering prevention in the related art.

[0040] Optionally, monitoring the operation events for the website directory files includes: monitoring the file operation dynamic feature sequence of the website directory files at the kernel layer; searching for the operation event for requesting to execute the operation event according to the file operation dynamic feature sequence, wherein the operation event includes one of the following: file creation request, file modification request, file deletion request, and file rename request. In this embodiment, when executing the operation event, the file operation dynamic feature sequence of the operation event is monitored by implementing the call of the monitoring module at the kernel layer, and the operation event that allows the operation event is searched.

[0041] Optionally, determining whether the operating process has operating permissions for the website directory files includes: determining whether the operating process has first operating permissions, and determining whether the directory location where the website directory files are located has second operating permissions, wherein the first operating permissions are used to indicate whether the operating process is allowed to execute operating events, and the second operating permissions are used to indicate whether the directory location where the website directory files are located is allowed to occur operating events; when the operating process has the first operating permissions, and the directory location where the website directory files are located has the second operating permissions, it is determined that the operating process has operating permissions for the website directory files; when the operating process has the first operating permissions, or the directory location where the website directory files are located has the second operating permissions, it is determined that the operating process does not have operating permissions for the website directory files.

[0042] In an alternative embodiment, Figure 3 FIG. 4 is a flowchart of determining whether an execution subject has the operation authority for an operation event according to an embodiment of the present invention. Figure 3 As shown, the following steps are included:

[0043] Step S302: monitor service process access events.

[0044] In this embodiment, after the process is started, the access events of the service process (i.e., the above-mentioned operation process) are monitored (i.e., the above-mentioned monitoring of the operation events for the website directory files) to determine the operation events of the service process accessing the directory files, which at least include: the operation events of creating new directory files; the operation events of modifying directory files; the operation events of deleting directory files; and the operation events of renaming directory files.

[0045] Step S304, determine whether the directory file has access rights. If yes, continue to access the directory file; if not, deny access to prevent hackers from attacking the website directory file.

[0046] Step S306, whether to create or modify files. In this embodiment, it is determined whether the operating process has the operating authority (i.e., the first operating authority) that allows the execution of directory files, such as creating or modifying directory files. If there is no first operating authority, then it is allowed to continue to access the website directory files; if there is the first operating authority, then step S308 is executed.

[0047] Step S308, whether to allow the creation or modification of files. In this embodiment, it is determined whether the directory location where the website directory file is located allows the operation permission of the directory file (i.e., the second operation permission mentioned above). If yes, the service process is allowed to create or modify the directory file; if not, the request to create or modify the directory file is rejected.

[0048] That is to say, if the service process has the first operation permission and the directory location where the file is located has the second operation permission, it is determined that the service process has the operation permission for the website directory file, otherwise it does not.

[0049] Optionally, identifying the operation process of an operation event includes: obtaining specified information carried by the operation event, wherein the specified information includes at least one of the following: a digital signature of the operation event, a process name of the operation event, and an MD5 value of the operation event; and identifying the operation process based on the specified information.

[0050] Optionally, before monitoring operation events on website directory files, it also includes: monitoring access requests to website directory files; identifying the access process of the access request; allowing the access request if the access process has access rights to the website directory files; and denying the access request if the access process does not have access rights to the website directory files.

[0051] According to the above embodiment, Figure 3 As shown in , by monitoring the service process access events, it is determined whether the service process has the access rights to the directory files. If so, the directory files are accessed; if not, the access is denied, thereby preventing unauthorized processes from accessing the website directory files.

[0052] Optionally, after determining whether the operating process has the operating authority for the website directory file, the method further includes: if the operating process has the operating authority for the website directory file, allowing the operating event.

[0053] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0054] Example 2

[0055] In this embodiment, a device for attack defense of a website is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0056] Figure 4 is a structural block diagram of a device for defending against attacks on a website according to an embodiment of the present invention. Figure 4 As shown, the device includes: a first monitoring module 402, used to monitor operation events for website directory files; a first identification module 404, connected to the above-mentioned first monitoring module 402, used to identify the operation process of the operation event; a judgment module 406, connected to the above-mentioned first identification module 404, used to judge whether the operation process has the operation authority of the website directory file; a rejection module 408, connected to the above-mentioned judgment module 406, used to reject the operation event when the operation process does not have the operation authority of the website directory file.

[0057] Optionally, the first monitoring module 402 includes: a monitoring unit, used to monitor the file operation dynamic feature sequence of the website directory file at the kernel layer; a search unit, used to search for an operation event used to request execution of the operation event according to the file operation dynamic feature sequence, wherein the operation event includes one of the following: a file creation request, a file modification request, a file deletion request, and a file rename request.

[0058] Optionally, the judgment module 406 includes: a judgment unit, used to judge whether the operation process has a first operation permission, and to judge whether the directory location where the website directory file is located has a second operation permission, wherein the first operation permission is used to indicate whether the operation process is allowed to execute the operation event, and the second operation permission is used to indicate whether the directory location where the website directory file is located allows the operation event to occur; a determination unit, used to determine that the operation process has the operation permission for the website directory file if the operation process has the first operation permission and the directory location where the website directory file is located has the second operation permission; and to determine that the operation process does not have the operation permission for the website directory file if the operation process has the first operation permission or the directory location where the website directory file is located has the second operation permission.

[0059] Optionally, the first identification module 404 includes: an acquisition unit, used to acquire specified information carried by the operation event, wherein the specified information includes at least one of the following: a digital signature of the operation event, a process name of the operation event, and an MD5 value of the operation event; and an identification unit, used to identify the operation process based on the specified information.

[0060] Optionally, the above-mentioned device also includes: a second monitoring module, used to monitor access requests to the website directory file; a second identification module, used to identify the access process of the access request; a processing module, used to allow the access request if the access process has access rights to the website directory file; and reject the access request if the access process does not have access rights to the website directory file.

[0061] Optionally, the above-mentioned device also includes: allowing the operation event when the operation process has the operation authority of the website directory file.

[0062] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0063] Example 3

[0064] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0065] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0066] S1, monitors the operation events on the website directory files;

[0067] S2, identifying the operation process of the operation event;

[0068] S3, determining whether the operation process has the operation authority of the website directory file;

[0069] S4: If the operation process does not have the operation authority for the website directory file, reject the operation event.

[0070] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0071] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0072] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0073] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0074] S1, monitors the operation events on the website directory files;

[0075] S2, identifying the operation process of the operation event;

[0076] S3, determining whether the operation process has the operation authority of the website directory file;

[0077] S4: If the operation process does not have the operation authority for the website directory file, reject the operation event.

[0078] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0079] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0080] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0081] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, 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. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0082] The units described as separate components may or may not be physically separated, and the components shown 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 solution of this embodiment.

[0083] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0084] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0085] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for preventing website tampering, It is characterized in that include: Monitor operation events on website directory files; Identify the operation process of the operation event; Determine whether the operation process has the operation authority of the website directory file; If the operation process does not have the operation authority for the website directory file, reject the operation event; Determining whether the operation process has the operation authority of the website directory file includes: Determine whether the operation process has a first operation permission, and determine whether the directory location where the website directory file is located has a second operation permission, wherein the first operation permission is used to indicate whether the operation process is allowed to execute the operation event, and the second operation permission is used to indicate whether the directory location where the website directory file is located is allowed to occur the operation event; When the operation process has the first operation permission and the directory location where the website directory file is located has the second operation permission, it is determined that the operation process has the operation permission for the website directory file; when the operation process has the first operation permission or the directory location where the website directory file is located has the second operation permission, it is determined that the operation process does not have the operation permission for the website directory file; Monitoring operations on website directory files include: Monitoring the dynamic feature sequence of file operations of the website directory files at the kernel layer; An operation event for requesting to execute the operation event is searched according to the file operation dynamic feature sequence.

2. The method according to claim 1, It is characterized in that The operation event includes one of the following: a file creation request, a file modification request, a file deletion request, and a file rename request.

3. The method according to claim 1, It is characterized in that The operation process of identifying the operation event includes: Acquire designated information carried by the operation event, wherein the designated information includes at least one of the following: a digital signature of the operation event, a process name of the operation event, and an MD5 value of the operation event; The operation process is identified according to the specified information.

4. The method according to claim 1, It is characterized in that Before monitoring the operation events on the website directory files, the method further includes: Monitoring access requests to directory files on the website; identifying an access process for the access request; If the access process has the access rights to the website directory file, the access request is allowed; if the access process does not have the access rights to the website directory file, the access request is denied.

5. The method according to claim 1, It is characterized in that After determining whether the operation process has the operation authority of the website directory file, the method further includes: In the case where the operation process has the operation authority for the website directory file, the operation event is allowed.

6. A device for preventing website tampering, It is characterized in that include: The first monitoring module is used to monitor operation events on website directory files; A first identification module, used for identifying the operation process of the operation event; A judgment module, used to judge whether the operation process has the operation authority of the website directory file; A rejection module, used for rejecting the operation event if the operation process does not have the operation authority of the website directory file; The judgment module includes: a judgment unit, used to judge whether the operation process has a first operation permission, and to judge whether the directory location where the website directory file is located has a second operation permission, wherein the first operation permission is used to indicate whether the operation process is allowed to execute the operation event, and the second operation permission is used to indicate whether the directory location where the website directory file is located allows the operation event to occur; a determination unit, used to determine that the operation process has the operation permission for the website directory file if the operation process has the first operation permission and the directory location where the website directory file is located has the second operation permission; and to determine that the operation process does not have the operation permission for the website directory file if the operation process has the first operation permission or the directory location where the website directory file is located has the second operation permission; The first monitoring module includes: a monitoring unit, which is used to monitor the file operation dynamic feature sequence of the website directory file at the kernel layer; and a search unit, which is used to search for an operation event for requesting to execute the operation event according to the file operation dynamic feature sequence.

7. The device according to claim 6, It is characterized in that The first monitoring module includes: A monitoring unit, used for monitoring the dynamic characteristic sequence of file operations of the website directory files at the kernel layer; A search unit is used to search for an operation event for requesting to execute the operation event according to the file operation dynamic feature sequence, wherein the operation event includes one of the following: a file creation request, a file modification request, a file deletion request, and a file rename request.

8. A storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 5 when executed.

9. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.