Archive for the ‘Break IC’ Category
Break Locked MCU W77E51 Eeprom Memory
Break Locked MCU W77E51 Eeprom Memory and extract its heximal out from it is a commonly requirement especially for those repairing companies with some obselete devices which use microcontroller W77E51, hereby we would like to introduce the composition of W77E51 on chip ROM:
The W77E51 has several modes to program the on-chip Flash EPROM. All these operations are configured by the pins RST, ALE, PSEN , A9CTRL(P3.0), A13CTRL(P3.1), A14CTRL(P3.2), OECTRL(P3.3), CE (P3.6), OE (P3.7), A0(P1.0) and VPP( EA ). Moreover, the A15A0(P2.7P2.0, P1.7P1.0) and the D7D0(P0.7P0.0) serve as the address and data bus respectively for these operations.
Read Operation
This operation is supported for customer to read their code and the Security bits. The data will not be valid if the Lock bit is programmed to low when Break Locked MCU W77E51 Eeprom Memory.
Output Disable Condition
When the OE is set to high, no data output appears on the D7..D0.
Program Operation
This operation is used to program the data to ROM and the security bits. Program operation is done when the VPP is reach to VCP (12.5V) level, CE set to low, and OE set to high.
Program Verify Operation
All the programming data must be checked after program operations. This operation should be performed after each byte is programmed; it will ensure a substantial program margin.
Erase Operation
An erase operation is the only way to change data from 0 to 1. This operation will erase all the ROM cells and the security bits from 0 to 1. This erase operation is done when the VPP is reach to VEP level, CE set to low, and OE set to high after Break Locked MCU W77E51 Eeprom Memory.
Erase Verify Operation
After an erase operation, all of the bytes in the chip must be verified to check whether they have been successfully erased to 1 or not. The erase verify operation automatically ensures a substantial erase margin. This operation will be done after the erase operation if VPP = VEP (14.5V), CE is high and OE is low if BREAK IC.
Crack Motorola MC68HC05B6 Microcontroller
Crack Motorola MC68HC05B6 Microcontroller by focus ion beam to modify MCU circuitry pattern for the purpose of reset encryption status, then the firmware can be readout from MCU;
the Motorola MC68HC05B6 microcontroller has a Mask ROM bootloader which prevents user code upload if the security bit is set. The part of the code responsible for the security. It checks the contents of the first byte in the EEPROM and if the bit 0, assigned as a security fuse, is programmed then the CPU goes into endless loop.
That sort of protection could be relatively easy defeated. As the CPU performs only one instruction in the loop, all the attacker has to do is apply different clock glitches to cause CPU malfunction. He does not even have to carefully synchronise the attack to microcontroller’s CPU clock signal, as doing glitches at a random time will give a success in a short number of attempts. Glitches could be inserted relatively easy without the use of any external generators by short circuiting the crystal resonator for a short time.
When the resonator starts it produces oscillations at different harmonics which cause many glitches. In most cases the attack has to be applied at a certain clock cycle to cause the desired result. In this case it is better to use either a signal pattern generator which can supply all the necessary signals to the chip or built such a generator using an FPGA prototyping board.

Clock Glitch Injection Points: External Source, PLL, and Reset
Most discussions of clock glitching begin with the waveform and never mention where the waveform is applied. That order is backwards. On a real product, the question of whether a clock can be disturbed at all is settled by the schematic, and it is settled before any equipment is unpacked. A board whose clock is generated inside the package and never leaves it is not a harder target; it is not a target.
Three nodes can carry a clock disturbance, and they are not equivalent. Each has a different insertion cost, a different side effect, and — most importantly — a different way of telling you that it worked.
Node one: the external clock input
The easiest case by a wide margin is a board with an external crystal or oscillator feeding a clock input pin. The disturbance is injected in series with the clock line, either by driving the pin from a generator instead of the oscillator, or by capacitively coupling a fast edge onto the existing clock.
Driving the pin directly is cleaner but requires removing or disabling the oscillator, which is destructive to the board and therefore unacceptable when the device must be returned working. Capacitive coupling leaves the board intact and works because the clock input is a high-impedance CMOS gate with a switching threshold around half the supply; a coupled edge of a few volts is enough to force an extra transition.
The side effect is that the whole chip sees the disturbed clock, including the watchdog, the timers and any communication peripheral. A glitch that lands on the target instruction also disturbs the UART that was going to report the result, so the observation channel has to be something other than the one being glitched. This is the single most common practical mistake: the glitch works and the result is invisible because the reporting path was corrupted by the same event.
Node two: after the PLL
If the device runs from an internal PLL, the clock that the core sees is not the clock on any pin. Injecting after the PLL means getting inside the package, which in practice means the optical route rather than an electrical one.
There is, however, a variant that is often overlooked: the PLL’s reference divider and feedback divider are configured through registers, and on some parts those registers are writable at run time through the debug interface. Changing the feedback divider produces a frequency step rather than a single-cycle glitch, which is a different kind of fault — it stretches or compresses many cycles rather than one — but it can still violate the timing of a specific operation. This is a register write, not an injection, and it requires a debug session, which is exactly what a protected part will not give.
The PLL’s own behaviour is the reason this node is discussed at all. A phase-locked loop has a lock detector, and the lock detector is the only active feedback signal in the entire clock path.
The lock detector is the one honest signal
When the reference clock is disturbed badly enough, the PLL loses lock. Most devices respond in one of three ways, and the response tells the operator what happened.
| PLL response | Observed behaviour | What it means |
|---|---|---|
| Holds last frequency | Device keeps running at the old rate | Lock not lost; glitch too small |
| Switches to internal RC | Device slows down, keeps running | Lock lost, fallback engaged |
| Holds core in reset | Device stops until clocks stabilise | Lock lost, reset engaged |
The second row is the useful diagnostic. A device that suddenly runs at a different baud rate, or whose timing loops stretch, has told you that the PLL unlocked and the fallback oscillator took over. That is a positive indication that the disturbance reached the clock tree, even though the fault did not land where it was wanted. Without this signal, an operator sweeping offsets on a board with no observable output has no way to distinguish “the glitch never arrived” from “the glitch arrived and did nothing”, and those two require opposite corrections.
The third row is the failure mode that ends projects. If the PLL holds the core in reset on every attempt, the glitch amplitude has to come down, but the useful window may be below the level at which the clock tree can be disturbed at all. On such a part the clock route is closed and the voltage route is the alternative.
Node three: reset and enable pins
The third node is not a clock at all, but it behaves like one. The reset pin, and on some parts a clock-enable or standby pin, gates the core’s clock internally. A short pulse on reset does not reset the device if it is shorter than the reset filter’s time constant, but it can suppress one clock edge.
This is attractive because the reset pin is almost always brought out to a header or a test pad, even on boards that hide everything else. It is also the node with the widest side effects, because the reset supervisor, the watchdog and the brown-out detector all watch it.
The window is narrow in a different dimension: the pulse has to be short enough to escape the digital filter and long enough to suppress an edge. On parts with a 100 ns glitch filter, that leaves a working window of tens of nanoseconds, which is achievable with a fast driver but demands a short ground return. A long ground lead turns a 20 ns pulse into a 60 ns one with ringing, and the ringing is what trips the reset.
Reading the board before injecting
The topology question is answered on the bench, with a probe rather than a generator, and it takes about twenty minutes.
The first measurement is a frequency count on every pin that could be a clock. A crystallised oscillator shows a clean sinusoid of a few hundred millivolts to a volt on one pin of a four-pad package, with the other three being supply, ground and either a second crystal terminal or no connection. An active oscillator in a metal can shows a rail-to-rail square wave on its output pin. A clock distributed from the microcontroller to a peripheral shows a square wave on a trace, and its frequency is the peripheral’s, not the core’s.
The second measurement is continuity from that node to the device’s clock input. On a board with a series damping resistor, the resistor is where the injection will go, and its value — typically 22 to 100 ohms — sets how much a coupled edge will be attenuated.
The third measurement is the one that saves the most time later: probe the clock input while the device runs normally and look at the rise time. A clock that arrives with a 5 ns rise means the node is being driven by a fast gate and a coupled injection will produce a clean edge. A clock that arrives with a 40 ns rise means the node is heavily loaded, and an injection will produce a slow edge that the input may not even recognise as a transition. In that case the injection has to be stronger, which moves it towards the reset side effects described above.
A board that yields no clock on any pin has its clock inside the package. That is the end of the analysis for this technique, and it is worth saying so to the customer in the same conversation rather than after a week of attempting.
Choosing between them
The choice is made by three questions, in order.
Is there a clock pin? If yes, node one is available and is the default. If the clock is internal and no pin carries it, node three is the fallback, and node two is not a real option without decapsulation.
Does the observation channel survive the glitch? If the only way to read the result is a UART or an SPI port clocked from the same tree, the answer is no, and the observation has to move to a current measurement or a spare GPIO.
Does the device recover? A node that leaves the part in reset on every attempt is worse than useless, because it consumes samples and produces no information.
What the injection point does not change
One thing is worth stating because it is frequently assumed otherwise: the injection point does not change which instruction is vulnerable. It changes only whether the disturbance arrives and what else it disturbs. The vulnerable instruction is decided by the design’s timing margin, and finding it is a separate problem treated in clock glitch application. The relationship between offset and instruction is a search, and the search strategy is in glitch attacks as a search problem.
Nor does the injection point change the fundamental comparison with supply manipulation. A voltage dip needs no clock pin, which makes it the only option on fully integrated parts; the trade-off is that it disturbs the analog domain as well, as described in power glitches.
In recovery work, the practical value of this analysis is that it produces a go or no-go answer in about an hour. We inspect the board, identify whether a clock node is reachable, and test the PLL’s fallback behaviour with a harmless disturbance before committing to a campaign. When the answer is no-go, the work moves to the physical route in extracting IC flash, and the customer is told early rather than after a week of sweeping. That early answer is the service at this layer: topology assessment, not waveform generation.
RC element with a characteristic time delay
Every transistor and its connection paths acts like an RC element with a characteristic time delay. The maximum usable clock frequency of a processor is determined by the maximum delay among its elements. Similarly, every flip-flop has a characteristic time window (of a few picoseconds) during which it samples its input voltage and changes its output accordingly. This window can be anywhere inside the specified setup cycle of the flip-flop, but is quite fixed for an individual device at a given voltage and temperature. So if we apply a clock glitch (a clock pulse much shorter than normal) or a power glitch (a rapid transient in supply voltage) this will affect only some transistors in the chip and cause one or more flip-flops to adopt the wrong state. By varying the parameters, the CPU can be made to execute a number of completely different wrong instructions, sometimes including instructions that are not even supported by the microcode. Although we do not know in advance which glitch will cause which wrong instruction in which chip, it can be fairly simple to conduct a systematic search.
Glitch Attacks as a Search Problem: Sweep, Fitness, and the Two-Parameter Window
Two glitch parameters have to be right at the same time: when the disturbance arrives relative to the instruction, and how long it lasts. Miss either and nothing happens. The set of pairs that works is a thin ridge in a grid that is typically tens of thousands of points in area, and finding that ridge is an optimisation problem with a very sparse reward.
Most failed glitch projects fail here rather than in the electronics. The rig works, the waveform is correct, the board is reachable, and the operator tries a dozen settings, sees nothing, and concludes that the part is protected. A dozen samples from a space of ten thousand is not an experiment.
The shape of the space
The two axes are not symmetric. The timing offset has a natural period: the instruction cycle. Beyond one cycle the same relative position repeats, so the search only has to cover one cycle divided by the timing resolution. On a 16 MHz part that is 62.5 ns, and a 1 ns resolution gives 63 points.
The width axis is bounded below by the pulse generator’s minimum pulse and above by the point at which the disturbance is long enough to be seen as a supply or clock failure rather than a fault. That range is typically one to thirty nanoseconds for a clock glitch, and one to several hundred nanoseconds for a voltage dip.
The product is a few thousand points at coarse resolution and tens of thousands at fine resolution. Attempts take between a tenth of a second and two seconds each, depending on how long the device needs to reboot and how the result is read out. That places a full coarse sweep between ten minutes and a few hours.
| Parameter | Natural range | Resolution that matters | Points |
|---|---|---|---|
| Offset, clock glitch | One instruction cycle | 1 ns | 40–70 |
| Offset, voltage dip | Several cycles | 10 ns | 50–200 |
| Width, clock glitch | 1–30 ns | 1 ns | 30 |
| Width, voltage dip | 10 ns–2 µs | 10 ns | 200 |
Why bisection does not work
The instinct of an engineer facing a one-dimensional sweep is to bisect: test the ends, test the middle, narrow down. That instinct is wrong here, and understanding why saves a week.
Bisection requires monotonicity: a predicate that is false on one side and true on the other, with a single crossing. The glitch response is not monotonic. Moving the offset later produces, in order: no effect, target fault, hang, reset, no effect again. There are two sign changes and a plateau, and the ordering of the middle two depends on which structure is being hit.
What the response does have is locality. A setting that produces a hang is within a few nanoseconds of a setting that produces the target fault, because both are manifestations of the same path failing at slightly different points. That locality is what makes a hill-climbing refinement work, but only after a coarse sweep has found the neighbourhood.
Grading the outcome instead of counting it
A binary success metric wastes most of the information each attempt produces. Four outcomes are distinguishable, and they carry an ordering.
| Outcome | Grade | Inference |
|---|---|---|
| No effect, normal operation | 0.0 | Disturbance too small or offset wrong |
| Reset or reboot | 0.1 | Too deep; window is on the other side |
| Hang, no restart | 0.4 | Fault landed, wrong target |
| Wrong decision, no other symptom | 1.0 | Target reached |
Grading turns the sweep into a landscape rather than a needle hunt. A region of 0.4 tells the operator that the fault mechanism is working and only the target is wrong, which means the offset should move by a few nanoseconds rather than the amplitude being changed. A region of 0.1 tells the opposite: reduce the disturbance and come back.
The grading also protects against a specific error that produces false success. Some glitches corrupt a status register that the readout path uses, so the reported result looks like the desired outcome while the device is in fact merely broken. Requiring that the device perform a second, independent operation correctly after the fault is the cheapest way to exclude that case, and it is worth building into the acceptance criterion from the start.
Hit rate and the number of samples
If the usable set is one percent of the grid, a random search needs about a hundred attempts to have a two-thirds chance of one hit. If it is a tenth of a percent, the same confidence needs a thousand. Those numbers decide whether a campaign is a morning or a fortnight.
The hit rate is not knowable in advance, but it is bounded by the geometry. The ridge width in the offset axis is set by the propagation delay spread across the target structure, typically one to three nanoseconds; the ridge width in the width axis is set by how much of the cycle needs to be lost, typically two to five nanoseconds. So the usable area is a few tens of points out of a few thousand, which is around one percent, and a coarse sweep of the entire space is the only reliable way to find it.
Repeating a successful setting ten times and requiring all ten to succeed is the validation step. A setting that works six times out of ten is on the edge of the ridge and will not survive a temperature change; a setting that works ten of ten is inside it.
When the ridge becomes a surface
A third parameter is usually present and usually ignored: the supply voltage during the attempt, or the temperature, or both. Each of them shifts the ridge rather than widening it.
The consequence is that a two-dimensional sweep performed at one voltage produces a ridge that does not exist at another voltage. This is why a setting found on a bench at 3.30 V can fail on the same board at 3.25 V, and why a rig that drifts by fifty millivolts over an afternoon appears to lose its successful setting.
There is a disciplined way to handle it. Fix the voltage at the nominal value of the target’s own regulator and map the ridge there, because that is the condition the customer’s device actually runs in. Then test the ridge at the two extremes of the regulator’s tolerance — typically plus and minus two percent — and record how far it moves. If the ridge shifts by more than half its width across that range, the setting is not stable enough to be reported as a method, and the work is not finished.
Temperature behaves differently and more kindly. Delay is monotonic in temperature over the operating range for most processes, so the ridge moves in one direction as the device warms. That monotonicity allows a bisection on temperature, which is not available on the offset axis. In practice a rig that can hold the device at a fixed temperature is worth more than one that can sweep it quickly.
| Parameter | Effect on the ridge | Handling |
|---|---|---|
| Supply voltage | Shifts laterally | Map at nominal, verify at tolerance |
| Temperature | Shifts monotonically | Hold fixed; bisect if needed |
| Clock frequency | Changes ridge width and position | Fix at the target’s setting |
| Decoupling | Attenuates the disturbance | Measure at the die, not the generator |
The sweep is not the deliverable
Once the ridge is mapped, the useful output is a description rather than a number: the centre of the ridge, its width in each axis, and its sensitivity to temperature and supply. That description is what allows the technique to be repeated next month on a different board of the same design, and it is what makes the result transferable to a second unit.
A single successful setting is a curiosity. A mapped ridge with documented sensitivity is a method, and it is the only form in which this work has lasting value.
How this connects to the physics
The search assumes that a fault is possible at all, which is a question about the chip rather than the algorithm. Whether the disturbance can reach a vulnerable path is decided by the injection topology, covered in clock glitch injection points, and whether the path in question has enough margin to fail is covered in clock glitch application. The voltage-side equivalent, where the window is bounded by a brown-out detector rather than a cycle, is in power glitches.
In recovery work this methodology is applied to one narrow goal: making a protected device accept a read command without erasing what it holds. We map the ridge on the customer’s board, report the usable region and its stability, and state plainly when the ridge does not exist — which happens on parts with an internal regulator and no accessible clock node, and on parts whose protection is enforced in hardware rather than by a branch. Where no ridge exists, the honest alternative is the physical route in extracting IC flash. The service is the measurement and the map, not a promise that every part has a window.
Noise Component is Power Consumption Characteristics
Power consumption characteristics always include noise components. The external noise can be reduced by proper design of the signal acquisition path and careful use of the measurement equipment. Measuring the power consumption on the resistor in the ground line has some advantages. Firstly, it reduces the noise level and, secondly, it allows us to measure the signal directly with an oscilloscope probe, because most probes have their common line permanently connected to the main power ground. To increase the signal-to-noise ratio further, the number of averaged samples can be increased.
Smaller Signals can be identified
By averaging the current measurements of many repeated identical operations, even smaller signals that are not transmitted over the bus can be identified. Signals such as carry-bit states are of special interest, because many cryptographic key-scheduling algorithms use shift operations that single out individual key bits in the carry flag. Even if the status-bit changes cannot be measured directly, they often cause changes in the instruction sequence or microcode execution, which then cause a clear change in the power consumption.
Computing Device Power Consumption
A computing device’s power consumption depends on its current activity. The consumption depends on changes of state of its components, rather than on the states themselves, because of the nature of CMOS transistors. When an input voltage is applied to a CMOS inverter, a transient short-circuit is induced. The rise of the current during this transient is much higher than the static dissipation caused by parasitic current leakage. Using a 10-20 resistor in the power supply line, these current fluctuations can be measured. To achieve good results, measurements should be made with at least 12-bit resolution and 50 MHz sampling frequency. Such acquisition parameters allow us to distinguish between different CPU instructions and estimate the number of bus bits changing at a time.
Avoid holes on security design
Any security system, either software or hardware, could also have holes in its design and there is always a small chance that an attacker would eventually find one with brute force random testing. Careful design of the security protection, followed by proper evaluation, could help avoid many problems and make such attacks virtually impossible.
Exploite Access Interface
The IC attacker could be also applied to the device communication protocol in order to find any hidden functions embedded by the software developer for testing and upgrade purposes. Chip manufacturers very often embed hardware test interfaces for postproduction testing of their semiconductor devices. If the security protection for these interfaces is not properly designed, the attacker can exploit it to get access to the on-chip memory. In smartcards such test interfaces are normally located outside the chip circuit and physically removed after the test operation, eliminating any possibility of use by outsiders.