Method for detecting anomalies suggesting a manipulation during a secure starting operation of a software-controlled device

EP4433925A1Inactive Publication Date: 2024-09-25CONTINENTAL AUTOMOTIVE TECHNOLOGIES GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
EP2022812429
Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-11-18
Filing Date
2022-11-15
Publication Date
2024-09-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Current secure boot processes are vulnerable to side-channel attacks, particularly in devices with limited resources, where complex protective measures can significantly reduce system performance and are difficult to implement effectively.

Method used

A method that includes monitoring operating parameters, flag checks, authentication code comparisons, and counter value management to detect and abort side-channel and error injection attacks without impairing system performance, utilizing a separate monitoring component or as part of the boot loader, allowing for early detection and initiation of countermeasures.

Benefits of technology

Enables the detection of side-channel and error injection attacks with reduced resource demand and system performance impact, ensuring secure boot processes without delaying the startup, suitable for resource-constrained devices like IoT devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 1.1
    Figure 1.1
Patent Text Reader

Abstract

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

Description

[0001] Method for detecting anomalies indicating tampering during a secure boot process of a software-controlled device

[0002] FIELD OF INVENTION

[0003] The present invention relates to a method for detecting or identifying anomalies during a secure start-up process of a software-controlled device, such as those that occur during manipulation attempts.

[0004] BACKGROUND

[0005] A large number of modern devices are controlled by software which, when the device is started up, is read from a storage medium and transferred to a main memory, where it is ultimately executed by a processor.

[0006] Since software is generally not monolithic and can be executed directly in non-volatile memory, such as flash memory, the individual components must be loaded from non-volatile memory into RAM for execution. In non-volatile memory, software components are typically stored within a file system tailored to the memory type, allowing them to be located by their file name. Immediately after starting a software-controlled device, the microprocessor is unaware of the file system structure and therefore cannot access it. Special auxiliary software must first be loaded to configure the microprocessor for access to the file system of the non-volatile memory.

[0007] The special auxiliary software is first loaded and executed by the firmware of a computer system from a defined memory area, the boot sector, of a bootable medium. It is also called a bootloader or startup program. The bootloader then loads further parts of the operating software. The bootloader can be divided into several successive stages; this is then called a multi-stage bootloader. This division into stages is used, for example, when the bootloader's program code does not fit entirely in the boot sector of a boot medium. In this case, only the first stage is loaded and executed initially, followed by the second stage, which only knows the length, block number and identification of the medium. The second stage can now handle the specific file system of the medium and loads the third stage based on a file name, for example.The third stage is the actual bootloader, which loads, for example, a configuration file containing a selection menu or software components required for the operation of the device, possibly in a predetermined sequence.

[0008] This multi-level bootloader structure has several advantages. For example, in the case described above, the actual bootloader file to be loaded in the third level can be modified at will or even physically moved on the medium, since the second level can already handle the medium's file system and locate the third level based on the file name. Furthermore, such a bootloader is not subject to the limitations of the length of a boot block or boot sector.

[0009] Certain devices are subject to special requirements for tamper-proof operation, e.g. devices that control complex machines in such a way that regulatory-approved and, above all, safe operating points or ranges are maintained, or machines that store or process data of high personal, business or social value.

[0010] As in almost every area of ​​technology, there are repeated attempts to manipulate the software of such devices, whether to change the operating points or ranges, or to gain access to data or other values. To prevent attempts to manipulate the software, the devices can be configured to load only signed software components during the boot process. The signature of each software component is verified before execution, and a security component is installed during the boot process to detect any tampering with software modules during the device's operation and implement countermeasures if necessary. This procedure is also referred to as a secure boot process.

[0011] During a secure boot process, a so-called Message Authentication Code (MAC), for example, can be used to obtain certainty about the origin of software components, data or messages and to verify their integrity.

[0012] MAC algorithms require two input parameters: the data to be protected and a secret key. From these two, a checksum is calculated, the Message Authentication Code.

[0013] The integrity of a software component to be loaded during the boot process can be checked using a MAC as follows: A secret key is stored in a secure memory or memory area of ​​the device, which key is otherwise only known to a software manufacturer authorized 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 a non-volatile memory of the device, from where it is read into a main memory when needed and executed by a microprocessor. Before the software component is executed, a security function calculates the 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 agreement of both values ​​as a successful integrity test, i.e. it is assumed that the software component was provided by an authorized software manufacturer who knows the secret key and it has not been modified in the non-volatile memory.

[0014] MACs are based either on block ciphers, hash functions, or are specially developed MACs. A common method for calculating MACs, the HMAC, is based on cryptographic hash functions and is used, for example, in SSL and IPsec communication protocols. A common method based on block ciphers is the Cipher-Based Message Authentication Code (CMAC), specified in NIST Special Publication 800-38B, which is used in conjunction with AES or Triple DES ciphers.

[0015] An attacker can now attempt to obtain the secret key, which, if a symmetric key is used for software verification, allows them to generate a valid, authentic MAC for any software. This MAC will then be recognized as valid during the verification process and executed without further ado.

[0016] Depending on how the keys are secured, this can be very difficult for the attacker, so that they often try to introduce modified software or software components into a system in another way that does not generate a valid signature for the modified software or software component.

[0017] For this purpose, in devices configured for a secure boot process, attempts are made to create conditions during the boot process, during which not all security functions are available and correctly parameterized, that could enable the replacement of original software components with modified software components. These modified software components can then be used, for example, to grant an attacker access to operating parameters or access data or the like during the boot process or operation of the device, ultimately achieving the actual goal of the attack. Side-channel attacks, for example, are used for this purpose. Side-channel attacks include, among others:Attacks that target a system component or parameter seemingly unrelated to the regular execution of software components in order to cause the microprocessor to execute unauthorized program code. A side-channel attack may include, among other things, manipulation of the microprocessor's clock frequency, which enables the attacker to more easily manipulate address and data lines between the microprocessor and non-volatile memory, causing the microprocessor to execute manipulated code or code from a memory address other than the one originally intended, where unauthorized code created by the attacker is located.

[0018] In a CMAC-based secure boot process, an attacker usually attempts to change the last block of an authentic piece of software or software component immediately after a successful CMAC verification and before its execution, e.g. by directly accessing memory interfaces or the data lines that connect the memory to the processor. If, for example, an AES-based CMAC is used, the attacker will change the last 128-bit block after authentication, which usually contains the last program instructions to be executed, in order to carry out an attack on the secure boot process. The attacker will use this change to try to get the processor to execute program code that it has provided in another memory area, which could, for example,contains a user created by the attacker and their access data, or establishes a communication connection via an interface not provided for in the original software or software component. The change will most often result in an error, ultimately triggering a reboot of the device. Therefore, after each reboot, the attacker will vary the changes to the last block of software until the device executes the program code in the other memory area, and the attacker gains the desired access. Since the attack is not directed at access provided by the device during normal operation, but rather attempts to manipulate the device using other means—in this example, by reducing the clock frequency and manipulating address and data lines—this type of attack is also referred to as a side-channel attack.

[0019] Side-channel attacks on a CMAC-based secure boot process are characterized by, among other things, frequent changes to at least one software block during the boot process, multiple consecutive failed boot processes, multiple reboot attempts within a short period of time after an uptime that falls below a predetermined minimum, even though the reboot itself was successful, unusual resource allocations during the boot process, and / or manipulation of the clock frequency before the boot process. Manipulation of the clock frequency is primarily intended to facilitate external access to address and data lines.

[0020] Such attacks usually occur offline, i.e. locally, without a network connection of the attacked device through which the attack could be detected, so that the owner or manufacturer of a device does not receive any knowledge of the interceptions and thus cannot take any countermeasures.

[0021] Particularly in microprocessor-controlled devices with limited resources, i.e., small memory or low computing power, complex protective measures that could detect side-channel attacks cannot be easily implemented without at least reducing the system performance to an intolerable level.

[0022] DE 102019127856 A1 discloses a method for securely booting a control unit. This comprises a hardware security module (HSM) and a host. After applying voltage to the control unit and at least partially booting the HSM, a check is performed to determine whether a flag assigned to the HSM is set to a first value or a second value. If the flag is set to the second value, an integrity and authentication check of software assigned to the control unit is performed. If the flag is set to the first value, the HSM boot process is completed by transmitting a request from the HSM to the host to boot 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. A check is then performed again to determine whether the flag is set to the first value or the second value.The HSM boot process is completed by transmitting a request from the HSM to the host to boot the host if the flag is set to the first value.

[0023] US 9740863 B2 discloses a device and a method for protecting a secure boot process against side-channel attacks. The device consists of cryptographically capable hardware for a first boot process. A non-volatile memory is also provided for storing manipulated boot processes. A comparison unit compares the number of manipulated boot processes against a maximum value. The comparison can be based on the times read from a first real-time clock and a second clock of the non-volatile memory. Based on this comparison, a control logic transfers control from the first to a second boot process.

[0024] DE 102019008059 A1 discloses a system and method for minimizing the likelihood that the secret key used by a bootloader is compromised. A bootloader is installed on the device. The bootloader is a software program that performs many functions. These functions may include checking the integrity of the checksum of the incoming software image, decrypting the incoming software image using a secret key, erasing data in the flash memory, installing the new software image in the flash memory, and other functions. The bootloader uses various techniques to track the versions of the software image to be installed. The method also counts the number of unfinished attempts made when attempting to update the software image.By monitoring these parameters, the bootloader can detect when a malicious actor attempts a side-channel attack. In response, the bootloader can prevent 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 analyzability 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 detected. The signal at least indirectly causes a restart of the microcontroller. During the restart, at least one software element running during the operation of the microcontroller is restarted.

[0026] During error-free operation of the microcontroller, at least one item of status information is stored in a memory. This status information includes at least the status of an instruction counter, and the memory is not immediately overwritten or erased upon reboot. During or after the reboot, the status information stored in the memory is accessed, and the status information is made available for analyzing a software error.

[0027] DESCRIPTION OF THE INVENTION

[0028] It is therefore an object of the present invention to propose a method which detects different types of attacks without significantly impairing the system performance and provides corresponding information for initiating or triggering countermeasures adapted to each of them.

[0029] This object is achieved by the method specified in claim 1. Advantageous embodiments and further developments are specified in the dependent claims.

[0030] The inventive method described below for detecting the type of attack on a secure boot process is preferably implemented in a separate monitoring component that executes the method in parallel with the actual boot process. Alternatively, the method can also be implemented as a separate process of a bootloader, which is stored as part of a firmware, preferably in a non-modifiable manner or modifiable only by passing additional security functions, and is started first.

[0031] According to the invention, the method comprises, as a first component, which is carried out before a first authentication of a software or software component to be loaded or before checking a hash value or a checksum over the last block of the software or software component and possibly further blocks, reading out 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-out operating parameter with corresponding stored reference values. The at least one operating parameter can, for example, relate to a supply voltage provided by a power management unit or a clock of the system or the microprocessor and further components provided by a clock generator. Corresponding reference values ​​are preferably read out from a specially secured memory area and / or can be stored in a cryptographically secure manner.If the comparison reveals a difference, a first signal is issued, indicating a detected side-channel attack and a failed startup process. The process and the subsequent startup process are terminated or aborted. Otherwise, further components of the process are executed.

[0032] The method also includes, as a second component, which is also executed before a first authentication of a software or software component to be loaded or before checking a hash value or a checksum for the last block of the software or software component and possibly further blocks, checking the state of a flag that is set during a boot process that has not yet been successfully completed. If the flag is set, a second signal is output, which signals a detected attack and a failed boot process, and the method and the further boot process are terminated or aborted. If the flag was not set during the check, it is subsequently set, and further components of the method are executed. The flag is preferably set in a non-volatile memory so that it retains its state for an extended period even without a power supply. This component can, among other things,They are used to detect fault injection attacks, which often lead to a reset at a specific point before the end of the boot process, e.g., due to a watchdog signal that detects a boot process that has stalled due to an unauthorized modification of a software or software component after some time, or due to a so-called "hard" reset induced by the attacker, i.e., a reset forced by disconnecting the device from the power supply. Since the flag was not cleared, as intended during the orderly completion of the boot process, it can be detected during the subsequent boot process.

[0033] The method further comprises, as a third component, calculating an authentication code of a software or software component to be loaded and, as a first check step, comparing the calculated authentication code with the authentication code read from a memory of the previous boot process. If the comparison shows a difference, a third signal is output, indicating a detected fault injection attack and a failed boot process, and the method and the subsequent boot process are terminated or aborted. 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 reveals a difference, a fourth signal is output, indicating a detected fault injection attack and a failed boot process. The process and the subsequent boot process are terminated or aborted. If all components have been processed without a detected attack and the boot process being aborted, the stored authentication code from the previous boot process is replaced with the authentication code calculated for the current boot process, the flag set during a boot process that has not yet been successfully completed is cleared, and the process is terminated. If necessary, a signal can be output indicating a successful secure boot process.

[0034] As an alternative to calculating an authentication code for comparison with a corresponding authentication code from a previous boot process, which may involve a significant computational effort, a hash value or checksum, e.g., a CRC value, can be calculated for the first test step of the third component over the last block of the software or software component and, if applicable, additional blocks, and compared with a value for the same blocks stored during the previous boot process. This minimizes the effort required for the first test step, and the more complex calculation of the authentication code only needs to be performed if no attack is detected in this first test step. This is particularly advantageous for devices where frequent attacks are suspected.

[0035] A general error in the software or software component, e.g. due to a memory error, will have identical hash values ​​or checksums across multiple boot processes, whereas in an attack the hash values ​​or checksums will differ from each other due to the change in the last block during each boot process.

[0036] If a multi-stage boot process takes place, i.e. several programs or software components are loaded one after the other, the method can comprise a fourth component which monitors the corresponding correct multiple execution of the third component. The fourth component comprises comparing a value assigned to a stage currently being loaded with a reference value assigned to this stage. The value assigned to the stage currently being loaded can, for example, be part of a file which contains the program code, or can be found in a table using the file name or other characteristics. The reference value for each stage of the secure boot process or the table can, for example, be read from a secure memory or memory area. If the individual stages have to be processed one after the other in a specific order, the software orA counter value must be stored in each software component of each stage, which is compared with the current counter value. After the software or software component of a stage has been successfully processed, the counter is incremented before the next stage is loaded, so that a new counter value is available for comparison at the next stage. The counter is first reset when the fourth component of the procedure is called, and the software or software component

[0037] The first-level software component accordingly contains the value 0.

[0038] If the comparison reveals a difference, a fifth signal is issued, indicating a detected fault injection attack and a failed boot process. The procedure and the subsequent boot process are terminated or aborted. Counter values, which allow identification of the affected software or software component, can also be provided for evaluation of the type of attack and / or stored for later security improvements.

[0039] If the comparison shows no difference, the boot process continues to execute and the fourth component will check the subsequent stages until the last stage of the boot process, indicated by the corresponding reference value, has been loaded.

[0040] In one or more embodiments of the method, unique time information is stored at the beginning and / or after the successful completion of the boot process, preferably in a secure memory or memory area and / or encrypted with a secret key stored in the device. During each new boot process, preferably before the first authentication of a software or software component, current time information is compared with the stored time information. If the difference between the two time information items is less than a predetermined value or negative, a sixth signal is output, indicating a detected attack and a failed boot process. The method is then terminated, and further boot processes are aborted.In an alternative embodiment, several times of consecutive reboot processes are stored, and the number of reboot processes within a predetermined first period is compared with a permissible maximum value. If the number of reboot processes exceeds the permissible maximum value, a sixth signal is output, which signals a detected attack and a failed boot process. The method is then terminated and the further boot process is aborted. This embodiment is particularly suitable if sufficiently precise, system-independent time information is not available immediately at the start of the boot process, but is only provided after the system has booted, e.g., from an external time signal such as GPS, NTP server, DCF-77 radio signal, or the like.These designs utilize the knowledge that a large number of attacks are aborted unsuccessfully and repeated within a short period of time, whereby either no successful boot process is achieved or the actual operating time after a successful boot process is below a predefined “normal” minimum operating time.

[0041] The two above embodiments are particularly well suited to generating signals for detecting fault injection attacks, which generally require resource-intensive monitoring of the program execution. However, fault injection attacks are also characterized by a number of specific events or features, including the manipulation of the clock frequency, frequent restarts of the first device after a cold start, i.e., a start after a long period of non-operation, or a so-called "hard" reset, or the repeated execution of the same software section and interruptions of the entire verification chain during the boot process, wherein only a specific stage of the boot process is repeatedly executed and verified, and wherein an abort occurs if the verification is unsuccessful. The detection of a hard reset can be achieved, for example, using the flag for a boot process that has not yet been completed successfully.The software running after a properly executed boot process can set another flag if it triggers a reboot of the device, so that the reason for the reboot can be determined based on the states of the two flags. For example, if the device is properly shut down or put into sleep mode, the flag may be cleared while it was previously set.

[0042] In one or more embodiments of the method, in which unique time information is stored at the beginning and / or after the successful completion of the startup process, the beginning and / or successful completion of the startup process is determined based on power consumption typical for these events, e.g., using corresponding data provided by a power management IC. Typically, power consumption reaches a minimum between consecutive startup processes, only to rise rapidly again thereafter.

[0043] In one or more embodiments of the method, the start of the startup process is determined based on a reset signal issued by a microprocessor. Such reset signals are often used to start additional components of the first device, which also need to be put into an operating state only when the first device is operated.

[0044] In one or more embodiments of the method, the allocation of at least one system resource of the first device is monitored during the boot process, e.g., the frequency with which a processor cache is emptied and reassigned to the same process and / or rewritten for this process. The number of allocations of the same system resource to the same process within a predetermined second period of time is compared with a maximum value specified for this system resource. If the number of allocations of the same system resource to the same process exceeds the specified maximum value, a seventh signal is output, signaling a detected attack and a failed boot process. Furthermore, the method is terminated, and the subsequent boot process is aborted. The term "process" can refer to any software or software component, a thread, or the like.This embodiment can be used particularly preferably in multiprocessor systems or systems with multi-core processors in which the method is executed exclusively and securely on one of the processors or processor cores, but can nevertheless more easily detect access to processor-internal system resources.

[0045] According to a further aspect of the invention, a device comprises one or more processors and volatile and non-volatile memories associated with them, which are communicatively connected to one another via one or more data lines or buses. Computer program instructions are stored in the non-volatile memory, which, when executed by the at least one processor, configure the device to carry out one or more embodiments of the method according to the invention.

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

[0047] The computer program product can be stored on a computer-readable medium or data carrier. The medium or data carrier can be physically embodied, e.g., as a hard drive, CD, DVD, flash memory, or the like, but the medium or data carrier can also comprise a modulated electrical, electromagnetic, or optical signal that can be received by a computer via a corresponding receiver and stored in the computer's memory.

[0048] The method according to the invention makes it possible to detect side-channel or fault injection attacks on a secure boot process with a lower demand on system resources and system performance compared to conventional cryptographic methods. Particularly in time-critical boot processes of software or software components that must be completed within a certain maximum time, e.g., in a system context involving several at least partially parallel processes of a system or several communicatively interconnected devices, the ability to detect attacks almost simultaneously during the boot process without significantly delaying it is advantageous.

[0049] The method according to the invention can therefore be used advantageously wherever resource-saving detection of side-channel or fault injection attacks on a secure boot process is required, for example in Internet of Things (IoT) devices or a distributed sensor infrastructure.

[0050] Preferably, the software or software component implementing the method is loaded early and before other software or software components, ideally as part of the bootloader, so that the security functions are available as quickly as possible. Alternatively or additionally, at least individual parts of the method can be executed by a dedicated, hard-coded security processor.

[0051] SHORT DESCRIPTION OF THE DRAWING

[0052] The invention is explained in more detail below with reference to the accompanying drawing.

[0053] Fig. 1 is a flowchart of an exemplary method for detecting a side-channel attack on an AES-CMAC based secure boot process, Fig. 2 is an exemplary block diagram of a device configured to carry out one or more aspects of the method according to the invention.

[0054] The same or similar elements may be referenced in the figures with the same reference numerals.

[0055] DESCRIPTION OF EMBODIMENTS

[0056] Figure 1 shows a flowchart of an exemplary method 100 for

[0057] Detection of a side-channel attack on an AES-CMAC-based secure boot process of a microprocessor-controlled device 200. The aim is to detect manipulation of the last 128-bit block of the boot process. For the present example, it is assumed that a reset is performed whenever the software is incorrectly verified. An AES-CMAC method is used to verify authenticity and integrity, with the same key being used at each stage of the boot process. First, the presence of a side-channel attack is checked in a first component I. For this purpose, at least one currently set operating parameter of the system component 208, e.g., a clock generation unit, of the device 200 necessary for the operation of the microprocessor 202 is read out in step 101 and compared in step 102 with corresponding reference values ​​read out from a secure memory area 206a.If the comparison reveals that the currently set operating parameter(s) do not match the reference value(s), the method branches to step 130, in which a signal is output indicating that a side-channel attack has been detected and that the secure boot process has failed. Appropriate countermeasures can then be taken in response to this signal.

[0058] If the comparison shows that the currently set operating parameters match the reference values ​​(“Y” branch from step 102), the method branches to step 103 of a second component II, in which it is checked whether a “startup process not yet successfully completed” flag has been cleared. If the flag is set, i.e., not cleared (“N” branch from step 103), the method branches to step 130, in which a signal is output indicating that the previous startup process was not completed correctly, that an attack is present, and that the secure startup process has failed. Appropriate countermeasures can then be taken in response to this signal.

[0059] If the flag is cleared, i.e. not set, "J" branch of step 103, it is set in step 104. The software or the corresponding software components intended for the secure boot process can now be loaded, with further security checks being carried out. In step 105 of a fourth component IV, a counter for successfully completed stages of the current boot process is reset, and in step 106 it is checked whether the counter for the successfully completed stages of the boot process matches a reference value for the current stage. The reference value for each stage of the secure boot process can, for example, be stored in a secure memory area. In this case, the software or software component of the stage can be identified, for example, by its file name or other characteristics and compared with a correspondingly assigned reference value.

[0060] If the individual stages must be processed consecutively in a specific order, a counter value can be stored in the software or software component of each stage, for example, which is compared with the current counter value. The software or software component of the first stage therefore contains the value 0, since the counter was reset in step 105. Each software or software component of a stage increments the counter after successful processing, so that a new counter value is available for comparison in the next stage.

[0061] Instead of incrementing a counter, after successful processing, an arbitrary value can be written to a memory that is read by each stage. Each software or software component must then be programmed with the corresponding value from the previous stage. This is particularly possible if all stages are provided by a manufacturer who knows the values. This safety function can detect whether a stage of the secure boot process has been skipped or omitted.

[0062] In step 107 of a third component III, authentication of the software or software component to be loaded is performed according to the respective implementation in the device. For example, a CMAC for the software or software component to be loaded is calculated using a secret key stored in the secure memory area, stored, and compared in step 108 with the also stored result of the authentication of the previous secure boot process. For the very first boot process, the correct value for the previous secure boot process can be written to memory, if necessary in a secure environment, or an incorrect error message and abort of the boot process can be suppressed in another way.If the comparison reveals that the results of the two immediately consecutive authentication processes differ (branch "N" of step 108), it can be assumed that a fault injection attack is present, which typically involves changing blocks of the software or software component during each boot process, and therefore a different MAC is calculated during each boot process, and that the secure boot process has failed. The method branches accordingly to step 130, in which a signal is output indicating that a fault injection attack is present and that the secure boot process has failed.

[0063] If the comparison shows that the results of the two immediately consecutive authentication processes are identical (“Y” branch of step 108), in step 109 the authentication result is compared with a reference value for the authentication of this software or software component read from a secure storage area. If the comparison shows that the authentication result also matches the reference value for authentication (“Y” branch of step 109), the authentication result from step 107 is saved in step 110 as the new authentication result of the previous secure boot process. The previously saved result is overwritten. By saving the most recent result of the authenticity check in step 108, a fault injection attack can be quickly detected.If the values ​​of two consecutive boot processes are identical but still do not match the reference value, a memory error can be inferred, for example. A change in the value to be stored between steps 109 and 110 would also be detected in this way. In the subsequent step 111, the counter for the successfully completed stages of the boot process is incremented, and in step 112, a check is made to determine whether the value of the incremented counter matches the stored reference value of the final stage of the boot process. If the result is positive (the "Y" branch of step 112), the "boot process not completed successfully" flag is cleared in step 113, and the secure boot process is successfully completed.

[0064] If the comparison in step 109 shows that the result of the authentication does not match the reference value for the authentication, "N" branch of step 109, the "boot process not completed successfully" flag is cleared in step 120 and a signal is output, in response to which countermeasures for secure boot bypassing attacks known to those skilled in the art can be initiated.

[0065] Figure 2 shows an exemplary block diagram of a device 200 configured to carry out one or more aspects of the method 100 according to the invention. In addition to a microprocessor 202, the device 200 comprises volatile and non-volatile memory 204, 206, as well as at least one further system component necessary for the operation of the microprocessor 202, for example, a clock generator and / or a power management IC. The elements of the device 200 are communicatively connected to one another via one or more data lines or buses 210. The non-volatile memory 206 contains computer program instructions which, when executed by the microprocessor 202, configure the device to carry out one or more embodiments of the method according to the invention.

[0066] LIST OF REFERENCE SYMBOLS (part of the description)

[0067] 100 procedures

[0068] 101 Reading operating parameters clock generation unit

[0069] 102 Comparison with reference values ​​of operating parameters

[0070] 103 Flag set?

[0071] 104 Set Flag

[0072] 105 Reset counter for levels

[0073] 106 Does the counter reading match the current stage of the boot process?

[0074] 107 Calculate authentication code / hash value / checksum

[0075] 108 Does the authentication code / hash value / checksum match the previous boot process?

[0076] 109 Comparing the authentication code / hash value / checksum with the corresponding reference value

[0077] 110 Save authentication code / hash value / checksum

[0078] 111 Increment counter

[0079] 112 last level reached?

[0080] 113 Delete flag

[0081] 120 Secure boot bypassing attack detected, boot failed

[0082] 130 Side-channel attack detected, boot failed

[0083] 200 device

[0084] 202 microprocessor

[0085] 204 volatile memory

[0086] 206 non-volatile memory

[0087] 206a secure storage area

[0088] 208 additional system components

[0089] 210 Power line or data line Z-bus

Claims

22 REQUIREMENTS 1. Method (100) for detecting the type of attack on a secure start-up process of a microprocessor-controlled device (200), comprising: - Reading (101) at least one operating parameter from at least one necessary for the operation of the microprocessor (202) System component (208) and comparison (102) of the at least one read-out operating parameter with corresponding stored reference values, wherein, if the comparison shows a difference, a first signal, which signals a detected side-channel attack and a failed start operation, is output and the procedure is terminated and the further start operation is aborted. - Checking (103) the state of a flag which is set during an incomplete start process, wherein if the flag is set a second signal is output which signals a detected fault injection attack and a failed start process and terminates the procedure and aborts the further start process, wherein if the flag is not set it is set after the check, - Calculating a hash value or checksum over at least one block of the software or software component, and comparing it with a hash value or checksum stored for the same at least one block of the software or software component during the previous start operation, or calculating (107) an authentication code of a software or software component to be loaded, and comparing (108) the calculated authentication code with the authentication code read from a memory during the previous start operation, wherein, if the comparison shows a difference, a third signal is output which signals a detected attack and a failed start operation and terminates the procedure and aborts the further start operation, - Calculating (107), if not already done previously, an authentication code of a software or software component to be loaded and comparing (109) the calculated authentication code with a reference code read from a memory, wherein, if the comparison shows a difference, a fourth signal is output which signals a detected error injection attack and a failed start operation and terminates the procedure and aborts the further start operation, - Replacing (110) the authentication code read from memory from the previous start process with the authentication code calculated for the current start process, and deleting (113) the flag that is set during a start process that has not yet been successfully completed. Method (100) according to claim 1, further comprising, if the start process is multi-stage: - Comparing (106) a current stage of a multi-stage startup process with a reference value associated with that stage, wherein, if the comparison shows a difference, a fifth signal is output, which signals a detected fault injection attack and a failed startup process, and the method is terminated and the further startup process is aborted, and wherein otherwise the execution of the startup process and the loading of subsequent stages are continued until the last stage of the startup process indicated by the corresponding reference value has been loaded. Method (100) according to claim 1 or 2, further comprising: - Storing unique time information at the start and / or after successful completion of the startup process, - Compare, at each new startup process, the current time information with the time information stored at a previous startup process, whereby if the comparison shows a difference that is smaller If a predetermined value is exceeded, a sixth signal is output, which signals a detected attack and a failed start operation, and the method is terminated and any further start operation is aborted. Method (100) according to claim 1 or 2, further comprising: - Storing unique time information at the start and / or after successful completion of the startup process, - Compare, at each new start operation, the number of previous restart operations within a predetermined time with a permissible maximum value, wherein, if the number of restart operations exceeds the permissible maximum value, a sixth signal is output, which signals a detected attack and a failed start operation, and the method is terminated and the further start operation is aborted. Method according to claim 3 or 4, wherein the start and / or the successful completion of a start operation is determined based on a power consumption typical for these events. Method according to claim 3 or 4, wherein the start of a start operation is determined based on a reset signal output by a microprocessor. Method according to any one of the preceding claims, further comprising: - Monitoring the allocation of at least one system resource to the first device (10) during the startup process, and - Comparing the number of assignments of the same system resource to the same process within a predetermined second period with a maximum value specified for this system resource, whereby if the number of assignments of the same system resource to the same process exceeds the specified maximum value, a seventh signal is output, which indicates a detected attack and a 25 failed start attempts are signaled and the procedure is terminated and the further start process is aborted.

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

9. Computer program product comprising instructions which, when the program is executed by a microprocessor (202) of a device (200), cause the device to execute the method (100) according to one or more of claims 1 to 7.

10. Computer-readable medium on which the computer program product according to claim 9 is stored.