Network log collection and protection method and device

Through the log signature verification technology of Merkel trusted tree and TCM chip, combined with elliptic curve encryption and DHash tree model, the problem of network device log data being tampered with is solved, the secure collection and integrity detection of log data is realized, and the security and analysis efficiency of the information system are improved.

CN115208573BActive Publication Date: 2025-08-19HANGZHOU DPTECH TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210441848.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-25
Publication Date
2025-08-19
Estimated Expiration
2042-04-25

AI Technical Summary

Technical Problem

In the prior art, the log data of network equipment is easily tampered with, deleted or forged by attackers, resulting in the inability to effectively protect the security status of the information system, and it is unrealistic to manually analyze massive security logs.

Method used

The Merkel trusted tree structure and TCM chip are used for log data signature verification, combined with elliptic curve encryption and combined public key technology, integrity detection is performed through log management components, and log storage and detection is used for timestamp-based DHash tree model.

Benefits of technology

It realizes the secure collection, transmission and storage of log data, ensures the integrity and forward security of log data, and improves the efficiency and accuracy of log analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115208573B_ABST
    Figure CN115208573B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a network log collection and protection method and device, comprising: a network node obtains historical logs and newly added logs and sends them to a log management component, and correspondingly generates a historical log Merkel tree and a newly added log Merkel tree at the network node; the network node uses its private key to perform root node signatures on the historical log Merkel tree and the newly added log Merkel tree through its TCM chip, thereby forming a first root node signature of the historical log Merkel tree and a second root node signature of the newly added log Merkel tree, and transmits these signatures to the log management component; the log management component generates a historical log Merkel tree and a newly added log Merkel tree at the log management component for the received historical logs and newly added logs; the log management component uses the network node public key through its TCM chip to verify the received first root node signature and second root node signature, rejecting data from the network node if the first root node signature verification fails, and rejecting the newly added log if the second root node signature verification fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of log collection and protection, and in particular to a network log collection and protection method and device. Background Art

[0002] The Merkel trust tree was developed to address authentication issues in multiple one-time signatures. The Merkel trust tree structure offers significant advantages in authentication, emphasizing the benefits of a single signature for multiple authentications. Today, the Merkel trust tree structure has been widely applied in various fields of information security, such as certificate revocation, source multicast authentication, and group key agreement.

[0003] The TCM standard, also known as the Trusted Cryptography Module (TCM), was developed in China and launched by the National Cryptography Administration in collaboration with several domestic IT companies. The biggest advantage of TPM chips is their ability to store and encrypt data and key files using hardware algorithms.

[0004] Information systems contain a large number of security logs, such as operating system logs, firewall logs, IDS (Intrusion Detection System) logs, audit logs, and database logs. Security logs play a crucial role in ensuring information system security. If an information system is compared to an airplane, then the log files are the plane's "black box." Assuming the security logs are intact, everything that happens in the information system will leave traces in the logs. For example, security logs record system activity information, such as program execution, program crashes, data modifications, and user behavior; they also record network connection information, such as source IP address, destination IP address, source port number, destination port number, and number of bytes sent. In short, security logs contain information related to the security status of the information system (both past and current).

[0005] Security logs play a crucial role in detecting potential security risks, uncovering attacks, and ensuring system security. This often makes them targets for attackers. Attackers can conceal their actions by modifying, deleting, or falsifying relevant log entries, making it impossible for administrators to detect attacks within information systems.

[0006] Network devices generate a large amount of log information during operation, including operation logs, fault logs, debug logs, and more. Therefore, log analysis is a crucial component of system fault analysis. Currently, security devices such as IDS systems, firewalls, and antivirus systems store much of their operational information in the form of syslog logs on local disks. If network device log data is stored in insecure directories, or if permission controls are lax and logs are not encrypted or verified, attackers can delete, tamper with, or forge logs.

[0007] Given the above situation, it is necessary to establish a log protection mechanism to safeguard important security logs. Furthermore, given the high value of security logs, we also need to analyze them to extract information related to information system security, such as the current security status of the information system, the presence of security vulnerabilities, and whether attacks have occurred. However, due to the massive volume of security logs, manual analysis is impossible.

[0008] Therefore, there is a need for a log collection and protection method and device that can effectively protect and efficiently detect log integrity, so as to realize the automated collection, preprocessing and analysis of logs and obtain information related to system security. Summary of the Invention

[0009] In view of this, the present disclosure provides a network log collection and protection method and device. According to one aspect of the present application, a network log collection and protection method is proposed, which includes: a network node obtains historical logs and newly added logs and sends them to a log management component, and correspondingly generates a historical log Merkel tree and a newly added log Merkel tree at the network node; the network node uses its private key to perform root node signatures on the historical log Merkel tree and the newly added log Merkel tree through its TCM chip, forming a first root node signature of the historical log Merkel tree and a second root node signature of the newly added log Merkel tree, and transmits them to the log management component; the log management component generates a historical log Merkel tree and a newly added log Merkel tree at the log management component for the received historical logs and newly added logs respectively; and the log management component uses the network node public key through its TCM chip to verify the received first root node signature and second root node signature respectively, and rejects data from the network node when the first root node signature verification fails, and rejects the received newly added log when the second root node signature verification fails.

[0010] According to the network log collection and protection method disclosed in the present invention, it also includes: after the log management component successfully verifies the first root node signature and the second root node signature it receives, it stores the newly added log and integrates the newly added log into the historical log Merkel tree at the log management component.

[0011] According to the network log collection and protection method disclosed in the present invention, the network node forms the first root node signature of the historical log Merkel tree and the second root node signature of the newly added log Merkel tree using its private key through its TCM chip, and the log management component verifies the first root node signature and the second root node signature using the network node public key through its TCM chip using elliptic curve encryption technology and combined public key technology.

[0012] According to the network log collection and protection method disclosed in the present invention, the historical log Merkel tree at the log management component is a DHash tree based on timestamps.

[0013] According to the network log collection and protection method disclosed herein, when a log management component integrates the newly added log into the historical log Merkel tree at the log management component, the root node data within the timestamp range to which the timestamp of the log to be integrated belongs is read according to the timestamp of the log to be integrated, the newly inserted hash value is calculated, the root node data is updated, and each update of the root node data is recorded in the update log.

[0014] According to the network log collection and protection method disclosed in the present invention, it also includes: when the log management component performs integrity detection on the timestamp-based DHash tree, if the left subtree at the detection position has completed detection and is recorded in the detection log, then the right subtree at the detection position is subjected to integrity detection.

[0015] According to one aspect of the present application, a network log collection and protection device is proposed, comprising: a network node-side log Merkel tree generation component, configured for a network node to obtain historical logs and newly added logs and send them to a log management component, and correspondingly generate a historical log Merkel tree and a newly added log Merkel tree at the network node; a signature component, configured for the network node to use its private key to perform root node signatures on the historical log Merkel tree and the newly added log Merkel tree through its TCM chip, thereby forming a first root node signature of the historical log Merkel tree and a second root node signature of the newly added log Merkel tree, and transmit the signatures to the log management component; a log management-side log Merkel tree generation component, configured for the log management component to generate a historical log Merkel tree and a newly added log Merkel tree at the log management component for the received historical logs and newly added logs, respectively; and a signature verification component, configured for the log management component to use the network node public key through its TCM chip to verify the received first root node signature and second root node signature, respectively, and to reject data from the network node if the first root node signature verification fails, and to reject the received newly added log if the second root node signature verification fails.

[0016] According to the network log collection and protection device disclosed in the present invention, it also includes: after the log management component successfully verifies the first root node signature and the second root node signature it receives, it stores the newly added log and integrates the newly added log into the historical log Merkel tree at the log management component.

[0017] According to the network log collection and protection device disclosed in the present invention, the network node forms the first root node signature of the historical log Merkel tree and the second root node signature of the newly added log Merkel tree using its private key through its TCM chip, and the log management component verifies the first root node signature and the second root node signature using the network node public key through its TCM chip using elliptic curve encryption technology and combined public key technology.

[0018] According to the network log collection and protection device disclosed herein, the historical log Merkel tree at the log management component is a DHash tree based on timestamps.

[0019] According to the network log collection and protection device disclosed in the present invention, when the log management component integrates the newly added log into the historical log Merkel tree at the log management component, the root node data within the timestamp range to which the timestamp of the log to be integrated belongs is read according to the timestamp of the log to be integrated, the newly inserted hash value is calculated, the root node data is updated, and each update of the root node data is recorded in the update log.

[0020] According to the network log collection and protection device disclosed in the present invention, it also includes: a selective detection component, which is used for the log management component to perform integrity detection on the timestamp-based DHash tree. If the left subtree at the detection position has completed detection and is recorded in the detection log, then the right subtree at the detection position is subjected to integrity detection.

[0021] In summary, the network log collection and protection method and apparatus disclosed herein propose a TCM-based log protection mechanism for network device logs. This mechanism utilizes a Merkel tree, elliptic curve cryptography, a combined public key, and a TCM chip to ensure the security of log data collection and protection. Furthermore, during the log storage phase, a timestamp-based DHash tree integrity check model is utilized to securely store log data, with integrity checks performed when necessary to ensure the integrity of the log data during storage.

[0022] It should be understood that the foregoing general description and the following detailed description are merely illustrative and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and other objects, features, and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the accompanying drawings. The drawings described below are merely some embodiments of the present application, and it is apparent to those skilled in the art that other drawings can be derived from these drawings without inventive effort.

[0024] Figure 1 What is shown is a flow chart of the network log collection and protection method according to an embodiment of the present disclosure.

[0025] Figure 2 The figure shows a flow chart of integrating newly added log data of nodes in the same period into a timestamp-based Dhash tree according to the network log collection and protection method of an embodiment of the present disclosure.

[0026] Figure 3 The figure shows a flow chart of integrating newly added log data of nodes in different time periods into a timestamp-based Dhash tree in the network log collection and protection method according to an embodiment of the present disclosure.

[0027] Figure 4 What is shown is a schematic diagram of the integrity detection process in the network log collection and protection method according to an embodiment of the present disclosure.

[0028] Figure 5 What is shown is a schematic diagram of a network log collection and protection device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Like reference numerals in the drawings represent like or similar parts, and thus repetitive description thereof will be omitted.

[0030] In addition, the described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, well-known methods, systems, implementations or operations are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0031] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0032] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0033] Those skilled in the art will understand that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present disclosure, and therefore cannot be used to limit the scope of protection of the present disclosure.

[0034] The log collection and protection method of the embodiment of the present disclosure includes: log data collection, log integrity verification, and log reception and storage when performing the network log collection and protection method.

[0035] Log data can be collected from host systems, network devices, or security devices (hereinafter collectively referred to as network nodes) within information systems, such as hosts, firewalls, audit systems, web security monitoring systems, or IDS intrusion detection systems. More specifically, network devices can be switches, routers, frame relays, hubs, VPNs, etc.; security devices can be firewalls, IDSs, abnormal traffic detection systems, vulnerability scanners (systems), etc.

[0036] Network nodes regularly upload log data generated during daily operations to the log management component. The log management component stores the received log data and, in order to ensure the security of the log data, needs to be isolated from the network nodes. That is, it only communicates with the network nodes when collecting logs regularly.

[0037] In addition, the following strategies need to be followed: (1) The log management component only accepts data addition and query operations from network nodes, but not deletion and modification operations. This ensures that even if the latter is hacked, the log data stored by the former cannot be destroyed; (2) The network node will only delete or modify its own logs when it receives a command from the log management component. Therefore, once the log data of the latter undergoes unexpected changes, it is considered to have been destroyed by the attacker and the collection of logs for the network node will stop.

[0038] After each network node generates log data, it is temporarily stored locally and the original log files are regularly uploaded to the log management component. During the log collection process, the log collection mechanism must be followed to ensure the security and reliability of the collected log data. This collection mechanism requires signature verification of the root node of the log Merkel tree to ensure the integrity of the log data.

[0039] Figure 1 The figure shows a flow chart of the network log collection and protection method according to an embodiment of the present disclosure. Figure 1 As shown, in step S102, the network node obtains the log and sends it to the log management component, and generates a log Merkel tree. Specifically, the network node obtains the historical log and the new log and sends them to the log management component, and generates the historical log Merkel tree and the new log Merkel tree at the network node accordingly.

[0040] More specifically, after a network node generates log data, it temporarily stores it locally. A new Merkel tree is constructed using the newly generated log file as the data file. Simultaneously, the network node also stores a historical Merkel tree constructed using previous log files. The new Merkel tree is then integrated into the historical Merkel tree. The purpose of constructing a log Merkel tree is to reduce the number of digital signature operations and the amount of data transferred, thereby improving processing efficiency.

[0041] In step S104, the network node performs root node signature on the log Merkel tree and transmits the formed root node signature to the log management component. Specifically, the network node uses its private key through its TCM chip to perform root node signature on the historical log Merkel tree and the newly added log Merkel tree, forming the first root node signature of the historical log Merkel tree and the second root node signature of the newly added log Merkel tree, and transmits them to the log management component.

[0042] More specifically, the network node's private key is used to sign the root nodes of the historical and newly added Merkel trees through the TCM chip, generating the signatures of the first and second root nodes of the historical and newly added Merkel trees. Finally, the newly generated log data, the signatures of the first and second root nodes are sent to the log management component.

[0043] In step S106 , the log management component generates a log Merkel tree for the received log. Specifically, the log management component generates a historical log Merkel tree and a new log Merkel tree for the received historical log and new log, respectively.

[0044] More specifically, after the log management layer receives the new logs from the network nodes, it also constructs a Merkel tree of the new logs.

[0045] In step S108, the log management component verifies the received root node signature and executes corresponding policy steps based on the verification result. Specifically, the log management component uses the network node public key through its TCM chip to verify the received first root node signature and second root node signature respectively, and rejects the data from the network node when the verification of the first root node signature fails, and rejects the received new log when the verification of the second root node signature fails.

[0046] In the network log collection and protection method of the embodiment of the present disclosure, after the log management component successfully verifies the first root node signature and the second root node signature it receives, it stores the newly added log and integrates the log data of the newly added log into the historical log Merkel tree at the log management component.

[0047] More specifically, the log management component uses the public key of the network node to verify the received signatures of the first and second root nodes through the TCM chip. Merkel If the verification result of the first root node signature is equal to the root node of the historical log Merkel tree, it indicates that the historical log data stored by the network node is safe. Otherwise, it indicates that the historical log data stored by the network node has been destroyed. In this case, it is considered that the network node has been invaded by an attacker. Similarly, if the verification result of the first root node signature is equal to the root node of the newly added log Merkel tree, it indicates that the newly received log data has not been destroyed during the transmission process, and the identity of the sender can also be confirmed; otherwise, the received log data is considered incomplete and is discarded.

[0048] Only when the first root node signature and the first root node signature are successfully verified at the same time, the newly received new log data will be stored, and the new log Merkel tree will be integrated into the historical log Merkel tree.

[0049] It should be noted that, in the above process, once a network node is found to have been invaded, data transmission with the node is stopped.

[0050] The above log collection and protection technologies ensure that the log data received by the log management component is secure and reliable. Even if a network node is compromised by an attacker, the data security of the log management component will not be affected, thus ensuring the forward security of the log data.

[0051] In addition, it has the following features: (1) Log files are used to construct the Merkel tree, and only the root node needs to be signed during integrity verification. Compared with other methods that require signing all files, although additional hash calculations are required when constructing the Merkel tree, the time complexity of hash calculations is much smaller than that of signature calculations, so the Merkel tree solution can improve computational efficiency. In addition, the signature information is reduced, which can also reduce the amount of authentication information transmitted. (2) Using the TCM chip for integrity verification can significantly improve the security of the key generation and signature verification process.

[0052] Secure log transmission and storage occurs after log trustworthiness is generated. Secure log transmission ensures complete trust during log transmission, achieved through the design of an interaction protocol between the client and server. Secure log storage ensures log integrity testing, improving the efficiency of integrity testing through the design of the stored data structure. Specifically, the security objectives of the log transmission and storage phase can be described as follows: After the submitted data is generated during the log generation phase, it is transmitted to a secure server for easy audit by system auditors. To ensure confidentiality and integrity during transmission, establishing a secure transmission channel is essential. The TCM-based log secure transmission model is established through interaction between the TCM modules on the client and server. Communication between the two parties requires mutual authentication of the platform's trustworthiness and negotiation of parameters such as the channel encryption key. During secure transmission to the server, the server reconstructs and stores the data based on a hash tree to facilitate log integrity testing.

[0053] Transmission security is ensured by a secure channel. This includes key generation, key migration, and client / server interaction. Once the secure channel is established, intermediate data transmission begins, undergoing encryption, decryption, and digital signatures. Specifically, key generation and migration occur within the TCM by creating objects, setting key attributes, and setting policies and authorization data. Client / server interaction occurs via sockets. Data encryption and decryption includes both symmetric and asymmetric encryption. Generated asymmetric and channel keys must be loaded into the TCM module and authorized before encryption and decryption.

[0054] According to the network log collection and protection method of the embodiment of the present disclosure, the network node uses its private key through its TCM chip, and the log management component uses the network node public key through its TCM chip to sign and verify the root node of the newly added log Merkel tree and the historical log Merkel tree using elliptic curve encryption technology and combined public key technology.

[0055] More specifically, the signing and verification process uses a TCM chip and a combined public key. The TCM chip ensures the security of the signature verification process, and the combined public key reduces the space required for key storage. The following is the signing and verification process in the network log collection and protection method of the embodiment of the present disclosure:

[0056] S10. First, generate several parameters T = (p, a, b, G, n, h) of the elliptic curve, and then generate sxt pieces of public and private key information (sxt is the dimension of the public and private key matrix).

[0057] S20. Generate a public key matrix and a private key matrix based on the public and private key information generated in step S10, store the former in plain text, and encrypt and store the latter using the public key of the key management terminal.

[0058] S30. The network node obtains the private key from the key management terminal.

[0059] S302: The network node sends a request to the key management terminal to obtain a key.

[0060] S304: After receiving the request, the key management terminal checks the legitimacy of the network node ID value, uses its own private key and calls the command to decrypt the private key matrix. After obtaining the private key matrix and public key matrix, it calculates the private key and public key belonging to the network node based on the ID value.

[0061] S306: Encapsulate the private key and send it to the network node.

[0062] S40. The network node signs the Merkel tree root node:

[0063] S402: After receiving the request from the network node, the TCM command loads the private key, and all subsequent operations will be performed in the TCM.

[0064] S404. TCM uses the private key and calls a command to sign the Merkel tree root node, and feeds the signature result back to the network node.

[0065] S406. The network node sends the signature result to the log management component.

[0066] S50. Log management component performs signature verification:

[0067] S502: After receiving the root node signature sent by the network node, the log management component first checks the legitimacy of the network node ID value and obtains the corresponding public key from the key management end according to the ID value.

[0068] S504: The log management component uses TCM to perform verification operations, verifies the root node signature, and feeds back the verification result.

[0069] S506: The log management component compares the verification result with the Merkel tree root node.

[0070] Preserving intermediate log data essentially involves saving the transmitted log field data and verifying its integrity when necessary. Building a timestamp-based hash tree integrity verification model based on the timestamps generated by the logs can reduce the time required to perform integrity checks on log data.

[0071] According to the network log collection and protection method of an embodiment of the present disclosure, the historical log Merkel tree at the log management component is a DHash tree based on timestamps.

[0072] The network log collection and protection method of the disclosed embodiment supports the insertion of data based on the timestamp DHash tree, global traversal of data, and selective traversal. The insertion of data reads the root node data within the current timestamp range according to different timestamps, calculates the newly inserted Hash value, and updates the root node. The global traversal of data is to perform an overall integrity check on the existing overall data. Specifically, the global traversal starts from the root node, traverses all nodes, and completes an overall test. The data tampered with by the log is usually the latest, so usually only selective traversal is required. Selective traversal can read all the data under the node according to the different timestamps, and perform integrity check on the data within the timestamp.

[0073] More specifically, according to the network log collection and protection method of the embodiment of the present disclosure, when the log management component inserts the log data of the newly added log into the timestamp-based DHash tree thereat, the root node data within the timestamp range to which the timestamp of the newly added log belongs is read, the newly inserted hash value is calculated, and the root node data is updated, and each update of the root node is recorded in the update log.

[0074] Figure 2 The figure shows a flow chart of integrating newly added log data of nodes in the same period into a timestamp-based Dhash tree according to the network log collection and protection method of an embodiment of the present disclosure.

[0075] like Figure 2 As shown, in step S202, it is determined whether it is the first data. If the result of the determination in step S202 is "yes", the process proceeds to step S204. In step S204, the timestamp of the root node D_1 is read, and the data is the hash value of the last data. In step S206, the DHash tree is inserted.

[0076] If the result of determining whether the data is the first one in step S202 is "No," proceed to step S204. In step S208, save the root node to the PCR. In step S210, read the PCR value at time D_0. In step S212, recalculate the root node. In step S214, insert the DHash tree. In step S216, save the root node to the PCR.

[0077] Figure 3 The figure shows a flow chart of integrating newly added log data from nodes in different time periods into a timestamp-based Dhash tree, according to a network log collection and protection method according to an embodiment of the present disclosure. Inserting nodes with different timestamps is analogous to inserting nodes in different time periods, requiring a timestamp range determination before updating the root node. Each root node update requires an update log record, facilitating rapid location of tampering during integrity checks.

[0078] like Figure 3 As shown, in step S302, it is determined whether it is the D0 period.

[0079] In step S302, if the result of determining whether it is the D0 period is "yes," the process proceeds to step S304. In step S304, the PCR value at time D0 is read. In step S306, the root node is recalculated. In step S308, the DHash tree is inserted. In step S310, the root node is updated to the PCR.

[0080] If the result of determining whether it is the D0 period in step S302 is "No," the process proceeds to step S312. In step S312, the PCR value is read. In step S314, the hash value of the root node and D1 is calculated, and the root node is updated. In step S316, data D2 is received and the hash value of the D1 node hash value and the D2 hash value is calculated as the parent node. In step S318, the DHash tree is inserted. In step S320, the hash value of the D1 root node PCR value and the parent node hash value is calculated, and the root node is updated.

[0081] More specifically, according to the network log collection and protection method of an embodiment of the present disclosure, when the log management component performs integrity check on the timestamp-based DHash tree, if the left subtree at the detection position has completed detection and recorded in the detection log, then the right subtree of the detection position is subjected to integrity check.

[0082] Figure 4 The figure shows a schematic diagram of the integrity detection process in the network log collection and protection method according to an embodiment of the present disclosure. Figure 4 As shown, in step S402, it is determined whether the detection command is a complete detection.

[0083] In step S402, when the result of determining whether the detection command is a complete detection is "yes", the process goes to step S404. In step S404, a complete detection is started. In step S406, the left and right nodes of each node are recursively traversed. In step S408, the hash value of the root node is calculated. In step S410, it is determined whether the calculated root node is consistent with the one stored in the PCR. In step S410, when the result of determining whether the calculated root node is consistent with the one stored in the PCR is "yes", the process goes to step S412. In step S412, the detection is completed and the detection log is recorded. In step S410, when the result of determining whether the calculated root node is consistent with the one stored in the PCR is "no", the process goes to step S414. In step S414, the tampered data is found according to the update log.

[0084] When the result of determining whether the detection command is a complete detection in step S402 is "No", the process goes to step S416, and in step S416, selective detection is started. In step S418, it is determined whether there is a detection log. When the result of determining whether there is a detection log in step S418 is "Yes", the process goes to step S420, and in step S420, the hash tree is traversed to locate the latest position of the detection log. In step S422, the subsequent data detection is continued. When the result of determining whether there is a detection log in step S418 is "No", the process goes to step S408 and the subsequent steps of step S408 to complete the integrity detection.

[0085] Figure 5 The diagram shows a schematic diagram of a network log collection and protection device according to an embodiment of the present disclosure. Figure 5 As shown, the network log collection and protection device includes: a network node end log Merkel tree generation component 502, a signature component 504 and a log management component 506, wherein the log management component 506 includes: a log management end log Merkel tree generation component 506a and a signature verification component 506b.

[0086] Among them, the network node-side log Merkel tree generation component 502 is used for the network node to obtain historical logs and newly added logs and send them to the log management component, and correspondingly generate the historical log Merkel tree and the newly added log Merkel tree at the network node; the signature component 504 is used for the network node to use its private key to perform root node signatures on the historical log Merkel tree and the newly added log Merkel tree through its TCM chip, forming the first root node signature of the historical log Merkel tree and the second root node signature of the newly added log Merkel tree, and transmit them to the log management component; the log management-side log Merkel tree generation component 506a is used for the log management component to generate the historical log Merkel tree and the newly added log Merkel tree at the log management component for the received historical logs and newly added logs respectively; and the signature verification component 506b is used for the log management component to use the network node public key through its TCM chip to verify the received first root node signature and second root node signature respectively, and reject the data from the network node when the first root node signature verification fails, and reject the received newly added log when the second root node signature verification fails.

[0087] According to the network log collection and protection device of an embodiment of the present disclosure, after the log management component successfully verifies the first root node signature and the second root node signature it receives, it stores the newly added log and integrates the newly added log into the historical log Merkel tree at the log management component.

[0088] According to the network log collection and protection device of the embodiment of the present disclosure, the network node forms the first root node signature of the historical log Merkel tree and the second root node signature of the newly added log Merkel tree using its private key through its TCM chip, and the log management component verifies the first root node signature and the second root node signature using the network node public key through its TCM chip using elliptic curve encryption technology and combined public key technology.

[0089] According to the network log collection and protection device of an embodiment of the present disclosure, the historical log Merkel tree at the log management component is a DHash tree based on timestamps.

[0090] According to the network log collection and protection device of the embodiment of the present disclosure, when the log management component integrates the newly added log into the historical log Merkel tree at the log management component, the root node data within the timestamp range to which the timestamp of the log to be integrated belongs is read according to the timestamp of the log to be integrated, the newly inserted hash value is calculated, the root node data is updated, and each update of the root node data is recorded in the update log.

[0091] According to the network log collection and protection device of an embodiment of the present disclosure, the log management component 506 also includes a detection component 506c. The detection component 506c is used for the log management component to perform integrity detection on the timestamp-based DHash tree. If the left subtree at the detection position has completed detection and is recorded in the detection log, then the right subtree at the detection position is subjected to integrity detection.

[0092] In summary, the network log collection and protection method and apparatus disclosed herein propose a TCM-based log protection mechanism for network device logs. This mechanism utilizes a Merkel tree, elliptic curve cryptography, a combined public key, and a TCM chip to ensure the security of log data collection and protection. Furthermore, during the log storage phase, a timestamp-based DHash tree integrity check model is utilized to securely store log data, with integrity checks performed when necessary to ensure the integrity of the log data during storage.

[0093] In simple terms, the disclosed network log collection and protection method and device collects log data from host systems, network devices, and security devices (hereinafter collectively referred to as network nodes) at the log management layer, performs protection and preprocessing, and then sends the preprocessed log data to the log analysis layer. Regarding log protection, a TCM-based log protection mechanism is proposed. Regarding log preprocessing, a parse tree model is used for log parsing and log standardization. During log transmission and storage, secure log transmission and storage occurs after log trustworthiness is generated, achieving the security objectives of the log transmission and storage phase. The disclosed secure log transmission achieves complete trustworthiness during the log transmission process, achieved through the design of an interaction protocol between the client and server. The disclosed secure log storage enables log integrity testing, improving the efficiency of integrity testing through the design of the stored data structure. The security objectives of the log transmission and storage phase can be described as follows: After the submitted data is generated during the log generation phase, it is transmitted to a secure server for easy audit by system auditors. To ensure confidentiality and integrity during the transmission process, establishing a secure transmission channel is essential. The TCM-based log secure transmission model is established through interaction between the TCM modules on the client and server. Communication between the two parties requires mutual authentication of the platform's trustworthiness and negotiation of parameters such as the channel encryption key. Upon secure transmission to the server, the server reconstructs and stores the data using a hash tree to facilitate log integrity testing. Preserving intermediate log data essentially involves saving the transmitted log field data and verifying its integrity when necessary. Based on the timestamps generated by the logs, a timestamp-based hash tree integrity verification model is proposed for log data, reducing the time required for integrity testing.

[0094] According to the log management layer of the present disclosure, the network nodes will regularly upload the log data generated during daily operation to the log management layer. After receiving the log data, the log management layer will store it. In order to ensure the security of the log data, it needs to be isolated from the network nodes and will only communicate with the network nodes when collecting logs regularly. In addition, the following strategies need to be followed: (1) The log management layer only accepts data addition and query operations of the network nodes, but not deletion and modification operations. This ensures that even if the latter is invaded, the log data stored by the former cannot be destroyed; (2) The network node will only delete or modify its own log when it receives a command from the log management layer. Therefore, once the log data of the latter undergoes unexpected changes, it is considered to have been destroyed by the attacker and the collection of logs of the node will stop.

[0095] After a network node generates log data, it is first temporarily stored locally. A new Merkle tree is constructed using the newly generated log file as the data file. The node also stores a historical Merkle tree constructed using the historical log file. The new Merkle tree is integrated into the historical Merkle tree. The purpose of constructing a log Merkle tree is to reduce the number of digital signature operations and transmission volume, thereby improving processing efficiency. Using the node's private key, the root nodes of the new and historical Merkle trees are signed through the TCM chip, generating root node signatures Signature1 and Signature2. Finally, the newly generated log data, Signature1, and Signature2 are sent to the log management layer. After receiving the log data, the log management layer also constructs a new log Merkle tree. Subsequently, the network node's public key is used to verify the received Signature1 and Signature2 through the TCM chip. If the verification result of Signature1 is equal to the root node of the new log Merkle tree, the newly received log data has not been corrupted during transmission, and the sender's identity can be confirmed. Otherwise, the received log data is considered incomplete and discarded. Similarly, if the verification result of Signature2 is equal to the root node of the previous log Merkle tree, the historical log data stored by the network node is secure. Otherwise, the historical log data stored by the node has been corrupted, in which case the node is considered to have been compromised. Only if both Signature1 and Signature2 are successfully verified is the newly received log data stored, and the new Merkle tree is integrated into the previous Merkle tree. In the above process, if a network node is found to have been compromised, data transmission with that node is stopped.

[0096] The above log collection and protection technologies ensure that the log data received by the log management layer is secure and reliable. Even if a network node is compromised by an attacker, the data security of the log management layer will not be affected, thus ensuring the forward security of the log data. Another benefit is that log files are used to construct a Merkle tree, and only the root node needs to be signed for integrity verification. Compared to other methods that require signing all files, although additional hash calculations are required to construct the Merkle tree, the time complexity of hash calculations is much less than that of signature calculations, so the Merkle tree solution can improve computational efficiency. Furthermore, the reduced signature information can also reduce the amount of authentication information transmitted. Using a TCM chip for integrity verification can significantly improve the security of the key generation and signature verification processes.

[0097] According to the disclosed method and system, the security of transmission is achieved by a secure channel. The implementation of the secure channel includes key generation, key migration, and client / server interaction. After the secure channel is established, the transmission of intermediate data begins, during which the data is first encrypted and decrypted and digitally signed. First, the generation and migration of keys are carried out inside the TCM. The generation and migration of keys are achieved by creating objects, setting key attributes, setting policies and authorization data. Secondly, the interaction between the client and the server is achieved through Socket. Finally, the encryption and decryption of data includes symmetric encryption and decryption and asymmetric encryption and decryption. The generated asymmetric and channel keys need to be loaded into the TCM module and authorized before encryption and decryption.

[0098] The disclosed method and system achieve secure storage. The DHash tree should support three algorithms: data insertion, global data traversal, and selective data traversal. The data insertion function should, based on different timestamps, read the root node data within the current timestamp range, calculate the newly inserted hash value, and update the root node. A global data traversal performs a comprehensive integrity check on the existing data. Starting from the root node, all nodes are traversed, performing a comprehensive check. Data tampered with according to logs is typically newly generated, so only a selective traversal is required. Selective traversal requires reading all data under a node based on the timestamp and performing an integrity check on the data within that timestamp. Similarly, inserting nodes with different timestamps is analogous to inserting nodes at different time periods, requiring a timestamp range determination before updating the root node. Each root node update requires an update log record to facilitate rapid location of the tampered location during integrity checks. When integrity checks are performed on stored data, selective checks are performed based on the server-side check log to determine whether to proceed. If the left subtree of the location being tested has been tested and recorded in the test log, a selective check can be performed on the right subtree. Otherwise, it traverses to the most recent record in the detection log and, from there, backtracks to the root node to match the hash value. During the signature verification process, this disclosure uses a TCM chip and a combined public key. The TCM chip ensures the security of the signature verification process, and the combined public key reduces the space required for key storage.

[0099] According to the disclosed method and system, in signature verification, first, several parameters T = (p, a, b, G, n, h) of the elliptic curve are generated. Then, sxt pieces of public and private key information are generated (sxt is the dimension of the public and private key matrices). Based on the generated public and private key information, a public key matrix and a private key matrix are generated, and the former is stored in plain text, while the latter is encrypted and stored using the public key of the key management terminal. The network node sends a request to the key management terminal to obtain the key. After receiving the request, the key management terminal checks the legitimacy of the node ID value, uses its own private key and calls a command to decrypt the private key matrix. After obtaining the private key matrix and public key matrix, the private key and public key belonging to the node are calculated based on the ID value. Finally, the private key is encapsulated and sent to the node.

[0100] After receiving a request from a network node, the network node signs the Merkle tree root node. The TCM command loads the private key. All subsequent operations are performed within the TCM. The TCM uses the private key and invokes a command to sign the Merkle tree root node and sends the signature result back to the network node. The network node sends the signature result to the log management layer. Upon receiving the root node signature from the network node, the log management layer first verifies the validity of the node ID value and retrieves the corresponding public key from the key management terminal based on the ID value. The log management layer verifies the root node signature using the TCM and sends back the verification result. The log management layer compares the verification result with the Merkle tree root node.

[0101] After each network node generates log data, it is temporarily stored locally and the original log files are regularly uploaded to the log management layer. During the log collection process, a log collection mechanism must be followed to ensure the security and reliability of the collected log data. This collection mechanism requires signature verification of the root node of the log Merkle tree to ensure the integrity of the log data. Regarding log protection, a log protection mechanism based on TCM is proposed to ensure the security of log data. This mechanism utilizes technical solutions such as the log Merkle tree, elliptic curve cryptography, a combined public key, and a TCM chip to protect network device logs. The integrity detection protection mechanism ensures secure data storage and, when needed, integrity testing.

[0102] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above-mentioned method according to the embodiments of the present disclosure.

[0103] The software product can be any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0104] The computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. The data signal propagated may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or component. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0105] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0106] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by a device, the computer-readable medium implements the following functions: determining the target virtual system to be restarted; closing the interface under the target virtual system; deleting the session of the target virtual system; removing the logged-in administrator information of the target virtual system; initializing the target virtual system; and opening the interface of the target virtual system to complete the restart of the target virtual system.

[0107] Those skilled in the art will appreciate that the modules described above can be distributed in the device according to the description of the embodiment, or can be modified accordingly to be used in one or more devices that are different from the embodiment. The modules of the above embodiment can be combined into one module or further divided into multiple submodules.

[0108] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0109] While the exemplary embodiments of the present disclosure have been specifically illustrated and described above, it should be understood that the present disclosure is not limited to the detailed structures, configurations, or implementations described herein; rather, the present disclosure is intended to encompass various modifications and equivalent configurations within the spirit and scope of the appended claims.

Claims

1. A network log collection and protection method, comprising: The network node obtains historical logs and new logs and sends them to the log management component, and generates the historical log Merkel tree and new log Merkel tree at the network node accordingly; The network node uses its private key to sign the root nodes of the historical log Merkel tree and the newly added log Merkel tree through its TCM chip, forming the first root node signature of the historical log Merkel tree and the second root node signature of the newly added log Merkel tree, and transmits them to the log management component; The log management component generates a Merkel tree of historical logs and a Merkel tree of newly added logs for the received historical logs and newly added logs, respectively. The Merkel tree of historical logs at the log management component is a DHash tree based on timestamps. The log management component verifies the received first root node signature and second root node signature respectively using the network node public key through its TCM chip, and rejects the data from the network node when the first root node signature verification fails, and rejects the received new log when the second root node signature verification fails; and When the log management component performs integrity check on the timestamp-based DHash tree, if the left subtree at the detection position has been detected and recorded in the detection log, the log management component performs integrity check on the right subtree at the detection position.

2. The network log collection and protection method according to claim 1, further comprising: After successfully verifying the first root node signature and the second root node signature received by the log management component, the log management component stores the newly added log and integrates the newly added log into the historical log Merkel tree at the log management component.

3. The network log collection and protection method according to claim 1, wherein the network node forms a first root node signature of a historical log Merkel tree and a second root node signature of a newly added log Merkel tree using its private key through its TCM chip, and the log management component verifies the first root node signature and the second root node signature using the network node public key through its TCM chip using elliptic curve cryptography and combined public key technology.

4. The network log collection and protection method according to claim 3, wherein when the log management component integrates the newly added log into the Merkel tree of the historical logs at the log management component, According to the timestamp of the log to be integrated, the root node data within the timestamp range to which the timestamp of the log to be integrated belongs is read, the newly inserted hash value is calculated, the root node data is updated, and each update of the root node data is recorded in the update log.

5. A network log collection and protection device, comprising: The network node-side log Merkel tree generation component is used for the network node to obtain historical logs and newly added logs and send them to the log management component, and correspondingly generate the historical log Merkel tree and the newly added log Merkel tree at the network node; The signature component is used by the network node to use its private key to perform root node signature on the historical log Merkel tree and the newly added log Merkel tree through its TCM chip, forming the first root node signature of the historical log Merkel tree and the second root node signature of the newly added log Merkel tree, and transmit them to the log management component; The log management end log Merkel tree generation component is used for the log management component to generate a historical log Merkel tree and a new log Merkel tree at the log management component for the received historical logs and new logs, respectively. The historical log Merkel tree at the log management component is a DHash tree based on the timestamp; as well as A signature verification component is used by the log management component to verify the received first root node signature and second root node signature respectively using the network node public key through its TCM chip, and reject the data from the network node when the first root node signature verification fails, and reject the received new log when the second root node signature verification fails; as well as The detection component is used for the log management component to perform integrity detection on the timestamp-based DHash tree. If the left subtree at the detection position has been detected and recorded in the detection log, the integrity detection is performed on the right subtree at the detection position.

6. The network log collection and protection device according to claim 5, further comprising: After successfully verifying the first root node signature and the second root node signature received by the log management component, the log management component stores the newly added log and integrates the newly added log into the historical log Merkel tree at the log management component.

7. The network log collection and protection device according to claim 5, wherein the network node forms a first root node signature of a historical log Merkel tree and a second root node signature of a newly added log Merkel tree using its private key through its TCM chip, and the log management component verifies the first root node signature and the second root node signature using the network node public key through its TCM chip using elliptic curve cryptography and combined public key technology.

8. The network log collection and protection device according to claim 7, wherein when the log management component integrates the newly added log into the Merkel tree of the historical logs at the log management component, According to the timestamp of the log to be integrated, the root node data within the timestamp range to which the timestamp of the log to be integrated belongs is read, the newly inserted hash value is calculated, the root node data is updated, and each update of the root node data is recorded in the update log.

Citation Information

Patent Citations

  • Cloud platform trusted log auditing method for privacy protection based on trusted third party

    CN108322306A

  • Threshold signature method, system and device based on aggregation multi-signature, and storage medium

    CN113556237A