Common methods and Countermeasures of cracking the

2022-09-22
  • Detail

Common methods and Countermeasures of single chip microcomputer cracking

1 introduction

single chip microcomputer (microcontroller) generally has internal ROM/EEPROM/flash for users to store programs. In order to prevent unauthorized access to or copying of the internal program of the single-chip microcomputer, most single-chip microcomputers are equipped with encryption lock positioning or encryption bytes to protect the on-chip program. If the encryption lock positioning is enabled (locked) during programming, it is impossible to directly read the program in the single chip microcomputer with an ordinary programmer, which is the so-called copy protection or locking function. In fact, such protection measures are fragile and easy to crack. With the help of special equipment or self-made equipment, the attacker of single chip microcomputer can extract the key information from the chip and obtain the program in the single chip microcomputer by using the loopholes or software defects in the design of single chip microcomputer and various technical means. Therefore, as a design engineer of electronic products, it is very necessary to understand the latest technology of the current single-chip microcomputer attack, so that we can know ourselves and the enemy well, so as to effectively prevent the products that we spend a lot of money and time painstakingly designing from being counterfeited overnight by others

2 single chip microcomputer attack technology

at present, there are four main technologies to attack single chip microcomputer, namely:

(1) software attack

this technology usually uses the processor communication interface and utilizes protocols, encryption algorithms or security vulnerabilities in these algorithms to attack. A typical example of the success of software attack is the attack on the early atmelat89c Series MCU. The attacker took advantage of the loopholes in the design of erasing operation sequence of this series of single chip computers, and used self programming to stop the next operation of erasing the data of on-chip program memory after erasing the encryption lock location, so that the encrypted single chip computer became an unencrypted single chip computer, and then used the programmer to read out the on-chip program

(2) electronic detection attack

this technology usually monitors the analog characteristics of all power supply and interface connections of the processor during normal operation with high time resolution, and implements the attack by monitoring its electromagnetic radiation characteristics. Because SCM is an active electronic device, when it executes different instructions, the corresponding power consumption changes accordingly. In this way, by using special electronic measuring instruments and mathematical statistical methods to analyze and detect these changes, we can obtain specific key information in the single chip microcomputer

(3) fault generation technology

this technology uses abnormal working conditions to make the processor error, and then provides additional access to attack. The most widely used means of fault generation attack include voltage shock and clock shock. Low voltage and high voltage attacks can be used to inhibit the operation of the protection circuit or force the processor to perform incorrect operation. The clock transient jump may reset the protection circuit without destroying the protected information. Transient power and clock jumps can affect the decoding and execution of a single instruction in some processors

(Jiangnan graphene Research Institute was established in Changzhou, Jiangsu Province 4) probe technology

this technology directly exposes the internal wiring of the chip, and then observes, manipulates and interferes with the single chip microcomputer to achieve the purpose of attack

for convenience, people divide the above four attack technologies into two categories. One is intrusive attack (physical attack). This kind of attack needs to destroy the package, and then it takes hours or even weeks to complete it in a special laboratory with the help of semiconductor test equipment, microscope and micro locator. All microprobe technologies are intrusive attacks. The other three methods are non-invasive attacks, and the attacked MCU will not be physically damaged. In some cases, non-invasive attacks are particularly dangerous, because the equipment required for non-invasive attacks can usually be self-made and upgraded, so it is very cheap

most non-invasive or different clearance type attacks of 7 sets of oil distribution valves require the attacker to have good processor knowledge and software knowledge. In contrast, intrusive probe attacks do not require much initial knowledge, and usually a set of similar technologies can be used to deal with a wide range of products. Therefore, attacks on single-chip computers often begin with intrusive reverse engineering, and the accumulated experience is conducive to the development of cheaper and faster non-invasive attack technology

3 general process of intrusive attack

the first step of intrusive attack is to remove the chip package. There are two ways to achieve this goal: the first is to completely dissolve the chip package and expose the metal wiring. The second is to remove only the plastic package on the silicon core. The first method needs to bind the chip to the test fixture and operate it with the help of the binding table. The second method requires not only the attacker's certain knowledge and necessary skills, but also personal wisdom and patience, but it is relatively convenient to operate

the plastic on the chip can be uncovered with a knife, and the epoxy resin around the chip can be corroded with concentrated nitric acid. Hot concentrated nitric acid will dissolve the chip package without affecting the chip and wiring. This process is generally carried out under very dry conditions, because the presence of water may erode the exposed aluminum wire connections

then clean the chip with acetone in the ultrasonic cell to remove the residue, which is mainly used to compare the hardness and softness of different minerals. Nitric acid is then cleaned with water to remove salt and dried. If there is no ultrasonic pool, this step is generally skipped. In this case, the chip surface will be a little dirty, but it will not affect the operation effect of ultraviolet light on the chip

the last step is to find the location of the protective fuse and expose it to ultraviolet light. Generally, a microscope with a magnification of at least 100 times is used to track the wiring of the programmed voltage input pin to find the protective fuse. If there is no microscope, a simple search is carried out by exposing different parts of the chip to ultraviolet light and observing the results. During operation, the chip shall be covered with opaque paper to protect the program memory from being erased by ultraviolet light. Exposing the protective fuse to ultraviolet light for 5 ~ 10 minutes can destroy the protective effect of the protective bit. After that, the contents of the program memory can be directly read out by using a simple programmer

it is not feasible to use UV reset protection circuit for single chip microcomputer that uses protective layer to protect EEPROM unit. For this type of MCU, microprobe technology is generally used to read the contents of memory. After the chip package is opened, the data bus connected from the memory to other parts of the circuit can be easily found by placing the chip under the microscope. For some reason, chip lock positioning in programming mode does not lock access to memory. Using this defect, you can read all the desired data by placing the probe on the data line. In the programming mode, restart the reading process and connect the probe to another data line to read out all the information in the program and data memory

another possible attack means is to find the protective fuse with the help of microscope, laser cutting machine and other equipment, so as to find all the signal lines associated with this part of the circuit. Due to the defective design, as long as a signal line from the protection fuse to other circuits is cut off, the whole protection function can be prohibited. For some reason, this line is very far away from other lines, so using a laser cutting machine can completely cut this line without affecting the adjacent line. In this way, the contents of the program memory can be directly read out by using a simple programmer

although most ordinary single-chip computers have the function of fuse burnout to protect the code in single-chip computers, because general-purpose low-grade single-chip computers are not positioned to make safety products, they often do not provide targeted preventive measures and the security level is low. In addition, the single-chip microcomputer has a wide range of applications, large sales volume, frequent entrusted processing and technology transfer between manufacturers, and a large number of technical data leakage, which makes it easier to read the internal program of the single-chip microcomputer by using the design loopholes of this kind of chip and the manufacturer's test interface, and by modifying the fuse protection bit and other invasive attacks or non-invasive attackers

4 some suggestions on how to crack single chip computers

in theory, attackers can use the above methods with sufficient investment and time to break through. Therefore, when using MCU to do encryption authentication or design system, we should try to increase the attack cost and time of attackers. This is the basic principle that system designers should always keep in mind. In addition, we should also pay attention to the following points:

(1) before selecting the encryption chip, we should fully investigate and understand the new progress of single chip microcomputer cracking technology, including which single chip computers have been confirmed to be able to crack. Try not to choose chips that have been mainly involved in the production process, such as long glass fiber reinforcement technology, blending and alloy technology and nanotechnology, which can be cracked or of the same series and model

(2) try not to choose MCS51 series single chip microcomputer, because this single chip microcomputer has the highest popularity in China and has been studied most thoroughly

(3) the originator of the product generally has the characteristics of large output, so the relatively rare and unpopular single-chip microcomputer can be selected to increase the difficulty of counterfeiters in purchasing

(4) choose microcontrollers with new technology, new structure and short time to market, such as atmelavr series microcontrollers

(5) if the design cost permits, smart card chips with hardware self destruction function should be selected to effectively deal with physical attacks

(6) if conditions permit, two single-chip computers of different models can be used for mutual backup and mutual verification, thus increasing the cracking cost

(7) polish the information such as chip model or reprint other models to confuse the false with the true

of course, in order to fundamentally prevent the single-chip computer from being decrypted and the program from being pirated, we can only rely on legal means to protect it

Copyright © 2011 JIN SHI