A webpage tamper-proof data encryption method and system

By building a 1+1+n layer tree web page jump structure and deep learning model on the web server, and performing encryption and signature verification on the client, the low efficiency of web page anti-tampering detection and data security issues are solved, and high efficiency is achieved. Detection and protection of web page tampering attacks.

CN117729041BActive Publication Date: 2024-10-29云尖(北京)软件有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311787829.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2024-10-29
Estimated Expiration
2043-12-22

AI Technical Summary

Technical Problem

In the existing technology, the anti-tamper detection efficiency of web pages is low, the background computing pressure is high, and the data security is low, which affects the user experience of client devices, and there are weak links in the protection of data tampering attacks.

Method used

A web page tampering attack detection model is built using a 1+1+n layer tree web page jump structure based on the web server and a deep learning algorithm. It combines the encryption algorithm and signature verification to detect web page tampering locally through the client device, reducing data transmission requirements. Improve detection efficiency and enhance security.

Benefits of technology

It improves the data security and detection efficiency of anti-tampering of web pages, reduces the background computing pressure, can accurately identify and prevent web page tampering attacks, and enhances the security protection level of web servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117729041B_ABST
    Figure CN117729041B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of web page anti-tampering, and discloses a web page anti-tampering data encryption method and system. The method comprises the following steps: based on a web page server, configuring the official web page of a target website, and constructing a web page tampering attack detection model; based on a trusted organization, performing key initialization and entity registration for all legal client devices; based on a web page server, sending the encrypted official web page data to all legal client devices; based on the current client device, accessing the official website of the target website; based on a web page server, providing the official web page of the target website; based on the current client device, accessing the official web page of the target website, and performing local web page tampering detection; based on a web page server, performing web page tampering attack detection. The present invention solves the problems of poor user experience, low detection efficiency, low security of big data under background computing pressure, and poor web page anti-tampering capability existing in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of web page tamper-proofing, and in particular relates to a web page tamper-proofing data encryption method and system. Background Art

[0002] Attacks on websites have emerged in an endless stream in recent years. Not only is the number of attacks increasing, but the types are also increasing dramatically, and the scope of attacks is also gradually expanding. According to statistics, more than 95% of Web sites have been "visited" by hackers. After a website is attacked, the webpage can be easily tampered with, including phishing, changing links, illegal content, dark links, web page Trojans and other malicious behaviors. The losses caused are difficult to estimate. Once the homepage representing the corporate image is tampered with, its authority will be hit, and ultimately it will have a significant impact on the social credibility of the enterprise. At the same time, it will also bring risks such as sensitive information leakage and deception to users browsing the webpage, endangering data security and user property security.

[0003] In the prior art, most of the methods use a web server to perform real-time anti-tampering detection on the official web pages accessed by client devices. The official web page data on the client device side is captured and compared in real time on the web server. This method requires a large amount of communication resources of the client device, affecting the user experience of the client device. In addition, its detection efficiency is low and the background computing pressure is high, so there is room for improvement. There are data security issues on the data channel between the client device and the web server, which has become a weak link in the protection against web page tampering attacks, resulting in low data security and poor web page anti-tampering capabilities. Summary of the invention

[0004] In order to solve the problems of poor user experience, low detection efficiency, low background computing pressure and big data security, and poor web page anti-tampering ability in the prior art, the present invention aims to provide a web page anti-tampering data encryption method and system.

[0005] The technical solution adopted by the present invention is:

[0006] A webpage tamper-proof data encryption method comprises the following steps:

[0007] Based on the web server, according to the web service structure, the official web page of the target website is configured, and based on some historical web tampering attack traffic data, a web tampering attack detection model is built;

[0008] Based on the trusted institution, all legitimate client devices are key initialized and entity registered to obtain the corresponding public-private key pair and signature information, the private key and signature information in the public-private key pair are returned to the legitimate client device, and the public key in the public-private key pair is sent to the web server;

[0009] Based on the web server, the official web page data of the official web page is encrypted according to the public keys of all legal client devices to obtain the encrypted official web page data, and the encrypted official web page data is sent to all legal client devices;

[0010] Based on the current client device, access the official website of the target website, generate a real-time web page login request, sign the real-time web page login request according to the signature information, obtain the corresponding real-time signature data, and send the real-time web page login request and the real-time signature data to the web page server;

[0011] Based on the web server, the trusted organization is called to verify the real-time signature data of the current client device. After the legal verification is passed, the official webpage of the target website is provided to the current client device according to the real-time webpage login request;

[0012] Based on the current client device, the official webpage of the target website is accessed, real-time official webpage data is collected, the local webpage tampering detection is performed on the real-time official webpage data and the locally stored encrypted official webpage data, a corresponding real-time local webpage tampering detection result is obtained, and according to the real-time local webpage tampering detection result, access to the official webpage of the target website is stopped;

[0013] Based on the web server, the real-time web page access traffic data of the current client device on the official web page is collected, and the real-time web page access traffic data is input into the web page tampering attack detection model to perform web page tampering attack detection, and obtain the corresponding real-time web page tampering attack detection result; and according to the real-time web page tampering attack detection result, stop providing the official web page of the target website to the current client device.

[0014] Furthermore, the web page service structure is a 1+1+n layer tree-like web page jump structure;

[0015] The 1+1+n layer tree-like web page jump structure includes an official web page node located at the first layer, an official web page node located at the second layer, several official web page nodes of n layers connected in a tree-like manner, and jump links between official web page nodes of each layer, wherein n is a positive integer greater than or equal to 3.

[0016] Furthermore, the official webpage includes a login webpage, a portal webpage, and several jump webpages;

[0017] Based on the web server, the web service structure of the target website is set to a 1+1+n layer tree-like web page jump structure;

[0018] According to the 1+1+n-layer tree-like web page jump structure, the login web page of the target website is configured in the official web page node of the first layer of the web page service structure;

[0019] In the official webpage node of the second layer of the webpage service structure, a portal page of the target website is set, and a jump link is configured between the portal page of the layer and the login page;

[0020] In the official webpage nodes of the third layer of the webpage service structure, a plurality of jump webpages of the target website are configured one by one, and between the plurality of jump webpages of the third layer and the portal webpages of the second layer, a plurality of jump links are configured one by one;

[0021] Continue to configure a number of jump web pages in a one-to-one correspondence on a number of official web page nodes in the i-th layer of the web page service structure, and configure a number of jump links in a one-to-one correspondence between a number of jump web pages in the i-th layer and any jump web page in the i-1-th layer, until the total number of layers of jump web pages reaches n layers, where i is a positive integer greater than 3 and less than or equal to n+2;

[0022] Collect several historical web page tampering attack traffic data of login web pages, portal web pages and jump web pages, and build a web page tampering attack detection model using deep learning algorithm based on several historical web page tampering attack traffic data.

[0023] Furthermore, several historical webpage tampering attack traffic data of login webpage, portal webpage and jump webpage are collected, and a webpage tampering attack detection model is constructed based on several historical webpage tampering attack traffic data using a deep learning algorithm, including the following steps:

[0024] Collecting several historical webpage tampering operation traffic data of webpage tampering attacks accessing login webpages, portal webpages, and jump webpages under various webpage tampering attack modes;

[0025] Collecting some historical web page tampering jump traffic data of web page tampering attacks that jump between login web page, portal web page and jump web page through jump links;

[0026] Integrate a number of historical web page tampering operation flow data and a number of historical web page tampering jump flow data to obtain a number of historical web page tampering attack flow data;

[0027] Preprocessing a number of historical webpage tampering attack traffic data to obtain a number of preprocessed historical webpage tampering attack traffic data;

[0028] Use the PCA method to perform data dimension reduction on some pre-processed historical webpage tampering attack traffic data, and obtain some key feature data of webpage tampering attack traffic and some historical webpage tampering attack traffic data after data dimension reduction;

[0029] Based on the historical web page tampering attack traffic data after data dimensionality reduction, the BiLTSM-IFWA optimization algorithm is used to build a web page tampering attack detection model.

[0030] Furthermore, based on the historical webpage tampering attack traffic data after some data dimensionality reduction, the BiLTSM-IFWA optimization algorithm is used to build a webpage tampering attack detection model, which includes the following steps:

[0031] After reducing the dimensionality of some data, the historical webpage tampering attack traffic data is divided into a model training sample set and a model test sample set in a ratio of 7:3;

[0032] The IFWA optimization algorithm is used to optimize the initial network parameters of the BiLTSM network to obtain the optimal initial network parameters of the BiLTSM network.

[0033] According to the optimal initial network parameters of the BiLTSM network, an initial webpage tampering attack detection model is constructed;

[0034] Input the model training sample set into the initial webpage tampering attack detection model for optimization training to obtain an optimized webpage tampering attack detection model;

[0035] Input the model test sample set into the optimized webpage tampering attack detection model, perform model testing, and obtain the corresponding test accuracy;

[0036] If the test accuracy is greater than the preset test accuracy threshold, the optimal webpage tampering attack detection model is output, otherwise, the optimization training continues.

[0037] Further, based on the trusted institution, key initialization and entity registration are performed for all legitimate client devices, the public-private key pair and signature information of each client device are obtained, the private key and signature information in the public-private key pair are returned to the corresponding client device, and the public key in the public-private key pair is sent to the web server, including the following steps:

[0038] Based on a trusted organization, collect the entity ID and device attributes of all legitimate client devices;

[0039] According to the device attributes, an asymmetric encryption algorithm is used to initialize the key and generate a public-private key pair for the client device;

[0040] Perform entity registration based on the private key in the public-private key pair and the corresponding entity ID, and generate signature information of the client device;

[0041] The private key and signature information in the public-private key pair are returned to the corresponding client device, and the public key in the public-private key pair is sent to the web server.

[0042] Furthermore, the real-time web page login request includes a real-time web page login instruction of the current client device and a corresponding real-time device IP address.

[0043] Further, based on the current client device, the official webpage of the target website is accessed, real-time official webpage data is collected, local webpage tampering detection is performed on the real-time official webpage data and the locally stored encrypted official webpage data, a corresponding real-time local webpage tampering detection result is obtained, and according to the real-time local webpage tampering detection result, access to the official webpage of the target website is stopped, including the following steps:

[0044] Based on the current client device, access the login webpage of the target website, collect the corresponding real-time device login information data, and send the real-time device login information data to the webpage server for login verification;

[0045] After the login verification is passed, visit the portal page and jump page of the target website to collect real-time official web page data;

[0046] If the current client device has the encrypted official webpage data of the official webpage of the target website stored locally, the encrypted official webpage data is decrypted according to the private key of the current client device to obtain the corresponding decrypted official webpage data, and then proceed to the next step; otherwise, the real-time local webpage tampering detection result is outputted as the risk of local webpage tampering, and the access to the official webpage of the target website is stopped;

[0047] The real-time official web page data is compared with the decrypted official web page data. If the comparison result shows that the data is consistent, the real-time local web page tampering detection result is output as there is no risk of local web page tampering, and the real-time official web page data continues to be collected to perform local web page tampering detection. Otherwise, the real-time local web page tampering detection result is output as there is a risk of local web page tampering, and access to the official web page of the target website is stopped.

[0048] Further, based on the web server, real-time web page access flow data of the current client device on the official web page is collected, the real-time web page access flow data is input into the web page tampering attack detection model, web page tampering attack detection is performed, and the corresponding real-time web page tampering attack detection result is obtained, and according to the real-time web page tampering attack detection result, the official web page of the target website is stopped from being provided to the current client device, including the following steps:

[0049] Based on the web server, collect the real-time web operation flow data of the current client device operating on the official web page;

[0050] Collect real-time web page jump traffic data of the current client device jumping between official web pages;

[0051] Integrate the real-time web page operation flow data and the real-time web page jump flow data to obtain the real-time web page access flow data of the current client device on the official web page;

[0052] According to a number of key characteristic data of web page tampering attack traffic, the real-time web page access traffic data is reduced in dimension to obtain the real-time web page access traffic data after the data dimension reduction;

[0053] The real-time web page access traffic data after data dimension reduction is input into the web page tampering attack detection model to perform web page tampering attack detection and obtain the corresponding real-time web page tampering attack detection results;

[0054] If the real-time webpage tampering attack detection result is that a webpage tampering attack exists, the official webpage of the target website will be stopped from being provided to the current client device, and the real-time device IP address and real-time device login information data of the current client device will be added to the blacklist.

[0055] A web page tamper-proof data encryption system is used to implement a web page tamper-proof data encryption method. The system includes a web page server, a trusted institution, and a plurality of client devices. The web page server and the trusted institution are respectively connected to a plurality of client devices, and the web page server is connected to the trusted institution.

[0056] The web page server is used to configure the official web page of the target website according to the web page service structure, and to build a web page tampering attack detection model according to a number of historical web page tampering attack traffic data; to encrypt the official web page data of the official web page according to the public keys of all legal client devices, to obtain the encrypted official web page data, and to send the encrypted official web page data to all legal client devices; to call a trusted institution to perform legal verification on the real-time signature data of the current client device, and after the legal verification is passed, to provide the official web page of the target website to the current client device according to the real-time web page login request; to collect the real-time web page access traffic data of the current client device on the official web page, to input the real-time web page access traffic data into the web page tampering attack detection model, to perform web page tampering attack detection, to obtain the corresponding real-time web page tampering attack detection result, and to stop providing the official web page of the target website to the current client device according to the real-time web page tampering attack detection result;

[0057] The trusted institution is used to perform key initialization and entity registration for all legal client devices, obtain the corresponding public-private key pair and signature information, return the private key and signature information in the public-private key pair to the legal client device, and send the public key in the public-private key pair to the web server; receive the call of the web server, perform legal verification according to the real-time signature data of the client device, and return the legal verification pass instruction to the web server;

[0058] The client device is used to receive and locally store the encrypted official web page data sent by the web server; access the official URL of the target website, generate a real-time web page login request, sign the real-time web page login request according to the signature information, obtain the corresponding real-time signature data, and send the real-time web page login request and the real-time signature data to the web server; access the official web page of the target website, collect the real-time official web page data, perform local web page tampering detection on the real-time official web page data and the locally stored encrypted official web page data, obtain the corresponding real-time local web page tampering detection result, and stop accessing the official web page of the target website according to the real-time local web page tampering detection result.

[0059] The beneficial effects of the present invention are:

[0060] The present invention discloses a web page tamper-proof data encryption method and system, which encrypts data transmission between a client device and a web page server, improves data security and the security protection level of the web page server through double encryption of encryption algorithm and signature verification, and avoids web page tampering attacks invading the web page server; adopts local web page tampering detection of the client device, avoids the large amount of data transmission demand for online web page tampering prevention, and can realize tampering detection only locally, thereby improving detection efficiency and reducing background computing pressure; collects web page access flow data of the client device in real time, builds a web page tampering attack detection model, and performs web page tampering attack detection, which can accurately detect and identify web page tampering attacks on the client device side, and provides web page tamper-proof capability.

[0061] Other beneficial effects of the present invention will be further described in the specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a flowchart of the webpage tamper-proof data encryption method of the present invention.

[0063] Figure 2 It is a structural block diagram of the web page tamper-proof data encryption system in the present invention. DETAILED DESCRIPTION

[0064] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments.

[0065] Embodiment 1:

[0066] like Figure 1 As shown, this embodiment provides a webpage tamper-proof data encryption method, comprising the following steps:

[0067] S1: Based on the web server, according to the web service structure, the official web page of the target website is configured, and a web tampering attack detection model is constructed based on several historical web tampering attack traffic data;

[0068] The web page service structure is a 1+1+n layer tree-like web page jump structure;

[0069] The 1+1+n-layer tree-like web page jump structure includes an official web page node located at the first layer, an official web page node located at the second layer, a number of official web page nodes at n layers connected in a tree-like manner, and jump links between official web page nodes at each layer, wherein n is a positive integer greater than or equal to 3;

[0070] The official webpage is configured through a 1+1+n-layer tree-like webpage jump structure, which changes the loop-nested jump mode of general webpages into a tree-like return jump mode, making it easier to collect the operation flow data of the client device on the webpage, collect the jump flow data and jump path of the webpage jump, and facilitate the tracking of the tampered webpage. At the same time, the impact of the webpage tampering attack is reduced to several adjacent webpages, reducing the loss;

[0071] The official webpage includes the login webpage, portal webpage and several jump webpages;

[0072] The steps include:

[0073] S1-1: Based on the web server, the web service structure of the target website is set to a 1+1+n-layer tree-like web page jump structure;

[0074] S1-2: According to the 1+1+n-layer tree-like web page jump structure, the login web page of the target website is configured in the official web page node of the first layer of the web page service structure;

[0075] S1-3: In the official webpage node of the second layer of the webpage service structure, a portal webpage of the target website is set, and a jump link is configured between the portal webpage of this layer and the login webpage of the previous layer;

[0076] S1-4: configuring a number of jump web pages of the target website in a one-to-one correspondence with a number of official web page nodes in the third layer of the web page service structure, and configuring a number of jump links in a one-to-one correspondence between the number of jump web pages in the third layer and the portal web pages in the second layer;

[0077] S1-5: Continue to configure a number of jump web pages in a one-to-one correspondence on a number of official web page nodes in the i-th layer of the web page service structure, and configure a number of jump links in a one-to-one correspondence between a number of jump web pages in the i-th layer and any jump web page in the i-1-th layer, until the total number of layers of jump web pages reaches n layers, where i is a positive integer greater than 3 and less than or equal to n+2;

[0078] S1-6: Collecting several historical webpage tampering attack traffic data of login webpage, portal webpage and jump webpage, and building a webpage tampering attack detection model based on several historical webpage tampering attack traffic data using a deep learning algorithm, including the following steps:

[0079] S1-6-1: Collecting several historical webpage tampering operation traffic data of webpage tampering attacks accessing login webpages, portal webpages, and jump webpages under various webpage tampering attack modes;

[0080] S1-6-2: Collecting several historical web page tampering jump traffic data of web page tampering attacks that jump between login web page, portal web page and jump web page through jump links;

[0081] S1-6-3: Integrate a number of historical web page tampering operation traffic data and a number of historical web page tampering jump traffic data to obtain a number of historical web page tampering attack traffic data;

[0082] S1-6-4: Preprocessing a number of historical webpage tampering attack traffic data to obtain a number of preprocessed historical webpage tampering attack traffic data;

[0083] S1-6-5: Use the principal component analysis (PCA) method to perform data dimension reduction on a number of pre-processed historical web page tampering attack traffic data to obtain a number of key feature data of web page tampering attack traffic and a number of historical web page tampering attack traffic data after data dimension reduction;

[0084] The volume of historical web page tampering attack traffic data after preprocessing is reduced, which reduces the data calculation and memory pressure of the web server, and improves the speed and efficiency of model training;

[0085] S1-6-6: Based on the historical webpage tampering attack traffic data after dimensionality reduction, a webpage tampering attack detection model is constructed using the Bidirectional Long Short-Term Memory networks (BiLTSM)-Improved Fireworks Algorithm (IFWA) algorithm, including the following steps:

[0086] S1-6-6-1: Divide the historical webpage tampering attack traffic data after dimensionality reduction into a model training sample set and a model test sample set in a ratio of 7:3;

[0087] S1-6-6-2: Use the IFWA optimization algorithm to optimize the initial network parameters of the BiLTSM network to obtain the optimal initial network parameters of the BiLTSM network, including the following steps:

[0088] S1-6-6-2-1: The initial network parameters of the BiLTSM network are used as the positions of the IFWA individuals in the IFWA optimization algorithm;

[0089] S1-6-6-2-2: Set the IFWA population parameters, maximum number of iterations and fitness function of the IFWA optimization algorithm, and use the optimization target as the position of the IFWA individual in the IFWA population;

[0090] S1-6-6-2-3: According to the IFWA population parameters, use the Circle chaotic mapping sequence to initialize the IFWA population and obtain the initialized IFWA population. The formula is:

[0091]

[0092] In the formula, q l' is the initial IFWA individual of Circle chaos mapping; q * l' is the randomly generated initial IFWA individual; l' is the IFWA individual indicator;

[0093] S1-6-6-2-4: According to the fitness function, calculate the fitness value of the IFWA individual in the initialized IFWA population. The formula is:

[0094]

[0095] In the formula, f(q l' ) is the initial IFWA individual q l' The fitness value; MSE is the prediction mean square error function; Y' l' , Y l' are the predicted value and the true value; L is the total number of IFWA individuals;

[0096] S1-6-6-2-5: Get the explosion radius and number of sparks of IFWA individuals in the IFWA population. The formula is:

[0097]

[0098] In the formula, S l' is the initial IFWA individual q l' The number of sparks; M' is a constant; f max is the maximum fitness value in the initialized IFWA population; f(q l' ) is the initial IFWA individual q l' The fitness value of ; τ is an infinitesimal constant;

[0099]

[0100] In the formula, R l' is the initial IFWA individual q l' Explosion radius; f is the explosion radius adjustment constant; minis the minimum fitness value in the initialized IFWA population;

[0101] S1-6-6-2-6: According to the explosion radius and number of sparks of each initial IFWA individual in the initial IFWA population, fireworks are exploded to obtain an updated IFWA population. The formula is:

[0102] q' l' =q l' +S l' ×rand(-1,1)

[0103] In the formula, q' l' is the updated IFWA individual; rand(-1,1) is a random number between -1 and 1; q l' For the initial IFWA individuals;

[0104] S1-6-6-2-7: Use the Gaussian mutation algorithm to perform Gaussian mutation on the initialized IFWA population to generate a Gaussian mutated IFWA population. The formula is:

[0105] q" l' =q l' +S l' ×G(1,1)

[0106] In the formula, q" l' is an IFWA individual with Gaussian variation; G(1,1) is a random number with Gaussian distribution whose mean and variance are both 1;

[0107] S1-6-6-2-8: Use the dynamic reverse learning algorithm to perform dynamic reverse learning on the initialized IFWA population to generate a dynamic reverse IFWA population. The formula is:

[0108] q'" l' =γ(L max +L min )-q l'

[0109] In the formula, q'" l' is the dynamically reversed IFWA individual; γ is the decreasing inertia coefficient, γ=0.9-0.5t / T; L max , L min are the maximum and minimum values ​​of the vector space respectively; t is the iteration indicator; T is the iteration number threshold;

[0110] S1-6-6-2-9: Calculate the fitness values ​​of all IFWA individuals in the updated IFWA population, the Gaussian mutated IFWA population, and the dynamically reversed IFWA population, and take the IFWA individual with the minimum fitness value as the optimal individual;

[0111] S1-6-6-2-10: If the number of iterations reaches the threshold or the fitness value of the optimal individual meets the requirements, the optimal solution corresponding to the current optimal individual is output to obtain the optimal initial network parameters of the BiLTSM network;

[0112] As a deep learning algorithm, the BiLTSM network has the defects of being sensitive to the initial value of the network, being prone to falling into the local optimum, and being prone to premature maturity. The IFWA optimization algorithm searches for the optimal solution in the optimization space, which can solve the above defects and provide the stability and accuracy of the BiLTSM network.

[0113] S1-6-6-3: Based on the optimal initial network parameters of the BiLTSM network, construct an initial webpage tampering attack detection model;

[0114] S1-6-6-4: input the model training sample set into the initial webpage tampering attack detection model for optimization training to obtain an optimized webpage tampering attack detection model;

[0115] S1-6-6-5: Input the model test sample set into the optimized webpage tampering attack detection model, perform model testing, and obtain the corresponding test accuracy;

[0116] S1-6-6-7: If the test accuracy is greater than the preset test accuracy threshold, the optimal webpage tampering attack detection model is output, otherwise, optimization training continues;

[0117] S2: Based on the trusted institution, perform key initialization and entity registration for all legitimate client devices, obtain the corresponding public-private key pair and signature information, return the private key and signature information in the public-private key pair to the legitimate client device, and send the public key in the public-private key pair to the web server, including the following steps:

[0118] S2-1: Based on the trusted organization, collect the entity ID and device attributes of all legitimate client devices;

[0119] S2-2: Based on the device attributes, use an asymmetric encryption algorithm to initialize the key and generate a public-private key pair for the client device, including the following steps:

[0120] S2-2-1: Use an asymmetric encryption algorithm to initialize the key and generate the public parameter GP, the master key MSK and the original public key PK. The formula is:

[0121] GP={p,g,g1,g a ,e(g,g) a ,H1,H2,H3,H4,H5,H6}

[0122] PK={g,g1,g a,e(g,g) a ,H u}

[0123] MSK = {g a ,a}

[0124] Where GP is the public parameter; MSK is the master key; PK is the original public key; a is the integer domain Z p Random numbers; H1, H2, H3, H4, H5, H6, H u is the target hash function; g1, g a is the random number of the generator of G; e(g,g) a are random numbers g1, g a Bilinear mapping of ;

[0125] S2-2-2: Generate the corresponding device private key SK based on the public parameter GP, master key MSK, original public key PK and device attribute u u and public key PK u , the formula is:

[0126] SK u = {MSK,u,K=g a g ab ,L u =g b ,(K=H3(u) b )}

[0127]

[0128] In the formula, SK u is the private key of device attribute u; b is the integer domain Z p Random number; L u , K is the private key parameter; H3 is the target hash function of the public parameter GP; u is the client device indicator; MSK is the master key; PK is the original public key; PK u is the public key; g b , g a , g ab is the random number of the generator of G;

[0129] S2-3: Perform entity registration based on the private key in the public-private key pair and the corresponding entity ID, and generate signature information of the client device. The formula is:

[0130]

[0131] Where k is a random number; {K, KID} is the signature information; K is the registration parameter; KID is the registration ID; H1 is the target hash function; ID is the entity ID; SK uis the private key of the client device u; is a prime number order;

[0132] S2-4: The private key SK in the public-private key pair u and signature information {K, KID} are returned to the corresponding client device, and the public key PK in the public-private key pair is u Send to web server;

[0133] S3: Based on the web server, the official web page data of the official web page is encrypted according to the public keys of all legal client devices to obtain the encrypted official web page data, and the encrypted official web page data is sent to all legal client devices;

[0134] S4: Based on the current client device, access the official website of the target website, generate a real-time web page login request, sign the real-time web page login request according to the signature information, obtain corresponding real-time signature data, and send the real-time web page login request and the real-time signature data to the web page server;

[0135] The signature formula is:

[0136]

[0137] Where r3 is a random number; {ID, M, σ = {K, R, V}} is real-time signature data; σ, R and V are signature parameters; M is a real-time web page login request; {K, KID} is signature information; KID is the registration ID; H2 is the target hash function; K is the registration parameter; P is the prime domain base point;

[0138] The real-time web page login request includes the real-time web page login instruction of the current client device and the corresponding real-time device IP address;

[0139] S5: Based on the web server, the trusted institution is called to perform legal verification on the real-time signature data of the current client device. After the legal verification is passed, the official webpage of the target website is provided to the current client device according to the real-time webpage login request;

[0140]

[0141] Where R and V are signature parameters; K is the registration parameter; M is the real-time web page login request; ID is the entity ID; H1 and H2 are the target hash functions; P is the prime domain base point; PK u is the public key;

[0142] S6: Based on the current client device, access the official webpage of the target website, collect real-time official webpage data, perform local webpage tampering detection on the real-time official webpage data and the locally stored encrypted official webpage data, obtain the corresponding real-time local webpage tampering detection result, and stop accessing the official webpage of the target website according to the real-time local webpage tampering detection result, including the following steps:

[0143] S6-1: Based on the current client device, access the login webpage of the target website, collect the corresponding real-time device login information data, and send the real-time device login information data to the webpage server for login verification;

[0144] S6-2: After the login verification is passed, visit the portal page and jump page of the target website to collect real-time official web page data;

[0145] S6-3: If the current client device locally stores the encrypted official webpage data of the official webpage of the target website, the encrypted official webpage data is decrypted according to the private key of the current client device to obtain the corresponding decrypted official webpage data, and then proceed to the next step; otherwise, the real-time local webpage tampering detection result is outputted as the risk of local webpage tampering, and the access to the official webpage of the target website is stopped;

[0146] S6-4: Compare the real-time official web page data with the decrypted official web page data. If the comparison result shows that the data is consistent, output the real-time local web page tampering detection result as no local web page tampering risk, continue to collect real-time official web page data, and perform local web page tampering detection. Otherwise, output the real-time local web page tampering detection result as there is a local web page tampering risk, and stop accessing the official web page of the target website.

[0147] S7: Based on the web server, collect the real-time web page access flow data of the current client device on the official web page, input the real-time web page access flow data into the web page tampering attack detection model, perform web page tampering attack detection, obtain the corresponding real-time web page tampering attack detection result, and according to the real-time web page tampering attack detection result, stop providing the official web page of the target website to the current client device, including the following steps:

[0148] S7-1: Based on the web server, collect the real-time web operation flow data of the current client device operating on the official web page;

[0149] S7-2: Collecting real-time web page jump traffic data of the current client device jumping between official web pages;

[0150] S7-3: Integrate the real-time web page operation flow data and the real-time web page jump flow data to obtain the real-time web page access flow data of the current client device on the official web page;

[0151] S7-4: According to a number of key characteristic data of web page tampering attack traffic, the real-time web page access traffic data is subjected to data dimension reduction to obtain the real-time web page access traffic data after data dimension reduction;

[0152] S7-5: input the real-time web page access traffic data after data dimension reduction into the web page tampering attack detection model, perform web page tampering attack detection, and obtain the corresponding real-time web page tampering attack detection result;

[0153] S7-6: If the real-time webpage tampering attack detection result is that a webpage tampering attack exists, stop providing the official webpage of the target website to the current client device, and add the real-time device IP address and real-time device login information data of the current client device to the blacklist.

[0154] Embodiment 2:

[0155] like Figure 2 As shown, this embodiment provides a webpage anti-tampering data encryption system for implementing a webpage anti-tampering data encryption method. The system includes a webpage server, a trusted institution, and a plurality of client devices. The webpage server and the trusted institution are respectively connected to a plurality of client devices, and the webpage server is connected to the trusted institution;

[0156] The web page server is used to configure the official web page of the target website according to the web page service structure, and to build a web page tampering attack detection model according to a number of historical web page tampering attack traffic data; to encrypt the official web page data of the official web page according to the public keys of all legal client devices, to obtain the encrypted official web page data, and to send the encrypted official web page data to all legal client devices; to call a trusted institution to perform legal verification on the real-time signature data of the current client device, and after the legal verification is passed, to provide the official web page of the target website to the current client device according to the real-time web page login request; to collect the real-time web page access traffic data of the current client device on the official web page, to input the real-time web page access traffic data into the web page tampering attack detection model, to perform web page tampering attack detection, to obtain the corresponding real-time web page tampering attack detection result, and to stop providing the official web page of the target website to the current client device according to the real-time web page tampering attack detection result;

[0157] The trusted institution is used to perform key initialization and entity registration for all legal client devices, obtain the corresponding public-private key pair and signature information, return the private key and signature information in the public-private key pair to the legal client device, and send the public key in the public-private key pair to the web server; receive the call of the web server, perform legal verification according to the real-time signature data of the client device, and return the legal verification pass instruction to the web server;

[0158] The client device is used to receive and locally store the encrypted official web page data sent by the web server; access the official URL of the target website, generate a real-time web page login request, sign the real-time web page login request according to the signature information, obtain the corresponding real-time signature data, and send the real-time web page login request and the real-time signature data to the web server; access the official web page of the target website, collect the real-time official web page data, perform local web page tampering detection on the real-time official web page data and the locally stored encrypted official web page data, obtain the corresponding real-time local web page tampering detection result, and stop accessing the official web page of the target website according to the real-time local web page tampering detection result.

[0159] The present invention discloses a web page tamper-proof data encryption method and system, which encrypts data transmission between a client device and a web page server, improves data security and the security protection level of the web page server through double encryption of encryption algorithm and signature verification, and avoids web page tampering attacks invading the web page server; adopts local web page tampering detection of the client device, avoids the large amount of data transmission demand for online web page tampering prevention, and can realize tampering detection only locally, thereby improving detection efficiency and reducing background computing pressure; collects web page access flow data of the client device in real time, builds a web page tampering attack detection model, and performs web page tampering attack detection, which can accurately detect and identify web page tampering attacks on the client device side, and provides web page tamper-proof capability.

[0160] The present invention is not limited to the above optional implementations, and anyone can derive other various forms of products under the enlightenment of the present invention. The above specific implementations should not be understood as limiting the scope of protection of the present invention. The scope of protection of the present invention should be based on the definition in the claims, and the description can be used to interpret the claims.

Claims

1. A webpage tamper-proof data encryption method, characterized in that: The steps include: Based on the web server, according to the web service structure, the official web page of the target website is configured, and based on some historical web tampering attack traffic data, a web tampering attack detection model is built; The web page service structure is a 1+1+n layer tree-like web page jump structure; The 1+1+n layer tree-like web page jump structure includes an official web page node located at the first layer, an official web page node located at the second layer, several official web page nodes of n layers connected in a tree-like manner, and jump links between official web page nodes of each layer, wherein n is a positive integer greater than or equal to 3; The official webpage includes the login webpage, portal webpage and several jump webpages; In addition, based on the web server, according to the web service structure, the official web page of the target website is configured, and according to a number of historical web tampering attack traffic data, a web tampering attack detection model is constructed, including the following steps: Based on the web server, the web service structure of the target website is set to a 1+1+n layer tree-like web page jump structure; According to the 1+1+n-layer tree-like web page jump structure, the login web page of the target website is configured in the official web page node of the first layer of the web page service structure; In the official webpage node of the second layer of the webpage service structure, a portal page of the target website is set, and a jump link is configured between the portal page of the layer and the login page; In the official webpage nodes of the third layer of the webpage service structure, a plurality of jump webpages of the target website are configured one by one, and between the plurality of jump webpages of the third layer and the portal webpages of the second layer, a plurality of jump links are configured one by one; Continue to configure a number of jump web pages in a one-to-one correspondence on a number of official web page nodes in the i-th layer of the web page service structure, and configure a number of jump links in a one-to-one correspondence between a number of jump web pages in the i-th layer and any jump web page in the i-1-th layer, until the total number of layers of jump web pages reaches n layers, where i is a positive integer greater than 3 and less than or equal to n+2; Collect several historical webpage tampering attack traffic data of login webpage, portal webpage and jump webpage, and build a webpage tampering attack detection model based on several historical webpage tampering attack traffic data using deep learning algorithm, including the following steps: Collecting several historical webpage tampering operation traffic data of webpage tampering attacks accessing login webpages, portal webpages, and jump webpages under various webpage tampering attack modes; Collecting some historical web page tampering jump traffic data of web page tampering attacks that jump between login web page, portal web page and jump web page through jump links; Integrate a number of historical web page tampering operation flow data and a number of historical web page tampering jump flow data to obtain a number of historical web page tampering attack flow data; Preprocessing a number of historical webpage tampering attack traffic data to obtain a number of preprocessed historical webpage tampering attack traffic data; Use the principal component analysis (PCA) method to perform data dimension reduction on some pre-processed historical webpage tampering attack traffic data, and obtain some key feature data of webpage tampering attack traffic and some historical webpage tampering attack traffic data after data dimension reduction; Based on the historical webpage tampering attack traffic data after dimensionality reduction, a webpage tampering attack detection model is constructed using the Bidirectional Long Short-Term Memory Network BiLTSM-Improved Fireworks Algorithm IFWA; Based on the trusted institution, all legitimate client devices are key initialized and entity registered to obtain the corresponding public-private key pair and signature information, the private key and signature information in the public-private key pair are returned to the legitimate client device, and the public key in the public-private key pair is sent to the web server; Based on the web server, the official web page data of the official web page is encrypted according to the public keys of all legal client devices to obtain the encrypted official web page data, and the encrypted official web page data is sent to all legal client devices; Based on the current client device, access the official website of the target website, generate a real-time web page login request, sign the real-time web page login request according to the signature information, obtain the corresponding real-time signature data, and send the real-time web page login request and the real-time signature data to the web page server; Based on the web server, the trusted organization is called to verify the real-time signature data of the current client device. After the legal verification is passed, the official webpage of the target website is provided to the current client device according to the real-time webpage login request; Based on the current client device, the official webpage of the target website is accessed, real-time official webpage data is collected, the local webpage tampering detection is performed on the real-time official webpage data and the locally stored encrypted official webpage data, a corresponding real-time local webpage tampering detection result is obtained, and according to the real-time local webpage tampering detection result, access to the official webpage of the target website is stopped; Based on the web server, the real-time web page access traffic data of the current client device on the official web page is collected, and the real-time web page access traffic data is input into the web page tampering attack detection model to perform web page tampering attack detection, and obtain the corresponding real-time web page tampering attack detection result; and according to the real-time web page tampering attack detection result, stop providing the official web page of the target website to the current client device.

2. A webpage tamper-proof data encryption method according to claim 1, characterized in that: Based on the historical webpage tampering attack traffic data after data dimensionality reduction, the BiLTSM-IFWA algorithm is used to build a webpage tampering attack detection model, which includes the following steps: After reducing the dimensionality of some data, the historical webpage tampering attack traffic data is divided into a model training sample set and a model test sample set in a ratio of 7:3; The IFWA algorithm is used to optimize the initial network parameters of the BiLTSM network to obtain the optimal initial network parameters of the BiLTSM network. According to the optimal initial network parameters of the BiLTSM network, an initial webpage tampering attack detection model is constructed; Input the model training sample set into the initial webpage tampering attack detection model for optimization training to obtain an optimized webpage tampering attack detection model; Input the model test sample set into the optimized webpage tampering attack detection model, perform model testing, and obtain the corresponding test accuracy; If the test accuracy is greater than the preset test accuracy threshold, the optimal webpage tampering attack detection model is output, otherwise, the optimization training continues.

3. A webpage tamper-proof data encryption method according to claim 1, characterized in that: Based on a trusted institution, all legitimate client devices are key initialized and entity registered, a public-private key pair and signature information of each client device are obtained, the private key and signature information in the public-private key pair are returned to the corresponding client device, and the public key in the public-private key pair is sent to the web server, including the following steps: Based on a trusted organization, collect the entity ID and device attributes of all legitimate client devices; According to the device attributes, an asymmetric encryption algorithm is used to initialize the key and generate a public-private key pair for the client device; Perform entity registration based on the private key in the public-private key pair and the corresponding entity ID, and generate signature information of the client device; The private key and signature information in the public-private key pair are returned to the corresponding client device, and the public key in the public-private key pair is sent to the web server.

4. A webpage tamper-proof data encryption method according to claim 1, characterized in that: The real-time web page login request includes the real-time web page login instruction of the current client device and the corresponding real-time device IP address.

5. A webpage tamper-proof data encryption method according to claim 4, characterized in that: Based on the current client device, the official webpage of the target website is accessed, real-time official webpage data is collected, and local webpage tampering detection is performed on the real-time official webpage data and the locally stored encrypted official webpage data to obtain the corresponding real-time local webpage tampering detection result, and according to the real-time local webpage tampering detection result, the access to the official webpage of the target website is stopped, including the following steps: Based on the current client device, access the login webpage of the target website, collect the corresponding real-time device login information data, and send the real-time device login information data to the webpage server for login verification; After the login verification is passed, visit the portal page and jump page of the target website to collect real-time official web page data; If the current client device has the encrypted official webpage data of the official webpage of the target website stored locally, the encrypted official webpage data is decrypted according to the private key of the current client device to obtain the corresponding decrypted official webpage data, and then proceed to the next step; otherwise, the real-time local webpage tampering detection result is outputted as the risk of local webpage tampering, and the access to the official webpage of the target website is stopped; The real-time official web page data is compared with the decrypted official web page data. If the comparison result shows that the data is consistent, the real-time local web page tampering detection result is output as there is no risk of local web page tampering, and the real-time official web page data continues to be collected to perform local web page tampering detection. Otherwise, the real-time local web page tampering detection result is output as there is a risk of local web page tampering, and access to the official web page of the target website is stopped.

6. A webpage tamper-proof data encryption method according to claim 1, characterized in that: Based on the web server, real-time web page access flow data of the current client device on the official web page is collected, the real-time web page access flow data is input into the web page tampering attack detection model, web page tampering attack detection is performed, and the corresponding real-time web page tampering attack detection result is obtained. According to the real-time web page tampering attack detection result, the official web page of the target website is stopped from being provided to the current client device, including the following steps: Based on the web server, collect the real-time web operation flow data of the current client device operating on the official web page; Collect real-time web page jump traffic data of the current client device jumping between official web pages; Integrate the real-time web page operation flow data and the real-time web page jump flow data to obtain the real-time web page access flow data of the current client device on the official web page; According to a number of key characteristic data of web page tampering attack traffic, the real-time web page access traffic data is reduced in dimension to obtain the real-time web page access traffic data after the data dimension reduction; The real-time web page access traffic data after data dimension reduction is input into the web page tampering attack detection model to perform web page tampering attack detection and obtain the corresponding real-time web page tampering attack detection results; If the real-time webpage tampering attack detection result is that a webpage tampering attack exists, the official webpage of the target website will be stopped from being provided to the current client device, and the real-time device IP address and real-time device login information data of the current client device will be added to the blacklist.

7. A webpage tamper-proof data encryption system, used to implement the webpage tamper-proof data encryption method according to any one of claims 1 to 6, characterized in that: The system includes a web server, a trusted institution and a plurality of client devices, wherein the web server and the trusted institution are respectively connected to the plurality of client devices, and the web server is connected to the trusted institution; The web server is used to configure the official web page of the target website according to the web service structure, and build a web page tampering attack detection model according to a number of historical web page tampering attack traffic data; encrypt the official web page data of the official web page according to the public key of all legal client devices, obtain the encrypted official web page data, and send the encrypted official web page data to all legal client devices; Calling a trusted institution to perform legal verification on the real-time signature data of the current client device. After the legal verification is passed, providing the official webpage of the target website to the current client device according to the real-time webpage login request; collecting the real-time webpage access flow data of the current client device on the official webpage, inputting the real-time webpage access flow data into the webpage tampering attack detection model, performing webpage tampering attack detection, obtaining the corresponding real-time webpage tampering attack detection result, and according to the real-time webpage tampering attack detection result, stopping providing the official webpage of the target website to the current client device; The trusted institution is used to perform key initialization and entity registration for all legal client devices, obtain the corresponding public-private key pair and signature information, return the private key and signature information in the public-private key pair to the legal client device, and send the public key in the public-private key pair to the web server; receive the call of the web server, perform legal verification according to the real-time signature data of the client device, and return the legal verification pass instruction to the web server; The client device is used to receive and locally store the encrypted official web page data sent by the web page server; access the official website of the target website, generate a real-time web page login request, sign the real-time web page login request according to the signature information, obtain the corresponding real-time signature data, and send the real-time web page login request and the real-time signature data to the web page server; Visit the official webpage of the target website, collect real-time official webpage data, perform local webpage tampering detection on the real-time official webpage data and the locally stored encrypted official webpage data, obtain the corresponding real-time local webpage tampering detection result, and stop accessing the official webpage of the target website based on the real-time local webpage tampering detection result.

Citation Information

Patent Citations

  • Webpage tampering detecting method and device

    CN103605926A

  • Webpage tamper-proofing detection method based on combination of DRAE and SVM

    CN112948897A