A method, system, apparatus and equipment for detecting the hacking of a device.

By judging the enable state and data format consistency of the key register during device operation, the security problem of the initial key after the processor is cracked is solved, and protection is achieved during normal system operation.

CN117171735BActive Publication Date: 2026-11-10SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310938347.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2026-11-10
Estimated Expiration
2043-07-28

AI Technical Summary

Technical Problem

In existing technologies, once a processor is hacked, malicious individuals can modify the processor's internal circuitry using FIB technology, causing the initial key to be obtained during normal system operation and thus losing its protection.

Method used

The system checks the enable pin of the key register during normal operation. If the enable pin is valid, the system determines that the device has been compromised and rejects all instructions received by the processor. If the enable pin is invalid, the system retrieves the key data and checks whether its format matches that of the OTP memory. If the format matches, the system determines that the device has been compromised and rejects all instructions.

Benefits of technology

Even after the processor is physically damaged, the initial key remains secure, preventing malicious individuals from obtaining it during normal system operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117171735B_ABST
    Figure CN117171735B_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, apparatus, and device for detecting device cracking, relating to the field of data security. During normal device operation, the system checks the validity of the enable pin of the key register. If valid, the device is deemed cracked, and all instructions received by the processor are rejected. If invalid, the key data in the key register is retrieved, and its format is compared to the initial key in the one-time programmable memory. If they do not match, the device is considered intact; if they match, the device is cracked, and all instructions are rejected. By detecting the validity of the key register and whether a key with the same data format as the initial key can be retrieved from it, any instructions are rejected upon detecting processor cracking. This protects the security of the initial key even after the processor is physically damaged, preventing malicious individuals from obtaining the initial key through the processor during normal system operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security, and in particular to a method, system, apparatus, and device for detecting device breaches. Background Technology

[0002] For various devices, an initial key is typically stored in the device's internal OTP (One-Time Programmable) memory. System loading requires this initial key. Specifically, after the device powers on, the processor loads the initial key from the OTP memory into the key register and sets its enable pin high. The processor can retrieve the initial key when the enable pin is high, and then executes subsequent system loading steps. Because the initial key has a high priority, it can be used for data encryption and decryption, in addition to dedicated encryption / decryption keys. Therefore, to prevent malicious use of the initial key, after successful system loading, the processor keeps the enable pin of the key register low to prevent the processor itself and the user from retrieving the initial key during normal system operation.

[0003] However, once the processor is hacked, if FIB (focused ion beam) technology is used to physically modify and crack the processor's internal circuitry, the processor can set the enable pin of the key register to a high level during normal system operation. This allows malicious actors to obtain the initial key through the processor during normal system operation, thus rendering the initial key unprotected. Summary of the Invention

[0004] The purpose of this invention is to provide a method, system, device, and equipment for detecting device cracking, which can protect the security of the initial key even after the processor is physically damaged, and prevent malicious personnel from obtaining the initial key through the processor during normal system operation.

[0005] To address the aforementioned technical problems, this invention provides a method for detecting device tampering, applied to a processor within a device. The device further includes a one-time programmable memory and a key register. The method for detecting device tampering includes: When the device is operating normally, determine whether the enable pin of the key register is valid; If successful, the device is determined to be hacked, and all instructions received by the processor itself are rejected. If invalid, then retrieve the key data from the key register; Determine whether the data format of the key data is consistent with the data format of the initial key in the one-time programmable memory; If there is no discrepancy, the device is determined not to have been hacked; If they match, the device is determined to be hacked, and all instructions received by the processor itself are rejected.

[0006] On the one hand, before determining whether the enable pin of the key register is valid, the following steps are also included: When a power-on command for the device is detected, the initial key in the one-time programmable memory is sent to the key register as the key data of the key register; Enable the key register; The device is powered on using the key data in the key register; Once the device is running normally, the enable pin of the key register is set to invalid.

[0007] On the one hand, enabling the key register includes: The pulse generator connected to the key register is controlled to send a level signal indicating that the enable terminal is valid to the enable terminal of the key register; Setting the enable pin of the key register to invalid includes: When the device is operating normally, the pulse generator is controlled to continuously send a level signal to the enable terminal of the key register, indicating that the enable terminal is invalid.

[0008] On the one hand, determining whether the enable pin of the key register is valid includes: Determine whether the enable terminal of the key register is at a level indicating that the enable terminal is valid, and determine whether the signal sent by the pulse generator to the enable terminal of the key register is at a level indicating that the enable terminal is valid; If any one is yes, then the enable terminal of the key register is determined to be valid; If both are negative, then the enable pin of the key register is determined to be invalid.

[0009] On the one hand, after rejecting all instructions received by the processor itself, it also includes: An alarm signal is generated and sent to the alarm module so that the alarm module can issue an alarm.

[0010] On the one hand, an alarm signal is generated and sent to the alarm module, including: When it is determined that the device has been hacked, the current time recorded in the service terminal connected to the device is obtained as the time point when the device was hacked. Obtain the location information of the device; An alarm signal containing the time point at which the device was compromised and the location information is generated and sent to the alarm module, so that the alarm module can send the alarm signal to the service terminal connected to the device.

[0011] On the one hand, before rejecting all instructions received by the processor itself, it also includes: The execution priority of the interrupt instruction generated by the signal generator connected to the processor is set to the highest. Reject all instructions received by the processor itself, including: The signal generator is controlled to continuously send the interrupt command to the enable pin of the processor itself; When the processor receives any instruction other than the interrupt instruction, it executes the operation task corresponding to the instruction. While performing the operation task, it is determined whether the processor's own enable pin has received the interrupt instruction; If the interrupt command is received, the execution of the operation task is terminated; If the interrupt command is not received, determine whether the signal generator is faulty; If a malfunction occurs, the device will be shut down. If there is no fault, control the signal generator to send the interrupt command to the processor's own enable terminal, and return to the step of determining whether the processor itself has received the interrupt command.

[0012] This application also provides a device cracking detection system applied to a processor in a device, wherein the device further includes a one-time programmable memory and a key register, and the device cracking detection system includes: The enable terminal judgment unit is used to determine whether the enable terminal of the key register is valid when the device is operating normally; if valid, the rejection unit is triggered; if invalid, the key data acquisition unit is triggered. The trigger rejection unit is used to determine that the device has been hacked and to reject all instructions received by the processor itself; The key data acquisition unit is used to acquire the key data in the key register; A data format determination unit is used to determine whether the data format of the key data is consistent with the data format of the initial key in the one-time programmable memory; if they are inconsistent, the security determination unit is triggered; if they are consistent, the rejection unit is triggered. The security determination unit is used to determine that the device has not been hacked.

[0013] This application also provides a device for detecting device hacking, comprising: Memory, used to store computer programs; A processor, used to execute the computer program, implements the steps of the device cracking detection device method as described above.

[0014] This application also provides a device, including a device body and a device cracking detection device as described above; The device body is connected to the device's crack detection device.

[0015] The beneficial effect of this application is that it provides a method, system, apparatus, and device for detecting device cracking, relating to the field of data confidentiality. During normal device operation, the system determines whether the enable pin of the key register is valid. If valid, the device is deemed cracked, and all instructions received by the processor are rejected. If invalid, the key data in the key register is retrieved, and then it is determined whether the data format of the key data is consistent with the data format of the initial key in the one-time programmable memory. If they are inconsistent, the device is deemed not cracked; if they are consistent, the device is deemed cracked, and all instructions are rejected. By detecting whether the key register is valid and whether a key with a data format consistent with the initial key can be retrieved from the key register, any instructions are rejected after the processor is detected to be cracked. This can protect the security of the initial key even after the processor is physically damaged, preventing malicious personnel from obtaining the initial key through the processor during normal system operation. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart of a device hacking detection method provided in this application; Figure 2 A schematic diagram of the structure of a device provided in this application; Figure 3 A schematic diagram of the structure of a detection module provided in this application; Figure 4 This application provides a schematic diagram of the structure of a device for detecting the cracking of equipment. Figure 5 This is a schematic diagram of the structure of a device cracking detection system provided in this application. Detailed Implementation

[0018] The core of this invention is to provide a method, system, device, and equipment for detecting device cracking, which can protect the security of the initial key even after the processor is physically damaged, preventing malicious personnel from obtaining the initial key through the processor during normal system operation.

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Currently, to protect device security and the security of data stored on the device, devices typically encrypt certain sensitive operations, especially for real-time embedded systems where security is paramount. Therefore, whether it's system modification, execution of operations, or data transmission, devices usually employ various encryption algorithms. To implement these encryption and decryption operations, the devices typically store these keys internally.

[0021] Among these keys is a special key called the initial key, which is stored in the OTP memory. When the device powers on, the initial key in the OTP memory is written to a dedicated key register (the purpose of the key register is to protect the OTP memory, as the OTP memory cannot be modified. To prevent damage to the OTP memory due to certain problems during operation, a dedicated key register is usually set up). This operation is usually handled by the bootloader, and the user cannot intercept or prevent the writing of the initial key. The device uses the initial key to decrypt various data related to device startup so that the device can use the decrypted data to complete the power-on startup. When the device reaches user mode, the device will continuously control the key register to close and no longer access the OTP memory, so that the user cannot obtain the initial key. This is because the initial key can also be used as a key in other operations. Taking data encryption and decryption as an example, when decrypting data, in addition to using a key specifically set for data encryption and decryption, the initial key can also be used to decrypt the data. It can be seen that the initial key has very high privileges. Therefore, in order to protect data security, it is necessary to prohibit the use of the initial key.

[0022] However, with the increasing number of malicious attack methods, especially the use of FIB technology to cut the processor's circuitry, the continuous control signal output by the processor to the key register can change from a shutdown signal to an on signal. This allows malicious actors to obtain the initial key stored in the key register through the processor after the device enters user mode, thus cracking the device.

[0023] To solve the above technical problems, please refer to Figure 1 , Figure 1 A flowchart of a device cracking detection method provided in this application is applied to a processor in the device. The device also includes a one-time programmable memory and a key register. The device cracking detection method includes: S1: When the device is running normally, determine whether the enable pin of the key register is valid; To effectively detect whether the processor itself has been compromised, this application considers that malicious actors modifying the processor's circuitry may also damage some of the processor's security detection circuitry or mechanisms, rendering the processor unable to detect its own security vulnerabilities. Furthermore, to obtain the initial key from the key register through the processor, malicious actors will inevitably not disrupt the communication and data transmission connection between the processor and the key register. Therefore, since the key register is only valid during the device's power-on startup and becomes invalid after the device has completed startup and is running normally, and malicious actors can only operate on it during startup and normal operation, the processor can monitor the enable pin of the key register in real time during normal device operation. The specific steps for determining the enable pin's validity include checking whether the level at the key register's enable pin is high when the key register is active high, and also checking whether the enable pin's level can change or reverse (because a compromised processor is no longer under its own control and can only continuously output a high level).

[0024] S2: If valid, the device is determined to be hacked, and all instructions received by the processor itself are rejected; S3: If invalid, retrieve the key data from the key register; Because the processor can only obtain the initial key from the key register when the key register is valid, if the enable pin of the key register is valid, it can be directly determined that the processor has not sent a control signal to the key register to keep it invalid or turn it off. In other words, it can be determined that the processor has been cracked. If the enable pin of the key register is invalid, it can usually be considered that the processor has not been cracked. However, considering that there may be some advanced cracking techniques that can bypass the detection of the enable pin, further detection is required.

[0025] S4: Determine whether the data format of the key data is consistent with the data format of the initial key in the one-time programmable memory; S5: If there is no consistency, the device is determined not to have been hacked; If they match, proceed to S2.

[0026] Further detection involves actively retrieving the key from the key register and determining whether the retrieved key is equal to the initial key. Specifically, due to the protection mechanism for the initial key, it is only stored in the OTP memory and the key register; the processor itself does not store the initial key. Therefore, when retrieving the key from the key register, the processor itself does not know whether the retrieved key is equal to the initial key. Thus, the data format of the initial key can be pre-stored in the processor as a criterion. If the data format of the key retrieved from the key register matches the data format of the initial key, it can be generally concluded that the key retrieved by the processor from the key register is the initial key. Furthermore, if the data format of the key retrieved from the key register is inconsistent with the data format of the initial key, this is usually because the enable pin of the key register is invalid or the link between the processor and the key register is broken, causing the processor to only retrieve data 0 or some garbled characters from the key register. Therefore, in the absence of processor compromise, inconsistent data formats are the most common cause. As a simple example, suppose the initial key is X1y2. The first character must be an uppercase letter, the second character must be any number from 1 to 5, the third character must be a lowercase letter, and the fourth character must be any number from 1 to 9. If the data format of the key obtained from the key register also conforms to the above data format, even if the obtained key is not X1y2, but another key such as A3z9, it will be directly determined that the data format is consistent.

[0027] If the enable pin of the key register is detected to be valid, or if the enable pin of the key register is detected to be invalid but a key with the same data format as the initial key can be obtained from the key register, it is determined that the processor and device have been compromised. In this case, the processor will reject all instructions from the user, especially read and write instructions, thereby preventing the user from obtaining the initial key from the key register through the processor. The specific process of rejection can be as follows: after receiving an instruction, it determines whether the initiator of the instruction is the user-operated terminal or whether the instruction was issued by the user to the processor from the device where the processor resides. If it is determined to be either, the instruction will not be responded to. Alternatively, any instruction can be received normally, but the task of the instruction will be directly interrupted during the execution of the instruction, that is, these instructions will be unable to complete.

[0028] In summary, during normal device operation, the system checks the enable pin of the key register. If it is valid, the device is considered compromised, and all instructions received by the processor are rejected. If invalid, the system retrieves the key data from the key register and checks if its format matches the initial key in the one-time programmable memory. If they do not match, the device is considered intact; if they match, the device is considered compromised, and all instructions received by the processor are rejected. By detecting the validity of the key register and verifying the availability of a key with a format matching the initial key, the system rejects all instructions upon detecting processor compromise. This protects the initial key even after physical damage to the processor, preventing malicious individuals from obtaining the initial key through the processor during normal system operation.

[0029] Based on the above embodiments: In some embodiments, before determining whether the enable pin of the key register is valid, the method further includes: When a power-on command is detected, the initial key in the one-time programmable memory is sent to the key register as the key data of the key register; Enable the key register; The device is powered on using the key data in the key register. Once the device is running normally, disable the enable pin of the key register.

[0030] To ensure the security of the initial key, this application uses the initial key to decrypt some boot-related data when the device powers on and starts up, allowing the device to use this decrypted data to perform boot and system startup operations. Furthermore, the device is in a user-inoperable state until the system startup is complete; users can only access the device's BIOS (Basic Input Output System) to view and modify some system operating parameters, but cannot access the key register. Therefore, when the device is powered on, after copying the initial key from the One-Time Programmable Memory (OTP memory) to the key register, the enable pin of the key register can be set to valid. This allows the processor to obtain the correct initial key from the key register and perform boot and system startup operations based on the initial key. Once the device has completed its boot process and entered the normal user mode (for Windows-based devices, booting up is considered complete when the device reaches the user's desktop), the processor continuously sends signals (such as shutdown signals, interrupt signals, or power-off signals) to the enable pin of the key register to invalidate the key register itself. This ensures that the key register remains invalid during normal device operation, thereby preventing the user from obtaining the initial key and ensuring its security.

[0031] In some embodiments, enabling the key register includes: The pulse generator connected to the key register sends a level signal to the enable terminal of the key register, indicating that the enable terminal is valid. Invalidate the enable pin of the key register, including: During normal operation of the equipment, the control pulse generator continuously sends a level signal to the enable terminal of the key register, indicating that the enable terminal is invalid.

[0032] To ensure the security of the initial key simply and effectively, this application also includes a pulse generator in the device. The processor controls the key register by controlling the pulse generator. For details, please refer to... Figure 3 , Figure 3This application provides a schematic diagram of a detection module. The processor only needs to send a signal to the pulse generator in the detection module once. After receiving this signal, the pulse generator will continuously output the required output level signal until it receives the next signal. For example, the key register is active high. When the device is first powered on, the processor outputs a high-level signal to the pulse generator, and the pulse generator will continuously output a high-level signal to the enable terminal of the key register to make the key register valid. After the device has finished powering on and starting up, the processor outputs a low-level signal to the pulse generator, and the pulse generator will continuously output a low-level signal to the enable terminal of the key register to ensure that the key register remains invalid during normal device operation.

[0033] Furthermore, a pulse signal detection mechanism can be added to the pulse generator, allowing it to respond only to the first two received signals after power-on. These correspond precisely to the high-level signal received when the device first powers on and the low-level signal received after power-on, preventing interference from other signals that could cause the key register to become valid unexpectedly. In other words, after power-on, the pulse generator records the number of control signals it receives. This count is zero when the device first powers on, and increments by 1 for each received signal. Once the count reaches two, it stops responding to subsequent control signals. The count is reset to zero when the device is powered off. This simple and effective method ensures the security of the initial key.

[0034] Furthermore, to reduce wiring within the device, the detection circuit for checking the validity of the key register's enable pin can pass through the detection module. Specifically, the processor sends an instruction to check the validity of the key register, along with some related data configuration, to the detection module. The detection module configures the read enable register based on the content sent by the processor. The function of this read enable register is to read the enable bit information of the key register, and then the read enable register returns the read enable bit information to the detection module, so that the detection module can return the enable bit information to the processor. In addition, in conjunction with other embodiments, the detection module itself can also detect the enable bit waveform of the key register, thereby detecting whether the level of the key register can be reversed normally, and returning the result to the processor. When the processor controls the validity and invalidation of the key register, it can also send a corresponding signal to the pulse generator in the detection module, which is used to achieve this.

[0035] In some embodiments, determining whether the enable pin of the key register is valid includes: Determine whether the enable pin of the key register is at a level indicating that the enable pin is valid, and determine whether the signal sent by the pulse generator to the enable pin of the key register is at a level indicating that the enable pin is valid; If any one of them is true, then the enable pin of the key register is considered valid; If both are negative, then the enable pin of the key register is deemed invalid.

[0036] To further ensure the security of the initial key, this application considers the potential for the pulse generator to be compromised. For example, if a malicious user discovers the pulse generator's function and modifies the processor to only send control signals to the pulse generator that enable the key register, then during normal device operation, in addition to checking the enable pin of the key register itself, it is also necessary to check whether the voltage level signal emitted by the pulse generator enables the key register. Taking a high-level enable pin as an example, it is necessary to simultaneously determine whether the enable pin of the key register is high and whether the voltage level signal emitted by the pulse generator is high. If the enable pin of the key register itself is valid, or if the voltage level signal emitted by the pulse generator is valid, the enable pin of the key register can be directly determined to be valid, meaning the device can be directly determined to have been compromised. In summary, this approach further ensures the security of the initial key.

[0037] In some embodiments, after rejecting all instructions received by the processor itself, the method further includes: An alarm signal is generated and sent to the alarm module so that the alarm module can issue an alarm.

[0038] To promptly notify relevant personnel that the device has been hacked, this application includes the following reference: Figure 2 , Figure 2 The schematic diagram of a device provided in this application shows that, upon determining that the device and processor have been hacked, an alarm will be issued directly through the alarm module. Considering that the device is usually in the possession of malicious individuals when hacked, the alarm issued by the alarm module is not a sound alarm to the surrounding area. Instead, the alarm module can be a module that automatically dials a phone number or sends a message. When the device and processor are detected to be hacked, the alarm module will make a phone call or send a message to a pre-set emergency contact user to inform them that the device has been hacked. Based on this, relevant personnel can be promptly alerted that the device has been hacked.

[0039] In some embodiments, generating an alarm signal and sending it to the alarm module includes: When it is determined that the device has been hacked, the current time recorded in the service terminal connected to the device is obtained as the time point when the device was hacked; Obtain the device's location information; An alarm signal containing the time and location information of the device being hacked is generated and sent to the alarm module, so that the alarm module can send the alarm signal to the service terminal connected to the device.

[0040] To more accurately determine the extent of device hacking, please refer to the following in this application. Figure 2 , Figure 2 This application provides a schematic diagram of the device's structure. Considering that after a device is hacked, other information about it is usually modified as well—for example, when the device is a mobile phone, the SIM card is typically removed, and functions or parameters such as the date, location, and system time are usually modified—to determine if the device has been hacked, while the device is still connected to the internet, the date and system time recorded on the service terminal (usually a cloud platform) connected to the device can be obtained as the date and time the device was hacked.

[0041] Additionally, if the device's location services (such as GPS) are not disabled, its coordinates and location on the local map can be obtained through these services. If the device's location services are disabled, its internal wireless communication services (such as Wi-Fi and Bluetooth) can be used to obtain wireless communication signals from other nearby devices, and the location services of these other devices can be used to determine the compromised device's coordinates and location on the local map. Then, the date and time of the device's compromise, along with its coordinates and location on the local map, are sent to the service terminal. This allows the service terminal to accurately determine the device's current coordinates and location, as well as the time of the compromise, enabling timely assessment of data breaches and prompt navigation to the device's location. Based on this, the extent of device compromise can be determined more accurately.

[0042] In addition, the device can record its current IP (Internet Protocol) address, MAC (Media Access Control) address, and power-on time each time it is powered on and send them to the service terminal. When the time cannot be obtained from the service terminal, the device's internal RTC (Real-Time Clock) register can be accessed to record the time.

[0043] In some embodiments, before rejecting all instructions received by the processor itself, the method further includes: Set the execution priority of interrupt instructions generated by the signal generator connected to the processor to the highest level; Reject all instructions received by the processor itself, including: The control signal generator continuously sends interrupt commands to the processor's own enable pin; When the processor receives any instruction other than an interrupt instruction, it executes the operation task corresponding to the instruction. While performing the operation task, it is determined whether the processor's own enable pin has received an interrupt instruction; If an interrupt command is received, the execution of the operation task will be terminated; If no interrupt command is received, determine whether the signal generator is faulty; If a malfunction occurs, the control device will be shut down; If there is no fault, the control signal generator sends an interrupt command to the processor's own enable pin and returns to the step of determining whether the processor itself has received the interrupt command.

[0044] To effectively and securely prevent the processor from accessing the data in the key register, this application, upon detecting that the device and processor have been compromised, aims to prevent users from obtaining the initial key from the key register through the processor. Considering that simply having the processor reject all instructions is unlikely to restore it to its original state, shutting down the entire device is typically the most effective preventative measure. However, frequent power-on and power-off cycles accelerate the device's lifespan and may damage its internal circuitry, potentially leading to complete device failure.

[0045] Based on this, to prevent users from obtaining the initial key from the key register through the processor, the processor will trigger a signal generator connected to its own enable pin. Once triggered, the signal generator will continuously send interrupt signals to the processor's enable pin. Regardless of what task the processor is currently executing, as long as an interrupt signal exists, the processor will immediately interrupt and stop the currently executing task, such as interrupting the task of obtaining the initial key from the key register, thereby preventing malicious personnel from obtaining the initial key from the key register through the processor.

[0046] Furthermore, considering the possibility of signal generator malfunction, after determining that the processor and device have been compromised, if the processor has already triggered the signal generator but its enable pin does not receive an interrupt signal, the processor will determine if the signal generator is faulty. Specifically, it will determine if the processor can obtain any type of signal from the signal generator; or whether the signal generator is present. If faulty, it means that the aforementioned interrupt task method is unavailable, and the processor will ultimately shut down the device. If not faulty, the processor will trigger the signal generator again and restart the detection. If, after repeated triggering and detection, no interrupt signal is received from the signal generator, the processor will also be deemed faulty, and the processor will ultimately shut down the device. Based on this, it is possible to effectively and securely ensure that the processor cannot obtain the data in the key register.

[0047] Please refer to Figure 4 , Figure 4 A schematic diagram of a device cracking detection apparatus provided in this application includes: Memory 21 is used to store computer programs; The processor 22 is used to implement the steps of the device cracking detection device method as described above when executing a computer program.

[0048] For a detailed description of the device cracking detection device provided in this application, please refer to the embodiments of the device cracking detection method described above, which will not be repeated here.

[0049] A device includes a device body and a device for detecting the cracking of the device as described above; The main body of the device is connected to the device's crack detection device.

[0050] For a detailed description of the device provided in this application, please refer to the embodiments of the above-described device cracking detection method; further details will not be repeated here.

[0051] Please refer to Figure 5 , Figure 5 This application provides a schematic diagram of a device crack detection system, which includes a processor applied in the device. The device also includes a one-time programmable memory and a key register. The device crack detection system comprises: Enable terminal judgment unit 31 is used to determine whether the enable terminal of the key register is valid when the device is running normally; if valid, it triggers the rejection unit 32; if invalid, it triggers the key data acquisition unit 33. The rejection unit 32 is used to determine that the device has been hacked and reject all instructions received by the processor itself. The key data acquisition unit 33 is used to acquire key data in the key register; The data format judgment unit 34 is used to determine whether the data format of the key data is consistent with the data format of the initial key in the one-time programmable memory; if they are inconsistent, the judgment security unit 35 is triggered; if they are consistent, the rejection unit 32 is triggered. Security unit 35 is used to determine whether the device has been hacked.

[0052] For a detailed description of the device cracking detection system provided in this application, please refer to the embodiments of the device cracking detection method described above; further details will not be repeated here.

[0053] Based on the above embodiments: In some embodiments, it also includes: The key writing unit is used to send the initial key in the one-time programmable memory to the key register as the key data of the key register when a power-on command of the device is detected, before determining whether the enable terminal of the key register is valid. The first setting unit is used to enable the key register. The power-on unit is used to control the device to power on using the key data in the key register; The second setting unit is used to invalidate the enable terminal of the key register after the device is running normally.

[0054] In some embodiments, the first setting unit is specifically used to control a pulse generator connected to the key register to send a level signal indicating that the enable terminal is valid to the enable terminal of the key register; The second setting unit is specifically used to control the pulse generator to continuously send a level signal indicating that the enable terminal is invalid to the enable terminal of the key register when the device is running normally.

[0055] In some embodiments, the enable terminal determination unit 31 includes: The level judgment unit is used to determine whether the enable terminal of the key register is at a level indicating that the enable terminal is valid, and to determine whether the signal sent by the pulse generator to the enable terminal of the key register is at a level indicating that the enable terminal is valid. If any of them are true, then rejection unit 32 is triggered; If both are negative, then the key data acquisition unit 33 is triggered.

[0056] In some embodiments, it also includes: The alarm unit is used to generate an alarm signal and send it to the alarm module after rejecting all instructions received by the processor itself, so that the alarm module can issue an alarm.

[0057] In some embodiments, the alarm unit includes: The time acquisition unit is used to acquire the current time recorded in the service terminal connected to the device as the time point when it is determined that the device has been hacked. The positioning acquisition unit is used to acquire the device's location information; The sending unit is used to generate an alarm signal containing the time and location information of the device being hacked and send it to the alarm module, so that the alarm module can send the alarm signal to the service terminal connected to the device.

[0058] In some embodiments, it also includes: The priority setting unit is used to set the execution priority of interrupt instructions generated by the signal generator connected to the processor to the highest level before rejecting all instructions received by the processor itself. Rejection unit 32 includes: The first interrupt control unit is used to control the signal generator to continuously send interrupt commands to the processor's own enable terminal; The instruction execution unit is used to execute the operation task corresponding to any instruction received by the processor, except for interrupt instructions. The interrupt determination unit is used to determine whether the processor's own enable pin has received an interrupt instruction while performing the operation task; if an interrupt instruction is received, the termination unit is triggered; if no interrupt instruction is received, the fault determination unit is triggered. Termination unit, used to terminate the execution of operation tasks; The fault determination unit is used to determine whether the signal generator is faulty; if it is faulty, the shutdown unit is triggered; if it is not faulty, the second interrupt control unit is triggered. Shutdown unit, used to control the shutdown of equipment; The second interrupt control unit is used to control the signal generator to send an interrupt command to the processor's own enable pin, triggering the interrupt judgment unit.

[0059] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0060] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting the hacking of a device, characterized in that, The processor used in the device, the device also including a one-time programmable memory and a key register, and the method for detecting the cracking of the device includes: When the device is operating normally, determine whether the enable pin of the key register is valid; If successful, the device is determined to be hacked, and all instructions received by the processor itself are rejected. If invalid, then retrieve the key data from the key register; Determine whether the data format of the key data is consistent with the data format of the initial key in the one-time programmable memory; If there is no discrepancy, the device is determined not to have been hacked; If they match, the device is determined to be hacked, and all instructions received by the processor itself are rejected. Before determining whether the enable terminal of the key register is valid, the method further includes: when a power-on command of the device is detected, sending the initial key in the one-time programmable memory to the key register as the key data of the key register; enabling the key register; controlling the device to power on using the key data in the key register; and disabling the key register after the device is running normally. Setting the enable terminal of the key register to be valid includes: controlling a pulse generator connected to the key register to send a level signal indicating that the enable terminal is valid to the enable terminal of the key register; setting the enable terminal of the key register to be invalid includes: controlling the pulse generator to continuously send a level signal indicating that the enable terminal is invalid to the enable terminal of the key register when the device is operating normally. Determining whether the enable terminal of the key register is valid includes: determining whether the enable terminal of the key register is at a level indicating that the enable terminal is valid, and determining whether the signal sent by the pulse generator to the enable terminal of the key register is at a level indicating that the enable terminal is valid; if either is true, then the enable terminal of the key register is determined to be valid; if neither is true, then the enable terminal of the key register is determined to be invalid.

2. The device hacking detection method as described in claim 1, characterized in that, After rejecting all instructions received by the processor itself, it also includes: An alarm signal is generated and sent to the alarm module so that the alarm module can issue an alarm.

3. The device hacking detection method as described in claim 2, characterized in that, Generate an alarm signal and send it to the alarm module, including: When it is determined that the device has been hacked, the current time recorded in the service terminal connected to the device is obtained as the time point when the device was hacked. Obtain the location information of the device; An alarm signal containing the time point at which the device was hacked and the location information is generated and sent to the alarm module, so that the alarm module can send the alarm signal to the service terminal connected to the device.

4. The method for detecting the hacking of a device as described in any one of claims 1 to 3, characterized in that, Before rejecting all instructions received by the processor itself, the following is also included: The execution priority of the interrupt instruction generated by the signal generator connected to the processor is set to the highest. Reject all instructions received by the processor itself, including: The signal generator is controlled to continuously send the interrupt command to the enable pin of the processor itself; When the processor receives any instruction other than the interrupt instruction, it executes the operation task corresponding to the instruction. While performing the operation task, it is determined whether the processor's own enable pin has received the interrupt instruction; If the interrupt command is received, the execution of the operation task is terminated; If the interrupt command is not received, determine whether the signal generator is faulty; If a malfunction occurs, the device will be shut down. If there is no fault, control the signal generator to send the interrupt command to the processor's own enable terminal, and return to the step of determining whether the processor itself has received the interrupt command.

5. A device hacking detection system, characterized in that, The processor used in the device, the device also includes a one-time programmable memory and a key register, and the device's crack detection system includes: The enable terminal judgment unit is used to determine whether the enable terminal of the key register is valid when the device is operating normally; if valid, the rejection unit is triggered; if invalid, the key data acquisition unit is triggered. The trigger rejection unit is used to determine that the device has been hacked and to reject all instructions received by the processor itself; The key data acquisition unit is used to acquire the key data in the key register; A data format determination unit is used to determine whether the data format of the key data is consistent with the data format of the initial key in the one-time programmable memory; if they are inconsistent, the security determination unit is triggered; if they are consistent, the rejection unit is triggered. The security determination unit is used to determine that the device has not been hacked; Before determining whether the enable terminal of the key register is valid, the method further includes: when a power-on command of the device is detected, sending the initial key in the one-time programmable memory to the key register as the key data of the key register; enabling the key register; controlling the device to power on using the key data in the key register; and disabling the key register after the device is running normally. Setting the enable terminal of the key register to be valid includes: controlling a pulse generator connected to the key register to send a level signal indicating that the enable terminal is valid to the enable terminal of the key register; setting the enable terminal of the key register to be invalid includes: controlling the pulse generator to continuously send a level signal indicating that the enable terminal is invalid to the enable terminal of the key register when the device is operating normally. Determining whether the enable terminal of the key register is valid includes: determining whether the enable terminal of the key register is at a level indicating that the enable terminal is valid, and determining whether the signal sent by the pulse generator to the enable terminal of the key register is at a level indicating that the enable terminal is valid; if either is true, then the enable terminal of the key register is determined to be valid; if neither is true, then the enable terminal of the key register is determined to be invalid.

6. A device for detecting the cracking of equipment, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the device cracking detection apparatus method as claimed in any one of claims 1 to 4 when executing the computer program.

7. A device, characterized in that, It includes the device body and the device cracking detection device as described in claim 6; The device body is connected to the device's crack detection device.

Citation Information

Patent Citations

  • Storage chip test key protection method, device and equipment

    CN115359833A

  • Semiconductor device and operating method thereof

    CN116127535A