Distributed system man-in-the-middle attack defense method and device based on encryption and detection

By performing partial linear encryption and data reconstruction detection on nodes of distributed system, the data theft and tampering of man-in-the-middle attacks are solved, and accurate detection and defense of man-in-the-middle attacks are realized, and the security and performance of the system are improved.

CN118659926BActive Publication Date: 2024-11-19HANGZHOU INNOVATION RES INST OF BEIJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411124972.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-11-19
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

When facing man-in-the-middle attacks, existing distributed systems cannot effectively prevent attackers from stealing or tampering with the original observation data and state estimate data inside the sensor node, and cannot detect false data injected by the attacker in time, resulting in system performance degradation.

Method used

Using the encryption and detection method, the node performs partial linear encryption at the data sending end, and reconstructs the actually received data at the receiving end to generate an attack detection signal. By comparing the relative entropy with the normal detection signal, whether a man-in-the-middle attack occurs.

Benefits of technology

Effectively prevent data tampering, timely identify man-in-the-middle attacks, improve the data transmission security of distributed systems and the detection and defense capabilities of network attacks, and reduce storage and computing overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118659926B_ABST
    Figure CN118659926B_ABST
Patent Text Reader

Abstract

The distributed system man-in-the-middle attack defense method and device based on encryption and detection provided by the present invention relates to the field of distributed information physical system security technology. The method is applied to any node in the distributed system, and the method includes: when the node is a data sending end, the data to be transmitted is partially linearly encrypted and sent to the data receiving end; when the node is a data receiving end, the actual received data is reconstructed and an attack detection signal is generated based on the reconstructed data and the normal measurement data of the local end, and whether a man-in-the-middle attack has occurred is determined based on the comparison result of the relative entropy between the attack detection signal and the normal detection signal and the detection threshold. The present invention can improve the data transmission security of the distributed system, and also enhance the system's detection and defense capabilities against network attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed information-physical system security technology, and in particular to a distributed system man-in-the-middle attack defense method and device based on encryption and detection. Background Art

[0002] Distributed systems that integrate perception, computing, communication, and control are one of the paradigms of modern intelligent systems and are widely used in many key areas such as smart manufacturing, smart transportation, and smart grids. Distributed estimation is a key link in data perception and fusion, and the accuracy of the estimation results will directly affect the decision-making and control performance of the entire system.

[0003] Existing distributed systems still face some challenges in terms of security, one of the important issues is the man-in-the-middle attack. The man-in-the-middle attack is an active attack method. The attacker can launch various network attacks on the communicating parties in the system, such as eavesdropping attacks and false data injection attacks, which seriously damages the accuracy of state estimation and thus leads to the performance degradation of the entire system.

[0004] For man-in-the-middle attacks, some existing solutions cannot effectively prevent attackers from stealing or tampering with the original observation data and state estimation data inside the sensor node, and cannot effectively detect the false data with abnormal statistical characteristics injected by the attacker. Therefore, how to provide a defense method that can both prevent data tampering and detect false data is a technical problem that needs to be solved. Summary of the invention

[0005] One of the purposes of the present invention is to provide a distributed system man-in-the-middle attack defense method and device based on encryption and detection. The embodiments of the present invention can prevent attackers from stealing or tampering with data, and can accurately detect man-in-the-middle attacks. The embodiments of the present invention can be implemented as follows:

[0006] In the first aspect, the present invention provides a distributed system man-in-the-middle attack defense method based on encryption and detection, which is applied to any node in the distributed system; the method comprises: when the node is a data sending end, partially linearly encrypting the data to be transmitted and sending it to the data receiving end; when the node is a data receiving end, reconstructing the actually received data and generating an attack detection signal based on the reconstructed data and the normal measurement data of this end, and determining whether a man-in-the-middle attack has occurred based on the comparison result of the relative entropy between the attack detection signal and the normal detection signal and the detection threshold.

[0007] In a second aspect, the present invention provides a distributed system man-in-the-middle attack defense device based on encryption and detection, which is applied to any node in a distributed system; the man-in-the-middle attack defense device includes: an encryption module, a reconstruction module and a detection module; when the node is a data sending end, the encryption module is used to perform partial linear encryption on the data to be transmitted and then send it to the data receiving end; when the node is a data receiving end, the reconstruction module is used to reconstruct the actually received data; the attack detection module is used to generate an attack detection signal based on the reconstructed data and the normal measurement data of this end, and determine whether a man-in-the-middle attack has occurred based on the comparison result of the relative entropy between the attack detection signal and the normal detection signal and the detection threshold.

[0008] In a third aspect, the present invention provides a distributed system, comprising a plurality of nodes, any one of the nodes being used to execute the distributed system man-in-the-middle attack defense method based on encryption and detection as described in the first aspect.

[0009] In a fourth aspect, the present invention provides a storage medium storing instructions, which, when executed on a computer, enables the computer to execute the distributed system man-in-the-middle attack defense method based on encryption and detection as described in the first aspect.

[0010] The distributed system man-in-the-middle attack defense method and device based on encryption and detection provided by the present invention have the following advantages: if a node in the distributed system is a data sending end, the data is partially linearly encrypted before sending the data to be transmitted, which can effectively prevent potential attackers from making unauthorized access or tampering with the data. Through partial linear encryption, even if the data is intercepted during transmission, the attacker cannot interpret its content, thereby protecting the confidentiality and integrity of the data. Moreover, the embodiment of the present invention adopts data-level encryption rather than encryption authentication, which can significantly reduce storage and computing overhead; if the node is a data receiving end, then after receiving the actual transmitted data, the data actually received is reconstructed and then an attack detection signal is generated. Finally, the relative entropy between the attack detection signal and the normal detection signal is used to determine whether a man-in-the-middle attack has occurred. Through the above method, the embodiment of the present invention can timely discover and identify man-in-the-middle attacks, which can not only improve the data transmission security in the distributed system, but also enhance the system's detection and defense capabilities against network attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0012] Figure 1 A schematic diagram of the structure of a distributed estimation system provided by an embodiment of the present invention;

[0013] Figure 2 Another architecture diagram of a distributed estimation system provided by an embodiment of the present invention;

[0014] Figure 3 A schematic flow chart of a distributed system man-in-the-middle attack defense method based on encryption and detection provided by an embodiment of the present invention;

[0015] Figure 4 A network connection topology diagram of a distributed estimation system in a certain industrial scenario provided by an embodiment of the present invention;

[0016] Figure 5 Schematic diagram of the state estimation of each attacked channel without defense measures;

[0017] Figure 6 It is a schematic diagram of the relative entropy value of the attack detection signal and the normal detection signal in each attacked channel without defense measures;

[0018] Figure 7 A schematic diagram of state estimation of each attacked channel under the distributed system man-in-the-middle attack defense method based on encryption and detection provided by an embodiment of the present invention;

[0019] Figure 8 A schematic diagram of relative entropy values ​​of attack detection signals and normal detection signals in a distributed system man-in-the-middle attack defense method based on encryption and detection provided by an embodiment of the present invention;

[0020] Fig. 9 A functional module diagram of a distributed system man-in-the-middle attack defense device based on encryption and detection provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0022] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0024] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] The network architecture and business scenarios described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.

[0027] The following will take the distributed estimation system as an example to introduce the encryption and detection based man-in-the-middle attack defense method provided by the embodiment of the present invention. This method is also applicable to distributed systems of the same type as the distributed estimation system, and the embodiment of the present invention will not be described in detail here.

[0028] Please refer to Figure 1 , Figure 1 A schematic diagram of the structure of a distributed estimation system provided by an embodiment of the present invention. The distributed estimation system includes multiple nodes 01. The multiple nodes 01 can establish communication connections through wired or wireless networks. Each node 01 has a data forwarding function, and can send data to other nodes 01, and can also receive data sent by other nodes 01.

[0029] In the embodiment of the present invention, each node 01 includes a sensor and an estimator. The sensor can measure the physical process, and the estimator can estimate the local state in combination with the measurement data of the sensor. In the subsequent description of the embodiment of the present invention, the estimator can represent a node.

[0030] In an optional embodiment, the estimator may be, but is limited to, a Kalman filter estimator. When the estimator is a Kalman filter estimator, the observation data from multiple sensors can be effectively fused through an alternating process of prediction and updating to optimally estimate the state variables of the physical process in the system.

[0031] For ease of understanding Figure 1 The working principle of the distributed estimation system shown is exemplary, assuming that the state of the physical process to be measured in the system at time step k is recorded as , , represents an m-dimensional data set, then the state at time step k+1 is as shown in formula (1):

[0032] (1)

[0033] in, , the state at time step k+1; A is the time-invariant process matrix; w(k) is an independent and identically distributed Gaussian noise with mean 0 and variance Q, which can be expressed as .

[0034] At time step k, the state measurement value of the physical process by sensor i in node i can be expressed by the following formula (2):

[0035] (2)

[0036] in, is the measurement matrix of sensor i; N is the total number of nodes; , represents an n-dimensional data set, which is the sensor i pair Normal measurement data of The mean value corresponding to sensor i is 0, R i Independent and identically distributed Gaussian noise with variance , can be expressed as Initial state Satisfies Gaussian distribution and is consistent with all w(k) and Independently of each other, the steady state of the distributed estimation system has been achieved at time k = 0.

[0037] It is understandable that the physical process is not a strict linear process, but it can be approximated as a linear process through linearization, fuzzification and other methods. Therefore, the above assumption is reasonable. In addition, assume That is, the measurement of sensor i is a non-saturated measurement, which is consistent with actual industrial scenarios.

[0038] In the absence of a man-in-the-middle attack, using the Kalman filter estimation method, the state estimation process of estimator i can be expressed by the following formula:

[0039] (3)

[0040] in, is the estimation error covariance matrix of estimator i, ; and are the state estimates of estimator i and estimator j under normal operation (not attacked), respectively; is the Kalman gain of estimator i; is the estimated consensus gain; N i is the set of all incoming neighbors of node i, which means that data can be obtained from N i Each node in transmits to node i, node j is N i One of the nodes in the collection; YesN i The estimated error covariance matrix of node r in; is a matrix The inverse matrix of .

[0041] In the embodiment of the present invention, the estimators can exchange information through a wireless network, and a malicious attacker can eavesdrop on and tamper with the data in the communication channel between the estimators, resulting in the destruction of the state estimation accuracy and deterioration of the estimation performance of the system.

[0042] For example, see Figure 1 , for the sake of distinction, in the absence of a man-in-the-middle attack, the local state estimate of estimator i is ), in the presence of a man-in-the-middle attack, the local state estimate of estimator i is recorded as . Estimator i will During the transmission to estimator 1, the attack vector on the communication channel between estimator 1 and estimator i is After estimator 1 uses the attacked data from estimator i for consistency, the accuracy of the state estimate will be reduced, resulting in a decrease in the performance of the entire system.

[0043] In response to the above-mentioned man-in-the-middle attack phenomenon, some existing defense and detection methods include:

[0044] The 111 provided in this embodiment has at least the following advantages:

[0045] 1) Encryption and authentication technology: This is the most basic and widely used defense method. Specifically, it uses encryption protocols (such as SSL / TLS) and authentication mechanisms such as digital signatures in communications between sensor nodes. This can prevent attackers from eavesdropping and tampering with transmitted information, but it requires reliable key management and authentication agencies.

[0046] 2) Multi-path transmission redundancy technology: The same information is transmitted through multiple different paths, making it difficult for attackers to control all paths at the same time. Then, a comparison and verification is performed at the receiving end to determine whether the information has been attacked.

[0047] 3) Protocol-level security inspection technology: Monitor and inspect the behavior of sensor nodes at the protocol level, detect abnormal node behavior (such as frequent retransmission or injection of abnormal data, etc.) and isolate it.

[0048] 4) Quantum key distribution technology: Quantum key distribution technology is used to generate keys that are extremely difficult to crack, providing high-intensity encryption protection for communications between nodes.

[0049] 5) Blockchain defense technology: Utilize the decentralized and tamper-proof characteristics of blockchain to achieve secure data transmission and storage, and track abnormal behavior in the network.

[0050] After careful study, the inventors found that the above methods have the following defects:

[0051] Existing encryption and authentication technologies, and multi-path transmission redundancy technologies cannot effectively prevent attackers from stealing or tampering with the original observation data and state estimation data within the node; the protocol-level security check technology is tightly coupled with the distributed estimation algorithm, resulting in poor technical portability and versatility; although quantum key distribution technology can provide high security, its implementation process is very complicated and requires a dedicated quantum communication infrastructure; multi-path transmission redundancy and blockchain defense require a large amount of additional bandwidth, storage and computing resources, and are not suitable for use in resource-constrained distributed environments.

[0052] In order to defend and detect man-in-the-middle attacks, the embodiments of the present invention Figure 1 Node 01 in has been improved, see Figure 2 , Figure 2 Another architecture diagram of a distributed estimation system provided by an embodiment of the present invention.

[0053] like Figure 2 As shown, each node 01 is equipped with encryption function, reconstruction function and attack detection function. Figure 2 Only the reconstruction function and attack detection function of node 1 and the encryption function of node i are drawn, and the encryption function of node 1 and the reconstruction function and attack detection function of node i are omitted, but this should not be understood as a limitation on the function of node 01.

[0054] In one embodiment of the present invention, the encryption function refers to that the node performs partial linear encryption on the data to be transmitted before sending the data to be transmitted, so as to prevent attackers from launching data tampering attacks. At the same time, since physical processes usually have high-dimensional state data, the node can perform partial linear encryption on the data to be transmitted instead of traditional encryption authentication, which can significantly reduce storage and computing overhead.

[0055] In an optional implementation, the encryption method may be, but is not limited to, a linear encryption method. The embodiment of the present invention preferably adopts a partial linear encryption method, which can improve the system's ability to resist attacks.

[0056] In one embodiment of the present invention, the reconstruction function refers to the node reconstructing the actually received data, and the attack detection function refers to the node generating an attack detection signal based on the reconstructed data, and then judging whether a man-in-the-middle attack has occurred through the relative entropy between the attack detection signal and the normal detection signal.

[0057] For example, please continue to see Figure 2 , the estimated value of the state of estimator i when sending the attack Before, Encrypt and obtain the encrypted state estimate, recorded as , and then sends the encrypted state estimate. During the transmission, the attack vector The actual data received by estimator 1 is Estimator 1 reconstructs the actual received data and obtains the reconstructed data, which can be expressed as ,Then the reconstructed data is processed through the attack detection function to determine whether a man-in-the-middle attack has occurred.

[0058] In the embodiment of the present invention, for Figure 2 For each node 01 in the network, it can play different roles in different scenarios, namely, data sending end and data receiving end. Figure 2 Taking node 1 and node i as an example, Figure 2 The diagram shows a scenario where node 1 is used as a data receiving end and node i is used as a data sending end, and data is exchanged between the two. In other scenarios, node 1 can also be used as a data sending end to send data, and node i can also be used as a data receiving end to receive data.

[0059] Therefore, in the embodiment of the present invention, for each node, there are the following two situations:

[0060] Case 1: As a data transmitter, the node can use the encryption function to perform partial linear encryption on the data to be transmitted, and then send the encrypted data out, which can prevent the data from being tampered with.

[0061] Case 2: As a data receiver, the node can use the reconstruction function and attack detection function to accurately determine whether a man-in-the-middle attack has occurred.

[0062] In the embodiment of the present invention, the node can not only prevent data from being tampered with based on the encryption function, reconstruction function and attack detection function, but also accurately detect whether a man-in-the-middle attack has occurred, thereby ensuring the accuracy of state estimation within the system.

[0063] based on Figure 2 The system architecture shown in the figure, the embodiment of the present invention provides a distributed system man-in-the-middle attack defense method based on encryption and detection, see Figure 3 , Figure 3 A schematic flow chart of a distributed system man-in-the-middle attack defense method based on encryption and detection provided by an embodiment of the present invention. The execution subject of the method can be Figure 2 Any node in the process includes the following steps:

[0064] S301: When the node is a data sending end, partially linearly encrypt the data to be transmitted and then send it to the data receiving end;

[0065] In the embodiment of the present invention, the data to be transmitted is a local state estimation value of the data sending end.

[0066] S302: When the node is a data receiving end, the actually received data is reconstructed and an attack detection signal is generated based on the reconstructed data and the normal measurement data of the local end, and whether a man-in-the-middle attack has occurred is determined based on a comparison result of the relative entropy between the attack detection signal and the normal detection signal and a detection threshold.

[0067] In the scheme of step S301 and step S302, if a node in the distributed system is a data transmitter, the data is partially linearly encrypted before the data to be transmitted is sent, which can effectively prevent potential attackers from unauthorized access or tampering with the data. Through partial linear encryption, even if the data is intercepted during transmission, the attacker cannot interpret its content, thereby protecting the confidentiality and integrity of the data, and the embodiment of the present invention adopts data-level encryption rather than encryption authentication, which can significantly reduce storage and computing overhead. If the node is a data receiver, then after receiving the actual transmitted data, the actual received data is reorganized and an attack detection signal is generated. Finally, by comparing the relative entropy of the attack detection signal with the normal detection signal, it is determined whether a man-in-the-middle attack has occurred. Through this method, the system can promptly detect and identify man-in-the-middle attacks. The whole process can improve the security of system data transmission, and also enhance the system's detection and defense capabilities against network attacks.

[0068] It is worth noting that in the existing detection mechanism, the attack detection signal is generated by the data sending end and sent to the data receiving end together with the local state estimation value of the data sending end. This detection mechanism has serious problems. For example, an attacker can identify the attack detection signal in the data transmitted by the data sending end, and thus only attack the attack detection signal. Under this attack mode, the system will never trigger an attack alarm, and the system state estimation will be arbitrarily affected. Therefore, in the embodiment of the present invention, the data sending end only sends the local state estimation value, and the attack detection signal is generated by the data receiving end. This detection method is more reasonable and reliable.

[0069] In the following embodiments of the present invention, node j is used as a data sending end, node i is used as a data receiving end, and data is transmitted from node j to node i as an example, and the above-mentioned distributed system man-in-the-middle attack defense method based on encryption and detection is introduced in detail.

[0070] In one embodiment of the present invention, for the above step S301, performing partial linear encryption on the data to be transmitted can not only reduce computing power consumption, but also ensure that the estimation performance of the distributed estimation system is not affected by selecting a sufficiently large encryption key parameter. The specific implementation method is as follows:

[0071] Step a1: construct an encryption matrix using preset encryption key parameters;

[0072] Step a2: determining the data portion to be encrypted in the data to be transmitted;

[0073] Step a3: Use the encryption matrix to perform linear encryption on the data to be encrypted, and send the encrypted data to be transmitted to the receiving node.

[0074] In one embodiment of the present invention, the encryption key parameters include an encryption vector variance and an encryption coefficient. For step a1, the implementation method may be: generating a random encryption vector according to a given encryption vector variance and a random seed number; and constructing an encryption matrix according to the random encryption vector and a given encryption coefficient.

[0075] In order to facilitate the process of constructing the encryption matrix, the encrypted vector variance is assumed to be , the encryption factor is , the random seed number is , through the pseudo-random algorithm, the encryption vector variance and the random seed number are used to generate a random encryption vector, denoted as , , represents an m-dimensional data set, which can be expressed by formula (4):

[0076] (4)

[0077] in, Independent and identically distributed ; t=1, 2…, m, and is independent of other random vectors in the system.

[0078] Furthermore, the embodiment of the present invention can use encryption coefficients and random encryption vectors to construct an encryption matrix, as shown in formula (5):

[0079] (5)

[0080] in, is the encryption matrix, ,express dimensional data set; is a unit vector; yes Obviously, for any >0,k and , encryption matrix Reversible, which provides a basis for the subsequent construction of the reconstruction matrix.

[0081] After the encryption matrix is ​​constructed through the above implementation, the linear encryption matrix can be used to perform partial linear encryption on the data to be transmitted.

[0082] In the embodiment of the present invention, a pseudo-random number algorithm can be used to obtain With the same random seed, both the data sender and the data receiver can independently generate exactly the same random encryption vector. , and then get the same encryption matrix and its inverse matrix. Therefore, given , and , the data receiving end can completely reconstruct the data to be transmitted sent by the data end.

[0083] In an optional implementation, considering that packet loss or delay may occur during data transmission, it is only necessary to add timestamp information to the data to be transmitted, and the data receiving end can generate a random encryption vector corresponding to the timestamp information through a pseudo-random number algorithm, thereby completely reconstructing the data to be transmitted.

[0084] In order to facilitate understanding of the process of partially linearly encrypting the data to be transmitted in the embodiment of the present invention, it is assumed that when there is a man-in-the-middle attack, the data to be transmitted to be sent by node j is a damaged local estimate, which is recorded as , node j can first determine the encrypted data part and the unencrypted data part of the data to be transmitted, as shown in formula (6):

[0085] (6)

[0086] in, Data to be transmitted The part of data to be encrypted; Data to be transmitted The data portion that is not encrypted.

[0087] For the unencrypted data part, the embodiment of the present invention does not perform any processing; for the data part to be encrypted, the embodiment of the present invention can use the encryption matrix shown in formula (5) to perform linear encryption processing, and the encryption process is shown in formula (7):

[0088] (7)

[0089] in, It is the part of the data to be encrypted after linear encryption. Represents the inverse matrix of the encryption matrix.

[0090] At this point, the data to be transmitted after partial linear encryption processing at node j is as shown in formula (8):

[0091] (8)

[0092] in, It represents the encrypted data to be transmitted, and node j can then send out the encrypted data to be transmitted.

[0093] It is understandable that the embodiment of the present invention adopts the above-mentioned partial linear encryption method, when the encryption key is not leaked and the encryption key parameters are and In the event of a leak, we can choose a sufficiently large encryption vector with a variance of , an attack alarm can be triggered when a single channel is attacked in the global worst case, so that the data receiving end does not refer to the state estimation value of the attacked communication channel when performing consistency state estimation, thereby reducing the damage to the system.

[0094] With respect to the above step S302, in one embodiment of the present invention, the node as the data receiving end may determine whether a man-in-the-middle attack occurs after receiving the actually transmitted data.

[0095] For ease of understanding, the following explanation is continued using the example of node j transmitting data to node i.

[0096] Assuming that there is a man-in-the-middle attack and the attacker uses an error data injection attack, the data actually received by node i, that is, the actual data transmitted in the communication channel (i, j) between node i and node j, is as shown in formula (9):

[0097] (9)

[0098] in, Represents the data actually received at node i; represents the attack vector imposed by the attacker on the communication channel (i, j); It is the encrypted data to be transmitted.

[0099] In formula (9), before determining whether the actually received data is the estimated value of the state under the man-in-the-middle attack, a reconstruction matrix can be constructed based on the encryption matrix used in the encryption process, and decryption can be achieved using the reconstruction matrix.

[0100] Therefore, in one embodiment of the present invention, the actual received data is reconstructed in step S302 and an attack detection signal is generated based on the reconstructed data and normal measurement data of the local end. The implementation method may be as follows:

[0101] Step b1: construct an encryption matrix using preset encryption key parameters;

[0102] Step b2: constructing a reconstruction matrix based on the inverse matrix of the encryption matrix;

[0103] Step b3: Reconstruct the actually received data using the reconstruction matrix to obtain reconstructed data;

[0104] Step b4: Generate an attack detection signal based on the normal measurement data of the local end and the reconstructed data.

[0105] In the embodiment of the present invention, the encryption process and the reconstruction process are related, and the reconstruction matrix used in the reconstruction process is constructed on the basis of the encryption matrix used in the encryption process. The implementation method of constructing the encryption matrix has been introduced above and will not be repeated here. In one implementation, the embodiment of the present invention can construct a reconstruction matrix based on the inverse matrix of the encryption matrix, and the reconstruction matrix is ​​shown in formula (10):

[0106] (10)

[0107] in, represents the reconstruction matrix, Represents the inverse matrix of the encryption matrix.

[0108] Based on the reconstruction matrix shown in formula (10), node i can use the reconstruction matrix to reconstruct the actually received data. The reconstruction process can be expressed by formula (11):

[0109] (11)

[0110] in, Indicates the data actually received by node i Reconstruct the reconstructed data, and node i can use the reconstructed data To generate attack detection signals.

[0111] In one embodiment of the present invention, the attack detection signal may be generated by multiplying the measurement matrix with the reconstructed data, and then using the difference between the normal measurement data of the local end and the multiplication result as the attack detection signal. This implementation may be expressed by formula (12):

[0112] (12)

[0113] in, Indicates attack detection signal; Indicates normal measurement data of the data receiving end; represents the difference between the estimated value of the damaged local state of node j in the presence of a man-in-the-middle attack and the estimated value of the local state of node j in normal operation; , is the normal detection signal generated by the data receiving end when there is no man-in-the-middle attack. Since the estimation error of the Kalman filter state estimator converges to a steady state when it is operating normally, the normal detection signal It satisfies Gaussian distribution and is stable, which can be expressed as , = +R i , The estimated error covariance matrix of the Kalman estimator of node j at time k when it converges to a steady state is a definite value that can be calculated according to the formula of the distributed Kalman filter; and R i , which has been introduced before and will not be repeated here. T is the transposition symbol.

[0114] In one embodiment of the present invention, the node as the data receiving end can use the comparison result between the relative entropy between the attack detection signal and the normal detection signal and the detection threshold to determine whether a man-in-the-middle attack has occurred. The calculation formula of the relative entropy is shown in formula (13):

[0115]

[0116] (13)

[0117] Among them, Tr(·) represents the matrix trace, and are respectively the normal detection signals when the data receiving end node i is operating normally and the actual attack detection signal generated Their respective variance matrices, for The mean of n is the dimension of the normal measurement data of the data receiving node i. Satisfies Gaussian distribution and is stable, then is a known quantity and can be stored in the detection device in advance. The actual attack detection signal generated The mean and variance of are calculated by selecting the latest data through the sliding window.

[0118] Furthermore, the embodiment of the present invention can compare the relative entropy of the normal detection signal and the attack detection signal with the size of the detection threshold, so as to determine whether a man-in-the-middle attack occurs. The specific implementation method is as follows:

[0119] Step c1: determine whether the relative entropy is less than the detection threshold;

[0120] Step c2: If yes, it is determined that no man-in-the-middle attack has occurred;

[0121] Step c3: If not, it is determined that a man-in-the-middle attack has occurred.

[0122] Continuing with the example of node i and node j, if it is determined that the channel (i, j) between node i and node j is attacked, the estimator of node i will not use the data from node j for consistency.

[0123] In an optional implementation, when it is determined that a man-in-the-middle attack has occurred, an attack alarm may also be triggered.

[0124] The embodiment of the present invention also verifies the technical effect of the embodiment of the present invention through simulation.

[0125] See also Figure 4 , assuming that the network connection topology of the distributed estimation system in an industrial scenario is as follows Figure 4 As shown. Figure 4 In the figure, the arrow points to the direction in which data is transmitted through the network, and the dotted line represents the attacker launching a man-in-the-middle attack on the transmission channel.

[0126] Assume that at time k=70, the attacker launches an attack on the communication channels (1, 2), (2, 4), (3, 5), (4, 3), and (5, 1). Without taking any defensive measures, the state of each node under the man-in-the-middle attack is estimated as follows: Figure 5 As shown, Figure 5 Schematic diagram of the state estimation of each attacked channel without defense measures. Where k is the time step, is the actual state of node 1, , , , , The number in the upper right corner represents the node number, and the number in the lower right corner represents the data dimension number. A 1-dimensional vector representing the state estimate of node 2.

[0127] from Figure 5 As can be seen in Figure 2, after the attack, the estimated state of the attacked node deviates from the actual state. As a covert attack, the man-in-the-middle attack can successfully avoid the detection of the attack detector. Therefore, the alarm status of the attack detector based on relative entropy of each attacked channel is as follows: Figure 6 As shown, Figure 6 It is a schematic diagram of the relative entropy value of the attack detection signal and the normal detection signal in each attacked channel without defense measures. Figure 6 It can be seen that after the attack occurred, the value of the attack detector was always below the alarm threshold of 0.2 and failed to trigger the attack alarm.

[0128] In comparison, after adopting the distributed system man-in-the-middle attack defense method based on encryption and detection provided by the embodiment of the present invention, the state estimation of each node under the man-in-the-middle attack is as follows: Figure 7 As shown, Figure 7 The present invention is a schematic diagram of state estimation of each attacked communication channel under the distributed system man-in-the-middle attack defense method based on encryption and detection provided by an embodiment of the present invention.

[0129] exist Figure 7 In order to reflect the Figure 5 The same trend is shown, but the peak near k = 70 is truncated. It can be seen that under the multi-channel global worst-case attack, each node re-tracks the actual physical state after a period of time. This is because when the encryption parameter is large enough, the global worst-case attack will trigger an attack alarm and the receiving node will no longer use the channel data. At the same time, the attacker does not attack all channels, and the local state estimates between nodes can still be consistent.

[0130] Similarly, after adopting the distributed system man-in-the-middle attack defense method based on encryption and detection provided by the embodiment of the present invention, the alarm situation of the attack detector based on relative entropy of each attacked channel is as follows: Figure 8 As shown, Figure 8 This is a schematic diagram of the relative entropy values ​​of the attack detection signal and the normal detection signal under the distributed system man-in-the-middle attack defense method based on encryption and detection provided by the embodiment of the present invention. It can be seen that after the attack occurs, all attacked nodes trigger the attack alarm of the detector. Since all attack alarms are triggered, the state estimation will have a temporary estimated peak, but after a period of time, the actual physical state can be tracked again, which shows the resistance of the linear partial encryption provided by the embodiment of the present invention to attacks.

[0131] It can be seen that the distributed system man-in-the-middle attack defense method based on encryption and detection provided by the embodiment of the present invention has the following advantages: combining data encryption and attack detection based on relative entropy can not only prevent data from being tampered with, but also accurately identify man-in-the-middle attacks. In the process of data encryption, only part of the data is linearly encrypted, which can reduce the computing resources required by the system.

[0132] In one embodiment of the present invention, based on Figure 3 With the same inventive concept, the embodiment of the present invention provides a man-in-the-middle attack defense device based on encryption and detection, such as Fig. 9 As shown, Fig. 9 The function module diagram of the middleman attack defense device based on encryption and detection provided by the embodiment of the present invention. The middleman attack defense device based on encryption and detection 90 can be used with Figure 2 The node 01 shown includes an encryption module 901, a reconstruction module 902 and an attack detection module 903;

[0133] When the node is a data sending end, the encryption module 901 is used to perform partial linear encryption on the data to be transmitted and then send it to the data receiving end;

[0134] When the node is a data receiving end, the reconstruction module 902 is used to reconstruct the actually received data; the attack detection module 903 is used to generate an attack detection signal based on the reconstructed data and the normal measurement data of this end, and determine whether a man-in-the-middle attack has occurred based on the comparison result of the relative entropy between the attack detection signal and the normal detection signal and the detection threshold.

[0135] It is understandable that the encryption module 901, the reconstruction module 902 and the attack detection module 903 can be executed in coordination. Figure 3 Each step in the process is performed to achieve the corresponding technical effect.

[0136] In an optional implementation, the encryption module 901 is specifically used to construct an encryption matrix using preset encryption key parameters; determine the data portion to be encrypted in the data to be transmitted; use the encryption matrix to linearly encrypt the data portion to be encrypted, and send the encrypted data to be transmitted to the data receiving end.

[0137] In an optional implementation, the encryption module 901 is specifically configured to generate a random encryption vector according to a given encryption vector variance and a random seed number; and construct the encryption matrix according to the random encryption vector and a given encryption coefficient.

[0138] In an optional implementation, the reconstruction module 902 is specifically used to construct an encryption matrix using preset encryption key parameters; construct a reconstruction matrix based on the inverse matrix of the encryption matrix; reconstruct the actually received data using the reconstruction matrix to obtain reconstructed data; and generate the attack detection signal based on the normal measurement data of the local end and the reconstructed data.

[0139] In an optional implementation manner, the attack detection module 903 is specifically configured to obtain a preset measurement matrix, multiply the measurement matrix by the reconstructed data, and then use the difference between the normal measurement data of the local end and the multiplication result as the attack detection signal.

[0140] In an optional implementation, the attack detection module 903 is specifically used to determine whether the relative entropy is less than a detection threshold; if so, it is determined that no man-in-the-middle attack has occurred; if not, it is determined that a man-in-the-middle attack has occurred.

[0141] In an optional implementation, the encryption and detection-based man-in-the-middle attack defense device 90 may further include an alarm module for triggering an attack alarm when it is determined that a man-in-the-middle attack has occurred.

[0142] It should be noted that the division of modules in the above embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0143] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.

[0144] The present invention also provides an electronic device, on which the following Figure 2 Alternatively, the electronic device may be deployed with a distributed estimation system as shown. Figure 2 One or more nodes 01 are shown.

[0145] In an optional implementation, the electronic device can be used to execute the distributed system man-in-the-middle attack defense method based on encryption and detection provided in an embodiment of the present invention, and may include: a memory, a processor, a communication interface, and a bus, wherein the memory, the processor, and the communication interface are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.

[0146] Optionally, the bus may be a peripheral component interconnect standard bus or an extended industry standard architecture bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0147] In the embodiment of the present application, the processor may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor. The software module may be located in a memory, and the processor reads the program instructions in the memory and completes the steps of the above method in combination with its hardware.

[0148] In the embodiment of the present application, the memory may be a non-volatile memory, such as a hard disk or a solid state drive, or a volatile memory, such as a RAM. The memory may also be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory in the embodiment of the present application may also be a circuit or any other device that can implement a storage function, for storing instructions and / or data.

[0149] The memory can be used to store software programs and modules, such as the instructions / modules of the encryption and detection based man-in-the-middle attack defense device 90 provided in the embodiment of the present invention, which can be stored in the memory in the form of software or firmware or fixed in the operating system of the electronic device. The processor executes the software programs and modules stored in the memory to perform various functional applications and data processing. The communication interface can be used to communicate signaling or data with other node devices.

[0150] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0151] The network where the electronic device is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network, etc.

[0152] Based on the above embodiments, the present application also provides a storage medium, in which a computer program is stored. When the computer program is executed, the distributed system man-in-the-middle attack defense method based on encryption and detection provided in the above embodiments is executed.

[0153] Based on the above embodiments, an embodiment of the present invention further provides a computer program. When the computer program runs on a computer, the computer executes the distributed system man-in-the-middle attack defense method based on encryption and detection provided in the above embodiments.

[0154] Based on the above embodiments, an embodiment of the present invention further provides a chip, which is used to read a computer program stored in a memory and to execute the distributed system man-in-the-middle attack defense method based on encryption and detection provided in the above embodiments.

[0155] A computer program product is also provided in an embodiment of the present invention, including instructions, which, when executed on a computer, enable the computer to execute the distributed system man-in-the-middle attack defense method based on encryption and detection provided in the above embodiment.

[0156] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by instructions. These instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0159] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A distributed system man-in-the-middle attack defense method based on encryption and detection, characterized in that: Applied to any node in a distributed system; the method comprises: When the node is a data transmitting end, the data to be transmitted is partially linearly encrypted and then sent to the data receiving end, including: using a preset encryption key parameter to construct an encryption matrix; determining the data portion to be encrypted in the data to be transmitted; using the encryption matrix to linearly encrypt the data portion to be encrypted, and sending the encrypted data to be transmitted to the data receiving end; wherein the encryption matrix is ​​in the form of: ;in, is the encryption factor; The random encryption vector is generated by using the encryption vector variance and the random seed number; when the encryption key is not leaked and the encryption key parameters are and the encrypted vector variance In the case of leakage, by choosing a sufficiently large variance of the encrypted vector , when a single channel is attacked under the global worst-case scenario, an attack alarm will be triggered, so that the data receiving end does not refer to the state estimation value of the attacked communication channel when performing consistency state estimation; When the node is the data receiving end, the actually received data is reconstructed and an attack detection signal is generated based on the reconstructed data and the normal measurement data of the local end, and whether a man-in-the-middle attack has occurred is determined based on a comparison result of the relative entropy between the attack detection signal and the normal detection signal and a detection threshold; wherein the reconstruction matrix used in the reconstruction process is constructed on the basis of the encryption matrix used in the encryption process.

2. The distributed system man-in-the-middle attack defense method based on encryption and detection according to claim 1 is characterized in that: Reconstruct the actually received data and generate an attack detection signal based on the reconstructed data and the normal measurement data of the local end, including: Constructing an encryption matrix using preset encryption key parameters; constructing a reconstruction matrix based on the inverse matrix of the encryption matrix; Reconstructing the actually received data using the reconstruction matrix to obtain reconstructed data; The attack detection signal is generated according to the normal measurement data of the local end and the reconstructed data.

3. The distributed system man-in-the-middle attack defense method based on encryption and detection according to claim 2 is characterized in that: Generating the attack detection signal according to the normal measurement data of the local end and the reconstructed data includes: Get the preset measurement matrix; The measurement matrix is ​​multiplied by the reconstructed data, and then the difference between the normal measurement data of the local end and the multiplication result is used as the attack detection signal.

4. The distributed system man-in-the-middle attack defense method based on encryption and detection according to claim 1 is characterized in that: Determining whether a man-in-the-middle attack has occurred according to a comparison result of a relative entropy between the attack detection signal and the normal detection signal and a detection threshold, including: Determining whether the relative entropy is less than the detection threshold; If yes, it is determined that no man-in-the-middle attack has occurred; If not, it is determined that a man-in-the-middle attack has occurred.

5. The distributed system man-in-the-middle attack defense method based on encryption and detection according to claim 1 is characterized in that: The method further comprises: When a man-in-the-middle attack is confirmed to have occurred, an attack alarm is triggered.

6. A distributed system man-in-the-middle attack defense device based on encryption and detection, characterized in that: Applied to any node in a distributed system; the distributed system man-in-the-middle attack defense device based on encryption and detection includes: an encryption module, a reconstruction module and an attack detection module; When the node is a data sending end, the encryption module is used to perform partial linear encryption on the data to be transmitted and then send it to the data receiving end; When the node is a data receiving end, the reconstruction module is used to reconstruct the actually received data; the attack detection module is used to generate an attack detection signal based on the reconstructed data and the normal measurement data of the local end, and determine whether a man-in-the-middle attack has occurred according to the comparison result of the relative entropy between the attack detection signal and the normal detection signal and the detection threshold; wherein the reconstruction matrix used in the reconstruction process is constructed on the basis of the encryption matrix used in the encryption process; The encryption module is specifically used to: construct an encryption matrix using preset encryption key parameters; determine the data portion to be encrypted in the data to be transmitted; use the encryption matrix to linearly encrypt the data portion to be encrypted, and send the encrypted data to be transmitted to the data receiving end; wherein the encryption matrix is ​​as follows: ;in, is the encryption factor; The random encryption vector is generated by using the encryption vector variance and the random seed number; when the encryption key is not leaked and the encryption key parameters are and the encrypted vector variance In the case of leakage, by choosing a sufficiently large variance of the encrypted vector ,When a single channel is attacked under the global worst case situation, an attack alarm will be triggered, so that the data receiving end does not refer to the state estimation value of the attacked communication channel when performing the consistency state estimation.

Citation Information

Patent Citations

  • Safety test system based on IPv6 wireless sensor network

    CN104837150A

  • Electric power information physical system safety control method based on cooperative interaction type observer

    CN116633631A

  • Distributed smart power grid false data injection attack method and device, and medium

    CN116668090A

  • Data processing method and device based on large language model

    CN117909471A

  • A system for trust based attacker detection for manet and method thereof

    IN202021052163A