Operating system credible state proving method and device, computer and storage medium

By calculating the comparison between the current system status value and the pre-stored trusted status benchmark value in the operating system, local trusted status certification is realized, solving the complexity and performance problems of traditional remote certification solutions, and improving system performance and accuracy. .

CN118551376APending Publication Date: 2024-08-27ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310170839.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Traditional operating system trustworthy certification solutions rely on remote servers, resulting in complex deployment, large system memory usage, impact on system performance, and difficulty in ensuring accuracy.

Method used

By calculating the current system status value of the operating system and comparing it with the pre-sealed trusted status benchmark value, local trusted status certification is achieved, and the platform register scalability of the trusted platform module is used to reduce system memory usage and improve performance.

Benefits of technology

It simplifies architecture deployment, reduces system memory usage, improves system performance and calculation accuracy, and enables local certification of the trusted status of the operating system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551376A
    Figure CN118551376A
Patent Text Reader

Abstract

The invention discloses an operating system credible state proving method and device, a computer and a storage medium, and the method comprises the steps: calculating a current system state value of an operating system, the current system state value comprising a metric value of a system key file; comparing the current system state value of the operating system with a pre-stored credible state reference value of the operating system; and verifying the current credible state of the operating system according to a comparison result. Local certification of the credible state of the operating system can be achieved, dependence on a remote server is not needed, architecture deployment can be simplified, the expandability of the platform register of the credible platform module can be used for calculating the metric value of the key file of the sealing system, occupation of the system memory is reduced, the system performance is improved, and the reliability of the system is improved. And the calculation accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of operating system security technology, and in particular to a method, device, computer and storage medium for proving the trusted state of an operating system. Background Art

[0002] At present, the hardware and software structures of personal computers, servers and other embedded computing devices are relatively simple, which may lead to arbitrary use of resources, especially the executable code can be modified, malicious programs can be implanted, resulting in virus propagation and hacker attacks to cause wanton damage; more seriously, there is no strict access control for legitimate users, resulting in unauthorized access and causing unsafe accidents.

[0003] With the development of cloud computing, the Internet of Things, mobile computing and other technologies and the continuous expansion of their application fields, the leading role of modern information technology in social production and life has become increasingly prominent, and the supporting function of information technology means in various fields of society has become increasingly important. At the same time, both information providers and visitors have higher and higher requirements and attention to information security. Trusted computing technology, which inherits traditional technologies and applications, reflects current application needs and technical characteristics, and integrates modern management concepts and human social trust mechanisms, has become a new element in the field of information security and is constantly explored and developed in practice.

[0004] The purpose of trusted computing is to gradually establish a trusted chain starting from the power-on of the device, measure the next step by the previous step, ensure that the code and corresponding resources executed in the next step are trustworthy and auditable, and help users understand whether the current software and hardware environment is in the expected state. If tampering occurs, the execution can be terminated or an alarm can be given in time.

[0005] At present, the operating system is the basic software, and protecting the trustworthiness of the basic software is an important guarantee for building a network security system. Trustworthy proof is a necessary measure to protect the integrity of the operating system. At present, there are trusted proof solutions based on remote proof servers, that is, uploading the measurement values ​​required by the system to the remote server, and the remote proof server completes the verification of the measurement values ​​to determine whether the system software has been tampered with, and then prove whether the current system status is trustworthy.

[0006] However, traditional remote attestation solutions need to rely on other servers or components on the network, which makes their deployment complex, occupies a large amount of system memory, and affects system performance. Summary of the invention

[0007] In view of this, the main purpose of the embodiments of the present application is to propose a method, device, computer and storage medium for proving the trusted state of an operating system, aiming to simplify deployment, reduce system memory usage and improve system performance.

[0008] The present invention provides a method for proving the trusted state of an operating system, the method comprising: Calculating a current system status value of the operating system, wherein the current system status value includes a measurement value of a key file of the system; Comparing the current system state value of the operating system with a pre-stored trusted state reference value of the operating system; The current trusted state of the operating system is verified according to the comparison result.

[0009] Optionally, before the step of calculating the current system state value of the operating system, the step further includes: A trusted state reference value of the operating system is calculated and stored locally.

[0010] Optionally, the step of calculating the trustworthy state reference value of the operating system and storing it locally includes: When the operating system is started, the measurement values ​​of the firmware, OS boot program, kernel, and memory file system image used by the operating system are calculated respectively according to a pre-configured system key file list; After the operating system is started, the measurement value of the user state program of the operating system is calculated, and the key system files include: firmware, OS boot program, kernel, memory file system image, and user state program used by the operating system; The calculated measurement values ​​of the firmware, OS boot program, kernel, memory file system image, and user-mode program used by the operating system are archived.

[0011] Optionally, the step of sealing the calculated measurement values ​​of the firmware, OS boot program, kernel, memory file system image, and user-mode program used by the operating system includes: According to a predetermined expansion algorithm, the calculated measurement values ​​of the firmware, OS boot program, kernel, memory file system image and user-mode program used by the operating system are expanded to the platform register corresponding to the trusted platform module; Parse the pre-configured platform register list; Calling the interface of the trusted platform module, and obtaining the measurement values ​​in the corresponding platform registers in sequence according to the platform register list as the trusted state reference values ​​of the operating system; Signing the trusted state reference value obtained from the trusted platform module according to the pre-generated proof identity key to obtain corresponding signature information; The trusted state reference value and the corresponding signature information are saved in a specified file or database.

[0012] Optionally, after the operating system is started, the step of calculating the measurement value of the user mode program of the operating system includes: After the operating system is started, the metric values ​​of the user-mode programs of the operating system are calculated in sequence using a hash algorithm according to a pre-configured system key file list.

[0013] Optionally, the step of calculating the current system status value of the operating system, wherein the current system status value includes the measurement value of the key system file, comprises: After the operating system is started or runs for a preset time, the measurement values ​​of the system key files of the operating system are calculated according to a pre-configured system key file list to obtain the current system state value of the operating system.

[0014] Optionally, the step of comparing the current system state value of the operating system with a pre-stored trusted state reference value of the operating system includes: Parse the pre-configured platform register list; According to the platform register list, sequentially read the stored trusted state reference values ​​from the file or database; The current system state value of the operating system is compared with the read trusted state reference value to obtain a comparison result.

[0015] Optionally, the step of verifying the current trusted state of the operating system according to the comparison result includes: When the current system state value of the operating system is consistent with a pre-stored trustworthy state reference value of the operating system, determining that the current system state of the operating system is trustworthy; When the current system state value of the operating system is inconsistent with the pre-sealed trusted state reference value of the operating system, it is determined that the current system state of the operating system is not trusted.

[0016] Optionally, when the current system state value of the operating system is consistent with a pre-stored trustworthy state reference value of the operating system, before the step of determining whether the current system state of the operating system is trustworthy, the method further includes: Calling the signature verification interface provided by the trusted platform module according to the pre-generated proof identity key to verify the signature of the current system state value of the operating system; When the signature verification passes, it is determined that the current system state of the operating system is credible.

[0017] Optionally, the method further comprises: When determining that the current system state of the operating system is credible, outputting a report that the current system state is credible; In the case where it is determined that the current system state of the operating system is not credible, a report that the current system state is not credible is output.

[0018] Optionally, before the step of calculating the current system state value of the operating system, the step further includes: Create system key configuration information, the system key configuration information including at least one of the following: a system key file list, a platform register list, a name of a storage file or database, a name and path of a system status certification report file, a trusted platform module usage password, and a certification identity key.

[0019] The present application also provides an operating system trusted state certification device, the device comprising: A measurement information calculation module, used to calculate a current system state value of the operating system, wherein the current system state value includes a measurement value of a key file of the system; The system status verification module is used to compare the current system status value of the operating system with the trusted status reference value of the operating system pre-sealed in the storage module, and verify the current trusted status of the operating system according to the comparison result.

[0020] Optionally, the device further comprises: a storage module; The measurement information calculation module is further used to calculate a trustworthy state reference value of the operating system; The storage module is used to locally store the trusted state reference value of the operating system.

[0021] An embodiment of the present application also proposes a computer, which includes a memory, a processor, and an operating system trusted state certification program stored in the memory and executable on the processor, wherein the operating system trusted state certification program implements the operating system trusted state certification method as described above when executed by the processor.

[0022] An embodiment of the present application further proposes a computer-readable storage medium, on which an operating system trusted state certification program is stored. When the operating system trusted state certification program is executed by a processor, the operating system trusted state certification method as described above is implemented.

[0023] The embodiments of the present application propose a method, device, computer and storage medium for proving the trusted state of an operating system, which calculates the current system state value of the operating system, wherein the current system state value includes the measurement value of the key files of the system; compares the current system state value of the operating system with the trusted state reference value of the operating system that is sealed in advance; and verifies the current trusted state of the operating system according to the comparison result. The present invention can locally calculate the current system state value of the operating system, compare the current system state value with the trusted state reference value of the system that is sealed in advance, and then realize the local proof of the trusted state of the operating system without relying on a remote server to realize the proof of the trusted state of the system, thereby simplifying the architecture deployment, reducing the occupation of system memory, and improving system performance. Furthermore, the scalability of the platform registers of the trusted platform module can also be used to calculate the measurement value of the key files of the sealed system, further reducing the occupation of system memory, and improving the performance of the system and the accuracy of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.

[0025] Figure 1 A schematic diagram of the system architecture involved in the embodiment of the method for proving the trusted state of an operating system of the present application; Figure 2 This is a flowchart of an embodiment of a method for proving the trusted state of an operating system of the present application; Figure 3 This is a flowchart of another embodiment of the method for proving the trusted state of an operating system of the present application; Figure 4 This is a flowchart of another embodiment of the method for proving the trusted state of an operating system of the present application; Figure 5 This is a functional module diagram of an embodiment of an operating system trusted state certification device of the present application; Figure 6 This is a functional module diagram of an embodiment of a computer device to which the trusted status certification of the operating system of the present application belongs.

[0026] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0028] Optionally, in this document, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. Optionally, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context in the specific embodiment.

[0029] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0030] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0031] In the embodiments of the present application, the communication device may be a server, a terminal device, or a base station device, etc., and the present application needs to be determined according to the specific context.

[0032] The following description will be made by taking a server as an example, and those skilled in the art will understand that, in addition to components specifically used for mobile purposes, the construction according to the embodiments of the present application can also be applied to other fixed types of terminals.

[0033] The main solution of the embodiment of the present application is: by calculating the current system state value of the operating system, the current system state value includes the measurement value of the key files of the system; comparing the current system state value of the operating system with the pre-sealed trusted state reference value of the operating system; verifying the current trusted state of the operating system according to the comparison result. The present invention can locally calculate the current system state value of the operating system, compare the current system state value with the pre-sealed system trusted state reference value, and then realize the local proof of the trusted state of the operating system without relying on the remote server to realize the proof of the trusted state of the system, thereby simplifying the architecture deployment, reducing the occupation of system memory, and improving system performance. Furthermore, the scalability of the platform register of the trusted platform module can also be used to calculate the measurement value of the key files of the sealed system, further reducing the occupation of system memory, and improving the performance of the system and the accuracy of calculation.

[0034] Technical terms involved in the embodiments of this application: The embodiments of the present application take into account that currently, the hardware and software structures of personal computers, servers and other embedded computing devices are relatively simple, which may lead to arbitrary use of resources, especially the possibility of modification of executable code and implantation of malicious programs. Virus programs take advantage of the weakness of the operating system not checking the consistency of the executable code, embed the virus code into the executable code program, and spread the virus; hackers take advantage of the vulnerabilities of the attacked system to steal superuser privileges, implant attack programs, and wilfully destroy; more seriously, there is no strict access control for legitimate users, so unauthorized access can be carried out, causing unsafe accidents.

[0035] In recent years, with the development of technologies such as cloud computing, the Internet of Things, and mobile computing, and the continuous expansion of their application fields, the leading role of modern information technology in social production and life has become increasingly prominent, and the supporting function of information technology means in various fields of society has become increasingly important. At the same time, both information providers and visitors have higher and higher requirements and attention to information security. People's requirements for information security have exceeded the five elements of confidentiality, integrity, reliability, availability, and non-repudiation in the traditional definition. Trusted computing technology, which inherits traditional technologies and applications, reflects current application needs and technical characteristics, and integrates modern management concepts and human social trust mechanisms, has become a new element in the field of information security and is constantly explored and developed in practice.

[0036] In the traditional computer / server field, without Trusted Platform Module (TPM) and trusted computing, key programs and configuration files such as BIOS / UEFI, Grub, OS kernel, user-mode binary programs and configuration files on the device may be tampered with, and malware may be implanted to further steal business data or remotely control the device. In the past, such tampering could not be monitored and discovered. The purpose of trusted computing is to gradually establish a trusted chain starting from the power-on of the device, measure the next step by the previous step, and ensure that the code and corresponding resources executed in the next step are trustworthy and auditable, so as to help users understand whether the current software and hardware environment is in the expected state. If tampering occurs, the execution can be terminated or an alarm can be given in time.

[0037] The operating system is basic software, and protecting the trustworthiness of basic software is an important guarantee for building a network security system. Trustworthy proof is a necessary measure to protect the integrity of the operating system. At present, there are trusted proof solutions based on remote proof servers, that is, the measurement values ​​required by the system are uploaded to the remote server, and the remote proof server completes the verification of the measurement values ​​to determine whether the system software has been tampered with, and then prove whether the current system status is trustworthy. However, in actual applications, remote proof solutions need to rely on other servers or components on the network, and their deployment is complex. In addition, traditional remote proof solutions are based on the Linux IMA mechanism, which occupies a large amount of system memory and affects system performance. The specific problems are as follows: Impact on the accuracy of the system's trustworthiness: The uncertainty of the TPM configuration status register (PCR10) affects the remote attestation's judgment of the system's trustworthiness. For example, if systemd starts services concurrently, the PCR will change, which will affect the value determination of the system's trustworthiness benchmark and the accuracy of the remote attestation system's judgment of the target system's trustworthiness.

[0038] Impact on system performance: Executing a binary program with an IMA signature requires decrypting and verifying the binary's hash value, which will cause system performance to degrade.

[0039] Increased system memory usage: When IMA measures binary programs, the measurement logs are recorded in the virtual file system under / proc, which will cause an increase in system memory usage.

[0040] Therefore, an embodiment of the present application proposes a solution that can simplify deployment, reduce system memory usage, improve system performance, and improve the accuracy of system trusted proof.

[0041] The system architecture involved in the embodiment of the present application can refer to Figure 1 shown.

[0042] like Figure 1 As shown, the system architecture may include: a trusted platform module, a Linux kernel (the kernel used by the Linux operating system), a measurement information calculation module, a system status verification module, a system integrity information collection module, and a storage module, wherein: The trusted platform module may specifically adopt a TPM2.0 chip.

[0043] The solution of this embodiment is mainly to realize local proof of the trusted state of the operating system with a trusted platform module. It mainly realizes local proof of the trusted state of the operating system through the scalability of the PCR (platform register) of the TPM2.0 chip. It does not rely on other servers or components on the network, but only relies on the PCR value of the local TPM2.0 chip to realize the proof of the trusted state of the system, thereby simplifying the architecture deployment, reducing the occupation of system memory, and improving system performance.

[0044] Reference Figure 1 As shown, the software architecture of the embodiment of the present application mainly includes a measurement information calculation module, a system status verification module, a system integrity information collection module, and a storage module. The main functions of each module are as follows: The measurement information calculation module (hereinafter referred to as the calculation module) is mainly responsible for calculating the hash value of the system's key files and expanding it to the corresponding TPM2.0 PCR. During the system startup process after the initial deployment of the system, the calculation module calculates the hash values ​​of the firmware, OS bootloader, kernel (vmlinuz), and memory file system image used by the operating system and expands them to the corresponding platform registers (PCR) to facilitate the acquisition or storage of subsequent benchmark values. When the system is started, the calculation module calculates the measurement values ​​of the system's user-mode key files, mainly based on the local configuration file list, and expands them to the corresponding registers (PCR16).

[0045] The integrity information acquisition module is mainly responsible for reading the PCR value according to the TCG specification protocol and sending it to the storage module after signing.

[0046] The storage module is responsible for storing the benchmark value of the system's trusted state and storing the benchmark value of the system's trusted state in a local file or database.

[0047] The system status verification module (hereinafter referred to as the calculation module) is responsible for verifying the trustworthy status of the system at a certain moment and generating a verification report. Specifically, it determines whether the current system status is trustworthy based on the previously stored trustworthy status benchmark value and the current system status value.

[0048] Therefore, through the scalability of the PCR of the TPM2.0 chip, local proof of the trusted state of the operating system can be achieved without relying on other servers or components on the network. It only relies on the PCR value of the local TPM2.0 chip to achieve proof of the trusted state of the system, thereby simplifying architecture deployment, reducing system memory usage, and improving system performance.

[0049] Based on the above system architecture, an embodiment of the method for proving the trusted state of the operating system of the present application is proposed.

[0050] Specifically, refer to Figure 2 , Figure 2 This is a flow chart of an embodiment of a method for proving the trusted state of an operating system of the present application.

[0051] like Figure 2 As shown, an embodiment of the present application proposes a method for proving the trusted state of an operating system, the method comprising: Step S101, calculating the current system state value of the operating system, wherein the current system state value includes the measurement value of the key files of the system; Among them, the execution subject of the method of the embodiment of the present application can be an operating system trusted status certification device, which can be carried on a terminal or server in the form of hardware or software. The terminal or server is a computer device with an operating system installed.

[0052] As an implementation method, the operating system trusted status certification method of the embodiment of the present application can be applied to a physical machine environment that has a Linux operating system installed and supports a trusted platform. The physical machine can be a computer device that has an operating system installed, such as a terminal or a server.

[0053] Specifically, in order to prove the trusted state of the operating system, it is first necessary to calculate the current system state value of the operating system, wherein the current system state value of the operating system includes the measurement values ​​of key system files.

[0054] Among them, system key files include but are not limited to firmware used by the operating system, OS boot program, kernel, memory file system image, user-mode programs, etc.

[0055] As an implementation method, the following scheme may be used to calculate the current system status value of the operating system: After the operating system is started or runs for a preset time, the hash values ​​of the system key files such as firmware, OS boot program, kernel, memory file system image, user mode program, etc. used by the operating system are calculated according to the pre-configured system key file list, and the current system status value of the operating system is obtained as the measurement value.

[0056] The pre-configured system critical file list includes system critical files that need to be protected, including firmware, OS boot program, kernel, memory file system image, user state program and other system critical files used by the operating system as described above.

[0057] Further, as an implementation method, after the system is started or has been running for a period of time, Figure 1 The metric information calculation module shown calculates the metric values ​​of the system key files, mainly calculating the metric values ​​of the system key files according to the locally configured system key file list and expanding them into the corresponding register (PCR16).

[0058] Step S102, comparing the current system state value of the operating system with a pre-stored trusted state reference value of the operating system; In this embodiment, the trusted state reference value of the operating system is pre-calculated and stored.

[0059] Among them: the operating system trusted state baseline value is usually the hash value of the system key files calculated after the system is initially installed and deployed, or after the server software and hardware are updated and before running actual business.

[0060] The operating system trusted state benchmark value mainly includes the measurement values ​​of the firmware, OS bootloader, kernel (vmlinuz), memory file system image (initramfs), and user-mode programs used by the operating system.

[0061] Among them, the measurement values ​​of the firmware, OS boot program, kernel and memory file system used by the operating system are calculated by the measurement information measurement module when the system starts, and the measurement values ​​of user-mode programs are calculated by the measurement information measurement module after the system starts.

[0062] In this embodiment, the calculated trust status reference value of the operating system can be pre-sealed by the storage module to facilitate the verification of the current trust status of the operating system after the operating system is started or runs for a period of time.

[0063] Specifically, after calculating the current system state value of the operating system, the current system state value of the operating system is compared with the pre-sealed trusted state reference value of the operating system to determine whether the current system state value of the operating system is consistent with the pre-sealed trusted state reference value of the operating system.

[0064] As an implementation manner, the current system state value of the operating system is compared with the pre-stored trusted state reference value of the operating system, and the following scheme may be adopted: First, the pre-configured platform register list is parsed.

[0065] The pre-configured platform register list includes information of several platform registers.

[0066] Then, according to the platform register list, the stored trusted state reference values ​​are read in sequence from a pre-configured file or database.

[0067] Among them, the trusted state reference value is temporarily saved in the corresponding platform register after calculation, that is, after calculating the measurement value of the relevant program, the calculated measurement value is extended to the platform register defined by the TCG specification. Then, the pre-configured platform register list can be parsed through the system integrity information collection module, and the values ​​in the corresponding platform registers can be obtained in turn, and the trusted state reference values ​​obtained from each platform register can be stored in a local file or database through the storage module.

[0068] Therefore, when comparing the current system state value of the operating system with the pre-sealed trusted state reference value of the operating system, the stored trusted state reference values ​​can be read sequentially from the pre-configured file or database according to the platform register list.

[0069] Finally, the current system state value of the operating system is compared with the read trusted state reference value to obtain a comparison result.

[0070] In this embodiment, a local file or database can be used to store a list of key operating system files and benchmark values ​​related to the system status, and the local proof of the trusted status of the operating system can be achieved through the scalability of the PCR of the TPM2.0 chip. It does not rely on other servers or components on the network, but only relies on the PCR value of the local TPM2.0 module to achieve proof of the trusted status of the system, thereby simplifying the architecture deployment, reducing the occupancy of system memory, and improving system performance.

[0071] Step S103: verifying the current trustworthy state of the operating system according to the comparison result.

[0072] Specifically, as an implementation manner, when the current system state value of the operating system is consistent with a pre-sealed trusted state reference value of the operating system, it is determined that the current system state of the operating system is trusted.

[0073] When the current system state value of the operating system is inconsistent with the pre-sealed trusted state reference value of the operating system, it is determined that the current system state of the operating system is not trusted.

[0074] As another implementation, when the current system state value of the operating system is consistent with a pre-sealed trusted state reference value of the operating system, the signature of the current system state value of the operating system is verified; when the signature verification passes, it is determined that the current system state of the operating system is trusted.

[0075] Among them, when verifying the signature, the signature verification interface provided by the trusted platform module can be called according to the pre-generated proof identity key to verify the signature of the current system status value of the operating system; if the signature verification passes, it is determined that the current system status of the operating system is credible.

[0076] Among them, the pre-generated identity proof key is mainly used for signing and verifying the system status benchmark value.

[0077] In this embodiment, when the trusted state reference value of the operating system is sealed in advance, the signature information of the trusted state reference value may be sealed together.

[0078] For example, the hash value of the calculated system key file of the operating system, that is, the trusted state reference value, can be signed by a pre-generated proof identity key, and then the trusted state reference value and the corresponding signature information can be sealed in a specified file or database through a storage module.

[0079] Afterwards, when verifying the current trusted state of the operating system, the current system state value of the operating system is compared with the pre-sealed trusted state reference value of the operating system to determine whether the current system state value of the operating system is consistent with the pre-sealed trusted state reference value of the operating system. If the current system state value of the operating system is consistent with the pre-sealed trusted state reference value of the operating system, the signature of the current system state value of the operating system is verified; if the signature verification passes, it is determined that the current system state of the operating system is trusted. If the current system state value of the operating system is inconsistent with the pre-sealed trusted state reference value of the operating system, it is determined that the current system state of the operating system is untrustworthy.

[0080] Further, when it is determined that the current system state of the operating system is credible, a report that the current system state is credible may be output; when it is determined that the current system state of the operating system is not credible, a report that the current system state is not credible may be output.

[0081] This embodiment adopts the above scheme, specifically by calculating the current system state value of the operating system, the current system state value includes the measurement value of the key files of the system; comparing the current system state value of the operating system with the pre-sealed trusted state reference value of the operating system; and verifying the current trusted state of the operating system according to the comparison result. The present invention can locally calculate the current system state value of the operating system, compare the current system state value with the pre-sealed system trusted state reference value, and then realize the local proof of the trusted state of the operating system without relying on the remote server to realize the proof of the trusted state of the system, thereby simplifying the architecture deployment, reducing the occupation of system memory, and improving system performance.

[0082] Reference Figure 3 , Figure 3 This is a flowchart of another embodiment of the method for proving the trusted state of an operating system of the present application.

[0083] like Figure 3 As shown, the embodiment of the present application is in the above Figure 1 Based on the embodiment shown, before the above step: calculating the current system state value of the operating system, the following steps are also included: Step S100, calculating the trustworthy state reference value of the operating system and storing it locally.

[0084] The operating system trusted state baseline value is usually the hash value of the key system files calculated after the system is initially installed and deployed, or after the server software and hardware are updated and before running actual business.

[0085] The operating system trusted state benchmark value mainly includes the measurement values ​​of the firmware, OS bootloader, kernel (vmlinuz), memory file system image (initramfs), and user-mode programs used by the operating system.

[0086] Among them, the measurement values ​​of the firmware, OS boot program, kernel and memory file system used by the operating system are calculated by the measurement information measurement module when the system starts, and the measurement values ​​of user-mode programs are calculated by the measurement information measurement module after the system starts.

[0087] In this embodiment, the calculated trust status reference value of the operating system can be stored in the storage module to facilitate the verification of the current trust status of the operating system after the operating system is started or runs for a period of time.

[0088] The technical solution of the present application can calculate the measurement value of the system key files listed in the configured system key file list based on the characteristics of UEFI firmware supporting TPM2.0 and the extensibility of the PCR of the TPM2.0 chip, and compare the measurement value with the sealed system trust state reference value to judge the current system trust state, so as to realize the local system to prove whether the system state is trustworthy. In addition, a local file or database can be used to store the operating system key file list and the reference value related to the system state for local proof of the system trust state, and the measurement value of the system key file can be calculated and stored by using the PCR16 of TPM2.0.

[0089] Specifically, as an implementation mode, the following scheme may be used to calculate the trustworthy state reference value of the operating system: When the operating system starts, the measurement values ​​of the firmware, OS boot program, kernel, and memory file system image used by the operating system are calculated respectively according to the pre-configured system key file list; after the operating system starts, the measurement values ​​of the user-mode programs of the operating system are calculated.

[0090] Afterwards, the calculated measurement values ​​of the firmware, OS boot program, kernel, and memory file system image used by the operating system are sealed.

[0091] Among them, as an implementation method, the step of sealing the calculated measurement values ​​of the firmware, OS boot program, kernel, memory file system image and user-mode program used by the operating system includes: First, according to a predetermined expansion algorithm, the calculated measurement values ​​of the firmware, OS boot program, kernel, memory file system image, and user-mode program used by the operating system are expanded to the platform registers corresponding to the trusted platform module; Then, parse the pre-configured platform register list; Then, calling the interface of the trusted platform module, and obtaining the measurement values ​​in the corresponding platform registers in sequence according to the platform register list as the trusted state reference values ​​of the operating system; Furthermore, the trusted state reference value obtained from the trusted platform module may be signed according to the pre-generated proof identity key to obtain corresponding signature information; Finally, the trusted state reference value and the corresponding signature information are saved in a specified file or database through a storage module.

[0092] As an implementation method, the specific process of calculating the trustworthy state reference value of the operating system and storing it locally may include: Step 201: Power on and start a machine with an operating system installed.

[0093] Step 202: Hardware self-check and initialization.

[0094] Step 203: Calculation of firmware metric values. UEFI firmware is used to form a trusted boot root with the TPM2 chip. The EFI firmware internal program startup and metric value calculation are implemented by the EFI firmware manufacturer in accordance with the TCG EFI specification, and the metric values ​​of the calculation-related programs are extended to the PCR registers defined in the TCG specification.

[0095] Step 204: Calculation of OS bootloader measurement value. The OS bootloader is loaded into the UEFI firmware, and the measurement value is extended to the register of PCR4 in TPM2.0 according to the TCG specification.

[0096] Step 205: Calculation of operating system kernel parameters. The OS boot program calculates the hash value of the cmdline parameter used when the system is started and expands it to the register of PCR8 in TPM2.0.

[0097] Step 206: Calculate the operating system kernel (vmlinuz) and initramfs image metrics. The OS bootloader calculates the kernel and intramfs metrics and expands them into the register of PCR9.

[0098] Step 207: Calculate the measurement value of key files in user mode of the system. When the system is started, the calculation module uses the hash algorithm to calculate the hash value of each file in turn according to the list of pre-configured key files of the system. Then, according to the extension algorithm defined in the TCG specification, the corresponding hash value is extended to the PCR16 corresponding to TPM2.0. The specific extension algorithm is as follows: nPCR16 Value = SHA256(n-1 PCR16 Value || SHA256(nth measured file)).

[0099] In the above algorithm formula, “||” means two digest values ​​are connected together. The meanings of each field are as follows: 1) n-1 PCR16 Value indicates the actual value in the PCR after the metric value of the n-1th file is calculated.

[0100] 2) SHA256 (nth measured file) The digest value of the nth file content calculated using the SHA256 algorithm.

[0101] 3) nPCRVaule uses the SHA256 algorithm to calculate the concatenation of n-1PCRValue and the nth file digest value as input to obtain the basic digest value.

[0102] Therefore, the trustworthy state reference value of the operating system is calculated through the above steps 201 to 207.

[0103] After completing the calculation of the operating system's trusted state baseline value, since the calculated baseline value is temporarily stored in the platform register (PCR), it is necessary to obtain the system's trusted state baseline value from the trusted platform module to facilitate the storage module to store the baseline value and the verification module to verify the system's trusted state based on the baseline value.

[0104] The trusted status baseline value of the operating system can be obtained through the system integrity information collection module, as follows: First, the system integrity information collection module parses the pre-configured platform register (PCR) list.

[0105] Then, the system completion information collection module calls the interface of the trusted platform module and obtains the trusted state reference values ​​in the corresponding platform registers (PCRs) in turn according to the platform register (PCR) list.

[0106] Then, a pre-generated attestation identity key (AIK) is used to sign the trusted state reference value obtained from the trusted platform module, and the trusted state reference value and the corresponding signature information are sent to the storage module for storage.

[0107] When storing the trusted state baseline value of the operating system, the storage module first obtains the system trusted state baseline value and the signature information of the baseline value; then, the storage module parses the pre-configured storage file or database path, and saves the trusted state baseline value and the corresponding signature information to the specified file or database.

[0108] When the operating system is started next time or the operating system has been running for a period of time, the verification module can verify the system status and complete the system local verification by verifying whether the current system status value is consistent with the system trusted status reference value that was sealed in advance.

[0109] If the current status value is consistent with the previously stored system trustworthy status benchmark value, it means that the files of business concern have not been tampered with and the system status is trustworthy; otherwise, the relevant files may have been tampered with and the current system status is untrustworthy. The specific verification steps are as follows: Step 301: The verification module parses a pre-configured platform register (PCR) list, and reads the previously stored system trusted state reference values ​​in sequence from a file or database storing system trusted state reference values ​​according to the list.

[0110] Step 302: Calculate the current system status value. The verification module calculates the hash value of the key files on the current system based on the pre-configured system key file list by calling the external calculation interface provided by the calculation module to determine the current status value of the system. The specific calculation method of the current status value of the system here is consistent with the method of calculating the system trusted status benchmark value mentioned above.

[0111] Step 303: Compare the system's trusted state reference value and the system's current state value. The verification module compares the system's trusted state reference value obtained in step 301 with the system's current state value calculated in step 302 to determine whether the two are consistent; if they are consistent, proceed to step 304; if they are inconsistent, go to step 305 and report that the system state is untrustworthy.

[0112] Step 304: Verify the signature. In order to prevent the system's trusted state reference value from being maliciously tampered with, after the system's trusted state reference value is compared with the system's current state value in step 303, the verification module also needs to use the pre-generated identity authentication key AIK and call the signature verification interface provided by the trusted platform module to verify the signature of the system's trusted state reference value. If the signature verification passes, a report that the current system state is credible is output in step 305; otherwise, a report that the current system state is untrustworthy is output in step 304.

[0113] Step 305: Output a system status report based on the verification comparison results of step 303 and step 304 and the previous verification results.

[0114] If the system status baseline value in step 303 is inconsistent with the current status value, or the content signature verification of the system status baseline value in step 304 fails, it means that the system key files may be tampered with, and a report that the system is untrustworthy is output; if the comparison result of the system status baseline value in step 303 and the current value is consistent and the signature verification of the system's trusted status baseline value in step 305 passes, it means that the system key files have not been tampered with, proving that the system is in a trustworthy state.

[0115] This embodiment uses the above scheme, specifically by calculating the current system state value of the operating system, the current system state value includes the measurement value of the key files of the system; comparing the current system state value of the operating system with the pre-sealed trusted state reference value of the operating system; and verifying the current trusted state of the operating system according to the comparison result. The present invention can locally calculate the current system state value of the operating system, compare the current system state value with the pre-sealed system trusted state reference value, and then realize local proof of the trusted state of the operating system without relying on a remote server to realize the proof of the trusted state of the system, thereby simplifying the architecture deployment, reducing the occupation of system memory, and improving system performance. Furthermore, the scalability of the platform registers of the trusted platform module can also be used to calculate the measurement value of the sealed key files of the system, further reducing the occupation of system memory, and improving the performance of the system and the accuracy of calculation.

[0116] Reference Figure 4 , Figure 4 This is a flowchart of another embodiment of the method for proving the trusted state of an operating system of the present application.

[0117] like Figure 4 As shown, the embodiment of the present application is in the above Figure 3 Based on the embodiment shown, before the above step of calculating the current system state value of the operating system, the following steps are also included: Step S1001, create system key configuration information, the system key configuration information includes at least one of the following: system key file list, platform register list, storage file or database name, system status certification report file name and path, trusted platform module usage password, certification identity key.

[0118] Specifically, you can create system-critical configuration information in the following ways: Configure the system key file list used by the computing module. The list mainly includes the system key files that need to be protected.

[0119] A list of platform registers (PCRs) used by the configuration verification module.

[0120] The name of the storage file or database used by the configuration storage module.

[0121] Configure the name and path of the system status attestation report file.

[0122] Configure the trusted platform module password.

[0123] Generate an identity authentication key (AIK), which is mainly used for signing and verifying the system status baseline value.

[0124] This embodiment uses the above scheme, specifically by creating system key configuration information, to calculate the current system state value of the operating system; compare the current system state value of the operating system with the pre-sealed trusted state reference value of the operating system; and verify the current trusted state of the operating system based on the comparison result. The present invention can locally calculate the current system state value of the operating system, compare the current system state value with the pre-sealed system trusted state reference value, and then realize local proof of the trusted state of the operating system without relying on a remote server to realize the proof of the trusted state of the system, thereby simplifying the architecture deployment, reducing the occupancy of the system memory, and improving the system performance. Furthermore, the scalability of the platform registers of the trusted platform module can also be used to calculate the measurement values ​​of the sealed system key files, further reducing the occupancy of the system memory, and improving the system performance and calculation accuracy.

[0125] Compared with the prior art, the technical solution of this application can calculate the measurement value of the key system files listed in the configuration file based on the characteristics of UEFI firmware supporting TPM2.0 and the extensibility of the PCR of the TPM2.0 chip, and judge the current system trust state by comparing the measurement value with the sealed system trust state reference value. Therefore, it is possible to prove whether the system state is trustworthy locally in the system.

[0126] In addition, a local file or database can be used to store a list of key operating system files and benchmark values ​​related to the system status for local certification of the system's trusted status, and TPM2.0's PCR16 can be used to calculate and store the measurement values ​​of key system files to improve the accuracy of the operating system's trusted status certification. This method does not rely on other servers or components on the network to achieve local certification of the operating system's trusted status. Moreover, this method can not only prove the trusted status of the system during the system startup process, but also prove the trusted status of the system during the operation of the operating system, thereby improving the system's performance and reducing the occupation of system memory.

[0127] In practical applications, this application solution starts from the underlying UEFI and TPM2.0 trusted base, and through measurement, continuously expands the measurement scope, and finally covers the running system to form a bare metal trusted boot or running environment. In virtualization, the trusted HOST host can be expanded to support local certification and provide an NFV running cloud environment.

[0128] In addition, if Figure 5 As shown, an embodiment of the present application provides an operating system trusted state certification device, the device comprising: A metric information calculation module, used to calculate the current system state value of the operating system and expand it into the corresponding platform register, wherein the current system state value includes the metric value of the key system file; The system status verification module is used to compare the current system status value of the operating system with the trusted status reference value of the operating system pre-sealed in the storage module, and verify the current trusted status of the operating system according to the comparison result.

[0129] Furthermore, the device also includes: a storage module, a system integrity information collection module; The measurement information calculation module is further used to calculate a trustworthy state reference value of the operating system; The system integrity information collection module is used to read the current system status value in the platform register according to the TCG specification protocol and send it to the storage module after signing.

[0130] The storage module is used to locally store the trusted state reference value of the operating system.

[0131] The present embodiment implements the principle and implementation process of operating system trusted state certification. Please refer to the above embodiments for the principle and implementation process of operating system trusted state certification, which will not be repeated here.

[0132] like Figure 6 As shown, an embodiment of the present application further proposes a computer, which includes a memory, a processor, and an operating system trusted state certification program stored in the memory and executable on the processor, and when the operating system trusted state certification program is executed by the processor, the operating system trusted state certification method as described in the above embodiments is implemented.

[0133] The computer may be a terminal device or a server with a trusted platform module operating system, and the computer may include an output module 110 , a processor 120 , a memory 130 and a communication module 140 .

[0134] The memory 130 stores an operating system trusted state certification program. The communication module 140 may include a WIFI module, a mobile communication module, a Bluetooth module, etc., and communicates with an external device or a server through the communication module 140.

[0135] Among them, when the operating system trusted state certification program in the memory 130 is executed by the processor, the operating system trusted state certification method described in the above embodiments can be implemented.

[0136] Since all the technical solutions of all the aforementioned embodiments are adopted when the trusted state certification program of this operating system is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.

[0137] In addition, an embodiment of the present application further proposes a computer-readable storage medium, on which an operating system trusted state certification program is stored. When the operating system trusted state certification program is executed by a processor, the operating system trusted state certification method described in the above embodiments is implemented.

[0138] Since all the technical solutions of all the aforementioned embodiments are adopted when the trusted state certification program of this operating system is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.

[0139] Compared with the prior art, the embodiment of the present application can calculate the measurement value of the key system files listed in the configuration file based on the characteristics of UEFI firmware supporting TPM2.0 and the extensibility of the PCR of the TPM2.0 chip through the above technical solution, and judge the current system trust state by comparing the measurement value with the sealed system trust state reference value. Therefore, it is possible to prove whether the system state is trustworthy locally in the system.

[0140] In addition, a local file or database can be used to store a list of key operating system files and benchmark values ​​related to the system status for local certification of the system's trusted status, and TPM2.0's PCR16 can be used to calculate and store the measurement values ​​of key system files to improve the accuracy of the operating system's trusted status certification. This method does not rely on other servers or components on the network to achieve local certification of the operating system's trusted status. Moreover, this method can not only prove the trusted status of the system during the system startup process, but also prove the trusted status of the system during the operation of the operating system, thereby improving the system's performance and reducing the occupation of system memory.

[0141] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

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

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

[0144] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for proving the trusted state of an operating system, It is characterized in that The method comprises: Calculating a current system status value of the operating system, wherein the current system status value includes a measurement value of a key file of the system; Comparing the current system state value of the operating system with a pre-stored trusted state reference value of the operating system; The current trusted state of the operating system is verified according to the comparison result.

2. The method according to claim 1, It is characterized in that The step of calculating the current system state value of the operating system also includes: A trusted state reference value of the operating system is calculated and stored locally.

3. The method according to claim 2, It is characterized in that The system key files include: firmware, OS boot program, kernel, memory file system image, and user state program used by the operating system. The steps of calculating the trusted state reference value of the operating system and sealing it locally include: When the operating system is started, the measurement values ​​of the firmware, OS boot program, kernel, and memory file system image used by the operating system are calculated respectively according to a pre-configured system key file list; After the operating system is started, calculating a metric value of a user-mode program of the operating system; The calculated measurement values ​​of the firmware, OS boot program, kernel, memory file system image, and user-mode program used by the operating system are archived.

4. The method according to claim 3, It is characterized in that The step of sealing the calculated measurement values ​​of the firmware, OS boot program, kernel, memory file system image and user-mode program used by the operating system includes: According to a predetermined expansion algorithm, the calculated measurement values ​​of the firmware, OS boot program, kernel, memory file system image and user-mode program used by the operating system are expanded to the platform register corresponding to the trusted platform module; Parse the pre-configured platform register list; Calling the interface of the trusted platform module, and obtaining the measurement values ​​in the corresponding platform registers in sequence according to the platform register list as the trusted state reference values ​​of the operating system; Signing the trusted state reference value obtained from the trusted platform module according to the pre-generated proof identity key to obtain corresponding signature information; The trusted state reference value and the corresponding signature information are saved in a specified file or database.

5. The method according to claim 4, It is characterized in that The step of calculating the metric value of the user mode program of the operating system after the operating system is started includes: After the operating system is started, the metric values ​​of the user-mode programs of the operating system are calculated in sequence using a hash algorithm according to a pre-configured system key file list.

6. The method according to claim 4, It is characterized in that The step of calculating the current system status value of the operating system, wherein the current system status value includes the measurement value of the key system file, comprises: After the operating system is started or runs for a preset time, the measurement values ​​of the system key files of the operating system are calculated according to a pre-configured system key file list to obtain the current system state value of the operating system.

7. The method according to claim 4, It is characterized in that The step of comparing the current system state value of the operating system with the pre-stored trusted state reference value of the operating system comprises: Parse the pre-configured platform register list; According to the platform register list, sequentially read the stored trusted state reference values ​​from the file or database; The current system state value of the operating system is compared with the read trusted state reference value to obtain a comparison result.

8. The method according to claim 4, It is characterized in that The step of verifying the current trusted state of the operating system according to the comparison result comprises: When the current system state value of the operating system is consistent with a pre-stored trustworthy state reference value of the operating system, determining that the current system state of the operating system is trustworthy; When the current system state value of the operating system is inconsistent with the pre-sealed trusted state reference value of the operating system, it is determined that the current system state of the operating system is not trusted.

9. The method according to claim 8, It is characterized in that In the case where the current system state value of the operating system is consistent with the pre-stored trustworthy state reference value of the operating system, before the step of determining whether the current system state of the operating system is trustworthy, the method further includes: Calling the signature verification interface provided by the trusted platform module according to the pre-generated proof identity key to verify the signature of the current system state value of the operating system; When the signature verification passes, it is determined that the current system state of the operating system is credible.

10. The method according to any one of claims 1 to 9, It is characterized in that The method further comprises: When determining that the current system state of the operating system is credible, outputting a report that the current system state is credible; In the case where it is determined that the current system state of the operating system is not credible, a report that the current system state is not credible is output.

11. The method according to any one of claims 4 to 9, It is characterized in that The step of calculating the current system state value of the operating system also includes: Create system key configuration information, the system key configuration information including at least one of the following: a system key file list, a platform register list, a name of a storage file or database, a name and path of a system status certification report file, a trusted platform module usage password, and a certification identity key.

12. An operating system trusted state certification device, It is characterized in that The device comprises: A measurement information calculation module, used to calculate a current system state value of the operating system, wherein the current system state value includes a measurement value of a key file of the system; The system status verification module is used to compare the current system status value of the operating system with the trusted status reference value of the operating system pre-sealed in the storage module, and verify the current trusted status of the operating system according to the comparison result.

13. The device according to claim 12, It is characterized in that The device also includes: a storage module; The measurement information calculation module is further used to calculate a trustworthy state reference value of the operating system; The storage module is used to locally store the trusted state reference value of the operating system.

14. A computer comprising a memory, a processor, and an operating system trusted state certification program stored in the memory and executable on the processor, wherein the operating system trusted state certification program, when executed by the processor, implements the operating system trusted state certification method as described in any one of claims 1 to 11.

15. A computer-readable storage medium, wherein an operating system trusted state certification program is stored on the computer-readable storage medium, and when the operating system trusted state certification program is executed by a processor, the operating system trusted state certification method according to any one of claims 1 to 11 is implemented.