Method and apparatus for proving trusted state of operating system, computer, and storage medium

By calculating the comparison between the current system status value of the operating system and the pre-sealed trusted status benchmark value, and utilizing the PCR scalability of the TPM2.0 chip, the local trusted status certification of the operating system is realized, which solves the complexity of the remote certification scheme. Addresses performance and memory usage issues, improving system performance and accuracy.

WO2024179285A1PCT designated stage expired Publication Date: 2024-09-06ZTE CORP

Patent Information

Application Number
PCT/CN2024/076144
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-27
Filing Date
2024-02-05
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The remote trusted certification scheme of existing operating systems is complex to deploy, takes up a large amount of system memory, affects system performance, and is difficult to achieve accurate trusted status verification locally.

Method used

By calculating the current system status value of the operating system, including the measurement values ​​of key system files, and comparing it with the pre-sealed trusted status benchmark value, the PCR scalability of the TPM2.0 chip is used to achieve local trusted status certification and reduce the impact on the system. memory usage and improve performance.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024076144_06092024_PF_FP
    Figure CN2024076144_06092024_PF_FP
Patent Text Reader

Abstract

Disclosed in the present application are a method and apparatus for proving a trusted state of an operating system, a computer, and a storage medium. The method comprises: 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 to a pre-stored trusted state reference value of the operating system; and verifying the current trusted state of the operating system according to the comparison result.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, computer and storage medium for proving trusted state of operating system

[0001] Related applications

[0002] This application claims priority to Chinese patent application No. 202310170839.9 filed on February 27, 2023, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] 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

[0004] 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, causing viruses to spread and hacker attacks to cause wanton damage; more seriously, there is no strict access control for legitimate users, resulting in unauthorized access and unsafe incidents.

[0005] With the development and continued expansion of technologies like cloud computing, the Internet of Things, and mobile computing, modern information technology is playing an increasingly prominent role in society's production and daily lives, and its supporting functions across various sectors are becoming increasingly important. At the same time, both information providers and users are placing increasing demands on and prioritizing information security. Trusted computing, which inherits traditional technologies and applications, reflects current application needs and technical characteristics, and integrates modern management concepts and social trust mechanisms, has become a new element in the field of information security and is undergoing continuous exploration and development in practice.

[0006] The purpose of trusted computing is to gradually establish a trusted chain starting from the power-on of the device. By measuring the next step by the previous step, the code and corresponding resources executed in the next step are guaranteed to be trustworthy and auditable. This helps 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 issued in a timely manner.

[0007] Currently, operating systems are fundamental software, and protecting their trustworthiness is crucial for building a network security system. Trustworthy attestation is a necessary measure for protecting the integrity of operating systems. Existing trustworthy attestation solutions rely on remote attestation servers. These solutions upload the required system metrics to a remote server, which then verifies the metrics to determine if the system software has been tampered with and, in turn, prove the trustworthiness of the current system state.

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

[0009] Summary of the Invention

[0010] 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.

[0011] The present invention provides a method for proving the trustworthy state of an operating system, the method comprising:

[0012] Calculating a current system state value of the operating system, wherein the current system state value includes measurement values ​​of key system files;

[0013] Comparing the current system state value of the operating system with a pre-stored trusted state reference value of the operating system;

[0014] The current trustworthy state of the operating system is verified according to the comparison result.

[0015] The present application also provides a device for proving the trusted state of an operating system, the device comprising:

[0016] A measurement information calculation module, configured to calculate a current system state value of the operating system, wherein the current system state value includes measurement values ​​of key system files;

[0017] The system status verification module is used to compare the current system status value of the operating system with the trustworthy status reference value of the operating system pre-sealed in the storage module, and verify the current trustworthy status of the operating system according to the comparison result.

[0018] 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. When the operating system trusted state certification program is executed by the processor, the operating system trusted state certification method described above is implemented.

[0019] An embodiment of the present application further provides 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 above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used 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 following is a brief introduction to the drawings required for describing the embodiments. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without inventive work.

[0021] FIG1 is a schematic diagram of the system architecture involved in an embodiment of the method for proving the trusted state of an operating system of the present application;

[0022] FIG2 is a flow chart of an embodiment of a method for proving the trusted state of an operating system according to the present application;

[0023] FIG3 is a flow chart of another embodiment of the method for proving the trusted state of an operating system of the present application;

[0024] FIG4 is a flow chart of another embodiment of the method for proving the trusted state of an operating system of the present application;

[0025] FIG5 is a schematic diagram of functional modules of an embodiment of an operating system trustworthy status certification device of the present application;

[0026] FIG6 is a schematic diagram of the functional modules of an embodiment of a computer device to which the operating system trusted status certification belongs in the present application.

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

[0028] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0029] As used herein, the terms "comprises," "includes," or any other variants thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising 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 shall be determined by their interpretation in the specific embodiment or further in conjunction with the context of the specific embodiment.

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

[0031] In the subsequent description, the use of suffixes such as "module", "component" or "unit" to represent elements is only for the purpose of facilitating the description of the present application and has no specific meaning. Therefore, "module", "component" or "unit" can be used interchangeably.

[0032] 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.

[0033] The subsequent description will be made using a server as an example. It will be understood by those skilled in the art that, in addition to components specifically used for mobile purposes, the structure according to the embodiments of the present application can also be applied to other fixed types of terminals.

[0034] 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; and verifying the current trusted state of the operating system according to the comparison result. The present application 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 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 calculations.

[0035] Technical terms involved in the embodiments of this application:

[0036] The embodiments of this application take into account the relatively simplified hardware and software architectures of current personal computers, servers, and other embedded computing devices, which can lead to arbitrary resource usage, particularly the possibility of modifying executable code and implanting malicious programs. Viruses exploit the operating system's failure to check the consistency of executed code, embedding virus code within the executable code and enabling virus propagation. Hackers exploit vulnerabilities in the attacked system to steal superuser privileges, implant attack programs, and wreak havoc. Even more seriously, the lack of strict access control for legitimate users allows unauthorized access, resulting in unsafe incidents.

[0037] In recent years, with the development and continued expansion of technologies such as cloud computing, the Internet of Things, and mobile computing, the leading role of modern information technology in social production and life has become increasingly prominent, and the supporting function of information technology in various social fields has become increasingly important. At the same time, both information providers and accessors have increasingly demanded and prioritized information security. This demand for information security has gone beyond the traditional definition of confidentiality, integrity, reliability, availability, and non-repudiation. Trusted computing, which inherits traditional technologies and applications, reflects current application needs and technical characteristics, and integrates modern management concepts and human trust mechanisms, has become a new element in the field of information security and is continuously explored and developed in practice.

[0038] In traditional computers and servers, without a Trusted Platform Module (TPM) and trusted computing, critical programs and configuration files on devices, such as the BIOS / UEFI, Grub, OS kernel, user-mode binaries, and configuration files, could be tampered with, potentially allowing malware to be implanted for further data theft or remote device control. In the past, such tampering was impossible to monitor or detect. Trusted computing aims to gradually establish a chain of trust, starting with device power-on. By measuring the next step with the previous one, the executed code and corresponding resources are trusted and auditable. This helps users understand whether the current hardware and software environment is in the expected state. If tampering occurs, execution can be terminated or an alert can be issued in a timely manner.

[0039] 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. Currently, there are trustworthy 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:

[0040] Impact on the accuracy of system trustworthiness attestation: Uncertainty in the TPM configuration status register (PCR10) affects remote attestation's assessment of the system's trustworthiness. For example, concurrent systemd service startups can cause PCR changes, affecting the determination of the system's trustworthiness benchmark and the remote attestation system's accuracy in assessing the target system's trustworthiness.

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

[0042] Increased system memory usage: Because IMA measures binary programs and records measurement logs in the virtual file system under / proc, it causes an increase in system memory usage.

[0043] Therefore, the 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 trustworthiness certification.

[0044] The system architecture involved in the embodiment of the present application can be shown in FIG1 .

[0045] As shown in Figure 1, 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:

[0046] The trusted platform module may specifically adopt a TPM2.0 chip.

[0047] The solution of this embodiment mainly realizes 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.

[0048] As shown in Figure 1, the software architecture of the embodiment of the present application mainly includes a metric 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:

[0049] 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 into 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 (bootloader), kernel (vmlinuz), and memory file system image used by the operating system and expands them into the corresponding platform registers (PCRs) to facilitate the subsequent acquisition or storage of benchmark values. When the system startup is completed, the calculation module calculates the measurement values ​​of the system's user-state key files, mainly based on the local configuration file list, and expands them into the corresponding registers (PCR16).

[0050] 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.

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

[0052] The system state verification module (hereafter referred to as the calculation module) is responsible for verifying the system's trustworthy state at a given moment and generating a verification report. Specifically, it determines whether the current system state is trustworthy based on a pre-stored trustworthy state benchmark value and the current system state value.

[0053] 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. 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 prove the trusted state of the system, thereby simplifying the architecture deployment, reducing the use of system memory, and improving system performance.

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

[0055] Refer to Figure 2, which is a flow chart of an embodiment of a method for proving the trusted state of an operating system of the present application.

[0056] As shown in FIG2 , an embodiment of the present application provides a method for proving the trusted state of an operating system, the method comprising:

[0057] 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 system files;

[0058] 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.

[0059] 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 is installed with a Linux operating system and supports a trusted platform. The physical machine can be a computer device installed with an operating system, such as a terminal or server.

[0060] In order to prove the trustworthy 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 the key files of the system.

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

[0062] As an implementation method, the following scheme may be used to calculate the current system status value of the operating system:

[0063] After the operating system is started or has run 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 used as the measurement value to obtain the current system status value of the operating system.

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

[0065] As an implementation method, when the system is started or has been running for a period of time, the measurement value of the system key file can be calculated by the measurement information calculation module shown in Figure 1, mainly based on the locally configured system key file list to calculate the measurement value of the system key file and expand it to the corresponding register (PCR16).

[0066] Step S102, comparing the current system state value of the operating system with a pre-stored trustworthy state reference value of the operating system;

[0067] In this embodiment, the trustworthy state reference value of the operating system is pre-calculated and stored.

[0068] The operating system trustworthy status 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 actual business operations are carried out.

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

[0070] 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. The measurement values ​​of the user state program are calculated by the measurement information measurement module after the system starts.

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

[0072] In one embodiment, after calculating the current system status value of the operating system, the current system status 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 status value of the operating system is consistent with the pre-sealed trusted state reference value of the operating system.

[0073] As an implementation manner, the comparison of the current system state value of the operating system with the pre-stored trusted state reference value of the operating system may adopt the following scheme:

[0074] First, the pre-configured platform register list is parsed.

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

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

[0077] After the trusted state baseline values ​​are calculated, they are temporarily stored in the corresponding platform registers. Specifically, after calculating the metrics for the relevant programs, the calculated metrics are expanded to the platform registers defined by the TCG specification. The system integrity information collection module then parses the pre-configured platform register list, sequentially retrieving the values ​​from the corresponding platform registers. The trusted state baseline values ​​obtained from each platform register are then stored in a local file or database via the storage module.

[0078] 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.

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

[0080] 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 scalability of the PCR of the TPM2.0 chip can be used to achieve local proof of the trusted status of the operating system. 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.

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

[0082] As an implementation manner, when the current system state value of the operating system is consistent with a pre-stored trustworthy state reference value of the operating system, it is determined that the current system state of the operating system is trustworthy.

[0083] When the current system state value of the operating system is inconsistent with the pre-stored trustworthy state reference value of the operating system, it is determined that the current system state of the operating system is untrustworthy.

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

[0085] 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 trustworthy.

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

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

[0088] 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 designated file or database through a storage module.

[0089] Afterwards, when verifying the current trusted state of the operating system, the current system state value of the operating system is compared with a pre-stored 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-stored trusted state reference value of the operating system. If the current system state value of the operating system is consistent with the pre-stored 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, the current system state of the operating system is determined to be trusted. If the current system state value of the operating system is inconsistent with the pre-stored trusted state reference value of the operating system, the current system state of the operating system is determined to be untrustworthy.

[0090] In one embodiment, 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.

[0091] This embodiment adopts the above scheme, specifically by calculating the current system status value of the operating system, the current system status value includes the measurement value of the key files of the system; comparing the current system status value of the operating system with the pre-sealed trusted state baseline value of the operating system; and verifying the current trusted state of the operating system based on the comparison result. This application can locally calculate the current system status value of the operating system, compare the current system status value with the pre-sealed system trusted state baseline 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.

[0092] 3 , which is a flow chart illustrating another embodiment of the method for proving the trusted state of an operating system according to the present application.

[0093] As shown in FIG3 , based on the embodiment shown in FIG1 , the embodiment of the present application further includes, before the above step of calculating the current system state value of the operating system:

[0094] Step S100: Calculate the trustworthy state reference value of the operating system and store it locally.

[0095] The operating system's trusted status baseline value is usually the hash value of key system files calculated after the system is initially installed and deployed, or after the server's software and hardware are updated, and before actual business operations are performed.

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

[0097] 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. The measurement values ​​of user-mode programs are calculated by the measurement information measurement module after the system starts.

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

[0099] The technical solution of this application can calculate the measurement values ​​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 scalability 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 baseline value, thereby achieving local system proof of 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 baseline value related to the system state for local proof of the system trust state, and the PCR16 of TPM2.0 can be used to calculate and store the measurement values ​​of the system key files.

[0100] As an implementation manner, the following scheme may be used to calculate the trustworthy state reference value of the operating system:

[0101] 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.

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

[0103] 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:

[0104] First, according to a predetermined expansion algorithm, the calculated metrics of the firmware, OS bootloader, kernel, memory file system image, and user-mode programs used by the operating system are expanded into the platform registers corresponding to the trusted platform module.

[0105] Then, parse the pre-configured platform register list;

[0106] Then, calling the interface of the trusted platform module, and sequentially obtaining the measurement values ​​in the corresponding platform registers according to the platform register list as the trusted state reference values ​​of the operating system;

[0107] In one embodiment, the trusted state reference value obtained from the trusted platform module may be signed according to a pre-generated proof identity key to obtain corresponding signature information;

[0108] Finally, the trustworthy state reference value and the corresponding signature information are saved in a designated file or database through a storage module.

[0109] As an implementation method, the specific process of calculating the operating system's trustworthy status baseline value and storing it locally may include:

[0110] Step 201: Power on and start the machine with the operating system installed.

[0111] Step 202: Hardware self-test and initialization.

[0112] Step 203: Calculate firmware metrics. UEFI firmware forms a trusted boot root with the TPM2 chip. EFI firmware internal program startup and metric calculation are implemented by the EFI firmware vendor in accordance with the TCG EFI specification. The metric values ​​for the relevant programs are expanded into the PCR registers defined in the TCG specification.

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

[0114] 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 PCR8 in the TPM2.0.

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

[0116] Step 207: Calculate the metrics of key user-mode files. When the system boots up, the calculation module uses a hash algorithm to calculate the hash value of each file in the pre-configured list of key system files. Then, using the extension algorithm defined by the TCG specification, the corresponding hash value is extended to the PCR16 corresponding to TPM2.0. The specific extension algorithm is as follows:

[0117] nPCR16 Value = SHA256(n-1 PCR16 Value || SHA256(nth measured file)).

[0118] In the above algorithm formula, "||" represents the concatenation of two digest values. The meanings of the fields are as follows:

[0119] 1) The n-1 PCR16 Value indicates the actual value in the PCR after the metric value of the n-1th file is calculated.

[0120] 2) SHA256 (nth measured file) uses the SHA256 algorithm to calculate the digest value of the nth file content.

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

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

[0123] 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.

[0124] The system integrity information collection module can be used to obtain the operating system's trusted status baseline value, as follows:

[0125] First, the system integrity information collection module parses the pre-configured platform register (PCR) list.

[0126] Then, the system completeness 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 sequence according to the platform register (PCR) list.

[0127] Then, a pre-generated authentication 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.

[0128] 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.

[0129] 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 previously stored system trusted status benchmark value.

[0130] 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:

[0131] Step 301: The verification module parses a pre-configured platform register (PCR) list, and sequentially reads previously stored system trustworthy state reference values ​​from a file or database storing system trustworthy state reference values ​​according to the list.

[0132] Step 302: Calculate the current system state. The verification module uses the external calculation interface provided by the calculation module and, based on a preconfigured list of key system files, calculates the hash values ​​of the key files on the current system to determine the current system state. The specific method for calculating the current system state remains consistent with the method for calculating the system's trusted state baseline value described above.

[0133] Step 303: Compare the system's trusted state baseline value with the system's current state value. The verification module compares the system's trusted state baseline 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, the module proceeds to step 304. If not, the module proceeds to step 305 and reports that the system state is untrustworthy.

[0134] Step 304: Signature Verification. To prevent malicious tampering with the system's trusted state baseline value, after the system's trusted state baseline value is compared with the system's current state value in step 303, the verification module also needs to use the pre-generated AIK and call the signature verification interface provided by the trusted platform module to verify the signature of the system's trusted state baseline value. If the signature verification passes, a report is output in step 305 confirming the current system state is trusted; otherwise, a report is output in step 304 confirming the current system state is untrustworthy.

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

[0136] 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 file 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 file has not been tampered with, proving that the system is in a trustworthy state.

[0137] 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 based on the comparison result. This application 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 achieve local proof of the trusted state of the operating system without relying on a remote server to achieve proof of the trusted state of the system, thereby simplifying architecture deployment, reducing the occupancy of system memory, and improving system performance. In one embodiment, 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 occupancy of system memory, and improving system performance and calculation accuracy.

[0138] 4 , which is a flow chart illustrating another embodiment of the method for proving the trusted state of an operating system of the present application.

[0139] As shown in FIG4 , based on the embodiment shown in FIG3 , the embodiment of the present application further includes, before the above step of calculating the current system state value of the operating system:

[0140] 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.

[0141] In one embodiment, the system key configuration information may be created in the following manner:

[0142] Configure the system critical file list used by the computing module. This list mainly includes system critical files that need to be protected.

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

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

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

[0146] Configure the password for the Trusted Platform Module.

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

[0148] 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. This application 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 thus achieve local proof of the trusted state of the operating system without relying on a remote server to achieve proof of the trusted state of the system, thereby simplifying architecture deployment, reducing the occupancy of system memory, and improving system performance. In one embodiment, 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 system memory, and improving system performance and calculation accuracy.

[0149] Compared to existing technologies, the technical solution of this application can calculate the measurement values ​​of key system files listed in the configuration file based on the UEFI firmware's support for TPM2.0 and the scalability of the TPM2.0 chip's PCR. This measurement value is then compared with the stored system trust status benchmark value to determine the current system trust status. This allows local verification of system trustworthiness.

[0150] 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 proof of the system's trusted state. Furthermore, TPM2.0's PCR16 can be used to calculate and store measurement values ​​for key system files, improving the accuracy of proof of the operating system's trusted state. This method does not rely on other servers or components on the network, achieving local proof of the operating system's trusted state. Furthermore, this method can prove the trusted state of the system not only during system startup, but also during the operating system's operation, thereby improving system performance and reducing system memory usage.

[0151] In practical applications, this application solution starts with the underlying UEFI and TPM2.0 trusted base, continuously expands the measurement scope through measurement, and ultimately covers the operating system, forming a bare-metal trusted boot or operating environment. In virtualization, it can expand the trusted host, support local attestation, and provide an NFV operating cloud environment.

[0152] In addition, as shown in FIG5 , an embodiment of the present application provides an operating system trusted state certification device, the device comprising:

[0153] A metric information calculation module is used to calculate the current system state value of the operating system and expand it into the corresponding platform register. The current system state value includes the metric values ​​of the system key files;

[0154] The system status verification module is used to compare the current system status value of the operating system with the trustworthy status reference value of the operating system pre-sealed in the storage module, and verify the current trustworthy status of the operating system according to the comparison result.

[0155] In one embodiment, the device further comprises: a storage module, a system integrity information collection module;

[0156] The measurement information calculation module is further used to calculate a trustworthy state reference value of the operating system;

[0157] 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.

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

[0159] The principles and implementation process of the operating system trusted state certification implemented in this embodiment are as follows. Please refer to the above embodiments and will not be repeated here.

[0160] As shown in Figure 6, 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 capable of running on the processor. When the operating system trusted state certification program is executed by the processor, it implements the operating system trusted state certification method described in the above embodiments.

[0161] 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 .

[0162] The memory 130 stores an operating system trust status 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 server through the communication module 140.

[0163] The operating system trustworthy status certification program in the memory 130 , when executed by the processor, can implement the operating system trustworthy status certification method as described in the above embodiments.

[0164] Since the operating system trusted state certification program adopts all the technical solutions of all the aforementioned embodiments when 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.

[0165] In addition, an embodiment of the present application also 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.

[0166] Since the operating system trusted state certification program adopts all the technical solutions of all the aforementioned embodiments when 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.

[0167] Compared to existing technologies, the embodiments of this application utilize the aforementioned technical solution to calculate the measurement values ​​of key system files listed in the configuration file based on the UEFI firmware's support for TPM 2.0 and the scalability of the TPM 2.0 chip's PCR. This measurement value is then compared with a stored system trustworthiness benchmark value to determine the current system trustworthiness. This allows for local system verification of system trustworthiness.

[0168] 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 proof of the system's trusted state. Furthermore, TPM2.0's PCR16 can be used to calculate and store measurement values ​​for key system files, improving the accuracy of proof of the operating system's trusted state. This method does not rely on other servers or components on the network, achieving local proof of the operating system's trusted state. Furthermore, this method can prove the trusted state of the system not only during system startup, but also during the operating system's operation, thereby improving system performance and reducing system memory usage.

[0169] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

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

[0171] 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 the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially 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 mentioned above, and includes a number of instructions for enabling a communication device (which can be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the method of each embodiment of the present application.

[0172] The above are merely optional embodiments of the present application and do not 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, in, 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, in, 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, in, 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, in, 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, in, 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, in, 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, in, 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, in, 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 different from the pre-stored trusted state reference value of the operating system If the two systems are consistent, it is determined that the current system state of the operating system is untrustworthy.

9. The method according to claim 8, in, 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, in, 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, in, 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, in, The device comprises: A measurement information calculation module, configured to calculate a current system state value of the operating system, wherein the current system state value includes measurement values ​​of key system files; The system status verification module is configured 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, in, The device also includes: a storage module; The measurement information calculation module is further configured to calculate a trustworthy state reference value of the operating system; The storage module is configured 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 having an operating system trusted state certification program stored thereon, wherein the operating system trusted state certification program, when executed by a processor, implements the operating system trusted state certification method as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Trusted bootstrap method and system thereof

    CN101038556A

  • TEE-based operating system application integrity measurement method and system

    CN113190831A

  • Computer credible authentication system, method and equipment and readable storage medium

    CN113190853A

  • Start control method of operating system, terminal equipment and readable storage medium

    CN114995894A

  • Trusted hardware device in a computer

    EP1030237A1

Cited By

  • Method, apparatus, electronic device and storage medium of remote attestation

    US12762245B2