Advanced firmware lock

By introducing challenge and response mechanisms into electronic devices, ensuring that the device is allowed to start only when it responds correctly at startup, solving the security risks of existing firmware locks in the face of savvy thieves and hackers, and achieving effective locking of the device and Safe boot.

CN118974729APending Publication Date: 2024-11-15ABSOLUTE SOFTWARE CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380025923.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-02-07
Filing Date
2023-01-31
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing firmware locks are difficult to effectively protect against smart thieves and hackers, and cannot be effectively locked when the device is offline, which poses a security risk.

Method used

The firmware agent challenges the operating system agent every time the electronic device is booted or restarted and allows startup when the response is correct, otherwise the firmware lock is enabled. The operating system agent writes a response at the end of the session to ensure security at subsequent startups.

Benefits of technology

Through the challenge and response mechanism, the security of the device is improved, unauthorized startup is prevented, the possibility of successful hacker attacks is reduced, and the device is effectively locked when it is offline, enhancing the security protection of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118974729A_ABST
    Figure CN118974729A_ABST
Patent Text Reader

Abstract

In order to improve the security of the computer, when the computer is started or restarted each time, the firmware agent sends a challenge to the operating system agent for subsequent starting. During boot-up, the response to the last challenge will be checked because the operating system agent has provided it to a specified mailbox in advance at the last boot-up of the device. The operating system agent may generate a response in the offline mode or when connected to the server. And if the response is correct, the equipment is normally started. If the response is incorrect, a firmware lock is enabled. A number of breadth launches may be allowed without response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to mobile electronic device security. Specifically, the present disclosure relates to the use of firmware locks. Background Art

[0002] Firmware locks are generally considered stronger than other types of device locks. However, it is possible for a savvy thief to bypass existing firmware locks.

[0003] Existing firmware locks are based on reports, timer expiration, or hacking attempts. The UEFI (Unified Extensible Firmware Interface) agent operates on reports stored in the EFI (Extensible Firmware Interface) partition during boot. The OS (Operating System) agent stores reports in this partition periodically, and the OS agent receives instructions from the server periodically. Device rules detect non-compliant use, reports of theft or loss, timer expiration, or hacking attempts, and automatically lock the device.

[0004] Another solution is to provide a firmware lock, where the lock command is issued remotely, causing a reboot. The user must wait for the remote unlock command before they can log in again using the established profile.

[0005] Absolute Software currently offers firmware lockdown with offline lockout capability. Absolute Software's Device Freeze Agent can enable offline lockout based on timer expiration or other conditions.

[0006] This background is not intended, and should not be construed, as constituting prior art to the present invention. Summary of the invention

[0007] At each startup or restart of the electronic device, the firmware agent issues a challenge to the operating system agent for subsequent startup, i.e., the operating system agent must correctly respond to the challenge during the current startup session to allow the next startup. During the firmware startup phase, the firmware agent processes the response to its previous challenge: the operating system agent provides the previous response to the specified mailbox in the previous startup session, i.e., when the device was last turned on and optionally connected to the monitoring server. If the response is correct, the device boots normally. If the response is incorrect or missing, the firmware lock is enabled. If the operating system agent is tampered with in the previous startup session and cannot provide a response, the firmware agent is able to lock the device in subsequent sessions so that the device will not boot before unlocking. If the operating system agent is tampered with after providing a response, the device may boot normally again, but will not be able to boot afterwards. The operating system agent may be able to detect the tampering attempt and delete the previously provided response before it becomes inoperable, thereby reducing the possibility of additional normal startups. The operating system agent may also choose to write the response at the end of the session, such as as part of the operating system restart or shutdown process, to achieve a similar effect.

[0008] For example, a room door is equipped with a follow-up one-way lock. The key can set the door to unlock, corresponding to the electronic device not equipped with a lock. The key can also lock the door when the door is open, so that the door will lock immediately when it is closed, but will remain open under other circumstances. This corresponds to the operation of an electronic device equipped with a lock. Continuing to provide the correct response will keep the door open, but if the correct response is not provided, the device will lock and cannot be unlocked unless the password is entered. The password is like a key to the door.

[0009] The present invention discloses a method for protecting an electronic device, comprising: a firmware (FW) agent in the electronic device generates a challenge to an operating system (OS) agent in the electronic device during the startup process of the electronic device; after the startup process is completed, the OS agent writes a response to the challenge into a mailbox in the electronic device; the FW agent checks the response during the subsequent startup process of the electronic device; and the FW agent allows or prevents the completion of the subsequent startup process according to whether the response is correct or incorrect, wherein the electronic device receives one or more inputs from a user between the end of the startup process and the start of the subsequent startup process.

[0010] The present invention also discloses an electronic device, comprising a processor and a non-transitory computer-readable medium, wherein the non-transitory computer-readable medium stores a firmware (FW) agent and an operating system (OS) agent as computer-readable instructions. When the processor executes the computer-readable instructions, it will result in: the FW agent generates a challenge for the OS agent during the startup process of the electronic device; the OS agent writes a response to the challenge into a mailbox in the electronic device after the startup process is completed; the FW agent checks the response during the subsequent startup process of the electronic device; and the FW agent allows or prevents the completion of the subsequent startup process based on whether the response is correct or incorrect, wherein the electronic device receives one or more inputs from the user between the end of the startup process and the start of the subsequent startup process.

[0011] Also disclosed is a system including a server and an electronic device, the electronic device including a processor and a non-volatile computer-readable medium, the non-volatile computer-readable medium storing a firmware (FW) agent and an operating system (OS) agent as computer-readable instructions, the computer-readable instructions when executed by the processor causing: the FW agent to generate a challenge for the OS agent during the startup process of the electronic device; the OS agent to obtain a response from the server; the OS agent to write the response to the challenge to a mailbox in the electronic device after the startup process is completed; the FW agent to check the response during a subsequent startup process of the electronic device; and the FW agent to allow or prevent the completion of the subsequent startup process according to whether the response is correct or incorrect, respectively, wherein the electronic device receives one or more inputs from the user between the end of the startup process and the start of the subsequent startup process.

[0012] This brief description of the invention does not necessarily describe all features of the invention in detail and is not intended to, and should not be interpreted as, limiting the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 is a schematic block diagram of a system according to an embodiment of the present invention.

[0014] Figure 2 1 is a startup flow chart of connecting and disconnecting from a server according to an embodiment of the present invention.

[0015] Figure 3 is a flow chart of setting an offline response generation device according to an embodiment of the present invention.

[0016] Figure 4 is a flow chart of responding to a challenge offline according to an embodiment of the present invention. Specific embodiments

[0017] A. Glossary

[0018] BIOS – Basic Input Output System

[0019] CPU – Central Processing Unit

[0020] Digest – a hash value

[0021] DPAPI – Data Protection Application Programming Interface

[0022] DXE – Driver Execution Environment. This is the third phase of the UEFI boot process. During DXE, drivers install boot services and runtime services. In DXE, UEFI loads drivers for configured devices, installs drivers, and finds and executes boot code. After control is transferred to the booting operating system, runtime services will reside to handle the operating system's calls to UEFI, and boot services will terminate.

[0023] EFI – Extensible Firmware Interface

[0024] FW – Firmware

[0025] HDD – Hard Disk Drive

[0026] Lock message – A communication containing the unlock password hash and optional offline lock hash along with other parameters. If the offline lock hash is provided in the lock message, it results in a pre-lock operation, otherwise it results in a lock operation.

[0027] Lock Action – The device is locked immediately upon receiving a lock message that does not contain an offline lock hash value.

[0028] Mailbox – An area in the firmware, such as UEFI variables, that is accessible to both firmware agents and operating system agents. The mailbox contents can be authenticated during the DXE phase of boot.

[0029] Module - any component of the present invention, and any or all features of the present invention, without limitation. A module can be a software, firmware or hardware module.

[0030] NVRAM – Non-Volatile Random Access Memory

[0031] OEM – Equipment Manufacturer

[0032] Offline lock code – A code that causes a device to lock. For example, the lock may be a firmware lock that is triggered by an offline lock code. This may occur when instructions cannot be received from the server. The operating system agent knows or generates the offline lock code used to lock the device.

[0033] Offline Lock Hash – A hash of the offline lock code.

[0034] OS – Operating System

[0035] Pre-lock operation – Upon receiving a lock message containing an offline lock hash value, the electronic device is ready to lock, but is not actually locked. The presence of the offline lock hash value tells the firmware agent to save the message parameters and prepare to lock if certain conditions are met. Therefore, the lock itself can be considered ready.

[0036] Response - proves that the responder knows the secret. For example, the hash of the secret is used to calculate the digest of the response message, so neither the secret nor the hash of the secret is transmitted back to the challenger. The challenger must calculate the hash of the secret and the response digest in the same way as the responder, and then check that the digests match.

[0037] RO - Read Only

[0038] Secret – A code (such as a nonce or one-time use number) known only to the challenger and responder.

[0039] Session – The period between a CPU reset (session start) and a shutdown or restart. A session consists of the following phases in chronological order:

[0040] a. Firmware boot phase – The period between the CPU reset, the start of firmware boot, and the firmware handing over control to the OS boot loader. The firmware agent executes in the trusted portion of the firmware boot.

[0041] b. OS execution phase – The period between the start of the OS boot loader and the reboot or shutdown of the OS. The OS agent loads during the startup portion of the OS execution phase and remains active and communicating with the server until the session ends.

[0042] A session typically includes a period of time when a user uses an electronic device during the OS execution phase. For example, a user may interact with an electronic device to provide input to a productivity software application on the electronic device or view a presentation or video on the electronic device. The electronic device may receive other inputs from the user, and the electronic device may generate other outputs for the user. Therefore, the OS execution phase is at least an order of magnitude longer than the firmware boot phase, and is typically several orders of magnitude longer. A session may also include a period of time when the electronic device is ready for use by the user, such as displaying a prompt to enter a user identification or password. A session may also include a period of time when the electronic device automatically downloads software updates from a remote server. A session may include a period of time when the electronic device is partially powered off, for example, when the electronic device is in sleep mode or hibernation mode.

[0043] Subsequent - When used to refer to a subsequent event in a series of events, this means an event that occurs immediately after another event.

[0044] TLS – Transport Layer Security

[0045] TPM – Trusted Platform Module

[0046] UEFI – Unified Extensible Firmware Interface

[0047] Unlock Code – Instead of a password, it is automatically generated by the server (not the user) and is not a word or phrase but an array of random bytes, i.e. a code.

[0048] Unlock Password Hash – This is the hash of the unlock password that can be used to unlock a device that has triggered the firmware lock.

[0049] B. Exemplary Embodiments

[0050] The currently disclosed solution uses an active challenge / response mechanism to keep an electronic device unlocked, otherwise it automatically locks. During setup (which may require one or more boot cycles), the server sends a secure lock message to the device, which includes an unlock password hash and an offline lock hash. The device can be considered ready, i.e., in a pre-lock state or lock-ready state, and functioning normally when the challenge response is accessible. It is also ready to lock if the operating system agent sends a secret offline lock code to the firmware lock module.

[0051] At each boot, the firmware agent generates a challenge, and only a server or operating system agent with the corresponding key can generate a correct response. The challenge is a one-time challenge based on, for example, a high-quality random number, and the response is the corresponding one-time response. The operating system agent writes the response to a specified mailbox in each session (i.e., time period) that the device is turned on (i.e., before the device is reset). The mailbox can be a regular UEFI variable in NVRAM. For example, once the operating system agent starts running, it can write the response (if any) to the mailbox, or it can receive the response from the server and then write it to the mailbox. At the next boot (e.g., when the CPU is reset), the firmware agent verifies the response and, if correct, continues to boot normally; otherwise, the firmware lock is enabled.

[0052] In other embodiments, the mailbox may be replaced by a file in an EFI partition, hardware registers, TPM memory, or any other non-secure, non-volatile storage area accessible to the OS and firmware agents.

[0053] For situations where the device is used offline and a response must be obtained from the server, a certain number of restarts can be allowed without providing a response. This way the device does not lock every time it is used offline. A skip counter is used to count the number of times the device has restarted without responding. However, some sensitive devices may need to be connected in each session to avoid being locked. If the device is accidentally locked due to excessive offline restarts without responding, the device can be unlocked if the unlock password is known, and the hash value of the password is stored in a location accessible to the firmware lock.

[0054] During the UEFIDXE phase, the FW agent loads, generates a random number (used as a secret) to produce a challenge, and the random number hash value is saved in the FW's NVRAM for future verification. This is similar to the process described in patent application PCT / CA2018 / 051064 (titled "Secure Firmware Interface"). There may then be other FW agent steps, such as verifying previous challenges, other tasks (such as communicating with servers or other FW components, etc.). Typically, at boot time, the operating system starts, the operating system agent starts, the operating system agent views the challenge, the operating system agent communicates with the server, the server generates a response, the operating system agent writes the response to the mailbox, and then the device restarts. All of this happens in this order during the session. Then, at the next boot, the FW agent generates a new challenge and then verifies the result of the previously saved response in the mailbox to decide whether to continue booting.

[0055] If you do not want to continue booting, you will need to unlock the device. Once unlocked, the firmware will generate another challenge before generating the appropriate response and checking it on the next boot.

[0056] If requiring a challenge / response with the server in every session to keep the device unlocked is too strict, the solution can be further enhanced by setting up a separate key between the firmware agent and the OS agent so that the OS agent can respond without connecting to the server. This is less secure because the secret must be stored on the device. In one possible protocol, the firmware agent generates a separate key pair, saves the public key as a firmware variable, encrypts the private key, and sends it to the server via Absolute Software's secure interface (see patent application PCT / CA2018 / 051064). This can use a separate mailbox so as not to block other secure messages that may be transmitted from the server to the device. The server has the encryption key that the firmware agent used to encrypt the private key, uses it to decrypt the private key, and then sends the decrypted private key to the OS agent via TLS (Transport Layer Security). The OS agent saves the private key on the HDD (hard disk drive) or in the registry and protects it via DPAPI (Data Protection Application Programming Interface). From this point on, the firmware agent generates a challenge with random data, saves its hash value, and encrypts the random data using the public key. The OS agent then decrypts the encrypted random data using the private key, hashes the random data, and in response, sends a hash of the random data signed with the private key back to the firmware agent. By keeping the private key securely in the OS, only the logged-in or admin user can access it, and not hackers. The firmware agent verifies the signature of the response and compares the saved hash of the random data with the hash received from the OS agent.

[0057] If the firmware agent directly stores the private key so that the operating system agent can access it, this would be insecure because it happens through a channel that is vulnerable to hacking.

[0058] To further increase security, the aforementioned secrets can be stored in a TPM (Trusted Platform Module).

[0059] The device can be protected from physical attacks using a flash programmer. For example, a hacker might try to find the lock bit in the firmware flash and clear it. This would not be possible if the device manufacturer (OEM) implemented Absolute Software's Secure Storage specification, which is an interface that redirects writes of firmware variables from the default location (the main BIOS flash) to a secure storage location implemented by the OEM.

[0060] Figure 1 2 is a schematic block diagram of an exemplary embodiment of a system for providing a firmware lock, showing the main modules. The server 20 has the ability to respond 22 or generate a response after receiving a challenge, and can be connected to the device 30 via one or more communication networks. The device 30 is an electronic device, such as but not limited to a laptop, a tablet, a smart phone or a desktop. The device 30 includes one or more processors 32, which are operably connected to the firmware 40, the OS 60 and the user interface 70. The firmware 40 includes a FW agent 42, which includes a challenge generator 44 and a lock instruction 46. The challenge generator stores the challenge in a UEFI read-only variable 47. The lock instruction 46 activates the FW lock 50. The FW agent is connected to a mailbox 52, where a response to the generated challenge can be received. The OS 60 has an OS agent 62, which runs when the OS is running. The OS agent 62 has the ability to respond 64, access to the response or generate a response. The OS agent 62 also includes another lock instruction 66, which can be sent to the FW lock 50 at any time according to the situation detected by the OS agent. If the FW lock 50 is triggered, the firmware 40 is prevented from booting the OS, thereby locking the device 30. When the device is booting, the user can enter the unlock password 72 through the user interface 70 to unlock the device 30. The device 30 can also be unlocked by other means, such as through the BIOS level network stack, disk, etc., using various means to transmit the unlock password to the FW agent.

[0061] Figure 2is a flowchart for startup when connected and not connected to the server. Assuming that the locking system is fully set up and the device is started, in step 80, the OS agent writes a response to the challenge generated by the firmware agent during the current session (for example, at the beginning of the current session) to the mailbox. This is done in anticipation that the firmware agent will verify this response in a subsequent session and allow the OS to start again. During the current session, it is expected that the user will use the device and provide one or more inputs to the device, which is shown in step 91. Note that the user may continue to use the device after step 80 as the session continues. At the end of the current session, in step 82, the device is reset. In other cases, the device is turned off in step 82, for example because the user of the device does not need to use it. Therefore, it may remain turned off for a longer time before the subsequent session begins. Step 82, whether resetting or turning off the device, is usually performed by the user when he wants to end the session. The device starts to boot in step 83. In this subsequent session, the firmware agent generates a new challenge in step 84, requiring a new response from the operating system agent in order to ultimately continue the operation of the device in another subsequent session.

[0062] In step 84, the firmware agent generates a new random number / challenge at each boot, regardless of the outcome of the operation at the last boot. The firmware agent passes the challenge to the OS agent using a read-only UEFI variable. This way, the challenge is always available for the OS agent or server to read; at the first boot after setup, and after a period of offline time. If the generation of the challenge is skipped while the device is offline, then at the next boot online, the server will have no challenge and no way to generate a response.

[0063] In step 85, the FW agent checks the FW lock flag, which indicates whether the FW lock was triggered during the last boot. If the FW lock flag is not set, the process continues to step 86. If the FW lock is active (indicated by the set FW lock flag), the process jumps to step 98, where a password is required to complete the boot.

[0064] In step 86, it is checked whether the device's lock is ready, i.e. whether the lock is ready for use. This assumes that the challenge mechanism has been set up (keys have been generated, stored, etc.). If the FW is not locked and not lock-ready, the process continues to step 90, where the boot is completed normally. After the boot process is completed, in step 91, the device is used by the device user. In step 86, there may be more to check, such as setup steps, including configuration of advanced FW locks. For example, the lock message may require that offline challenges be disabled. The process can loop through the above steps (80-90) as many times as needed to set the lock and put the device in a lock-ready state.

[0065] If the lock is ready or prepared, the FW agent checks in step 87 whether the existing response variable is empty. The response variable is a read-only UEFI variable in the mailbox. If the response variable is empty, the skip count is increased in optional step 88, which occurs when the device is not connected to the server. In optional step 89 (which also occurs when the device is not connected to the server), the skip counter is checked to determine whether the skip count is below a preset level (n). Step 89 may also occur if the OS agent has been removed or disabled so that it cannot generate a response. If the skip count is within the limit, the process continues to step 90, where the boot is completed. The user can then use the device in step 91. At this point, the device is fully operational without being connected to a server. When this session is active, the process will return to step 80 to prepare for the next session.

[0066] However, if the skip count in step 89 has reached the limit (n), the FW agent will activate the FW lock in step 96. In a strict environment, where the grace number of reboots without a response is not allowed, the skip count check in step 89 will be removed (or the limit n will be set to 0). In this case, an empty response (from step 87) will cause the flow to go directly to step 96 to lock the device.

[0067] If the response variable is not empty in step 87, that is, there is a previous response from the OS agent, then in step 92, the FW agent receives the existing response from the mailbox. This response should be the response previously provided by the OS agent in the previous session. If the response is correct in step 94, the device completes the boot in step 90. If the response is incorrect or does not exist, then in step 96, the FW agent activates the FW lock. In step 97, the FW agent sets a flag in the FW storage location to indicate that the FW is locked. This is the flag checked in step 85. The device then requires the unlock password to be entered in step 98 to unlock the device and complete the boot. If the correct unlock password is received in step 100, the device will unlock, that is, clear the lock flag in step 102, clear the unlock and offline hash values, reset the skip count to zero in step 103, and so on, in preparation for the next lock message. Since the lock is disabled, the device will continue to boot in step 104.

[0068] After step 104, the FW lock function can be re-enabled by receiving a secure lock message (which prepares the device for lock with a new hash value and other parameters) after the device is set up again in step 106. During the setup, the server sends a secure lock message to the device, which includes the unlock password hash value and the offline lock hash value. The device can be considered pre-locked, but it will function normally when it can access the response to the challenge. If the operating system agent sends a secret offline lock code to the firmware lock module, it is also ready to lock.

[0069] If the password is incorrect or not entered at step 100, the process triggers the start of a reboot at step 112. In addition, the device may increase an attempt counter at step 114, which counts the number of incorrect passwords entered. In addition, the device may optionally introduce a delay at step 116 before requesting a password at step 98, the delay increasing as the counter increases or after a configurable number of attempts has been reached.

[0070] While it is possible to lock an online device using a signed simple plain text lock instruction from a server, when the device is offline, the signed instruction from the server cannot be delivered. Figure 3 is a flow chart of an example method for setting up a device to generate an offline response. In step 200, the FW agent generates a public-private key pair. This is after the FW agent receives a security command to prepare device lock, lock / unlock hash, configuration settings, etc. during setup. If the lock configuration request generates an offline response, this sub-function (offline lock) is enabled. In step 204, the public key is saved in the FW. In step 206, the FW agent encrypts the private key. In step 208, the FW agent sends the encrypted private key to the server. In step 210, the server decrypts the private key. In step 214, the server sends the decrypted private key to the OS agent via an encrypted TLS channel. In step 218, the OS agent receives the decrypted private key via an encrypted TLS channel. In step 220, the OS agent saves the private key in a secure storage provided by the OS. The public / private key pair is saved in the pre-lock setup phase (preparation phase), and none of them are sent in the challenge / response communication. In this embodiment, there is a secure link between the FW agent and the server and between the server and the OS agent, but there is no initial secure connection between the FW agent and the OS agent. Figure 3 The process is to establish a secure connection between the FW agent and the OS agent, which is required for offline communication.

[0071] Alternatively, the key pair is generated on the server side, rather than by the firmware. The server synchronously sends the public part of the signature to the firmware as part of the pre-lock procedure, and sends the private part to the agent over an encrypted TLS channel. This eliminates the need for the FW to send the private key to the agent via the server. Server-managed key pairs are also useful, as the server can periodically refresh expired keys and send new keys to the FW and OS agent. While possible, it can be cumbersome if key refreshes are initiated from the firmware side.

[0072] Figure 4is a flow chart for responding to a challenge when the device is offline. In step 230, the FW agent generates a random number (i.e., a random one-time use number or secret), hashes it in step 234, saves the hash value for later verification in step 236, and encrypts the challenge data derived from the random number using the public key in step 238. Adding more state information to the random one-time use number produces the challenge data. The FW agent then saves a digest of the challenge data in step 239. The FW takes the hash value (digest) of the plain text challenge data and saves the hash value for future verification responses. In step 240, the FW agent sends the encrypted challenge data (or "challenge") to the OS agent. When signing a message, the signature is generated from a short message digest (hash value). The encrypted challenge data (or simply challenge) is passed to the OS agent in the form of a read-only variable. The challenge data may contain additional information that the firmware wants to send to the agent, such as the number of challenges that were skipped and other state information.

[0073] The OS agent has received the private key during the pre-lock setting and has been using the private key until a lock / unlock occurs, or the server disables the offline response function or updates the key pair. In step 244, the OS agent uses the private key to decrypt the encrypted challenge data and obtain the plain text challenge data. The OS agent obtains its summary in the same way as the FW agent. The OS agent then generates a response, which is some information to be transmitted back to the FW agent, such as an "OK" string, a timestamp, etc. In order to sign this message, the message is hashed and the hash value of the original challenge data containing the key is added. In this way, the response summary includes a summary of the key, or it can be said that the key is used to generate the response summary. In step 248, the OS agent signs the response using the decryption key (i.e., a random number) used when generating the summary. In step 250, the OS agent sends the signed response to the FW agent.

[0074] Steps 230 to 240 are performed in the FW, during which the encrypted challenge is placed into a read-only UEFI variable. Thereafter, the OS is booted, the OS agent is loaded, and the process proceeds to step 244. All steps are continuous in one boot until step 250, where the response is written to the mailbox. There is a reboot 251 after step 250 to return to FW operation to verify the response and take action. In step 252, in the FW, the FW agent verifies the signature of the signed response using the previously saved digest of the challenge data. When the FW verifies the response signature, it takes the hash value of the response message (the "OK" string) and adds the hash value of the previously saved challenge. The resulting digest should be the same as the digest calculated by the OS agent when generating the signature. Therefore, when the FW agent calculates the signature of this digest using the public key, it should match.

[0075] If the signature verification succeeds, the device completes the boot, otherwise, the device will wait for the unlock password to be entered. If the signature verification fails, the device is locked, which is a significant state change. After locking, the unlock password or other unlock mechanism needs to be entered, and then the unlock process is performed.

[0076] Throughout the description, specific details have been set forth in order to more fully understand the present invention. However, the present invention can be implemented without these details. In other cases, well-known elements are not shown or described in detail, and repetition of steps and features is omitted to avoid unnecessarily obscuring the present invention. In general, unless otherwise specified, singular elements may be plural, and vice versa, without loss of generality. Therefore, the description should be regarded as illustrative, not restrictive.

[0077] The detailed description is presented in part in the form of methods or processes, symbolic representations of operations, functions and features of the present invention. The methods or processes implemented by software and firmware are here and generally understood to be a self-consistent sequence of steps leading to a desired result. These steps require physical operations on physical quantities. Usually, but not necessarily, these quantities take the form of electrical or magnetic signals or values ​​that can be stored, transmitted, combined, compared and otherwise operated. The processes described herein can be controlled by coded instructions (such as microcode) and / or programming instructions stored in one or more tangible or non-transient media readable by a computer or processor. The code module can be stored in any computer storage system or device, such as a hard disk drive, an optical disk drive, a solid-state memory, etc. These methods can also be embodied in part or in whole in special-purpose computer hardware, such as an ASIC (application-specific integrated circuit) or an FPGA (field programmable logic gate array) circuit.

[0078] When describing a processor, the processor may include two or more component processors. A computer readable memory may be divided into multiple component memories, which may be of the same type or different types. In some embodiments, the steps in the flow charts and other figures may be performed in a different order, steps may be eliminated, or additional steps may be included without departing from the present invention. Modules may be combined or divided into component modules.

[0079] It will be clear to those skilled in the art that further modifications may be made to the specific details disclosed herein to obtain other embodiments within the scope of the disclosed invention. All configurations described herein are merely examples, and the actual configuration depends on the specific embodiment. Therefore, the scope of the present invention should be interpreted according to the substantive content defined by the following claims.

Claims

1. A method for protecting an electronic device, comprising: A firmware (FW) agent in the electronic device generates a challenge to an operating system (OS) agent in the electronic device during the boot process of the electronic device; After the boot process is completed, the OS agent writes the response to the challenge into a mailbox in the implementing electronic device; The FW agent checks the response during a subsequent boot of the electronic device; and The FW agent allows or prevents completion of the subsequent startup process according to whether the response is correct; The electronic device receives one or more inputs from the user between the end of the startup process and the start of a subsequent startup process.

2. The method according to claim 1, characterized in that Include before said OS agent writes a response: The FW agent checks during startup whether the previous response in the mailbox is correct; and The FW agent allows the boot process to be completed.

3. The method according to claim 1, characterized in that: Including after the subsequent boot process is complete: The FW agent determines that the electronic device has no response in the mailbox during another startup process; and The FW agent prevents another boot process from completing.

4. The method according to claim 1, characterized in that Including after the subsequent boot process is complete: The FW agent determines that there is no response in the mailbox during another subsequent startup of the electronic device; The FW agent checks the number of consecutive times that the electronic device has started to boot but there is no response in the mailbox; as well as The FW agent allows or prevents completion of another subsequent startup process according to whether the consecutive number is lower than or reaches a limit.

5. The method according to claim 1, characterized in that Including after preventing subsequent boot processes from completing: The FW agent receives the correct password; and In response, the FW agent then allows the boot process to complete.

6. The method according to claim 1, characterized in that Includes an OS agent that obtains responses from a server.

7. The method according to claim 1, characterized in that This includes the OS agent writing the response before the subsequent boot process begins and in the following situations: When the operating system starts running; or When a response from the server is received; or When the session ends; or During the shutdown of electronic devices.

8. The method according to claim 1, characterized in that include: The FW agent generates a public key and a private key pair; The FW agent sends the encrypted private key to the server; The OS agent receives the decoded private key from the server; as well as The OS agent saves the decoded private key.

9. The method according to claim 8, characterized in that include: The FW agent encrypts the challenge using a public key; The OS agent decodes the challenge using a private key; The OS agent signs the response using a private key; The electronic device starts a subsequent startup process; as well as The FW agent verifies the signature of the signed response during a subsequent startup process.

10. The method according to claim 1, characterized in that include: The FW agent receives the public key of the key pair from the server; as well as The OS agent receives the private key of the key pair from the server.

11. The method according to claim 10, characterized in that include: The FW agent encrypts the challenge using a public key; The OS agent decodes the challenge using a private key; The OS agent signs the response using a private key; The electronic device starts a subsequent startup process; as well as The FW agent verifies the signature of the signed response during a subsequent startup process.

12. The method according to claim 1, characterized in that This includes setting up the electronic device prior to the initiation process so that the correct response is present in the mailbox.

13. An electronic device, comprising: A processor; as well as A non-transitory computer readable medium storing a firmware (FW) agent and an operating system (OS) agent as computer readable instructions, which when executed by the processor, result in: The FW agent generates a challenge to the OS agent during the startup process of the electronic device; The OS agent writes a response to the challenge into a mailbox in the electronic device after the boot process is completed; The FW agent checks the response during a subsequent startup of the electronic device; as well as The FW agent allows or prevents completion of a subsequent startup process according to whether the response is correct; The electronic device receives one or more inputs from the user between the end of the startup process and the start of a subsequent startup process.

14. The electronic device according to claim 13, characterized in that: The mailbox is a Unified Extensible Firmware Interface (UEFI) variable, a file in an Extensible Firmware Interface (EFI) partition, a hardware register, or a Trusted Platform Module (TPM) memory.

15. The electronic device according to claim 13, characterized in that: When the processor executes the computer readable instructions, it causes the OS agent to: Get a response from a server; or The response is generated using a private key from a key pair for which the FW agent has a public key.

16. A system comprising: A server; and An electronic device, comprising: a processor; and a non-transitory computer readable medium storing a firmware (FW) agent and an operating system (OS) agent as computer readable instructions that, when executed by the processor, result in: The FW agent generates a challenge to the OS agent during the startup process of the electronic device; The OS agent obtains a response from the server; The OS agent writes a response to the challenge into a mailbox in the electronic device after the boot process is completed; The FW agent checks the response during a subsequent boot of the electronic device; and The FW agent allows or prevents completion of a subsequent startup process according to whether the response is correct; The electronic device receives one or more inputs from the user between the end of the startup process and the start of a subsequent startup process.