Method for detecting anomalies indicative of manipulation during secure boot operations of a software-controlled device

The method addresses vulnerabilities in secure boot operations by monitoring system parameters and authentication codes to detect and prevent side-channel attacks, maintaining system performance and security in resource-constrained devices.

JP2024540573AActive Publication Date: 2024-10-31コンチネンタル·オートモーティヴ·テクノロジーズ·ゲゼルシャフト·ミト·ベシュレンクテル·ハフツング

Patent Information

Application Number
JP2024529707
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-11-18
Filing Date
2022-11-15
Publication Date
2024-10-31
Estimated Expiration
2042-11-15

AI Technical Summary

Technical Problem

Existing secure boot operations are vulnerable to side-channel attacks, particularly in devices with limited resources, where such attacks manipulate system components to gain unauthorized access, and current countermeasures compromise system performance or are resource-intensive.

Method used

A method that includes monitoring system parameters and flags during boot operations, calculating authentication codes, and checking for consistent hash values or checksums across stages to detect anomalies, terminating the boot process if discrepancies are found, thereby recognizing and preventing side-channel and fault injection attacks without significant resource burden.

Benefits of technology

The method effectively identifies and prevents side-channel and fault injection attacks with minimal impact on system performance, especially in resource-constrained devices, ensuring secure boot operations without prolonged delays or performance degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024540573000001_ABST
    Figure 2024540573000001_ABST
Patent Text Reader

Abstract

The present invention relates to a method for detecting anomalies suggesting manipulation during a secure boot operation of a software-controlled device, said method comprising, inter alia, checking the operating parameters of system components necessary for the operation of a microprocessor, checking flags indicating a boot operation that has not been properly completed, and checking a signature-based authenticity of the loaded software or of the loaded software components. In case of a multi-stage boot operation, a counter value assigned to a particular step is compared with an associated reference value. In case of a fault, each check can emit a signal, which, optionally together with further signals, allows the type of attack to be identified so that specific countermeasures can be initiated.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a method for recognizing or identifying anomalies (eg, anomalies occurring during an attempted operation) during a secure boot operation of a software-controlled device. [Background technology]

[0002] Many modern devices are controlled by software, which is read from a storage medium and transferred to a main memory where it is finally executed by a processor when the respective device is powered up.

[0003] The available software is generally not monolithic and may be executed directly in a non-volatile memory, e.g. a flash memory, so that the individual components for execution must be loaded from the non-volatile memory into the main memory. The software components are generally stored in a file system adapted to the type of memory so that they can be located in the non-volatile memory based on their file name. Immediately after booting of the software-controlled device, the microprocessor does not know the structure of the file system and therefore cannot access it. Therefore, it is first necessary to load specific auxiliary software that configures the microprocessor to access the file system in the non-volatile memory.

[0004] Certain auxiliary software is first loaded and executed from a defined memory area (boot sector) of the bootable medium by the computer system's firmware, also called a boot loader or boot program, which then loads further portions of the operating software.

[0005] The boot loader may be subdivided into several stages stacked on top of each other, in which case it is a multi-stage boot loader. Such a subdivision into stages occurs, for example, when the program code of the boot loader is not entirely contained in the boot sector of the boot medium. Then, first, only the first stage is loaded and executed, and then the second stage, of which the first stage knows only the length, block number, and medium identification, is loaded and executed. Here, the second stage can handle the specific file system of the medium and loads the third stage, for example based on the file name. Here, the third stage is the actual boot loader, which loads, if appropriate, a configuration file containing a selection menu, or software components required for the operation of the device in a predetermined order.

[0006] This multi-stage structure of the boot loader has several advantages: in this respect, in the above case, the actual boot loader file loaded in the third stage can be arbitrarily changed or even physically shifted on the medium, since the second stage can already handle the file system of the medium and can find the third stage based on the file name. In addition, such a boot loader is not limited by the length of the boot block or boot sector.

[0007] Certain devices (e.g. devices controlling complex machines for which regulatory approved and primarily secure operating points or areas have been compiled, or machines storing or processing data of high personal, commercial or social value) are subject to specific requirements regarding operational tamper resistance.

[0008] As in almost every field of technology, here too there are repeated attempts to manipulate the software of such devices, whether it be to change operating points or areas or to gain access to data or other values.

[0009] To prevent attempts to manipulate the software, a device may be configured as early as boot operation to only load signed software components. The signature of each software component is checked before it is executed and a security component is configured in the boot operation to recognize manipulations on the software modules in the operation of the device and to configure countermeasures if necessary. This procedure is also called secure boot operation or "secure boot".

[0010] In a secure boot operation, for example, so-called Message Authentication Codes (MAC) can be used to verify the origin of a software component, data or message and to check its integrity.

[0011] A MAC algorithm requires two input parameters: the data to be protected and a secret key, both of which are used to calculate a checksum, or message authentication code.

[0012] At the boot operation, the integrity of the loaded software component can be checked by a MAC as follows: A private key is stored in a secure memory or area of ​​memory of the device, otherwise only known by the authorized software manufacturer for the device. The software manufacturer calculates a MAC for this key and its software component. The software component and the associated MAC are stored in the non-volatile memory of the device, from where they are read into the main memory and executed by the microprocessor as required. Before the software component is executed, a security function calculates a MAC for the software component stored in the non-volatile memory using the key stored in the secure memory area of ​​the device and compares the calculated MAC with the MAC stored for the software component. The security function interprets the correspondence of both values ​​as a successful integrity test. That is, it is assumed that the software component was provided by an authorized software manufacturer who knows the private key and that it has not been modified in the non-volatile memory.

[0013] A MAC can be based on a block cipher, a hash function, or a specially developed MAC. One traditional method of MAC computation, HMAC, is based on a cryptographic hash function and is used, for example, in SSL and IPsec communication methods. One widely used block cipher-based method is the Cipher-based Message Authentication Code (CMAC), specified in NIST SP Series document 800-38B, which is used with the AES or Triple DES encryption methods.

[0014] Now, an attacker may attempt to gain knowledge of the private key so that if a symmetric key is used for software validation, the attacker can generate a valid authenticated MAC for any piece of software that will then be recognized as valid in the check and run without hesitation.

[0015] Depending on the key security measures, this can require significant time and effort from an attacker, which is why another type of attempt is often made to introduce modified software or modified software components into a system, where no valid signatures are generated for the modified software or modified software components.

[0016] For this purpose, in the case of a device configured for secure boot operation, an attempt is made as early as during the boot operation, when not all security functions are yet ready and correctly parameterized, to bring about conditions that may allow replacing original software components with modified software components. These modified software components can then be used, for example, during the boot operation or during the operation of the device, to grant an attacker access to operating parameters or data, etc., so that the actual goal of the attack is finally achieved.

[0017] For this purpose, for example, side-channel attacks are used. Side-channel attacks include, inter alia, attacks that target system components that are obviously unrelated to the normal execution of software components, or system parameters that are obviously unrelated to the execution of software components, in order to make the microprocessor execute fraudulent program code. Side-channel attacks may include, inter alia, the manipulation of the clock frequency of the microprocessor, which puts the attacker in a position to more easily manipulate the address and data lines between the microprocessor and the non-volatile memory, so that the microprocessor executes the manipulated code, or code from memory addresses where the fraudulent code generated by the attacker is located, different from the one actually provided.

[0018] In a CMAC-based secure boot operation, an attacker generally attempts to modify the last block of the software or software component immediately after the successful completion of the CMAC verification of the authentic software or software component and before its execution, for example by directly accessing the interface of the memory or the data lines connecting the memory to the processor. For example, if an AES-based CMAC is used, the attacker modifies the last 128-bit block, which generally contains the last program instruction to be executed after the authentication has been performed, in order to perform an attack against the secure boot operation. In this case, the attacker attempts to make the processor execute program code provided by the attacker in a different memory area and which contains, for example, a user and his access data created by the attacker or which constitutes a communication connection through an interface not provided in the original software or software component. In most attempts, this modification leads to a failure that eventually triggers a reboot of the device. Thus, the attacker changes the modification of the last block of the software after every reboot until the device executes the program code located in a different memory area and the attacker gains the desired access. Since this attack does not target the access provided by the device during normal operation, but attempts are made to manipulate the device in a different way (in this example, by reducing the clock frequency and manipulating the address and data lines), this type of attack is also called a side-channel attack.

[0019] Side-channel attacks against a CMAC-based secure boot operation are accordingly distinguished by, inter alia, frequent modification of at least one block of software in the boot operation, multiple consecutive failed boot operations, multiple reboot attempts within a short period of time after an operation time less than a predefined minimum operation time, despite the reboot having been otherwise successfully performed, abnormal resource allocation in the boot operation, and / or manipulation of the clock frequency prior to the boot operation, the latter intended to serve primarily to simplify external access to the address and data lines.

[0020] Such attacks are generally offline, i.e., local, and there is no network connection for the attacked device that could detect the attack, so the device owner or manufacturer has no knowledge of the attack and, as a result, no ability to take countermeasures.

[0021] In particular, when microprocessor-controlled devices have limited resources, i.e. small memory or low computational power, complex protection measures capable of recognizing side-channel attacks simply cannot be implemented without at least inevitably resulting in an unacceptable degradation of system performance.

[0022] DE 102019127856 A1 discloses a method for a secure boot of a control device. The method comprises a hardware security module (HSM) and a host. After a voltage has been applied to the control device and after the HSM has at least partially booted, a check is made to see whether a flag assigned to the HSM is set to a first value or to a second value. If the flag is set to the second value, an integrity and authentication check of the software assigned to the control device is performed. If the flag is set to the first value, the boot operation of the HSM is completed by transmitting a request to boot the host from the HSM to the host. If the integrity and authentication check is positive, the flag is set to the first value and a reboot of the HSM is initiated. Then a check is made again to see whether the flag is set to the first value or to a second value. If the flag is set to the first value, the boot operation of the HSM is completed by transmitting a request to boot the host from the HSM to the host.

[0023] US9740863B2 discloses a device and method for protecting a secure boot operation from side channel attacks. The device is composed of cryptographically suitable hardware for a first boot operation. In addition, a non-volatile memory is provided for storing the manipulated boot operations. A comparison unit compares the number of manipulated boot operations against a maximum value. The comparison may be based on the number of reads of a first real-time clock and a second clock of the non-volatile memory. Based on the comparison, a control logic transfers control from the first boot operation to the second boot operation.

[0024] DE 102019008059 A1 discloses a system and method for minimizing the probability of a secret key used by a boot loader being compromised. A boot loader is installed on a device. The boot loader is a software program that performs a number of functions. These functions may include checking the integrity of the checksum of the received software image, decrypting the received software image using the secret key, deleting data in the flash memory, installing a new software image in the flash memory, etc. The boot loader utilizes various techniques to keep track of the version of the software image that is installed. The method also counts the number of incomplete attempts made to update the software image. By monitoring these parameters, the boot loader can determine when a malicious actor attempts a side-channel attack. In response, the boot loader can not allow the loading of a new software image or access to the secret key.

[0025] DE 102009000874 A1 describes a method and a system for improving the analysability of software errors in a microcontroller. A monitoring module assigned to the microcomputer checks at least one function of the microcontroller and generates a signal if a malfunction of the microcontroller is recognized. This signal at least indirectly causes a reboot of the microcontroller. At least one software element executed during operation of the microcontroller is restarted during the reboot. In an error-free operation of the microcontroller, at least one item of condition information is stored in a memory, the condition information including at least a condition of an instruction counter, the memory not being immediately overwritten or erased during the reboot. During or after the reboot has taken place, the item of condition information stored in the memory is accessed and the condition information is available for analysing the software error. Summary of the Invention [Problem to be solved by the invention]

[0026] The object of the invention is therefore to propose a method for recognising different types of attacks and providing corresponding information for initiating or triggering countermeasures adapted to each one, without significantly impairing the system performance. [Means for solving the problem]

[0027] The above object is achieved by a method according to claim 1. Advantageous embodiments and further developments are set out in the respective dependent claims.

[0028] The method according to the invention described below for recognizing types of attacks against secure boot operation is preferably executed in a separate monitoring component that executes the method in parallel with the actual boot process, or it can also be implemented as a separate process of the boot loader that is stored as part of the firmware, preferably immutably or modifiable only in conjunction with further security features, and that is started first.

[0029] According to the invention, the method comprises, as a first component executed before a first authentication of the loaded software or software component or before a check of a hash value or checksum for the last and optionally further blocks of the software or software component, reading at least one operating parameter from at least one system component necessary for the operation of the microprocessor and comparing the at least one read operating parameter with a corresponding stored reference value. The at least one operating parameter may relate to, for example, a supply voltage provided by a power management unit or a clock signal provided by a clock generator of the system or the microprocessor and the further component. The relevant reference value is preferably read from a particularly secure memory area and / or may be stored in a cryptographically secure manner. If the comparison indicates a difference, a first signal is output indicating a recognized side channel attack and a failed boot operation and the method and further boot operations are ended or terminated. Otherwise, the further components of the method are executed.

[0030] The method additionally comprises, as a second component executed as well before the first authentication of the loaded software or software component or before the check of the hash value or checksum for the last and optionally further blocks of the software or software component, checking the state of a flag set in a boot operation that has not yet been successfully completed. If the flag is set, a second signal is output indicating a recognized attack and a failed boot operation, and the method and further boot operations are ended or terminated. If the flag is not set during the check, then the flag is set and further components of the method are executed. Preferably, the flag is set in a non-volatile memory so as to retain its state for a relatively long time even in the absence of a voltage supply. This component can be used, inter alia, to recognize fault injection attacks, which often lead to a reset at a certain point before the end of the boot operation, for example due to a watchdog signal. The watchdog recognizes after a certain time a boot operation that has stopped due to an unauthorized modification in the software or software component or due to a so-called "hard" reset (i.e. a reset forced by the device being disconnected from the power supply) brought about by an attacker. Because the flag is not removed, it may be recognized during a subsequent boot operation, as opposed to if the boot operation is properly terminated.

[0031] The method additionally comprises, as a third component, calculating an authentication code for the loaded software or software component, and, as a first check step, comparing the calculated authentication code with an authentication code of a preceding boot operation read from memory. If the comparison indicates a difference, a third signal is output, indicating a recognized fault injection attack and a failed boot operation, and the method and further boot operations are ended or terminated. Otherwise, as a second check step, the previously calculated authentication code is compared with a reference code read from a memory, preferably a secure memory or memory area. If the comparison indicates a difference, a fourth signal is output, indicating a recognized fault injection attack and a failed boot operation, and the method and further boot operations are ended or terminated. If no attack is recognized and the boot operation is not terminated, and all components have been executed, the stored authentication code of the preceding boot operation is replaced with the calculated authentication code for the current boot operation, the flags set in the boot operations not yet successfully completed are deleted, and the method is ended. Optionally, a signal may be output to indicate that the secure boot operation was performed successfully.

[0032] Instead of calculating an authentication code for comparison with a corresponding authentication code of a preceding boot operation (which may entail considerable computational complexity under certain circumstances), in a first checking step of the third component a hash value or checksum, e.g. a CRC value, for the last block and optionally further blocks of the software or software component may be calculated and compared with the value of the same blocks stored in a previous boot operation. As a result, the complexity of the first checking step can be kept low and a more complex calculation of the authentication code only needs to be performed if this first checking step did not confirm an attack. This is advantageous especially for devices at risk of frequent attacks.

[0033] A typical failure of software or software components (e.g., due to a memory error) will have the same hash value or checksum for multiple boot operations, but in the case of an attack the hash values ​​or checksums will be different from each other due to changes, typically in the last block, in each boot operation.

[0034] In case of a multi-stage boot operation, i.e. multiple programs or software components are loaded in succession, the method may include a fourth component for monitoring the corresponding multiple correct executions of the third component. The fourth component includes comparing a value assigned to the currently loaded stage with a reference value assigned to this stage. The value assigned to the currently loaded stage may be, for example, part of a file containing the program code or may be locatable based on a file name or other feature in the table. The reference value for each stage or table of the secure boot operation may be, for example, readable from a secure memory or memory area.

[0035] If the individual stages must be processed consecutively in a particular order, a counter value may be stored in the software or software component of each stage, and the counter value is compared to the current counter value. After the software or software component of a stage is successfully processed, the counter is incremented before the next stage is loaded, so that the new counter value is available for comparison in the next stage. When the fourth component of the method is called, the counter is first reset, and correspondingly the software or software component of the first stage contains the value 0.

[0036] If the comparison indicates a difference, a fifth signal is output indicating a recognized fault injection attack and a failed boot operation, and the method and further boot operations are ended or terminated. In this case, a counter value that allows, inter alia, to identify the affected software or software component may be provided to assess the type of attack and / or may be stored for later improvements in security.

[0037] If the comparison does not indicate a difference, execution of the boot operation continues with the fourth component checking subsequent stages until the last stage of the boot operation indicated by the corresponding reference value is loaded.

[0038] In one or more embodiments of the method, at the start of a boot operation and / or after successful completion, unique time information is preferably stored in a secure memory or memory area and / or encrypted with a secret key stored on the device. For each new boot operation, preferably before a first authentication of the software or software component, the current time information is compared with the stored time information. If the difference between the two items of time information is less than a predefined value or is nonexistent, a sixth signal is output indicating a recognized attack and a failed boot operation. The method is then ended and further boot operations are terminated.

[0039] In alternative embodiments, multiple points in time of successive reboot operations are stored and the number of reboot operations within a predefined first period is compared with a maximum allowed value. If the number of reboot operations exceeds the maximum allowed value, a sixth signal is output indicating a recognized attack and a failed boot operation. The method is then ended and further boot operations are terminated. This embodiment is particularly suitable in cases where sufficiently accurate time information independent of the system is not immediately available at the start of the boot operation, but rather is provided only after the system has been started, for example from an external time signal such as a GPS, an NTP server, a DCF-77 radio signal, etc. These embodiments exploit the insight that many attacks are terminated unsuccessfully and are repeated within a short period of time, in which case either no successfully completed boot operation occurs or the actual operation period after a successful boot operation is shorter than the previously defined "normal" minimum operation period.

[0040] The above two embodiments are particularly well suited to generate a signal for recognizing fault injection attacks, which generally require resource-intensive monitoring of program execution. However, fault injection attacks are also distinguished by a series of specific events or characteristics, notably the manipulation of the clock frequency, frequent rebooting of the first device after a cold boot, i.e. a boot after a relatively long time of no operation, or a so-called "hard" reset, or repeated execution of the same software part in the actual boot operation and interruption of the entire verification chain, where only certain stages of the boot operation are repeatedly executed and verified, and terminated when the verification fails. A hard reset can be recognized, for example, using a flag in the boot operation that has not yet been successfully completed. A further flag can be set by software executed after a properly executed boot operation, such that if said software initiates a reboot of the device, it can distinguish the reason for the reboot based on the state of the two flags. In this case, the flag can be deleted, for example, when the device is properly shut down or hibernated, even if it was previously set.

[0041] In one or more embodiments of the method in which the unique time information is stored upon initiation and / or successful completion of a boot operation, the initiation and / or successful completion of the boot operation is ascertained based on power consumption typical of the initiation and / or successful completion, e.g., by corresponding data provided by a power management IC, which typically reaches a minimum between successive boot operations and then rapidly rises again.

[0042] In one or more embodiments of the method, the initiation of the boot operation is determined based on a reset signal output by the microprocessor. Such a reset signal is often used to boot further components of the first device that also need to be in an operational state only during operation of the first device.

[0043] In one or more embodiments of the method, the allocation of at least one system resource of the first device is monitored in a boot operation, for example, how often the processor cache is emptied and allocated again from zero to the same process and / or how often it is written from zero for this process. The number of allocations of the same system resource to the same process within a predetermined second period is compared with a predetermined maximum value of this system resource. If the number of allocations of the same system resource to the same process exceeds the predetermined maximum value, a seventh signal is output, indicating a recognized attack and a failed boot operation. In addition, the method is ended and further boot operations are terminated. In this case, the term "process" may indicate any desired software or software component, thread, etc. This embodiment may be used in particular and preferably in a system having a multiprocessor system or a multicore processor. Here, the method is executed exclusively and securely in one of the processors or processor cores, but nevertheless in this case, accesses to the processor internal system resources may be more easily detected.

[0044] According to a further aspect of the invention, a device comprises one or more processors and further volatile and non-volatile memories assigned thereto, which are communicatively connected to each other via one or more data lines or data buses, computer program instructions being stored in the non-volatile memory, which, when executed by the at least one processor, configure the device to perform one or more embodiments of the method according to the invention.

[0045] A computer program product according to a further aspect of the invention comprises instructions which, when executed by a microprocessor of a device, cause the microprocessor of the device to carry out one or more embodiments and further developments of the method described above.

[0046] The computer program product may be stored on a computer readable medium or data carrier. The medium or data carrier may be a physical embodiment, for example as a hard disk, a CD, a DVD, or a flash memory, but the medium or data carrier may also include a modulated electrical, electromagnetic or optical signal that can be received by a computer by means of a suitable receiver and stored in the computer's memory.

[0047] The method according to the invention allows for the recognition of side-channel or fault injection attacks on a secure boot operation while placing a smaller burden on system resources and system performance compared to conventional cryptographic methods. In particular in a time-critical boot operation of software or software components that must be completed within a certain maximum time, it is advantageous to potentially be able to recognize attacks almost simultaneously in the boot operation without a noticeable delay of the boot operation, for example in the context of a system of multiple processes running at least partially in parallel, or of multiple devices communicatively connected to each other.

[0048] The method according to the invention may therefore advantageously be used whenever resource-saving recognition of side-channel or fault injection attacks against secure boot operations is required, such as, for example, in the case of devices involved in the Internet of Things (IoT) or distributed sensor infrastructures.

[0049] Preferably, the software or software components implementing the method are loaded early and before other software or software components, ideally as part of a boot loader, so that the security functionality is ready as soon as possible.Alternatively or additionally, at least individual parts of the method may be performed by a dedicated program-fixed security processor.

[0050] The invention will now be described in more detail with reference to the accompanying drawings. [Brief description of the drawings]

[0051] [Figure 1] 1 illustrates a flow diagram of an exemplary method for recognizing side-channel attacks against AES-CMAC based secure boot operations. [Diagram 2] 1 shows an exemplary block diagram of a device configured to perform one or more aspects of the method according to the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0052] In the drawings, identical or similar elements may be referred to by the same reference numbers.

[0053] FIG. 1 shows a flow diagram of an exemplary method 100 for recognizing side-channel attacks on an AES-CMAC-based secure boot operation of a microprocessor-controlled device 200. The objective here is to recognize the operation of the last 128-bit block of the boot operation. In this example, it is assumed that a reset is performed after every software misverification. When checking the authenticity and integrity, the AES-CMAC method is used and the same key is used at each stage of the boot operation. First, in a first component I, the presence of a side-channel attack is checked. For this purpose, in step 101, at least one currently set operating parameter of at least one system component 208 (e.g. a clock generation unit) of the device 200 that is necessary for the operation of the microprocessor 202 is read and compared in step 102 with a corresponding reference value read from the secure memory area 206a. If the comparison reveals that the currently set operational parameter(s) do not correspond to the reference value(s) ("N" branch of step 102), the method branches to step 130, where a signal is output indicating that a side-channel attack has been recognized and that the secure boot operation has failed. Depending on the signal, corresponding measures can then be taken.

[0054] If the comparison shows that the currently set operational parameters correspond to the reference values ​​("Y" branch of step 102), the method branches to step 103 of the second component II. Step 103 involves checking whether the flag "boot operation not yet successfully completed" has been deleted. If the flag is set, i.e. not deleted ("N" branch of step 103), the method branches to step 130, in which a signal is output indicating that the previous boot operation was not successfully completed, that an attack exists, and that the secure boot operation has failed. Depending on the signal, corresponding measures can then be taken.

[0055] If the flag is cleared, i.e. not set ("Y" branch of step 103), the flag is set in step 104. This allows software or corresponding software components provided for secure boot operation to be loaded and further security checks to be performed.

[0056] In the fourth component IV, in step 105, the counter of successfully executed stages of the current boot operation is reset, and in step 106, a check is made to see whether the counter of successfully executed stages of the boot operation corresponds to a reference value of the current stage. The reference value of each stage of the secure boot operation may be stored, for example, in a secure memory area. In this case, the software or software components of the stage may be identified, for example based on a file name or other characteristic, and compared with the correspondingly assigned reference value.

[0057] If the individual stages must be processed consecutively in a particular order, for example, a counter value may be stored in the software or software component of each stage, and the counter value is compared to the current counter value. Since the counter was reset in step 105, the software or software component of the first stage accordingly contains the value 0. Each software or software component of a stage increments the counter after successful processing, so that the new counter value is available for comparison in the next stage.

[0058] Instead of incrementing a counter, an arbitrary value can be written to memory after normal processing, which is read by each stage, in which case the corresponding value of the previous stage must be programmed into each software or software component. This is possible especially if all stages are provided by a manufacturer who knows their values. This security feature can recognize if a stage of the secure boot operation has been skipped or omitted.

[0059] A third component III, step 107, performs authentication of the loaded software or software component according to the respective implementation in the device. For example, based on a secret key stored in a secure memory area, a CMAC of the loaded software or software component is calculated, stored and compared in step 108 with a similarly stored result of authentication of a preceding secure boot operation. In the very first boot operation, optionally in a secure environment, the correct value of the preceding secure boot operation can be written to memory or an inapplicable error message and the termination of the boot operation can be suppressed in some other way. If the comparison shows that the results of two directly successive authentication operations are different from each other ("N" branch of step 108), it can be assumed that there is a fault injection attack, typically related to a block of software or software component that is modified in each boot operation, and therefore a different MAC is calculated in each boot operation and that the secure boot operation has failed. In response, the method branches to step 130 where a signal is output indicating that a fault injection attack is present and that the secure boot operation has failed.

[0060] If the comparison shows that the results of two directly successive authentication operations are identical ("Y" branch of step 108), then in step 109 the result of the authentication is compared with a reference value read out from the secure memory area for the authentication of this software or software component. If the comparison shows that the result of the authentication also corresponds to a reference value for authentication ("Y" branch of step 109), then in step 110 the result of the authentication from step 107 is stored as the new result of the authentication of the preceding secure boot operation, overwriting in the process the previously stored result. By storing the result of the latest authenticity check each time, it is possible to quickly recognize fault injection attacks in step 108. If the values ​​of two successive boot operations are identical but do not correspond to the reference value, then for example a memory error can be presumed. Changes in the values ​​stored between steps 109 and 110 are also recognized in this way. In the following step 111, a counter of successfully executed stages of the boot operation is incremented and in step 112 a check is made to see whether the value of the incremented counter corresponds to the stored reference value of the last stage of the boot operation. If so ('Y' branch of step 112), in step 113 the flag 'boot operation not successfully completed' is removed and the secure boot operation is ended successfully.

[0061] If the comparison in step 109 reveals that the authentication result does not correspond to the reference value for authentication (the "N" branch of step 109), then in step 120 the flag "boot operation not completed successfully" is removed and a signal is output, in response to which countermeasures against attacks to bypass secure boot, known to those skilled in the art, may be initiated.

[0062] 2 shows an exemplary block diagram of a device 200 configured to perform one or more aspects of the method 100 in accordance with the present invention. In addition to a microprocessor 202, the device 200 comprises a volatile memory 204 and a non-volatile memory 206, as well as at least one further system component necessary for the operation of the microprocessor 202 (e.g., a clock generator and / or a power management IC). The elements of the device 200 are communicatively coupled to each other via one or more data lines or data buses 210. The non-volatile memory 206 contains computer program instructions that, when executed by the microprocessor 202, configure the device to perform one or more embodiments of the method in accordance with the present invention. [Explanation of symbols]

[0063] 100 ways 101 Read the operating parameters of the clock generation unit 102 Compare operating parameters with reference values 103 flag set? 104 Set flag 105 Reset the stage counter 106 Does the counter reading match the current stage of the boot operation? 107 Calculate authentication code / hash value / checksum 108 Does the authentication code / hash value / checksum match previous boot operation? 109 Compare the authentication code / hash value / checksum with the corresponding reference value 110 Store authentication code / hash value / checksum 111 Increment Counter 112 Have you reached the last stage? 113 Remove a flag 120 Attacks that bypass Secure Boot have been identified, causing boot operations to fail 130 Side-channel attack is recognized and boot operation fails 200 devices 202 Microprocessor 204 Volatile Memory 206 Non-volatile memory 206a Secure Memory Area 208 Further System Components 210 Power line or data line / bus

Claims

1. A method (100) for recognizing a type of attack against a secure boot operation of a microprocessor-controlled device (200), comprising: reading (101) at least one operational parameter from at least one system component (208) necessary for operation of a microprocessor (202) and comparing (102) said read at least one operational parameter with a corresponding stored reference value, whereby if said comparison indicates a difference, a first signal is output indicating a recognized side channel attack and a failed boot operation, the method is ended and further boot operations are terminated; checking (103) the state of a flag set in a boot operation that has not yet been successfully completed, where if the flag is set, a second signal is output indicating a recognized fault injection attack and a failed boot operation, the method is ended and further boot operations are terminated, and if the flag is not set, the flag is set after the checking; calculating a hash value or checksum for at least one block of the software or software component and comparing it with a stored hash value or checksum for the same at least one block of the software or software component in a previous boot operation, or calculating an authentication code for the loaded software or software component (107) and comparing the calculated authentication code with the authentication code of the previous boot operation read from memory (108), where if the comparison indicates a difference, a third signal is output indicating a recognized attack and a failed boot operation, the method is ended and further boot operations are terminated; calculating (107) an authentication code for the software or software component to be loaded, if not already done before, and comparing (109) said calculated authentication code with a reference code read from memory, whereby if said comparison indicates a difference, a fourth signal is output indicating a recognized fault injection attack and a failed boot operation, the method is ended and further boot operations are terminated; replacing the authentication code of the previous boot operation read from the memory with the authentication code calculated for the current boot operation (110), and deleting the flag set in boot operations that have not yet been successfully completed (113); A method (100).

2. If the boot operation is of a multi-stage design, comparing (106) a current stage of a multi-stage boot operation with a reference value assigned to this stage, and if said comparison indicates a difference, a fifth signal is output indicating a recognized fault injection attack and a failed boot operation, the method is ended, and further boot operations are terminated, otherwise execution of the boot operation and loading of subsequent stages is continued until the last stage of the boot operation indicated by the corresponding reference value is loaded. The method (100) of claim 1, further comprising:

3. storing unique time information at the start of and / or after successful completion of said boot operation; comparing, for each new boot operation, current time information with time information stored in a previous boot operation, and if said comparison indicates a difference less than a predetermined value, outputting a sixth signal indicating a recognized attack and a failed boot operation, the method being ended and further boot operations being terminated. The method (100) of claim 1 or 2, further comprising:

4. storing unique time information at the start of and / or after successful completion of said boot operation; comparing, for each new boot operation, the number of preceding reboot operations within a predetermined time period with a maximum value allowed, and if said number of reboot operations exceeds said maximum value, outputting a sixth signal indicating a recognized attack and a failed boot operation, the method being ended and further boot operations being terminated. The method (100) of claim 1 or 2, further comprising:

5. 5. The method according to claim 3 or 4, wherein the initiation and / or the successful completion of a boot operation is verified based on a power consumption typical of the initiation and / or the successful completion.

6. 5. The method according to claim 3, wherein the initiation of a boot operation is determined based on a reset signal output by a microprocessor.

7. monitoring the allocation of at least one system resource of the first device (10) during the boot operation; comparing the number of allocations of the same system resource to the same process within a second predetermined time period with a predetermined maximum value for this system resource, and if the number of allocations of the same system resource to the same process exceeds the predetermined maximum value, a seventh signal is output indicating a recognized attack and a failed boot operation, the method is ended, and further boot operations are terminated; The method according to any one of claims 1 to 6, further comprising:

8. A device (200) comprising at least one processor (202), a volatile memory (204) and a non-volatile memory (206), and at least one further system component (208) necessary for the operation of said microprocessor, communicatively connected to each other via one or more data lines or one or more data buses (210), wherein computer program instructions are retrievably stored in said non-volatile memory (206) and which, when executed by said at least one processor (202), configure said device (200) to perform a method (100) according to any one of claims 1 to 10.

9. A computer program product comprising instructions which, when executed by a microprocessor (202) of a device (200), cause the microprocessor (202) of the device (200) to perform the method (100) according to any one of claims 1 to 7.

10. A computer readable medium having stored thereon the computer program product of claim 9.

Citation Information

Patent Citations

  • System management device, method and program, management server system and its control process, insurance method, security program, security management method, computer, and server computer

    JP2004206683A

  • Method and device for providing application integrity verification

    JP2018503157A

  • Information processing apparatus and method of controlling the same

    JP2020091698A

  • Device identification system and method for enrollment and registration of connected endpoint devices, and blockchain service

    JP2021505097A

  • Image file generation and loading

    US9165143B1

Cited By

  • Mitigation of a manipulation of software of a vehicle

    US12518015B2