CN112532589A - Webpage monitoring method and device and storage medium - Google Patents

Webpage monitoring method and device and storage medium Download PDF

Info

Publication number
CN112532589A
CN112532589A CN202011230161.1A CN202011230161A CN112532589A CN 112532589 A CN112532589 A CN 112532589A CN 202011230161 A CN202011230161 A CN 202011230161A CN 112532589 A CN112532589 A CN 112532589A
Authority
CN
China
Prior art keywords
directory
monitoring
webpage
value
backup
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011230161.1A
Other languages
Chinese (zh)
Inventor
陈华
吴中华
樊阳生
彭映龙
吴国华
丁聪霜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gctech Technology Co ltd
Original Assignee
Beijing Gctech Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gctech Technology Co ltd filed Critical Beijing Gctech Technology Co ltd
Priority to CN202011230161.1A priority Critical patent/CN112532589A/en
Publication of CN112532589A publication Critical patent/CN112532589A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

The application relates to a method, a device and a storage medium for monitoring a webpage, wherein the method comprises the following steps: setting modification authority of the directory; the directory is a directory for monitoring a webpage source code; the modification authority comprises non-modifiable and modifiable; if the modification authority is set to be not modifiable, generating a check value of the directory by using a first hash algorithm, and storing the check value; starting a webpage monitoring process; the webpage monitoring process comprises the following steps: acquiring the catalog in real time, and generating a monitoring value of the catalog by utilizing the first hash algorithm; obtaining a monitoring result of the webpage according to the monitoring value and the verification value; if the monitoring value is the same as the check value, the monitoring result is not tampered; and if the detection result is different, the detection result is tampered. The method and the device have the effects of avoiding false modification and false detection, being high in webpage monitoring reliability, being higher in monitoring speed and being small in memory occupation amount.

Description

Webpage monitoring method and device and storage medium
Technical Field
The present application relates to the field of network information security technologies, and in particular, to a method, an apparatus, and a storage medium for monitoring a web page.
Background
With the continuous development of the Web (World Wide Web) technology, the Web is widely used, but meanwhile, a large number of hackers infiltrate, dig leaks and attack, and in order to ensure the security of Web application, security policy deployment is required. The main protection measures adopted at present include:
(1) installing various antivirus software to ensure the safe operation of the computer;
(2) the transmitted data is encrypted by using SSL (Secure Sockets Layer) technology.
Although the above protection measures can close unnecessary exposed ports and filter some illegal information, the Web application cannot be secured, because the ports 80 and 443 must be opened to ensure the Web service for Web browsing, and there is still a risk of tampering with the Web page through the opened ports.
Disclosure of Invention
In order to reduce the risk of webpage tampering, the application provides a webpage monitoring method, a webpage monitoring device and a storage medium.
In a first aspect, the present application provides a method for monitoring a web page, which adopts the following technical scheme:
a method of web page monitoring, comprising:
setting modification authority of the directory; the directory is a directory for monitoring a webpage source code; the modification authority comprises non-modifiable and modifiable;
if the modification authority is set to be not modifiable, generating a check value of the directory by using a first hash algorithm, and storing the check value;
starting a webpage monitoring process; the webpage monitoring process comprises the following steps:
acquiring the catalog in real time, and generating a monitoring value of the catalog by utilizing the first hash algorithm;
obtaining a monitoring result of the webpage according to the monitoring value and the verification value; if the monitoring value is the same as the check value, the monitoring result is not tampered; and if the detection result is different, the detection result is tampered.
By adopting the technical scheme, the webpage is prevented from being illegally tampered on the premise of ensuring that legal modification is not covered, the reliability of webpage monitoring is improved, and the speed of performing the hash algorithm on the directory in real time is higher and the memory occupation amount is reduced because the directory is much smaller than the source code of the webpage.
Preferably, the generating the check value of the directory by using the first hash algorithm includes:
encrypting the catalog through a first hash algorithm to obtain a hash value;
acquiring a first secret key;
and splicing the hash value and the first key, and taking the obtained character string as a check value of the catalogue.
By adopting the technical scheme, the risk of tampering the check value can be reduced, and the reliability of the webpage monitoring result is improved, so that the safety of the webpage is improved.
Preferably, the obtaining the directory in real time and generating the monitored value of the directory by using the first hash algorithm includes:
acquiring a directory of a monitored webpage source code in real time;
encrypting the catalog obtained each time through the first hash algorithm to obtain the hash value of the catalog obtained each time;
acquiring a first secret key;
and splicing the hash value obtained each time with the first key, and taking the character string obtained by splicing as the monitoring value of the directory obtained each time.
By adopting the technical scheme, the reliability of the webpage monitoring result can be improved, so that the safety of the webpage is improved.
Preferably, if the modification permission is set as a non-modifiable permission, before starting the web page monitoring process, the method further comprises the steps of backing up the directory to obtain a backup directory and storing the backup directory;
and starting a webpage monitoring process, and if the monitoring result is tampered, recovering the directory of the monitored webpage source code by using the backup directory to ensure that the directory is the same as the backup directory.
By adopting the technical scheme, when the webpage is tampered, the webpage can be quickly restored to the version before being tampered, the use of a user is not influenced, and the user experience is improved.
Preferably, the backing up the directory to obtain a backup directory and storing the backup directory includes:
backing up the catalog to obtain a backup catalog, and storing the backup catalog in a specified first catalog according to backup time;
starting a webpage monitoring process, and if the monitoring result is tampered, further comprising:
inputting a specified time;
searching the first catalog according to the specified time, and searching the backup catalog with the backup time closest to the specified time;
and restoring the directory of the monitored webpage source code by using the backup directory to ensure that the directory is the same as the backup directory.
By adopting the technical scheme, when the webpage is tampered, the webpage can be quickly restored to any specified version, and the flexibility is better.
Preferably, the modification authority is set to be modifiable, and the web page monitoring process is stopped.
By adopting the technical scheme, the method avoids the false detection of the legal modification, enables the legal modification to be covered and improves the monitoring stability.
In a second aspect, the present application provides a device for monitoring a web page, which adopts the following technical solution:
an apparatus for web page monitoring, comprising:
the permission setting module is used for setting the modification permission of the directory; the directory is a directory for monitoring a webpage source code; the modification authority comprises non-modifiable and modifiable;
the verification module is used for generating a verification value of the directory by using a first hash algorithm when the modification permission is set to be not modifiable, and storing the verification value;
the webpage monitoring module is used for starting a webpage monitoring process and monitoring a webpage; wherein the web page monitoring process is configured to:
acquiring the catalog in real time, and generating a monitoring value of the catalog by utilizing the first hash algorithm;
obtaining a monitoring result of the webpage according to the monitoring value and the verification value stored by the verification module; if the monitoring value is the same as the check value, the monitoring result is not tampered; and if the detection result is different, the detection result is tampered.
By adopting the technical scheme, the webpage is prevented from being illegally tampered, the reliability of webpage monitoring is improved, and the hash algorithm is faster to the directory in real time due to the fact that the directory is much smaller than the source code of the webpage, and the memory occupation amount is reduced.
Preferably, the verification module includes:
the first hash algorithm unit is used for encrypting the catalogue through a first hash algorithm to obtain a hash value;
a first key acquisition unit configured to acquire a first key;
and the check value generating unit is used for splicing the hash value and the first key and taking the obtained character string as the check value of the directory.
By adopting the technical scheme, the risk of tampering the check value can be reduced, and the reliability of the webpage monitoring result is improved, so that the safety of the webpage is improved.
Preferably, the device further comprises a directory backup module;
when the modification authority is set to be an unmodified authority, the directory backup module backs up the directory to obtain a backup directory and stores the backup directory;
and if the monitoring result monitored by the webpage monitoring module is tampered, restoring the directory of the monitored webpage source code by using the backup directory to enable the directory to be the same as the backup directory.
By adopting the technical scheme, when the webpage is tampered, the webpage can be quickly restored to the version before being tampered, the use of a user is not influenced, and the user experience is improved.
In a third aspect, the present application provides a computer-readable storage medium storing computer-executable instructions for performing the method of monitoring a web page according to the first aspect.
In summary, the present application includes at least one of the following beneficial technical effects:
1. by combining modification authority with real-time monitoring of a webpage directory, the real-time monitoring of the webpage is realized by monitoring the directory of the webpage source code in real time, the webpage is prevented from being illegally tampered, not only is the false detection of legal modification avoided, and the reliability of webpage monitoring is improved, but also the hash algorithm speed of the directory is higher in real time due to the fact that the directory is much smaller than the webpage source code, and the memory occupation amount is reduced;
2. the check value used for monitoring the webpage is in a mode of combining multiple encryption algorithms, so that the risk of tampering the check value is reduced, and the reliability of the webpage monitoring result is improved, thereby improving the safety of the webpage;
3. when the modification permission setting is determined to be non-modifiable, a check value and a directory backup are triggered to be generated, and when the webpage is tampered, the webpage can be quickly restored to the version before the webpage is tampered, so that not only can the user experience be improved, but also the backup directory and the check value for restoration can be guaranteed to be the latest directory, and the reliability of a monitoring result is improved.
Drawings
Fig. 1 is a flowchart of a method for web page monitoring provided in embodiment 1 of the present application;
fig. 2 is a flowchart of step S200 provided in embodiment 1 of the present application;
fig. 3 is a flowchart of step S400 provided in embodiment 1 of the present application;
fig. 4 is a flowchart of a method for web page monitoring provided in embodiment 3 of the present application;
fig. 5 is a block diagram of a structure of a device for web page monitoring provided in embodiment 3 of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to fig. 1-5 and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application discloses a method for monitoring web pages, which can be applied to websites, can monitor whether the web pages are illegally tampered by monitoring catalogs of web page source codes, can also be applied to a safety protection platform, and can monitor whether the web pages of a plurality of websites are illegally tampered by monitoring the safety protection platform, and the method comprises the following steps:
setting modification authority of the directory; the directory is a directory for monitoring a webpage source code, and the modification authority comprises non-modification and modification;
if the modification authority is set to be not modifiable, generating a check value of the directory by using a first hash algorithm, and storing the check value;
starting a webpage monitoring process; the webpage monitoring process comprises the following steps:
acquiring a directory in real time, and generating a monitoring value of the directory by using a first hash algorithm;
obtaining a monitoring result of the webpage according to the monitoring value and the check value; if the monitoring value is the same as the check value, the monitoring result is not tampered; if not, the monitoring result is that the card is tampered.
In the embodiment, the modification authority is combined with the real-time monitoring of the webpage directory, and on the premise of ensuring that legal modification is not covered by the security protection of the webpage, the real-time monitoring of the webpage is realized by monitoring the directory of the webpage source code in real time, so that the webpage is prevented from being illegally tampered, the reliability of webpage monitoring is improved, and the hash algorithm speed of the directory is higher in real time and the memory occupation amount is reduced because the directory is much smaller than the webpage source code.
Example 1
Referring to fig. 1, as an embodiment of a method for web page monitoring, a method for web page monitoring includes the steps of:
s100, when the modification authority of the catalog of the monitoring webpage source code is set according to the requirement, judging whether the set modification authority is not modifiable, and if the modification authority is not modifiable, executing S200; otherwise, step S700 is executed.
The modification authority of the embodiment can be set to be modifiable or not; when the directory of the monitored webpage source code needs to be legally modified, the modification permission is set to be modifiable, the directory is modified legally (the modification is authorized), and the webpage monitoring process is triggered to stop when the modification permission is set to be modifiable, so that the legal modification is prevented from being covered by the webpage monitoring process; when the directory does not need to be modified or the modification is completed, the modification permission is set to be not modifiable, and at the moment, if the directory of the monitored webpage source code is modified to be illegally modified, the step S200 is triggered to be executed, the monitoring on the directory is started, and the directory is prevented from being illegally tampered; in this embodiment, the modification permission may directly adopt the existing read-write permission, that is, the read-only permission is not modifiable, and the read-write permission is modifiable.
S200, generating a check value of the directory by using a first hash algorithm, and storing the check value in a database; in the embodiment, the check value is regenerated every time the modification permission is set as non-modifiable, and the check value stored in the database is updated, so that the check value is generated according to the latest webpage source code, the inconsistency between the check value and the monitored value is ensured to be illegally tampered instead of legally tampered, and the misjudgment is avoided; in this embodiment, the storage check value database may be set in a server of a web page or a third-party server other than the web page server, in order to prevent the check value from being modified and improve the reliability of the check value, the server in which the storage check value database is located is preferably selected not to be a server corresponding to the web page.
Step S300, starting a webpage monitoring process.
And S400, acquiring a catalog of the webpage source code in real time, and calculating the catalog acquired each time by using a first hash algorithm to generate a monitoring value of the catalog acquired each time.
Step S500, judging whether the monitoring value is the same as the check value, if so, indicating that the webpage is not tampered, and executing step S400; otherwise, the web page is tampered with, and step S600 is executed.
And S600, recording and outputting a monitoring result as tampered, and carrying out safety alarm.
Step S700, stopping the webpage monitoring process, and legally modifying the webpage source code.
The embodiment combines modification authority with real-time monitoring of the webpage directory, and ensures that legal modification is not covered when the real-time monitoring of the webpage is realized by monitoring the directory of the webpage source code in real time, thereby improving the reliability of webpage monitoring and avoiding misjudgment; in addition, because the directory is much smaller than the webpage source code, the speed of carrying out the hash algorithm on the directory in real time is higher, and the memory occupation amount is reduced.
Example 2
In order to improve the security of the check value and the reliability of the monitor value and prevent the check value and the source code directory from being tampered with, in this embodiment, referring to fig. 2, step S200 of this embodiment includes the following steps:
step S201, obtaining a catalogue of webpage source codes.
Step S202, the obtained catalog is encrypted through a first hash algorithm to obtain a hash value.
Step S203, obtaining a first key, in this embodiment, the first key is a character string obtained by performing algorithm random calculation, and may be obtained by calculation in real time, or may be calculated and matched with a first key for each website source code, and then is preset in a server of the monitored website or a server of the security platform.
And step S204, splicing the hash value and the first key, and taking the obtained character string as a check value of the directory. In this embodiment, the first key may be spliced before the hash value or spliced after the hash value, and the specific splicing position is not limited in this embodiment.
Accordingly, referring to fig. 3, step S400 of the present embodiment includes the following steps:
step 401, obtaining a directory of a source code of a monitoring webpage and a preset first key in real time.
Step 402, encrypting the obtained catalogue each time through a first hash algorithm to obtain a hash value of the obtained catalogue each time.
And 403, splicing the hash value obtained each time with the first key, and taking the character string obtained by splicing as the monitoring value of the directory obtained each time.
In the embodiment, when the check value or the monitoring value is obtained, the catalog of the webpage source code is encrypted through the hash algorithm to obtain the hash value, the hash value can be changed along with the change of the catalog of the input webpage source code, so that the catalog of the webpage source code of each version corresponds to a unique hash value, in order to increase the tampering difficulty, the hash algorithm is combined with the encryption of the secret key, a first secret key is randomly distributed to the catalog of the webpage source code of each version, the first secret key and the hash value are spliced to realize secondary encryption, and therefore the tampering of the check value or the monitoring value can be realized only by simultaneously obtaining the hash algorithm and the first secret key, the tampering risk of the check value is effectively reduced, the safety of the check value and the reliability of the monitoring value are improved, and the reliability of the monitoring result is improved.
Example 3
In order to quickly restore an original webpage after a webpage is tampered, the implementation backups a directory of a source code of a current version and stores the backup directory each time a modification authority is set to be not modifiable, and restores the directory of the source code of the webpage by using the backup directory when the webpage is tampered, so that the webpage is restored, and thus the restored webpage version can be guaranteed to be the latest version, and at the moment, referring to fig. 4, the webpage monitoring method provided by the embodiment of the application comprises the following steps:
step A100, when the modification right of the catalog of the monitoring webpage source code is set according to the requirement, judging whether the set modification right is not modifiable, and if the modification right is not modifiable, executing the step A200; otherwise, step a800 is performed.
Step A200, obtaining a directory of the webpage source code, backing up the obtained directory to obtain a backup directory, and storing the backup directory in a specified position, wherein the backup directory can be stored in a server of the webpage or a server of the safety protection platform.
Step A300, generating a check value of the catalog by using a first hash algorithm, and storing the check value in a database.
Step A400, starting a webpage monitoring process.
Step A500, obtaining a catalog of a webpage source code in real time, and calculating the catalog obtained each time by using a first hash algorithm to generate a monitoring value of the catalog obtained each time.
Step A600, judging whether the monitoring value is the same as the check value, if so, indicating that the webpage is not tampered, executing step A500, and continuing to monitor the webpage; otherwise, the webpage is indicated to be tampered, and step a700 is executed.
And step A700, outputting the monitoring result as tampered, performing safety alarm, and recovering the directory of the monitored webpage source code by using the backup directory to enable the directory to be the same as the backup directory. The embodiment can directly replace the tampered directory with the backup directory.
In this embodiment, when the monitoring result is that the operation and maintenance personnel have been tampered with, the method further includes recording the tampering time, the tampered directory name and the tampered content in a tampering log, so as to provide a basis for subsequent maintenance and maintenance personnel to perform maintenance; the tampered content is obtained by comparing the backup catalog with the tampered current catalog, and the content of the tampered current catalog, which is different from the backup catalog, is the tampered content.
Step A800, stopping the webpage monitoring process, and legally modifying the webpage source code.
In order to flexibly select any version of the web page for recovery, in step a200 of this embodiment, the backing up the obtained directory to obtain a backup directory, and storing the backup directory in a specified location includes: the method comprises the steps of backing up a directory of a webpage source code to obtain a backup directory, and storing the backup directory under a specified first directory (a specified position, which can be a website server or a website server) according to backup time, wherein a plurality of backup directories with different backup times exist under the first directory.
Correspondingly, starting a webpage monitoring process, and if the monitoring result is tampered, further comprising:
inputting a specified time (specified version);
searching the first catalog according to the specified time, and searching the backup catalog with the backup time closest to the specified time (the backup catalog with the minimum absolute value of the difference between the backup time and the specified time);
and restoring the directory of the monitored webpage source code by using the searched backup directory to ensure that the directory is the same as the backup directory.
The embodiment of the application further discloses a device for monitoring the webpage, wherein a B/S framework (browser and server framework mode) is adopted, system management is achieved through Web access, a user interface is achieved through the browser, other modules are deployed on the server, a user logs in and accesses the server through the user interface on the browser, and if http:// system IP is input in the browser for logging in. The background management interface takes a layer template as a main body and is written by using Python language, so that the interface is simple and the function is easy to understand. Referring to fig. 5, an apparatus for web page monitoring includes:
the authority setting module 10 is used for setting the modification authority of the catalog; the directory is a directory of all webpage source codes of the monitoring website, and the modification authority includes non-modification and modification.
And the verification module 20 is used for generating a verification value of the directory by using a first hash algorithm and storing the verification value when the permission setting module 10 modifies the permission setting to be not modifiable.
The webpage monitoring module 30 is used for starting a webpage monitoring process to monitor the webpage after the verification module 20 stores the verification value; the webpage monitoring process is configured as follows:
acquiring the catalog in real time, and generating a monitoring value of the catalog of the webpage source code by using a first hash algorithm;
obtaining a monitoring result of the webpage according to the monitoring value and the check value stored by the check module; if the monitoring value is the same as the check value, the monitoring result is not tampered; if not, the monitoring result is that the card is tampered.
In the embodiment, modification authority is combined with real-time monitoring of a webpage directory, real-time monitoring of the webpage is realized by monitoring the directory of the webpage source code in real time, the webpage is prevented from being illegally tampered, a check value is generated by triggering firstly when the modification authority is set to be non-modifiable, a monitoring process is started, the check value for monitoring comparison is ensured to be the latest directory, legal modification false detection and false detection that the check value is not updated in time are avoided, and the reliability of the monitoring result of the webpage is improved; in addition, because the directory is much smaller than the webpage source code, the speed of carrying out the hash algorithm on the directory in real time is higher, and the memory occupation amount is reduced.
In the embodiment of the present application, in order to improve the security of the check value, the check module 20 includes:
the first hash algorithm unit is used for encrypting the catalogue through a first hash algorithm to obtain a hash value;
the first key acquisition unit is used for acquiring a first key, and obtaining the first key through algorithm calculation or presetting the first key in a server of a website in advance;
and the check value generating unit is used for splicing the hash value obtained by the first hash algorithm unit and the first key obtained by the first key obtaining unit, taking the obtained character string as the check value of the directory, and obtaining the check value of 1231456789abcd4321 after splicing if the hash value is 1231456789 and the first key is abcd 4321.
Accordingly, the web page monitoring module 30 includes:
the catalog acquisition unit is used for acquiring a catalog of the source code of the monitoring webpage in real time;
the second hash algorithm unit encrypts the directory acquired by the directory acquisition unit each time through the first hash algorithm to obtain the hash value of the directory acquired each time;
a second key acquisition unit that acquires the first key;
and the monitoring value generating unit is used for splicing the hash value obtained by the second hash algorithm unit and the first key each time to obtain the monitoring value of the directory obtained each time.
In this embodiment, the apparatus for web page monitoring further includes a directory backup module;
when the modification authority is set to be the non-modification authority, the directory backup module backups the directory to obtain a backup directory and stores the obtained backup directory; in this embodiment, when the modification right is set as the non-modifiable right, the directory backup module and the verification module may be triggered at the same time to start the generation of the directory backup and the verification value; the monitoring module can also be triggered in sequence, the specific sequence is not limited, and the web monitoring module starts to work only after the catalog backup module and the verification module are executed.
In this embodiment, when the monitoring result obtained by the web page monitoring module is tampered, the directory of the monitored web page source code is restored by using the backup directory stored by the directory backup module, so that the directory is the same as the backup directory.
In this embodiment, the system further includes a user login module, configured to log in the web page monitoring device according to the account and the password registered by the user, where the user login module includes, but is not limited to:
the user registration unit is used for adding an account of a user or an administrator and setting or modifying a login password of the account; in this embodiment, when adding an account, in order to ensure the uniqueness of a login user name corresponding to the added account, when setting a login user name of each account, a login user name list of a current device is searched according to the set login user name, if a corresponding login user name exists in the login user name list, the user is prompted to repeat the login user name and fail the setting, if not, the setting is successful, and the set login user name is added to the login user name list.
And the user login unit is used for logging in a webpage monitoring device through a login user name and a login password of the account.
In addition, an embodiment of the present application further discloses a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are used to execute a method for monitoring a webpage in embodiment 1, embodiment 2, or embodiment 3 of the present application.
The foregoing is a preferred embodiment of the present application and is not intended to limit the scope of the application in any way, and any features disclosed in this specification (including the abstract and drawings) may be replaced by alternative features serving equivalent or similar purposes, unless expressly stated otherwise. That is, unless expressly stated otherwise, each feature is only an example of a generic series of equivalent or similar features.

Claims (10)

1. A method for web page monitoring, comprising:
setting modification authority of the directory; the directory is a directory for monitoring a webpage source code; the modification authority comprises non-modifiable and modifiable;
if the modification authority is set to be not modifiable, generating a check value of the directory by using a first hash algorithm, and storing the check value;
starting a webpage monitoring process; the webpage monitoring process comprises the following steps:
acquiring the catalog in real time, and generating a monitoring value of the catalog by utilizing the first hash algorithm;
obtaining a monitoring result of the webpage according to the monitoring value and the verification value; if the monitoring value is the same as the check value, the monitoring result is not tampered; and if the detection result is different, the detection result is tampered.
2. The method for web page monitoring as claimed in claim 1, wherein the generating the check value of the directory by using the first hash algorithm comprises:
encrypting the catalog through a first hash algorithm to obtain a hash value;
acquiring a first secret key;
and splicing the hash value and the first key, and taking the obtained character string as a check value of the catalogue.
3. The method for web page monitoring as claimed in claim 2, wherein the obtaining the directory in real time and generating the monitored value of the directory using the first hashing algorithm comprises:
acquiring a directory of a monitored webpage source code in real time;
encrypting the catalog obtained each time through the first hash algorithm to obtain the hash value of the catalog obtained each time;
acquiring a first secret key;
and splicing the hash value obtained each time with the first key, and taking the character string obtained by splicing as the monitoring value of the directory obtained each time.
4. The method for web page monitoring according to claim 1, wherein if the modification right is set as a non-modification right, before starting the web page monitoring process, the method further comprises backing up the directory to obtain a backup directory and storing the backup directory;
and starting a webpage monitoring process, and if the monitoring result is tampered, recovering the directory of the monitored webpage source code by using the backup directory to ensure that the directory is the same as the backup directory.
5. The method for web page monitoring as claimed in claim 4, wherein the backing up the directory to obtain a backup directory and storing the backup directory comprises:
backing up the catalog to obtain a backup catalog, and storing the backup catalog in a specified first catalog according to backup time;
starting a webpage monitoring process, and if the monitoring result is tampered, further comprising:
inputting a specified time;
searching the first catalog according to the specified time, and searching the backup catalog with the backup time closest to the specified time;
and restoring the directory of the monitored webpage source code by using the backup directory to ensure that the directory is the same as the backup directory.
6. The method for web page monitoring according to claim 1, wherein the modification authority is set to be modifiable, and the web page monitoring process is stopped.
7. An apparatus for web page monitoring, comprising:
the permission setting module is used for setting the modification permission of the directory; the directory is a directory for monitoring a webpage source code; the modification authority comprises non-modifiable and modifiable;
the verification module is used for generating a verification value of the directory by using a first hash algorithm when the modification permission is set to be not modifiable, and storing the verification value;
the webpage monitoring module is used for starting a webpage monitoring process and monitoring a webpage; wherein the web page monitoring process is configured to:
acquiring the catalog in real time, and generating a monitoring value of the catalog by utilizing the first hash algorithm;
obtaining a monitoring result of the webpage according to the monitoring value and the verification value stored by the verification module; if the monitoring value is the same as the check value, the monitoring result is not tampered; and if the detection result is different, the detection result is tampered.
8. The apparatus for web page monitoring as claimed in claim 7, wherein the verification module comprises:
the first hash algorithm unit is used for encrypting the catalogue through a first hash algorithm to obtain a hash value;
a first key acquisition unit configured to acquire a first key;
and the check value generating unit is used for splicing the hash value and the first key and taking the obtained character string as the check value of the directory.
9. The web page monitoring device of claim 7, further comprising a directory backup module;
when the modification authority is set to be an unmodified authority, the directory backup module backs up the directory to obtain a backup directory and stores the backup directory;
and if the monitoring result monitored by the webpage monitoring module is tampered, restoring the directory of the monitored webpage source code by using the backup directory to enable the directory to be the same as the backup directory.
10. A computer-readable storage medium storing computer-executable instructions for performing a method of web page monitoring as claimed in any one of claims 1 to 6.
CN202011230161.1A 2020-11-06 2020-11-06 Webpage monitoring method and device and storage medium Pending CN112532589A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011230161.1A CN112532589A (en) 2020-11-06 2020-11-06 Webpage monitoring method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011230161.1A CN112532589A (en) 2020-11-06 2020-11-06 Webpage monitoring method and device and storage medium

Publications (1)

Publication Number Publication Date
CN112532589A true CN112532589A (en) 2021-03-19

Family

ID=74979846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011230161.1A Pending CN112532589A (en) 2020-11-06 2020-11-06 Webpage monitoring method and device and storage medium

Country Status (1)

Country Link
CN (1) CN112532589A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114201370A (en) * 2022-02-21 2022-03-18 山东捷瑞数字科技股份有限公司 Webpage file monitoring method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101482887A (en) * 2009-02-18 2009-07-15 北京数码视讯科技股份有限公司 Anti-tamper verification method for key data in database
US20130347109A1 (en) * 2012-06-21 2013-12-26 Cisco Technology, Inc. Techniques for Detecting Program Modifications
CN108629197A (en) * 2017-03-21 2018-10-09 中国航发商用航空发动机有限责任公司 File access control method and system for the integration environment
CN109257340A (en) * 2018-08-29 2019-01-22 北京中科锐链科技有限公司 A kind of website falsification-proof system and method based on block chain
CN111835706A (en) * 2020-05-27 2020-10-27 平安普惠企业管理有限公司 Method and device for detecting malicious extension of browser and computer equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101482887A (en) * 2009-02-18 2009-07-15 北京数码视讯科技股份有限公司 Anti-tamper verification method for key data in database
US20130347109A1 (en) * 2012-06-21 2013-12-26 Cisco Technology, Inc. Techniques for Detecting Program Modifications
CN108629197A (en) * 2017-03-21 2018-10-09 中国航发商用航空发动机有限责任公司 File access control method and system for the integration environment
CN109257340A (en) * 2018-08-29 2019-01-22 北京中科锐链科技有限公司 A kind of website falsification-proof system and method based on block chain
CN111835706A (en) * 2020-05-27 2020-10-27 平安普惠企业管理有限公司 Method and device for detecting malicious extension of browser and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114201370A (en) * 2022-02-21 2022-03-18 山东捷瑞数字科技股份有限公司 Webpage file monitoring method and system
CN114201370B (en) * 2022-02-21 2022-06-03 山东捷瑞数字科技股份有限公司 Webpage file monitoring method and system

Similar Documents

Publication Publication Date Title
CN109257340B (en) Website tamper-proof system and method based on block chain
US8135135B2 (en) Secure data protection during disasters
CN110177134B (en) Secure password manager based on multi-cloud storage and use method thereof
CN110572355A (en) Webpage data monitoring method and device, computer equipment and storage medium
US11120122B2 (en) Augmenting password generation and validation
CN105740725A (en) File protection method and system
CN109190335B (en) Software copyright protection method and system
US20040260968A1 (en) Server with file verification
CN110008392A (en) A kind of webpage tamper detection method based on web crawlers technology
CN111143808B (en) System security authentication method and device, computing equipment and storage medium
CN108229162B (en) Method for realizing integrity check of cloud platform virtual machine
KR20110072111A (en) Method and system for preventing outflow in software source code
CN112532589A (en) Webpage monitoring method and device and storage medium
US11256824B2 (en) Securing database backups with unique global identifier
CN113922975A (en) Security control method, server, terminal, system and storage medium
US9405927B2 (en) Tri-module data protection system specification
CN111291001A (en) Reading method and device of computer file, computer system and storage medium
CN113127141B (en) Container system management method and device, terminal equipment and storage medium
CN111143863A (en) Data processing method, device, equipment and computer readable storage medium
CN112800492A (en) Control method and device for decrypting disk data
CN115499252B (en) Page restoration device, page restoration method, electronic device and storage medium
CN117648100B (en) Application deployment method, device, equipment and storage medium
CN113343191B (en) Network information security protection method and system
CN114662027A (en) Webpage tamper-proofing method and system
CN114398670A (en) Malicious copy file determination method and device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination