Starting measurement method and device of virtual machine, equipment and storage medium
By obtaining remote proof report and benchmark proof report when the virtual machine is started, the security status of the virtual machine is solved, and the problem that the virtual machine monitor cannot detect the integrity of the BIOS and operating system is achieved, the security and integrity of the virtual machine are guaranteed. .
Patent Information
- Application Number
- CN202411214977.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-03
AI Technical Summary
The existing virtual machine monitor cannot ensure that the BIOS and operating system are detected at startup, resulting in severe security issues in the virtual machine running environment.
By obtaining the remote proof report and benchmark proof report when the virtual machine is re-registered successfully, determining the metric results of the virtual machine, thereby judging its current security status, building a complete hardware-based security system to ensure the integrity of the virtual machine.
It provides comprehensive trustworthy guarantees to ensure the security of the virtual machine during the startup stage, prevent hardware configuration and operating system from being tampered with, and improves the integrity of the virtual machine and the security of user data.
Smart Images

Figure CN119065793A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of virtualization technology, and in particular to a startup measurement method, device, equipment and storage medium for a virtual machine. Background Art
[0002] With the widespread application of virtualization technology, enterprises have greatly improved the utilization of computing resources. Due to the isolation of virtualization technology, different virtual machines can provide different services without affecting the work of other virtual machines. In addition, virtual machines have dynamic characteristics, and administrators can dynamically create, start, migrate or revoke virtual machines. Virtual machines run on hardware simulated by virtual machine monitors. Virtual machine monitors are responsible for managing the underlying real hardware resources, and virtual machines directly provide computing services to users.
[0003] In the cloud computing environment, users only need to rent the facilities, platforms or software of cloud service providers according to their needs to enjoy efficient and convenient cloud services, which improves work efficiency and avoids waste of resources. The openness of the cloud platform provides great convenience to users, but also makes users worry about the security of their data. Although logically, users store data in their own virtual machines, physically they are stored on a physical server. Malicious internal managers of physical facilities can steal users' private data from the server, causing irreparable losses to users.
[0004] Existing virtual machine monitors do not measure virtual machines, and cannot ensure the integrity and correctness of the BIOS and operating system when each virtual machine is started, thereby ensuring that the hardware configuration and operating system have not been tampered with when the user uses the computer, that is, ensuring the integrity of the virtual machine. Therefore, the virtual machine operating environment faces severe security issues. In order to solve these problems, the present application provides a virtual machine startup measurement method. Summary of the invention
[0005] The present application provides a virtual machine startup measurement method, device, equipment and storage medium to solve the security problems faced by the existing virtual machine operating environment.
[0006] In a first aspect, the present application provides a method for measuring the startup of a virtual machine, the method comprising:
[0007] After the virtual machine is successfully registered, restart the virtual machine, and when it is detected that the virtual machine enters the startup phase, obtain a remote attestation report of the virtual machine;
[0008] Determine the measurement result of the virtual machine according to the remote attestation report and the benchmark attestation report of the virtual machine, wherein the benchmark attestation report is obtained when the cloud platform registers the virtual machine when the virtual machine is successfully created;
[0009] The current security status of the virtual machine is determined according to the measurement result.
[0010] Optionally, after the virtual machine is successfully registered, the virtual machine is restarted, and when it is detected that the virtual machine enters the startup phase, before obtaining the remote attestation report of the virtual machine, the method further includes:
[0011] When the firmware on the virtual machine trusted chain changes, obtain the virtual machine device registration preparation request sent by the nova-api interface, the registration request includes: the uuid of the virtual machine;
[0012] According to the registration request, a ca-reports-pool database table is established and registration information is added to the ca-reports-pool database table, and a nonce random number is generated at the same time, wherein the registration information includes: a benchmark certification report and a public key;
[0013] According to the nonce random number and public key, the remote certification report is decrypted to obtain the PCR benchmark information, and the PCR benchmark information is saved in the benchmark certification report.
[0014] Optionally, decrypting the remote attestation report according to the nonce random number and the public key to obtain PCR benchmark information, and saving the PCR benchmark information into a benchmark attestation report includes:
[0015] After receiving the device registration request sent by the nova-api interface, the nova-compute interface forwards the device registration request to the virtual machine;
[0016] After obtaining the device registration request sent by the nova-compute interface, call tpm-tools to generate the endorsement key, and parse the endorsement key to obtain the public key and private key;
[0017] Export and encrypt the PCR information stored in the vtpm register according to the private key, generate a benchmark certification report, and send the public key and the benchmark certification report to the nova-compute interface;
[0018] The nova-compute interface sends a device registration request to the CA authentication heavy-duty, wherein the device registration request is obtained by compressing the public key and the benchmark certification report;
[0019] The CA certification center analyzes and processes the device registration information to obtain a benchmark certification report for the virtual machine.
[0020] Optionally, obtaining the remote attestation report of the virtual machine includes:
[0021] After the virtual machine is successfully created, the virtual machine startup measurement request preparation sent by the nova-api interface is obtained, and a target random number is generated and returned to the nova-api interface;
[0022] The nova-api interface sends a startup measurement request to the nova-compute interface, and the nova-compute interface sends the startup measurement request to the virtual machine, wherein the startup measurement request includes: a target random number and a target pcr information;
[0023] After receiving the startup measurement request, the virtual machine calls tpm-vm-agent to generate the remote attestation report.
[0024] Optionally, determining the measurement result of the virtual machine according to the remote attestation report and the benchmark attestation report of the virtual machine includes:
[0025] According to the uuid of the virtual machine, determining a benchmark certification report matching the uuid from a plurality of candidate registration information in a database;
[0026] Determine whether the target PCR information is consistent with the PCR benchmark information in the benchmark certification report;
[0027] When the target PCR information is consistent with the PCR reference information, determining that the measurement result of the virtual machine is a correct result;
[0028] When the target PCR information is inconsistent with the PCR benchmark information, it is determined that the measurement result of the virtual machine is an erroneous result.
[0029] Optionally, determining the current security status of the virtual machine according to the measurement result includes:
[0030] When the measurement result is a correct result, determining that the virtual machine is currently in a safe state;
[0031] When the measurement result is an error result, manually sent analysis information is obtained, where the analysis information is used to indicate whether the virtual machine is abnormal.
[0032] Optionally, when the measurement result is an error result, obtaining manually sent analysis information, where the analysis information is used to indicate whether the virtual machine is abnormal, includes:
[0033] When the analysis information indicates that the virtual machine is in a normal state, determining that the virtual machine is currently in a safe state, adding the uuid to a whitelist to update the whitelist, and updating and saving the PCR trusted set of the virtual machine according to the updated whitelist;
[0034] When the analysis information indicates that the virtual machine is in an abnormal state, it is determined that the virtual machine is currently in a dangerous state.
[0035] In a second aspect, the present application provides a security verification device for a remote attestation report of a virtual machine, the device comprising:
[0036] The processing module is used to restart the virtual machine after the virtual machine is successfully registered;
[0037] An acquisition module, configured to acquire a remote attestation report of the virtual machine when detecting that the virtual machine enters a startup phase;
[0038] A determination module is used to determine the measurement result of the virtual machine based on the remote attestation report and the benchmark attestation report of the virtual machine, wherein the benchmark attestation report is obtained when the cloud platform registers the virtual machine when the virtual machine is successfully created; and determine the current security status of the virtual machine based on the measurement result.
[0039] Optionally, the acquisition module is further used to acquire a virtual machine device registration preparation request sent by a nova-api interface when a firmware on the virtual machine trusted chain changes, wherein the registration request includes: a uuid of the virtual machine;
[0040] The processing module is further used to establish a ca-reports-pool database table according to the registration request and add registration information to the ca-reports-pool database table, and generate a nonce random number at the same time, wherein the registration information includes: a benchmark certification report and a public key;
[0041] The processing module is used to encrypt the key file corresponding to the key certificate to obtain an encrypted file, and send the encrypted file to the host machine; decrypt the remote certification report according to the nonce random number and the public key to obtain PCR benchmark information, and save the PCR benchmark information in the benchmark certification report.
[0042] Optionally, the processing module is further configured to forward the device registration request to the virtual machine after the nova-compute interface receives the device registration request sent by the nova-api interface;
[0043] The acquisition module is also used to obtain a device registration request sent by the nova-compute interface;
[0044] The processing module is also used to obtain the device registration request sent by the nova-compute interface, call tpm-tools to generate an endorsement key, and parse the endorsement key to obtain a public key and a private key; export and encrypt the pcr information stored in the vtpm register according to the private key, generate a benchmark certification report, and send the public key and the benchmark certification report to the nova-compute interface; the nova-compute interface sends the device registration request to the CA certification center, and the device registration request is obtained by compression processing based on the public key and the benchmark certification report; the CA certification center analyzes and processes the device registration information to obtain the benchmark certification report of the virtual machine.
[0045] Optionally, the acquisition module is further used to obtain the virtual machine startup measurement request preparation sent by the nova-api interface after the virtual machine is successfully created;
[0046] The processing module is further used to generate a target random number and return it to the nova-api interface; the nova-api interface sends a startup measurement request to the nova-compute interface, and the nova-compute interface sends the startup measurement request to the virtual machine, wherein the startup measurement request includes: a target random number and target pcr information; when the virtual machine receives the startup measurement request, the tpm-vm-agent is called to generate the remote attestation report.
[0047] Optionally, the device further includes: a judgment module;
[0048] The determination module is further used to determine, based on the uuid of the virtual machine, a benchmark certification report when the virtual machine is registered that matches the uuid from multiple candidate registration information in the database;
[0049] The judging module is used to judge whether the target PCR information is consistent with the PCR benchmark information in the benchmark certification report when the virtual machine is registered;
[0050] The determination module is further used to determine that the measurement result of the virtual machine is a correct result when the target PCR information is consistent with the PCR reference information;
[0051] The determination module is also used to determine that the measurement result of the virtual machine is an erroneous result when the target PCR information is inconsistent with the PCR benchmark information.
[0052] Optionally, the determination module is further configured to determine that the virtual machine is currently in a safe state when the measurement result is a correct result;
[0053] The acquisition module is further used to acquire analysis information sent by the user when the measurement result is an error result;
[0054] The judging module is further used to judge whether the virtual machine is abnormal.
[0055] Optionally, the processing module is further used to determine that the virtual machine is currently in a safe state when the analysis information indicates that the virtual machine is in a normal state, add the uuid to a whitelist to update the whitelist, and update and save the PCR trusted set of the virtual machine according to the updated whitelist;
[0056] The determination module is further configured to determine that the virtual machine is currently in a dangerous state when the analysis information indicates that the virtual machine is in an abnormal state.
[0057] In a third aspect, the present application provides a security verification device for a remote attestation report of a virtual machine, comprising:
[0058] Memory;
[0059] processor;
[0060] Wherein, the memory stores computer-executable instructions;
[0061] The processor executes the computer-executable instructions stored in the memory to implement the startup measurement method of the virtual machine as described in the first aspect and various possible implementations of the first aspect.
[0062] In a fourth aspect, the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the startup measurement method of a virtual machine as described in the first aspect and various possible implementations of the first aspect.
[0063] The present application provides a startup measurement method for a virtual machine, which determines the measurement result of the virtual machine by obtaining the remote attestation report when the virtual machine enters the startup phase and the benchmark attestation report when the virtual machine is registered, and the current security status of the virtual machine can be determined by the measurement result. The method provides a virtual trust root and a startup trust chain in a computing environment such as a trusted virtual machine instance, and the system trust provides users with all-round trust protection for the startup phase of the environment, builds a complete hardware-based security system, and ensures the integrity of the virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0065] Figure 1 The process of the virtual machine startup measurement method provided in this application Figure 1 ;
[0066] Figure 2 A schematic diagram of a virtual machine registration process based on a remote attestation report of a virtual machine provided for this application;
[0067] Figure 3 The process of the virtual machine startup measurement method provided in this application Figure 2 ;
[0068] Figure 4 A schematic diagram of a virtual machine startup measurement method provided in this application;
[0069] Figure 5 A schematic diagram of the structure of a security verification device for a remote attestation report of a virtual machine provided in this application;
[0070] Figure 6 A schematic diagram of the structure of the security inspection device for the remote attestation report of the virtual machine provided in this application.
[0071] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0073] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein.
[0074] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0075] First, the terms involved in this application are explained:
[0076] Firmware: Firmware is a program written into EPROM (erasable programmable read-only memory) or EEPROM (electrically erasable programmable read-only memory).
[0077] OpenStack: OpenStack is an open source cloud computing management platform project, a combination of a series of software open source projects. It was developed and initiated by NASA (National Aeronautics and Space Administration) and Rackspace, and is licensed under the Apache License (a free software license issued by the Apache Software Foundation).
[0078] OpenStack provides scalable and elastic cloud computing services for private and public clouds. The project goal is to provide a cloud computing management platform that is simple to implement, scalable, rich, and standardized.
[0079] nova-compute: nova-compute is a very important daemon process that is responsible for creating and terminating virtual machine instances, that is, managing the life cycle of virtual machine instances.
[0080] nova-api: nova-api is the RESTful API service provided by nova. Horizon, novaclient, etc. communicate with nova through this api.
[0081] Virtual Machine: A virtual machine is a complete computer system that is simulated by software and has complete hardware system functions and runs in a completely isolated environment. In layman's terms, a virtual machine uses software methods to virtualize several machines on a physical computer. Each virtual machine can run independently and can install various software and applications. It is a computer in a computer, a computer virtualized by software.
[0082] BIOS: BIOS, the full name is Basic Input / Output System, which means basic input / output system in Chinese.
[0083] BIOS is a set of programs embedded in the ROM chip on the computer motherboard. It is responsible for initializing and testing the system's hardware when the computer is turned on to ensure that the system can work normally.
[0084] UUID: UUID is the abbreviation of Universally Unique Identifier. It is a standard for software construction and is also part of the Open Software Foundation in the field of distributed computing environments. Its purpose is to allow all elements in a distributed system to have unique identification information without the need for a central control terminal to specify the identification information. In this way, everyone can create a UUID that does not conflict with others. In this case, there is no need to consider the problem of name duplication when creating a database.
[0085] VTPM: A Virtual Trusted Platform Module (VTPM) is a software-based representation of a physical Trusted Platform Module 2.0 chip. A VTPM acts like any other virtual device.
[0086] With the widespread application of virtualization technology, enterprises have greatly improved the utilization of computing resources. Due to the isolation of virtualization technology, different virtual machines can provide different services without affecting the work of other virtual machines. In addition, virtual machines have dynamic characteristics, and administrators can dynamically create, start, migrate or revoke virtual machines. Virtual machines run on hardware simulated by virtual machine monitors. Virtual machine monitors are responsible for managing the underlying real hardware resources, and virtual machines directly provide computing services to users.
[0087] In the cloud computing environment, users only need to rent the facilities, platforms or software of cloud service providers according to their needs to enjoy efficient and convenient cloud services, which improves work efficiency and avoids waste of resources. The openness of the cloud platform provides great convenience to users, but also makes users worry about the security of their data. Although logically, users store data in their own virtual machines, physically they are stored on a physical server. Malicious internal managers of physical facilities can steal users' private data from the server, causing irreparable losses to users.
[0088] Existing virtual machine monitors do not measure virtual machines and cannot ensure the integrity and correctness of the BIOS and operating system when each virtual machine is started, thereby ensuring that the hardware configuration and operating system have not been tampered with when the user is using the computer, that is, ensuring the integrity of the virtual machine. Therefore, the virtual machine operating environment faces severe security issues.
[0089] In response to the above problems, this application provides a virtual machine startup measurement method, which determines the measurement result of the virtual machine by obtaining the remote attestation report when the virtual machine enters the startup phase and the benchmark attestation report when the virtual machine is registered, and the current security status of the virtual machine can be determined by the measurement result. This method provides a virtual trust root and a startup trust chain in a computing environment such as a trusted virtual machine instance, and the system trust provides users with all-round trust protection for the environment startup phase, builds a complete hardware-based security system, and ensures the integrity of the virtual machine.
[0090] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0091] Figure 1 This is the process of the virtual machine startup measurement method provided by the embodiment of the present application Figure 1 .like Figure 1 As shown, the startup measurement method of a virtual machine provided in this embodiment includes:
[0092] S101: After the virtual machine is successfully registered, restart the virtual machine, and when it is detected that the virtual machine enters the startup phase, obtain a remote attestation report of the virtual machine.
[0093] After the virtual machine is successfully registered, the virtual machine is restarted. At this time, a startup measurement check needs to be performed on the virtual machine to prevent the virtual machine from being maliciously tampered with after the registration is successful.
[0094] It is understandable that the security of virtual machines is guaranteed by trusted computing. However, the trust chain is terminated when it reaches the virtual machine monitor level and does not extend to the upper virtual machines. The trust chain between the virtual machine monitor and the virtual machine does not exist. Therefore, in order to ensure the integrity of the upper-level client operating system, it is necessary to combine virtualization technology with trusted computing technology to build a trusted cloud platform.
[0095] S102: Determine a measurement result of the virtual machine according to the remote attestation report and a benchmark attestation report of the virtual machine.
[0096] The benchmark certification report is obtained by the cloud platform when the virtual machine is successfully created and the cloud platform registers the virtual machine.
[0097] The baseline attestation report obtained when the virtual machine is successfully registered, that is, the initial information of the virtual machine, is used as a benchmark for comparison with the remote attestation report after the virtual machine is started. The measurement result of the virtual machine can be obtained, that is, whether the virtual machine is in a safe state.
[0098] It can be understood that the security check of the virtual machine is to verify the identity of the cloud server and the integrity of the data through trusted computing means to increase the trust in the cloud platform. Therefore, it is necessary to compare the baseline attestation report when the virtual machine registration is successful and the remote attestation report after the virtual machine is started to ensure the integrity and correctness of the virtual machine.
[0099] S103: Determine the current security status of the virtual machine according to the measurement result.
[0100] The current security status of the virtual machine refers to whether the virtual machine is in a complete, correct and untampered state.
[0101] The virtual machine compares the baseline attestation report and the remote attestation report when the virtual machine is registered to obtain a measurement result, and then processes the measurement result to determine the current security status of the virtual machine.
[0102] It is understandable that if the current security status of the virtual machine does not meet expectations, employees are required to conduct in-depth analysis of the security issues of the virtual machine in order to continue to conduct security inspections of the virtual machine.
[0103] The startup measurement method of a virtual machine provided in an embodiment of the present application obtains a remote attestation report when the virtual machine enters the startup phase and a baseline attestation report when the virtual machine is successfully created. The measurement result of the virtual machine is obtained from the remote attestation report and the baseline attestation report when the virtual machine is registered, thereby determining the current security status of the virtual machine, ensuring that the hardware configuration and operating system have not been tampered with when the user uses the computer, that is, ensuring the integrity of the virtual machine.
[0104] Figure 2 A schematic diagram of a virtual machine registration process based on a remote attestation report of a virtual machine provided in this application. Figure 1 Based on the embodiment, the registration method of the virtual machine is described in detail. Figure 2 As shown, the cloud platform-based virtual machine registration method provided in this embodiment includes:
[0105] S201: When the firmware on the virtual machine trusted chain changes, a virtual machine device registration preparation request sent by the nova-api interface is obtained, where the registration request includes: the uuid of the virtual machine.
[0106] After the virtual machine is successfully created, it is necessary to determine whether trust_vm in falvor is true. If it is true, a device registration preparation request is sent to the CA certification center. This device registration preparation request contains the uuid of the virtual machine.
[0107] S202: According to the device registration preparation request, the CA certification center establishes a ca-reports-pool database table and adds registration information to the ca-reports-pool database table, and generates a nonce random number.
[0108] Among them, there is a ca-agent service in the CA certification center. When the CA certification center receives the device registration preparation request sent by the nova-api interface, it will construct a ca-reports-pool database table schema and add registration information below. At the same time, it will generate a nonce random number as a response and return it to the nova-api interface.
[0109] As you can understand, ca-reports-pool is a table in the database that records the corresponding relationship between the uuid of a virtual machine and the path to save the remote attestation benchmark content. The saved remote attestation benchmark content includes the benchmark attestation report and the public key.
[0110] S203: After receiving the device registration request sent by the nova-api interface, the nova-compute interface forwards the device registration request to the virtual machine.
[0111] After receiving the device registration preparation request from the nova-api interface, the CA certification center will prepare for remote report persistence and generate a nonce random number. Then, the preparation registration result including the nonce random number will be returned to the nova-api interface.
[0112] After receiving the reply to the device registration request, the nova-api interface will parse it to obtain the nonce random number, and then send a device registration request containing the parsed nonce random number to the nova-compute interface.
[0113] The nova-compute service sends this device registration request to the virtual machine.
[0114] S204: After obtaining the device registration request sent by the nova-compute interface, call tpm-tools to generate an endorsement key, and parse the endorsement key to obtain a public key and a private key.
[0115] The tpm-vm-agent service in the virtual machine handles the business requests of trusted computing. When the virtual machine receives the device registration request sent by the nova-compute interface, the tpm-vm-agent will call tpm-tools to generate the endorsement key, and then generate the asymmetric encryption public key and private key from the endorsement key.
[0116] S205: Export and encrypt the pcr information stored in the vtpm register according to the private key, generate a benchmark certification report, and send the public key and the benchmark certification report to the nova-compute interface.
[0117] Among them, the virtual machine uses the private key and nonce random number through tpm-tools to export the pcr information saved in the vtpm register and encrypt it to generate the benchmark certification report of the virtual machine. The virtual machine then returns the benchmark certification report and the public key to the nova-compute interface.
[0118] S206: The nova-compute interface sends the device registration request to the CA certification center.
[0119] The nova-compute interface compresses the public key and the benchmark certification report of the virtual machine to obtain a device registration request, and the nova-compute interface sends the compressed benchmark certification report and public key, that is, the device registration request of the virtual machine, to the CA certification center.
[0120] There is a tpm-server-agent service in nova-compute to process trusted business requests. When nova-compute receives the benchmark certification report and public key sent by the virtual machine, the tpm-server-agent service compresses the benchmark certification report and public key, which is also the registration information of the virtual machine.
[0121] S207: The CA certification center analyzes and processes the device registration information to obtain a benchmark certification report of the virtual machine.
[0122] Among them, after receiving the device request, the ca-agent in the CA certification center calls the tpm2-tool tool to decrypt the device registration information through the previously recorded nonce random number and the public key transmitted this time, thereby obtaining the benchmark pcr value and exporting it to the benchmark certification report. The benchmark report is stored in the folder under the path of the report save corresponding to the uuid in CA-resports-pool.
[0123] Optionally, after completing the virtual machine registration process, the CA certification center returns the registration result of the virtual machine to nova-compute to store the registration result.
[0124] It is understandable that any business in which the firmware on the trusted chain of any virtual machine changes should trigger the virtual machine device registration to update the CA certification center's benchmark certification report.
[0125] The cloud platform-based virtual machine registration method provided in the embodiment of the present application uses the state value of the firmware in the startup process trusted chain collected during the startup process, and stores the measurement result in the register, that is, the benchmark PCR value. Then the benchmark PCR value is read out from the register using the tpm-tool tool, and the private key of the asymmetric key generated by the tpm-tool is encapsulated into a benchmark certification report. And the benchmark certification report is sent to the connected CA certification center as a benchmark report for trusted startup and remote certification. This method achieves the purpose of preparing for remote authentication of the virtual machine by storing the benchmark PCR value during the registration process of the virtual machine.
[0126] Figure 3 The process of the virtual machine startup measurement method provided in the embodiment of the present application Figure 2 This embodiment is in Figure 1 Based on the embodiment, a startup measurement method of a virtual machine is described in detail.
[0127] like Figure 3 As shown, the startup measurement method of a virtual machine provided in this embodiment includes:
[0128] S301: The Nova-api interface obtains a start measurement request sent by the network management service.
[0129] Among them, after the virtual machine is successfully created, before changing the virtual machine status, the gateway service will check whether the virtual machine is a trusted virtual machine at that time. At this time, it is necessary to obtain the hash value of the firmware status on the trusted chain of the virtual machine startup process and the hash of the firmware status on the trusted chain on the host where the virtual machine is located. If it is a trusted virtual machine, VNC will be disabled first to ensure that the user cannot log in, and then a virtual machine startup measurement request will be initiated. After the nova-api interface receives the virtual machine startup measurement request, it first sends a "virtual machine startup measurement preparation request" to the CA certification center. The CA certification center returns the request result of the startup measurement preparation request, that is, it generates a target random number and returns it to the nova-api interface.
[0130] S302: The nova-api interface sends a startup measurement request to the nova-compute interface, and the nova-compute interface sends the startup measurement request to the virtual machine.
[0131] The start measurement request includes the target random number nonce, the list value of the PCR to be collected, and the remote proof report.
[0132] After receiving the startup target random number, the nova-api interface sends a startup measurement request to the nova-compute interface, and then the nova-compute interface sends the startup measurement request to the virtual machine.
[0133] Optionally, after the virtual machine receives the request to start measurement, the tpm2-tool tool can be called by the tpm-vm-agent service, and a remote attestation report is generated using the private key password generated by the device registration process and the passed-in nonce and measurement result trusted set. The report is then encapsulated into a measurement result using a secret key and finally sent to the nova-compute interface.
[0134] After the tpm-host-agent of the nova-compute interface receives the measurement results of the virtual machine, the tpm-host-agent service also calls the tpm2-tool tool, using the private key password generated by the device registration process and the incoming nonce and measurement result trust set to generate a remote attestation report, and encapsulate it into a measurement result through a secret key, and then compress the measurement results of the virtual machine and the physical machine into the final measurement result and send it to the CA certification center. After receiving the start measurement request and measurement report, the CA certification center parses to obtain the remote attestation report of the virtual machine and the remote attestation report of the physical machine, and then decrypts and verifies the remote attestation report.
[0135] After receiving the startup measurement request and measurement report, the CA certification center parses and obtains the remote attestation report of the virtual machine, and then decrypts and verifies the remote attestation report.
[0136] Optionally, the benchmark certification report when the virtual machine is registered that matches the uuid can also be determined from multiple candidate registration information in the database according to the uuid of the virtual machine.
[0137] Since there may be more than one virtual machine, it is necessary to determine the benchmark certification report when the virtual machine that needs to be security checked is registered from multiple candidate registration information in the database based on the uuid.
[0138] S303: The CA certification center verifies the remote certification report of the virtual machine and determines the measurement result of the virtual machine.
[0139] Among them, the ca-agent service of the CA certification center calls the tpm2-tool tool to use the public key and nonce passed in by the device registration to verify the virtual machine remote authentication report, thereby preliminarily obtaining the measurement results of the virtual machine.
[0140] Optionally, after determining the measurement result of the virtual machine, the CA certification authority returns the measurement result to nova-compute.
[0141] S304: nova-compute stores the startup measurement result in the nova database.
[0142] After nova-compute stores the startup measurement results in the nova database, the measurement results are obtained from the database. Specifically, it can be determined whether the target PCR information is consistent with the PCR benchmark information in the benchmark certification report to achieve the purpose of further verifying the measurement results.
[0143] like Figure 4 As shown in the figure, the target PCR information includes: target public key, target random number and measurement result trusted set, and the PCR benchmark information includes: public key, nonce random number and benchmark measurement trusted set. Therefore, it is necessary to judge three aspects in the end: whether the public key can be decrypted normally, whether the nonce is accurate, and whether the target PCR information is equal to the trusted set of the PCR benchmark information in the benchmark certification report.
[0144] If the public key signature verification fails, the measurement result of the virtual machine is illegal, the management and control interface will alarm, and the virtual machine is untrustworthy;
[0145] If the public key signature verification is successful, it indicates that the identity of the virtual machine is legal and needs to be further verified, that is, to determine whether the nonce random number is correct. If the nonce random number is incorrect, the measurement result of the virtual machine is illegal, the management interface alarms, and the virtual machine is untrustworthy;
[0146] If the nonce random number is correct, it means that the virtual machine has not been retransmitted, and further verification is needed, that is, to determine whether the target PCR information is equal to the trusted set of the PCR benchmark information in the benchmark certification report. If the target PCR information is equal to the trusted set of the PCR benchmark information in the benchmark certification report, it means that the state of the virtual machine after startup is consistent with the initial state of the virtual machine, and the measurement result of the virtual machine is the correct result, that is, the virtual machine has not been tampered with, the integrity and correctness of the virtual machine are guaranteed, and the current security state of the virtual machine is safe.
[0147] If the target PCR information is not equal to the trusted set of PCR benchmark information in the benchmark certification report, that is, the state of the virtual machine after startup is inconsistent with the initial state of the virtual machine, the measurement result of the virtual machine will be regarded as an error result. At this time, it is necessary to manually determine whether the unequal items are reasonable, and the manually determined results will be processed as analysis information.
[0148] If the analysis information obtained by manual positioning analysis indicates that the virtual machine is in an abnormal state, it means that the item in which the target PCR information of the virtual machine is not equal to the PCR benchmark information is unreasonable. At this time, the correctness and integrity of the virtual machine cannot be guaranteed, and the virtual machine is in a dangerous state.
[0149] It is understandable that the reason why the virtual machine is in an abnormal state may be that the virtual machine is attacked from the outside, such as hacker intrusion.
[0150] The security status of the virtual machine is manually checked and analyzed to obtain analysis information, which indicates whether the security status of the virtual machine is controllable. If the reasons are reasonable, such as the user modifying the configuration or upgrading the frim ware, resulting in the target PCR information of the virtual machine being unequal to the PCR benchmark information, the virtual machine is still in a safe state, that is, the virtual machine is in a normal state. Therefore, the uuid of the virtual machine is added to the whitelist, and the whitelist is updated. According to the updated whitelist, the PCR trusted set of the virtual machine is updated and saved to ensure that the security status of the virtual machine before the user modification is not repeatedly verified.
[0151] like Figure 4 As shown, when the analysis information indicates that the virtual machine is in a normal state, the UUID is added to the whitelist to update the whitelist, and the PCR trusted set of the virtual machine is updated and saved according to the updated whitelist. The whitelist refers to the virtual machine whose security inspection result indicates that it is unsafe and the security status of the virtual machine is controllable after manual investigation. The UUID of the virtual machine is added to the whitelist so that the security status of the virtual machine will not be repeatedly checked next time.
[0152] It is understandable that if the uuid of the virtual machine is not added to the whitelist and updated when the analysis information indicates that the virtual machine is in a normal state, the controllable security state of the virtual machine will be repeatedly checked.
[0153] The startup measurement method of the virtual machine provided in the embodiment of the present application obtains the hash value of the firmware status on the trusted chain of the virtual machine startup process and the hash of the firmware status on the trusted chain on the host machine where the virtual machine is located after the virtual machine is started, and exports it through a trusted tool to generate a remote attestation report, and compares the value in the virtual machine startup process state with the baseline value registered and saved by the CA trusted authentication platform device to determine whether the virtual machine is trustworthy. This method implements the security inspection of the remote attestation report of the virtual machine, completes the inspection of the integrity and security of the virtual machine, and thus determines whether the hardware configuration and operating system have been tampered with when the user uses the computer.
[0154] Figure 5 A schematic diagram of the structure of a security verification device for a remote attestation report of a virtual machine provided in this application. Figure 5 As shown, the security verification device 500 of the remote attestation report of the virtual machine provided in this embodiment includes:
[0155] Processing module 501, used to restart the virtual machine after the virtual machine is successfully registered;
[0156] The acquisition module 502 is used to acquire a remote attestation report of the virtual machine when it is detected that the virtual machine enters the startup phase;
[0157] Determination module 503 is used to determine the measurement result of the virtual machine based on the remote attestation report and the benchmark attestation report of the virtual machine, wherein the benchmark attestation report is obtained when the cloud platform registers the virtual machine when the virtual machine is successfully created; and determine the current security status of the virtual machine based on the measurement result.
[0158] Optionally, the acquisition module 502 is further used to acquire a virtual machine device registration preparation request sent by a nova-api interface when a firmware on the virtual machine trusted chain changes, wherein the registration request includes: a uuid of the virtual machine;
[0159] The processing module 501 is further used to establish a ca-reports-pool database table according to the registration request and add registration information to the ca-reports-pool database table, and generate a nonce random number at the same time, wherein the registration information includes: a benchmark certification report and a public key;
[0160] The processing module 501 is used to encrypt the key file corresponding to the key certificate to obtain an encrypted file, and send the encrypted file to the host machine; decrypt the remote certification report according to the nonce random number and the public key to obtain PCR benchmark information, and save the PCR benchmark information into the benchmark certification report.
[0161] Optionally, the processing module 501 is further configured to forward the device registration request to the virtual machine after the nova-compute interface receives the device registration request sent by the nova-api interface;
[0162] The acquisition module 502 is further used to acquire a device registration request sent by the nova-compute interface;
[0163] The processing module 501 is also used to obtain the device registration request sent by the nova-compute interface, call tpm-tools to generate an endorsement key, and parse the endorsement key to obtain a public key and a private key; export and encrypt the pcr information stored in the vtpm register according to the private key, generate a benchmark certification report, and send the public key and the benchmark certification report to the nova-compute interface; the nova-compute interface sends the device registration request to the CA certification center, and the device registration request is obtained by compression processing based on the public key and the benchmark certification report; the CA certification center analyzes and processes the device registration information to obtain the benchmark certification report of the virtual machine.
[0164] Optionally, the acquisition module 502 is further used to obtain the virtual machine startup measurement request preparation sent by the nova-api interface after the virtual machine is successfully created;
[0165] The processing module 501 is further used to generate a target random number and return it to the nova-api interface; the nova-api interface sends a startup measurement request to the nova-compute interface, and the nova-compute interface sends the startup measurement request to the virtual machine, wherein the startup measurement request includes: a target random number and the remote attestation report.
[0166] Optionally, the device further includes: a judgment module 504;
[0167] The determination module 503 is further used to determine, according to the uuid of the virtual machine, from a plurality of candidate registration information in the database, a benchmark certification report when the virtual machine is registered that matches the uuid;
[0168] The judging module 504 is used to judge whether the target PCR information is consistent with the PCR benchmark information in the benchmark certification report when the virtual machine is registered;
[0169] The determination module 503 is further used to determine that the measurement result of the virtual machine is a correct result when the target PCR information is consistent with the PCR reference information;
[0170] The determination module 503 is also used to determine that the measurement result of the virtual machine is an erroneous result when the target PCR information is inconsistent with the PCR benchmark information.
[0171] Optionally, the determination module 503 is further configured to determine that the virtual machine is currently in a safe state when the measurement result is a correct result;
[0172] The acquisition module 502 is further configured to acquire analysis information sent by a user when the measurement result is an error result;
[0173] The determination module 504 is further configured to determine whether the virtual machine is abnormal.
[0174] Optionally, the processing module 501 is further used to determine that the virtual machine is currently in a safe state when the analysis information indicates that the virtual machine is in a normal state, add the uuid to a whitelist to update the whitelist, and update and save the PCR trusted set of the virtual machine according to the updated whitelist;
[0175] The determination module 503 is further configured to determine that the virtual machine is currently in a dangerous state when the analysis information indicates that the virtual machine is in an abnormal state.
[0176] Figure 6 A schematic diagram of the structure of a security verification device for a remote attestation report of a virtual machine provided in this application. Figure 6 As shown, the present application provides a security verification device for remote attestation reporting of a virtual machine, and the security verification device 600 for remote attestation reporting of a virtual machine includes: a receiver 601, a transmitter 602, a processor 603 and a memory 604.
[0177] Receiver 601, used for receiving instructions and data;
[0178] A transmitter 602, used for sending instructions and data;
[0179] Memory 604, used to store computer-executable instructions;
[0180] The processor 603 is used to execute the computer-executable instructions stored in the memory 604 to implement the various steps executed by the startup measurement method of the virtual machine in the above embodiment. For details, please refer to the relevant description in the above virtual machine startup measurement method embodiment.
[0181] Optionally, the memory 604 may be independent or integrated with the processor 503 .
[0182] When the memory 604 is independently provided, the electronic device further includes a bus for connecting the memory 604 and the processor 603 .
[0183] The present application also provides a computer storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, a startup measurement method of a virtual machine as executed by a security inspection device for a remote attestation report of the above-mentioned virtual machine is implemented.
[0184] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical interfaces; for example, a physical interface may have multiple functions, or a function or step may be performed by several physical interfaces in cooperation. Some physical interfaces or all physical interfaces may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0185] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0186] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for measuring the startup of a virtual machine, characterized in that: include: After the virtual machine is successfully registered, restart the virtual machine, and when it is detected that the virtual machine enters the startup phase, obtain a remote attestation report of the virtual machine; Determine the measurement result of the virtual machine according to the remote attestation report and the benchmark attestation report of the virtual machine, wherein the benchmark attestation report is obtained when the cloud platform registers the virtual machine when the virtual machine is successfully created; The current security status of the virtual machine is determined according to the measurement result.
2. The method according to claim 1, characterized in that After the virtual machine is successfully registered, the virtual machine is restarted, and when it is detected that the virtual machine enters the startup phase, before obtaining the remote attestation report of the virtual machine, the method further includes: When the firmware on the virtual machine trusted chain changes, obtain the virtual machine device registration preparation request sent by the nova-api interface, and the device registration preparation request includes: the uuid of the virtual machine; According to the device registration preparation request, a ca-reports-pool database table is established and registration information is added to the ca-reports-pool database table, and a nonce random number is generated at the same time, wherein the registration information includes: a benchmark certification report and a public key; According to the nonce random number and public key, the remote certification report is decrypted to obtain the PCR benchmark information, and the PCR benchmark information is saved in the benchmark certification report.
3. The method according to claim 2, characterized in that Applied to a virtual machine, the remote attestation report is decrypted according to the nonce random number and the public key to obtain the PCR benchmark information, and the PCR benchmark information is saved in the benchmark attestation report, including: After receiving the device registration request sent by the nova-api interface, the nova-compute interface forwards the device registration request to the virtual machine; After obtaining the device registration request sent by the nova-compute interface, call tpm-tools to generate the endorsement key, and parse the endorsement key to obtain the public key and private key; Export and encrypt the PCR information stored in the vtpm register according to the private key, generate a benchmark certification report, and send the public key and the benchmark certification report to the nova-compute interface; The nova-compute interface sends a device registration request to a CA certification center, where the device registration request is obtained by compressing the public key and the benchmark certification report; The CA certification center analyzes and processes the device registration information to obtain a benchmark certification report for the virtual machine.
4. The method according to claim 1, characterized in that The obtaining of the remote attestation report of the virtual machine includes: After the virtual machine is successfully created, the virtual machine startup measurement request preparation sent by the nova-api interface is obtained, and a target random number is generated and returned to the nova-api interface; The nova-api interface sends a startup measurement request to the nova-compute interface, and the nova-compute interface sends the startup measurement request to the virtual machine, wherein the startup measurement request includes: a target random number and a target pcr information; After receiving the startup measurement request, the virtual machine calls tpm-vm-agent to generate the remote attestation report.
5. The method according to claim 1, characterized in that Determining the measurement result of the virtual machine according to the remote attestation report and the benchmark attestation report of the virtual machine includes: According to the uuid of the virtual machine, determining a benchmark certification report matching the uuid from a plurality of candidate registration information in a database; Determine whether the target PCR information is consistent with the PCR benchmark information in the benchmark certification report; When the target PCR information is consistent with the PCR reference information, determining that the measurement result of the virtual machine is a correct result; When the target PCR information is inconsistent with the PCR benchmark information, it is determined that the measurement result of the virtual machine is an erroneous result.
6. The method according to claim 1, characterized in that Determining the current security status of the virtual machine according to the measurement result includes: When the measurement result is a correct result, determining that the virtual machine is currently in a safe state; When the measurement result is an error result, manually sent analysis information is obtained, where the analysis information is used to indicate whether the virtual machine is abnormal.
7. The method according to claim 6, characterized in that When the measurement result is an error result, obtaining manually sent analysis information, where the analysis information is used to indicate whether the virtual machine is abnormal, includes: When the analysis information indicates that the virtual machine is in a normal state, determine that the virtual machine is currently in a safe state, add the uuid to a whitelist to update the whitelist, and update and save the PCR trusted set of the virtual machine according to the updated whitelist; When the analysis information indicates that the virtual machine is in an abnormal state, it is determined that the virtual machine is currently in a dangerous state.
8. The device according to claim 1, characterized in that The device comprises: The processing module is used to restart the virtual machine after the virtual machine is successfully registered; An acquisition module, configured to acquire a remote attestation report of the virtual machine when detecting that the virtual machine enters a startup phase; A determination module is used to determine the measurement result of the virtual machine based on the remote attestation report and the benchmark attestation report of the virtual machine, wherein the benchmark attestation report is obtained when the cloud platform registers the virtual machine when the virtual machine is successfully created; and determine the current security status of the virtual machine based on the measurement result.
9. A security verification device based on a remote attestation report of a virtual machine, characterized in that: include: Memory; processor; Wherein, the memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the startup measurement method of the virtual machine according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and when the computer executable instructions are executed by a processor, they are used to implement the startup measurement method of a virtual machine according to any one of claims 1 to 7.
Citation Information
Cited By
High-reliability multiple redundancy virtualization method based on microkernel
CN119883516A
A high-reliability multi-redundancy virtualization method based on a microkernel
CN119883516B
