Archive for the ‘Break IC’ Category

PostHeaderIcon Four Reasons to Attack Firmware and the Conflicts Between Them

A request to attack firmware names a technical action and hides a purpose. The purpose determines what evidence is needed, what counts as success, and — most importantly — what must not be done, because the four common purposes are not merely different. They are mutually destructive in specific pairs.

Understanding the conflicts is what allows a single engagement to satisfy more than one purpose, which is what most customers actually need.

The four purposes

Confidentiality is the simplest: obtain the contents so that the customer can see what is in their own product, or in a competitor’s.

Modification means changing behaviour: removing a limit, enabling a feature, fixing a defect that the original vendor will not fix.

Interoperability means making a second product work with the first: a replacement part, an aftermarket accessory, a compatible service. It requires the interface, not necessarily the code.

Forensics means establishing a fact for a dispute, an investigation or a regulatory process. It requires evidence rather than data.

Purpose Deliverable Success is
Confidentiality An image The image is correct
Modification A patched image plus a test The change works, nothing else changed
Interoperability An interface specification A second implementation interoperates
Forensics A report with a chain of custody An independent expert reaches the same conclusion

Conflict one: confidentiality versus modification

These two look compatible and are not, because modification changes the thing that confidentiality is supposed to preserve.

If the image is modified before it is archived, the archive no longer represents the device. If the modification is performed on the device before the image is taken, the image is of the modified device, and the question “what did it originally contain” becomes unanswerable.

The rule is therefore fixed: take the image first, archive it, verify the archive by reading it back, and only then modify anything. The archive is the artefact that satisfies the confidentiality purpose; everything else is downstream of it.

Order Confidence purpose Modification purpose
Archive then modify Satisfied Satisfied, from the archive
Modify then archive Failed Satisfied
Interleaved Both uncertain Both uncertain

Conflict two: modification versus forensics

This is the pair that causes real damage, because the forensic purpose requires the device to remain as it was found and the modification purpose requires it to change.

A forensic engagement needs the device in its original state, the image taken by a documented method, and a record that the device was not altered between the observation and the extraction. Any write to the device — even a read that changes a status bit, even a debug session that leaves a flag — weakens the record.

Action Modification value Forensic damage
Read only None None
Debug session that sets a flag None Small, but must be declared
Chip erase None Total
Write a patch The whole point Total

The third and fourth rows are why a device that might be evidence must never be used as a work unit. Two identical units, one preserved and one used, is the only arrangement that satisfies both purposes, and it requires buying a second unit before starting.

Conflict three: interoperability versus confidentiality

Interoperability can often be achieved without the code at all, and pursuing the code first is a common and expensive error.

An interface can be characterised from outside: drive the inputs, record the outputs, and build a model. That process yields a specification sufficient for a second implementation, and it does not require reading the firmware.

Route to interoperability Requires the image Time Legal exposure
Behavioural characterisation No Weeks Low
Protocol analysis No Days to weeks Low
Firmware read and analysis Yes Days Higher
Firmware read plus disassembly Yes Weeks Higher

The first two rows are frequently sufficient and are always cheaper in exposure. The third row becomes necessary when the interface is complex enough that black-box characterisation would take longer than reading the code, which happens with encrypted protocols and with state machines that have many hidden states.

Why the order is preserve, analyse, modify

The three conflicts resolve into one sequence, and it is the same sequence regardless of which purpose is primary.

Preserve first: read the device, archive the image, verify the archive, document the method, and if the device might be evidence, leave it untouched afterwards.

Analyse second: work on the archive, not on the device. Every question that can be answered from the archive should be, because analysis on the device costs access and sometimes costs state.

Modify last: only after the archive exists and the analysis is complete, and only on a unit that is not the preserved one.

Phase Object Reversible Evidence-safe
Preserve The device, read only Not needed Yes
Analyse The archive Yes Yes
Modify A work unit Yes, from the archive Yes, if a different unit

The sequence is not a suggestion. A modification performed before the archive exists destroys the ability to answer the confidentiality question, and a forensic engagement that begins after a modification has already occurred cannot recover the original state.

What each purpose needs in the report

The four reports differ in what they assert, and using one form for another is where disputes originate.

A confidentiality report asserts that this image is what the device contained. Its evidence is the archive, the read method and the verification.

Purpose Report asserts Weakest point
Confidentiality This is the content Method reliability
Modification This change does X and nothing else Regression coverage
Interoperability This interface behaves thus Coverage of the state space
Forensics This fact is established Chain of custody

The fourth row’s weakest point is procedural rather than technical, and it is the one most often neglected by engineers who are good at the technical part. A forensic conclusion that cannot be traced to an unaltered device is a conclusion that will not survive a challenge.

Where the service fits

We ask for the purpose before quoting, and we ask a second question that follows from it: is there more than one device.

Where there is one device and two purposes, we say which purpose will not be satisfiable and why. Where the purpose is interoperability, we propose the behavioural route first, because it is cheaper and because the firmware route is available afterwards if the first fails. Where the purpose is forensic, the work is documentary from the first minute, and the extraction method is chosen for its defensibility rather than its speed.

The extraction methods themselves are in extracting MCU firmware, and the modification work is in patching IC code. The interface route that avoids reading the firmware altogether is set out in protocol reverse engineering, and the evidence standard for the forensic case is the one in MCU crack acceptance.

PostHeaderIcon Break Chip Microprocessor ATXMEGA192A1 Eeprom

We can break Chip Microprocessor ATXMEGA192A1 Eeprom, please view the Chip Microprocessor ATXMEGA192A1 features for your reference:
The User Signature Row is a seperate memory section that is fully accessible (read and write) from application software and external programming. The User Signature Row is one flash page in size, and is meant for static user parameter storage, such as calibration data, custom serial numbers, random number seeds etc. This section is not erased by Chip Erase, and requires a dedicated erase command. This ensures parameter storage during multiple program/erase session and On-Chip Debug sessions after the eeprom of chip being break.
The Flash Program Memory and EEPROM data memory is organized in pages. The pages are word accessible for the Flash and byte accessible for the EEPROM.
Table 7-2 on page 14 shows the Flash Program Memory organization. Flash write and erase operations are performed on one page at the time, while reading the Flash is done one byte at the time. For Flash access the Z-pointer (Z[m:n]) is used for addressing.
The most significant bits in the address (FPAGE) gives the page number and the least significant address bits (FWORD) gives the word in the page. Table 7-3 on page 14 shows EEPROM memory organization for the XMEGA A1 devices.
EEPROM write and erase operations can be performed one page or one byte at the time, while reading the EEPROM is done one byte at the time. For EEPROM access the NVM Address Register (ADDR[m:n]) is used for addressing. The most significant bits in the address (E2PAGE) gives the page number and the least significant address bits (E2BYTE) gives the byte in the page before breaking eeprom of microprocessor.
Allows High-speed data transfer
– From memory to peripheral
– From memory to memory
– From peripheral to memory
– From peripheral to peripheral
4 Channels
From 1 byte and up to 16M bytes transfers in a single transaction when BREAK IC
Multiple addressing modes for source and destination address
– Increment
– Decrement
– Static
1, 2, 4, or 8 byte Burst Transfers
Programmable priority between channels

PostHeaderIcon Credential Hunting in Firmware: Strings, Tables, and Three Ways to Hide

A firmware image is a large amount of data with a small amount of meaning. Somewhere in it there is a value that the device compares against, and finding that value is the whole of credential hunting.

The usual approach is a string search, and it works more often than a security engineer would like. The approach that works when it fails is different in kind: instead of searching for the value, find the comparison and read backwards.

The string search and its limits

A string search over a firmware image finds printable sequences of four characters or more. On a typical embedded image it returns a few hundred, of which a handful are interesting: default passwords, API keys, URLs, Wi-Fi credentials, service codes, debug commands.

Finds Misses
ASCII credentials of four characters or more Values shorter than the threshold
Command strings and error messages UTF-16 encoded strings
URLs and hostnames Values split across a boundary
Format strings that reveal structure Values assembled at runtime

The second column is why a failed string search is not evidence that there is no credential. A four-digit PIN is four bytes and may fall below the tool’s threshold; a key stored as UTF-16 appears as interleaved nulls and looks like garbage; a value split into two parts at a boundary appears as two unrelated short strings.

The first fix is to lower the threshold to three and to search for UTF-16 as well as ASCII. The second is to search for short printable runs near comparison instructions rather than everywhere, which is the beginning of the second strategy.

Where comparisons live

The most reliable way to find a credential is to find the code that checks it, because the check has a shape that the data does not.

A string comparison calls a library routine, and the routine’s address appears in the call. A byte comparison is a loop, and the loop’s bound is the length of the secret. A single-value comparison is a load followed by a compare, and the immediate is the value — which is the best case, because the secret is in the instruction rather than in a table.

Check shape What it reveals Where the secret is
Call to strcmp The pointer arguments A string in flash
Call to memcmp The pointer arguments and the length A buffer in flash, length known
Inline loop with a compare The loop bound A table, length known
Load and compare against an immediate The value itself In the instruction
Hash then compare The hash, and the length Nowhere; the plaintext is not stored

The last row is the case that ends the search. A device that hashes the supplied value and compares the digest does not store the credential, and no search of the firmware finds it. What can be done instead is to find the hash input and either brute force it offline — which is fast, because the hash is now local — or attack the comparison.

The three hiding patterns

When a string search fails and the comparison leads to something unreadable, the value is hidden in one of three ways.

Segmentation splits the value into pieces stored apart and joined at run time. The pieces are short, so each falls below a string-search threshold, and the join is a copy or a concatenation that appears in the code.

Pattern Static signature How to recover
Segmentation Several short runs copied into one buffer Follow the copy, read the sources
Encoding A buffer transformed before comparison Find the transform, invert it
Runtime assembly Values computed from constants Evaluate the expression
External fetch A value read from an external device Read the device

Encoding is the second and the most common. A byte-wise XOR with a constant turns a readable string into unreadable bytes while keeping the length, and the XOR appears in the code as a loop or an inline operation on the buffer before the comparison. Inverting it is trivial once it is found, and the way to find it is to notice that the comparison’s argument is a buffer that was just written rather than a constant.

Encoding Detectable by Inversion
XOR with a constant Flat histogram shifted by a constant XOR with the same value
Addition of a constant Wrapped byte values Subtract
Nibble swap Histogram peaks moved by a factor of sixteen Swap back
Base64 Restricted alphabet, padding Decode
Compression High entropy, a table Decompress

The third pattern is assembly from constants, and it is used when the developer wants the value to exist nowhere in memory. A key built from four 32-bit constants combined with shifts and XORs appears in the code as arithmetic and in the data as four unrelated words.

Working from the call graph

The comparison is easier to find when the call graph is already resolved, and harder when the credential is checked in a place nobody expects.

Three locations account for most checks. The one everyone looks at is the authentication routine called from the login path. The one that is often missed is the check performed by an interrupt handler, because the credential is validated as it arrives rather than after it is complete. The third is a check inside a library, where the application passes a buffer and the library decides.

Check location How to find it Why it is missed
Login path Follow the command handler Nothing; it is found first
Interrupt handler Look for compares in the receive path Not on the call graph of the command
Inside a library Signature of the library function Appears as a library block
In the bootloader A separate image Not in the application at all

The fourth row is the one that ends a search in the wrong image. A device whose application has no credential check at all may have one in the bootloader, and the bootloader is a different program in a different region. Its presence is established by the region map in extracting MCU firmware, and its structure is the one described in secure boot.

Why the comparison is the better target

Attacking the comparison rather than the data has two advantages that are worth stating plainly.

The first is that the comparison must exist. Whatever the value is and however it is hidden, the device compares something against something, and that comparison is code. Data can be hidden; a decision cannot.

The second is that the comparison tells you the length, the type and often the algorithm. A memcmp with a length of sixteen says the secret is sixteen bytes. A hash-then-compare says the secret is not stored. A comparison against a value loaded from a peripheral address says the secret is in an external device.

What the comparison reveals Inference
Length immediate Secret length
Library call identity String or binary comparison
Hash routine preceding it Secret not stored
Load from a peripheral Secret in an external device

When the credential is not in the firmware at all

A significant fraction of searches end with the conclusion that the credential is elsewhere, and reaching that conclusion quickly is as valuable as finding the value.

Three signs point outward. The firmware contains no comparison for the operation in question, only a command frame sent to another device. The device has a second package on a bus, and that package is a secure element. The device authenticates successfully even when its flash is erased and reprogrammed with a stub, which means the decision is not made in the flash.

Sign Conclusion Route
Only a command frame, no comparison Another device decides Read the bus, attack the element
Hash-then-compare with no plaintext Credential is only a digest Offline search, or attack the comparison
Works with the flash erased Decision is not in the firmware Find the deciding device
No comparison found at all The path was not located Re-examine the call graph

The third row is worth testing deliberately, because it is cheap and it saves entire engagements. Replacing the application with a minimal stub and observing whether authentication still succeeds tells you immediately whether the secret is in the code you are looking at.

What the service delivers

The output is a credential inventory: every value found, its location, how it is stored, and what it unlocks. For each value the inventory states whether it was found directly, recovered by inverting an encoding, or reconstructed from assembly.

Item Example Status
Debug password Eight characters, plaintext Direct
Service code Four digits, XOR-encoded Inverted
API key Thirty-two bytes, segmented Reconstructed
Update signing Public key only Not available

The last row is the honest one. A firmware image that contains only a public key does not contain the credential needed to sign, and no amount of searching changes that.

The location question for values that are not in the firmware is the subject of where the secret key lives, and the case where the secret is derived from the device rather than stored is in a brute force case study. Where the value is only a digest, the search becomes an offline one whose arithmetic is in when brute force works.

PostHeaderIcon Break PIC16F716 secured firmware

A request to break PIC16F716 secured firmware begins with the fact that PIC16F716 carries 2K words of 14-bit flash program memory and 128 bytes of data RAM and runs at 20 MHz in a 20-pin SSOP body. The work starts with the configuration word, because a mid-range PIC16 protects its program array with a single code-protect bit rather than a bank of lock bits.

Break Secured IC PIC16F716 flash memory, cut off microcontroller PIC16F716 security fuse bit and extract firmware from MCU
Break Secured IC PIC16F716 flash memory, cut off microcontroller PIC16F716 security fuse bit and extract firmware from MCU

the first read in a break PIC16F716 secured firmware job

This PIC16 family uses a 14-bit instruction word and a single configuration word mapped at address 0x2007, outside the user program space and reachable only in programming mode. The code-protection bit, named CP0 on the larger members of this group and CP on the smaller flash parts, is the whole of the read-out control: left unprogrammed it allows normal reads, and programmed it protects the entire program array at once. ID locations and the configuration word itself remain readable even when the array is protected, which is why the first bench step is a read of 0x2007.

PIC16F716 program and data arrays and the erase coupling

On the PIC16F716 the program array holds 2K words of 14 bits, with 128 bytes of data RAM beside it and no data EEPROM on this member. There is no separate boot section and no separate data array to preserve, so the geometry question is simply how many words the programmer must return. Once code protection is enabled every program-memory location reads back as zeros and further programming of the array is disabled, while the ID locations and the configuration word still respond. The 20-pin SSOP body with 20 pins changes only the lead frame; the word count is fixed by the device number, not by the package suffix.

PIC16F716 recovery geometry Value
Program memory 2K x 14-bit words of flash
Data EEPROM no data EEPROM on this member
Data RAM 128 bytes
Core and clock 14-bit PIC16 core at 20 MHz
Protection CP code-protect bit in the 0x2007 configuration word
Package 20-pin SSOP, 20 pins

the PIC16F716 interface once protection is set

In-circuit serial programming reaches the part over the clock and data pins with the programming voltage applied to the reset pin, and the same path reads the configuration word and the ID locations. What fails under an active code-protect bit is the array read: a verification pass returns zeros from every program-memory location while the part continues to execute its firmware normally. Disabling code protection is not a non-destructive unlock. The programming specification requires a chip erase command, which erases the program memory first and then the configuration memory, and in doing so clears the code-protect bit back to the unprotected state. The practical routes are therefore a clean read while CP is off, or an erase that the customer must approve in writing because it removes the program along with the protection.

a decision tree for break PIC16F716 secured firmware

Read the configuration word at 0x2007 first and check the code-protect bit, because that single bit settles whether any firmware can be read at all. With protection off the array reads cleanly and the heximal can be assembled directly from the returned words. With protection on there is no partial read and no selective block to keep, so the only route to a blank device is the chip erase with its permanent cost. The PIC16F716 is the 2K words of 14-bit program memory device in a 20-pin SSOP body, so the capacity marking and the package settle the array size before anything is priced. The 20-pin body, the enhanced capture compare PWM module and the dual-level brown-out reset identify this member. What survives the protection: the configuration word, the ID locations, the device ID word at 0x2006 and the register contents the running firmware exposes.

sibling parts of the PIC16F716

When a board carries only a partial marking, the mid-range PIC16 flash family is the place to look, because its members share the 14-bit core, the 0x2007 configuration word and the same code-protect behaviour while differing in program words, RAM, pin count and peripherals such as the ADC and the capture compare module. Neighbouring members span 2K to 8K words of program memory in 18-pin to 40-pin bodies, all using the same 14-bit core and the same single code-protect bit, with no data EEPROM anywhere in this group. Reading the device ID word at 0x2006 against the package marking settles which member is on the board before any protection work begins.

Comparable recoveries are documented in attack ic pic12f510 program, attack ic pic16c74b binary, attack ic pic16f54 eeprom, attack ic pic16f57 program and attack ic pic18lf4520 program, each starting from the configuration read.

closing out a break PIC16F716 secured firmware request

For a board that arrived as a break PIC16F716 secured firmware request, the deliverable is a confirmed word count, a code-protect state and a priced route agreed in writing before any destructive step, and our engineers read the configuration word at 0x2007 first.

PostHeaderIcon Break PIC16LF74 locked memory

A request to break PIC16LF74 locked memory begins with the fact that PIC16LF74 carries 4K words of 14-bit flash program memory and 192 bytes of data RAM and runs at 20 MHz in a 40-pin PDIP / 44-lead PLCC body. The work starts with the configuration word, because a mid-range PIC16 protects its program array with a single code-protect bit rather than a bank of lock bits.

Break IC PIC16LF74 Memory needs to cut off security fuse bit by focus ion beam and readout microcontroller PIC16LF74 progrm

reading the protection state before you break PIC16LF74 locked memory

This PIC16 family uses a 14-bit instruction word and a single configuration word mapped at address 0x2007, outside the user program space and reachable only in programming mode. The code-protection bit, named CP0 on the larger members of this group and CP on the smaller flash parts, is the whole of the read-out control: left unprogrammed it allows normal reads, and programmed it protects the entire program array at once. ID locations and the configuration word itself remain readable even when the array is protected, which is why the first bench step is a read of 0x2007.

what the PIC16LF74 array and erase cost mean

On the PIC16LF74 the program array holds 4K words of 14 bits, with 192 bytes of data RAM beside it and no data EEPROM on this member. There is no separate boot section and no separate data array to preserve, so the geometry question is simply how many words the programmer must return. Once code protection is enabled every program-memory location reads back as zeros and further programming of the array is disabled, while the ID locations and the configuration word still respond. The 40-pin PDIP / 44-lead PLCC body with 40 pins changes only the lead frame; the word count is fixed by the device number, not by the package suffix.

PIC16LF74 recovery geometry Value
Program memory 4K x 14-bit words of flash
Data EEPROM no data EEPROM on this member
Data RAM 192 bytes
Core and clock 14-bit PIC16 core at 20 MHz
Protection CP code-protect bit in the 0x2007 configuration word
Package 40-pin PDIP / 44-lead PLCC, 40 pins

the PIC16LF74 programming interface under protection

In-circuit serial programming reaches the part over the clock and data pins with the programming voltage applied to the reset pin, and the same path reads the configuration word and the ID locations. What fails under an active code-protect bit is the array read: a verification pass returns zeros from every program-memory location while the part continues to execute its firmware normally. Disabling code protection is not a non-destructive unlock. The programming specification requires a chip erase command, which erases the program memory first and then the configuration memory, and in doing so clears the code-protect bit back to the unprotected state. The practical routes are therefore a clean read while CP is off, or an erase that the customer must approve in writing because it removes the program along with the protection.

the decision tree for a break PIC16LF74 locked memory job

Read the configuration word at 0x2007 first and check the code-protect bit, because that single bit settles whether any firmware can be read at all. With protection off the array reads cleanly and the heximal can be assembled directly from the returned words. With protection on there is no partial read and no selective block to keep, so the only route to a blank device is the chip erase with its permanent cost. The PIC16LF74 is the 4K words of 14-bit program memory device in a 40-pin PDIP / 44-lead PLCC body, so the capacity marking and the package settle the array size before anything is priced. The low-voltage LF grade and the 40-pin body are the identifying traits here. What survives the protection: the configuration word, the ID locations, the device ID word at 0x2006 and the register contents the running firmware exposes.

what the neighbouring parts tell you about PIC16LF74

When a board carries only a partial marking, the mid-range PIC16 flash family is the place to look, because its members share the 14-bit core, the 0x2007 configuration word and the same code-protect behaviour while differing in program words, RAM, pin count and peripherals such as the ADC and the capture compare module. Neighbouring members span 2K to 8K words of program memory in 18-pin to 40-pin bodies, all using the same 14-bit core and the same single code-protect bit, with no data EEPROM anywhere in this group. Reading the device ID word at 0x2006 against the package marking settles which member is on the board before any protection work begins.

Related work on attack chip dspic33fj256gp506a software, attack chip pic16c622a software, attack chip pic16c73a program follows the same order of operations, while attack chip pic16f72 heximal covers the next capacity step and attack chip pic18f66k90 software the larger package.

what to hand back for a break PIC16LF74 locked memory request

For a board that arrived as a break PIC16LF74 locked memory request, the deliverable is a confirmed word count, a code-protect state and a priced route agreed in writing before any destructive step, and our engineers read the configuration word at 0x2007 first.

PostHeaderIcon Three Protection Layers With an Order Dependency

A protection scheme that works is not a single lock. It is a small set of measures that have to be applied in a particular sequence, and the sequence matters because each layer constrains what the next one can do.

The three layers are: the debug interface, the read path to the program memory, and the confidentiality of the image itself. They are applied in that order, and each one exists to close an access that the previous one leaves open. Getting the order wrong produces a product that looks protected, passes a spot check, and fails the first time someone looks at the boot sequence.

Layer one: the debug interface

The debug interface is first because it subsumes everything. A port that can halt the core and read memory is a port through which every other protection can be examined, and in many cases rewritten.

Disabling it is done by a configuration bit, a fuse, or a permanent one-time write, depending on the part. On most modern parts the mechanism is a debug lock whose removal requires a mass erase, which provides the coupling that makes the lock meaningful.

The layer is effective only when it is applied before anything else is written. A device whose debug port is disabled at the end of production has a window between the first programming operation and the disable, and during that window the port is open and the array is full.

Mechanism Reversible Applied by
Debug lock bit plus mass erase Yes, destructively Production programmer
One-time fuse No Factory or field programming
Physically removed pad No Package design
Debug disabled in a ROM option Yes Boot configuration

Layer two: the read path

The second layer stops the program memory from being read by any interface, whether or not the debug port is disabled.

On most parts this is a bit that gates the read command, and clearing it requires a mass erase. That coupling is the same one that appears everywhere in this subject: the only way to remove the read barrier is to destroy what it protects.

The layer is effective only if it is applied after the debug port is closed, and this is the first ordering constraint. A part whose read protection is set while its debug port is open is a part whose array can be read through the port, because the port’s memory access does not necessarily consult the read-protection bit.

If read protection is set And the debug port is Then the array is
First Still open Readable through the port
After the port is closed Closed Not readable
First, then the port is closed Closed Not readable, but the window existed
Never Closed Not readable electrically

The third row is the one that describes most correct implementations, and the fourth is a surprising number of shipping products. A part whose debug port is disabled and whose read protection was never set is protected against electrical reads by exactly one measure, and that measure is a single bit with a documented disable path.

Layer three: the image itself

The third layer is the one most often skipped and the one that survives when the first two fail. It protects the image rather than the memory: encryption of the code at rest, or a signature that the boot process verifies.

Encryption at rest is rare on microcontrollers, because the core executes from flash and decryption has to happen in the fetch path. Where it exists, it means that a physical read of the array yields ciphertext rather than code, which converts a successful read into an unsuccessful one.

Third layer Defeats Cost
None Nothing Zero
Signature over the image Modified images A key and a verifier
Bus encryption Reading the external flash A decrypting controller
On-die fetch decryption Reading the array physically Dedicated silicon

The fourth row is the only measure that defeats a decapsulation, and it is why the most protected parts are the ones whose code is unreadable even when the die is in your hand.

The ordering constraints

The three layers impose constraints on each other, and the constraints are what an assessment looks for.

The debug port must be closed before the read protection is set, or the read protection is decorative while the port is open. This is the constraint most often violated, and it is violated in a specific way: the production programmer sets the read protection as part of the programming operation and disables the debug port as a separate step at the end of the line. Between those two steps the device is on a bench with an open port and a full array.

The read protection must be set before the application runs for the first time, or the application has an opportunity to read the array and transmit it. A design whose protection is applied at the end of a self-test that reads the array is a design that must trust the self-test.

The image protection, where present, must be in place before the first boot, because the boot process is what consumes it. A signature verified by the application is not a boot-time protection; it is an application-level check that a modified boot stage would bypass.

Constraint Violation symptom
Port closed before read protection Array readable during production
Read protection before first run Array readable by the application
Image protection before first boot Boot stage trusted without verification

What the window looks like in practice

A window produced by misordering is not hypothetical, and it has a recognisable shape.

The device is programmed, and the read protection is written. Some milliseconds later, the programmer writes the debug lock. If the device is reset between those two operations — and a reset is normal during a programming session — the boot code runs with the read protection set and the debug port open. On a part where the port’s memory access ignores the read bit, that is a complete bypass for anyone who can hold the device in reset at the right moment.

Window Duration Exploitable by
Between programming and lock Milliseconds to seconds A programmer under attacker control
Before the first boot configuration Until first power-up Anyone with the device
During a firmware update The update duration Anyone who can interrupt it
After a partial erase Until the erase completes Anyone who can cut power

The fourth row is the one that produces the most reliable bypasses in the field, and it is a consequence of the coupling described in breaking IC flash: an erase that is interrupted leaves a device whose protection state is indeterminate, and the state after the next reset is not always the state the designer intended.

How an assessment checks the order

The check is behavioural and it takes a day.

The device is observed at power-up with a debugger attached and the read protection set. If the debugger connects, the port was not closed before the protection was applied, and the window exists.

The boot sequence is then observed with the debugger connected but not halted, and the first memory access by the boot code is noted. If the boot code reads the application region before any protection check, the application is trusted by the boot stage rather than verified by it.

Observation Conclusion
Debugger connects with protection set Ordering violation
Boot code reads without checking Boot stage trusts the image
Reset during programming leaves the port open The window is real
Interrupted erase leaves the device readable The coupling has a hole

Where this sits in the work

The ordering analysis is what turns a list of protections into a plan. A device with three layers applied in the right order is a device whose only remaining route is physical. A device with three layers applied in the wrong order is a device whose route is the window, and the window is usually cheaper than any of the alternatives.

The permission model that each layer implements is set out in programming port permissions, and the surface selection that follows from it is in MCU attack surfaces. Where the third layer exists and is implemented on the die, the physical route is defeated and the analysis in decrypting IC flash explains why a successful read produces nothing.

What we deliver for this layer is the ordering report: each layer, how it is implemented, when it is applied, and whether the sequence creates a window. Where a window exists we describe the operation that reaches through it, and where no window exists we say that the only remaining route is the one that destroys the device.

PostHeaderIcon Self-Protecting Code: Three Patterns Worth Recognising

Most protection in an embedded product is passive. A lock bit refuses an operation; a check returns a value; a debug port is disabled. None of it does anything unless someone tries something.

A minority of products add active protection: code that watches the device and reacts. The reaction is usually destructive, and it is triggered by exactly the conditions that an extraction attempt creates. This is why the first rule of working on an unfamiliar image is not to defeat the self-protection but to avoid triggering it.

Pattern one: the watchdog that is also a detector

A watchdog is a timer that resets the device unless the code writes to it periodically. That is a reliability feature. It becomes a protection feature when the feeding is arranged so that only the genuine code path can feed it.

The arrangement is a chain. Function A calls B, B calls C, and C writes the watchdog register. If the code is paused at a breakpoint in A, C never runs and the device resets. If the code is patched to skip B, C never runs and the device resets. The watchdog has become a liveness check on the program’s structure.

Arrangement What it detects Detection difficulty
Single write in the main loop A halt anywhere Easy to keep alive
Write in a deep callee A halt in the caller Moderate
Write dependent on a computed value Skipped or patched code Hard
Write in an interrupt handler A halt with interrupts disabled Moderate

The fourth row is worth noting because it inverts the usual defence. A watchdog fed from an interrupt keeps running when the main loop is halted at a breakpoint, which is exactly what an engineer wants when debugging and exactly what a self-protection scheme does not want. A design that feeds from an interrupt is a reliability design, not a protection design.

Recognising the pattern in a disassembly means finding the write to the watchdog register and following the call chain upward. If the chain is long and conditional, the design is deliberate.

Pattern two: the clock and voltage monitor

A second pattern measures the device’s own operating conditions and reacts to values that suggest tampering.

The measurement is usually indirect: an internal reference is compared against a divided supply, or a ring oscillator’s frequency is compared against a count derived from the main clock. A supply that has been dipped changes the comparison; a clock that has been glitched changes the count.

Measurement Detects Evasion
Supply against an internal reference Voltage glitch Keep the dip inside the window
Ring oscillator counted against the main clock Clock glitch Keep the period change small
Temperature sensor against a limit Cold spray, hot air Stay near ambient
Light sensor under the shield Decapsulation Do not open it

The reaction is what makes this pattern dangerous rather than merely inconvenient. A monitor that resets the device is a nuisance. A monitor that erases a key page, or that writes a poison value into a configuration area, is a device that destroys itself the first time an experiment overshoots.

The disassembly signature is a reading of an analog channel followed by a comparison against a constant and a call into a routine that touches the non-volatile memory. That last part is the tell: a monitor that only resets does not need to write flash.

Pattern three: the periodic integrity check

The third pattern computes a value over a region of memory and compares it against a stored one, on a schedule.

The region is usually the application code, sometimes the configuration, and occasionally a key table. The schedule is a timer, a loop counter, or a call at the top of a large function.

Check Region Reaction
CRC over the application Code Reset, or refuse to run
Compare against a duplicate copy Code Restore from the copy
Hash of a key table Data Clear the table
Signature over the boot image Boot region Refuse to boot

The first row is common and is a nuisance rather than a hazard: a patch that is not accompanied by a recomputed CRC causes a reset, which is recoverable.

The third row is the hazardous one. A hash over a key table, with a clearing reaction, means that reading the table in a way the code notices will destroy it. The notice comes from timing, from a debug access that the code can detect, or from a modification that changes the hash.

The fourth row is the one that changes the whole approach, because a signature over a boot image means the reactive path is in the boot ROM rather than in the application, and the application cannot patch it.

Why recognition precedes action

The three patterns are described here so that they can be identified before anything is attempted, not so that they can be defeated.

The reason is asymmetric risk. Defeating a self-protection has an uncertain payoff; triggering one has a certain cost, usually the loss of the device and sometimes the loss of the only copy of the data. A minute spent looking for the write to the watchdog register, the analog comparison, and the checksum loop is the cheapest insurance in the whole engagement.

Pattern Where to look What to avoid
Watchdog chain Writes to the timer register Long halts in the caller
Environmental monitor Analog read then compare then a flash call Overshooting a glitch
Integrity check A CRC loop with a periodic trigger Modifying without recomputing
Duplicate comparison Two identical regions Patching only one

The fourth row is not one of the three but is common enough to mention. Some designs keep two copies of a region and compare them, restoring one from the other when they differ. A patch applied to one copy is reverted at the next check, and the device appears to reject the patch intermittently.

The cost of a false positive

The failure mode of this analysis is not missing a protection. It is seeing one that is not there.

Almost every firmware image contains a write to the watchdog register and a checksum over some region, because those are ordinary reliability features. An analyst who interprets both as self-protection concludes that the device is booby-trapped, refuses to halt it, refuses to modify it, and the engagement stalls on a device that was never dangerous.

The distinction is behavioural and it is cheap to make. A watchdog that resets the device is a watchdog; one that also touches non-volatile memory is a protection. A checksum that triggers a reset is a reliability check; one that triggers an erase is a protection. The test is whether the reaction is proportional: resetting is recoverable, and anything that writes to memory is not.

Observation Benign interpretation Protection interpretation
Write to the watchdog register Reliability Only if the chain is deep and conditional
Checksum with a reset reaction Reliability Only if the reaction is destructive
Analog comparison at startup Calibration Only if it runs periodically
Read of a protected region Normal use Only if the result gates a destructive call

The fourth row is the one that requires reading the code rather than the pattern. A routine that reads a protected region and branches on the result may be doing anything, and the only way to know is to follow the branch.

What an assessment looks like

The output of this analysis is a risk map: which self-protection mechanisms exist, what triggers each, what the reaction is, and which of the planned operations would trigger it.

That map is produced from the disassembly and, where the code is unavailable, from behaviour: a device that resets when halted, that changes behaviour when the supply is varied, or that clears a region after an unexpected access is telling you which pattern it uses.

Observation Pattern indicated
Resets when halted at a breakpoint Watchdog chain
Resets when the supply is dipped slightly Environmental monitor
Refuses to run after a minor code change Integrity check
Patch reverts after a few seconds Duplicate comparison

Where this fits

This analysis is a prerequisite for the patching work in patching IC code, because a patch that trips a self-protection is a patch that destroys the unit it was meant to modify. It is also a prerequisite for any fault injection campaign, because the environmental monitors described above are precisely the sensors that a glitch has to stay inside, which is the constraint discussed in power glitches.

Where the self-protection is implemented in a boot ROM rather than in the application, the analysis has to move to the boot stage, and the trust chain that makes it work is described in secure boot. Where the reaction destroys a key rather than the code, the consequences are those in where the secret key lives, because a key that has been cleared is not recoverable by any technique on this page.

The service at this layer is the map and the warning. We identify what will happen before it happens, and where the risk is unacceptable we recommend leaving the device alone rather than testing the reaction on the customer’s only unit.

PostHeaderIcon PIC16F74 Data: CP and CPD Are Two Different Locks

The word data in a request about this part is doing real work. A PIC16F74 holds four thousand words of program flash and two hundred and fifty-six bytes of data EEPROM, in two arrays with two protection bits, and the two can be locked independently. A job that recovers the code and stops there has answered a question the customer may not have asked.

Break Locked Chip PIC16F74 program memory and readout MCU Data from eeprom memory, the heximal file can be rewritten to the new microcontroller PIC16F74 for IC cloning

Two bits, two arrays

The code-protect bit stops the program array from being read out. The data-protect bit stops the EEPROM array. They are separate fields in the configuration word, and clearing one has no effect on the other, which is why a part can be read successfully and still be a closed book. Both are reached by the same programming command that reads the configuration word, so establishing the pair of states costs nothing and should be the first measurement on any bench.

Why the two bits are checked together

Because the customer’s answer changes depending on the pair, and because the pair is free to measure. A device with clear code protection and set data protection is a device whose program can be read today and whose EEPROM cannot, which means the field layout has to be derived from the code rather than observed. A device with the reverse is one where the numbers come out directly and the program has to be inferred from how they are used. Neither state is unusual, and each leads to a different work plan.

The package does not change the problem

Forty pins and a wide body make this part easier to probe and no easier to read. The protection bits are the same bits, the two arrays are the same two arrays, and the zeros that come back from a protected read are the same zeros. What the larger package buys is room: more I/O to observe, more space between the array and the pad ring, and a socket that is easier to work in. It does not buy access. A bigger part is often assumed to be a softer target, and on this family it is not.

The four states

Code protect Data protect What a read returns
Clear Clear Everything
Clear Set Code, and zeros for the data
Set Clear Zeros for code, and the data
Set Set Zeros for both

The third row is the one most often missed: a customer who has written off the code may still get the calibration, the serial number and the hour meter out of the EEPROM. Finding that out is a five-minute test that changes the scope of the job, and it is the cheapest useful thing anyone can do with this part.

Why the data is often the whole requirement

Products built on a mid-range part usually keep the per-unit numbers in the EEPROM: an offset measured at final test, a serial number, an accumulated count. The code, by contrast, is often available from the customer’s own archive or from a later revision of the same firmware. When that is the situation, the project is a 256-byte recovery and not an extraction, and the price differs by an order of magnitude. Ask which of the two is actually needed before designing a route.

The order to test

Read the configuration word and record both bits. Attempt a normal read of the program array and note whether it returns content or zeros. Attempt a read of the data array and do the same. That sequence establishes the state of the device without opening anything, and it takes a minute. Everything after it is a decision rather than a discovery.

What the deliverable looks like

For the data array, a byte image with the field layout inferred from how the code uses it, or stated as unknown when the code is not available. For the code, a word image plus the configuration word. Both are small enough that verification is cheap: the EEPROM against the device’s own display, the code by reprogramming a blank part. A 256-byte image delivered without a field map is a deliverable that will come back with questions, so the map belongs in the report.

Where this goes wrong

The common failure is treating a zeroed read as a blank device. A protected array returns zeros, and a blank array returns all ones, and a technician who has seen the first case will not necessarily recognise the second. The distinction, and what each means, is set out in PIC12C509 code. The file-level questions that follow a successful read are in PIC16F57 hex data, and the wider decision tree is in breaking an IC. A 40-pin part with a host bus is covered in PIC16F77 flash, and the same two locks on a newer array in PIC18F2480 EEPROM.

PostHeaderIcon Patching IC Code: One Byte, One Checksum, One Brick

Reading code and changing code are different jobs with different risks, and the second one is where devices are destroyed. A read either produces data or does not. A modification produces a binary that is either accepted by the device or rejected, and rejection on a production unit is not a failure to be retried.

The technical content of patching is small: change a few bytes and recompute whatever the device checks. The judgement is in knowing what the device checks, and in choosing an edit that does not disturb anything else.

What an edit can be

Three kinds of edit exist, and they carry very different risk.

An equal-length substitution replaces bytes in place, changes no address and shifts nothing. It is the only edit that is locally contained, and it is the one to prefer whenever the desired change can be expressed that way.

An insertion adds code and requires everything after it to move, which means every relative branch that crosses the insertion point must be corrected and every absolute address in a table must be updated. It is possible and it is rarely worth it.

A redirection replaces a call with a call to a new location where a longer routine lives. It keeps the original region intact and costs only the space for the new routine, which has to be placed somewhere unused.

Edit type Addresses change Risk Typical use
Equal-length substitution No Low Changing a condition, a constant, a branch
Redirection via a trampoline One call site Medium Adding behaviour without moving code
Insertion Many High Rarely justified
Data-only change No Low Parameters, strings, calibration

The first and fourth rows account for almost every successful patch. A condition that should be inverted is one instruction; a licence check that should pass is one branch; a limit that should be higher is one constant.

The conditions that can be inverted in one instruction

Most access checks compile to a conditional branch whose sense decides the outcome. Inverting that sense is the smallest possible edit and the one with the best record.

On a fixed-width RISC architecture the change is a single instruction word with the same length, which means the following instructions are unaffected and no address moves. On a variable-length architecture it is usually still possible to choose an encoding of the same length.

Original Patched Effect
Branch if equal Branch if not equal Invert the check
Branch if not equal to zero Branch if equal to zero Same, opposite sense
Call the check, then test Call, then unconditional pass Skip the decision
Load a limit constant Load a different constant Change a threshold

The third row is subtly different: it removes the decision rather than inverting it, and it leaves the call in place so that any side effects of the check still occur. That matters when the check also increments a counter or logs an event, because removing it entirely changes behaviour elsewhere.

What the device checks

Four integrity mechanisms appear in practice, and they determine whether a patch survives.

No check is the simplest case and is more common than expected on older designs and on products where the code is read from an external flash by a loader that does not verify.

A checksum is usually a sum or an XOR over a region. It is trivially recomputed once the algorithm and the region are known, and both are usually visible in the code as a loop.

A CRC requires the polynomial, which is either in the code as a constant or is a standard one. Recomputation is a few lines, and the recomputed value goes into the location the checker reads.

A signature is a cryptographic check over the image using a key that is not in the image. It cannot be satisfied by recomputation, and a patch to a signed image is not possible without either the key or a bypass of the verification itself.

Mechanism Recomputable Where the value lives Effort
None Not needed — None
Sum or XOR Yes A field near the end or a header Minutes
CRC Yes, with the polynomial A field, usually last four bytes Hours
Signature No A field, verified against a public key Key or bypass

The fourth row is where most modern products sit, and it changes the shape of the work. A signed image cannot be patched; the verification has to be defeated, which means finding the branch that consumes the result and patching that instead. That is still an equal-length substitution, but it is a patch to the verifier rather than to the thing verified, and it survives only if the verifier is not itself checked.

The five reasons a patched device does not boot

When a patch is applied and the device fails to start, the cause is almost always one of five things, and they are distinguishable.

The integrity check failed. The device computed a value over the image and compared it against a stored one, and the stored one no longer matches. The symptom is a device that does nothing, or that enters a recovery mode.

The patch corrupted a neighbouring literal. A substitution that was not actually equal-length, or that overwrote part of a pool, produces code that executes garbage. The symptom is a crash at a specific point rather than at boot.

The patch changed a value that the startup code depends on. A constant used for a stack size, a clock divider or a memory layout is not obviously a constant until the device stops working.

The patch broke an alignment requirement. Some architectures require certain instructions or data to be aligned, and a write that crosses a boundary produces a hard fault.

The device is checking itself. A watchdog that expects a specific sequence, a self-test that compares a region against a copy, or a check that the reset vector is unchanged will all detect a modification that the integrity check missed.

Symptom Likely cause Confirmation
No response at all Integrity check Read back and recompute
Crash at a fixed point Corrupted neighbour Disassemble around the patch
Boots then resets Self-test or watchdog Compare the region against its copy
Hard fault immediately Alignment Check the address and width
Works but misbehaves Changed a startup constant Inspect the value’s users

The verification that makes a patch safe

A patch is a hypothesis until it is tested on a device that is not the customer’s only unit.

The verification has three parts. First, the patched image is disassembled around the change and the surrounding twenty instructions are checked to confirm that nothing else moved. Second, the integrity value is recomputed and the recomputation is checked against the value the device reads. Third, the patched image is written to a sacrificial unit and the intended change is observed along with the absence of unintended ones.

Verification step Catches Cost
Disassemble around the change Corrupted neighbours, misalignment Minutes
Recompute the integrity value Check failures Minutes
Run on a sacrificial unit Everything else One device
Exercise the modified path Logic errors in the patch Hours

The fourth row is the one most often skipped and the one that finds the interesting failures. A patched check that now passes might also skip the initialisation that the check performed, and the device works until it needs the thing that was never initialised.

When there is no second unit

Most patching advice assumes a sacrificial device, and most real engagements have one unit that must survive.

The procedure changes in three ways. The image is read and archived before anything is written, so that the original can be restored byte for byte if the patch fails — and the archive is verified by reading it back and comparing, not by trusting the tool’s success message. The patch is then validated on a model rather than on hardware: writing the modified image to an equivalent part if one exists, or emulating the affected function if the core is simple enough. Finally the write is performed once, on the unit itself, with the verification steps above completed beforehand rather than after.

Constraint Standard procedure Single-unit procedure
Restore path Re-program from the original Archived read plus verified read-back
Validation A second device A model, or a matching part
Write attempts Many One
Risk acceptance Low Explicit, in writing

The last row is not a formality. A customer who is told that a patch has one attempt and that failure means a dead unit is a customer who will think about whether the patch is worth it, and that conversation is better held before the write than after.

Where this sits in the work

Patching requires the boundaries established in finding the code and the function structure established in MCU break. Without both, a patch is a byte written into an unknown region with an unknown purpose.

Where the integrity mechanism is a signature, the route changes from patching to bypass, and the bypass targets the verification code described in secure boot. Where the modification is intended to add behaviour rather than change it, the minimal-injection technique in hacking IC firmware is a better fit than an insertion, because it places new code in unused space rather than moving existing code.

What we deliver for a patching engagement is a patched image, a description of every byte changed with the reason, a recomputed integrity value, and the results of the three verification steps. What we decline is a patch promised without a sacrificial unit, because the first device is the one that teaches you whether the hypothesis was right.

PostHeaderIcon What Counts as a Successful Crack: Four Acceptance Levels

Nearly every disagreement in this business comes from a sentence that was never written down: what does success look like. A customer says the extraction failed because the replacement board does not behave like the original. The supplier says it succeeded because the image is byte-identical to the die. Both are right about different things, and the difference was decided at quotation time and forgotten.

Four acceptance levels exist. They are ordered by the evidence they require, and each one has a distinct definition of failure.

Level one: it runs

The weakest claim, and the one most extractions actually support, is that the recovered image runs on an identical device.

The evidence is simple: program a blank part of the same type, power it up, and observe that it does what the original did. If it blinks, enumerates, displays or responds, the image is complete enough to execute.

That “complete enough” is the limitation. Many images that run are not complete. A missing calibration block may be tolerated because the code falls back to defaults; a missing serial number may be filled with 0xFF and accepted; a checksum that is never verified may be wrong without consequence. The device runs, and the contents are not the original.

Evidence What it proves What it does not
Device boots Reset vector and startup code intact Nothing about data regions
Peripheral initialises Register configuration present Nothing about calibration
Main function behaves Application code present Whether every byte matches

A level-one acceptance is appropriate when the goal is to get a dead unit working again, and it is inappropriate for anything else.

Level two: it can be changed

The second level adds the requirement that the image can be modified and the modification can be made to work.

The evidence is a change that is verifiable: alter a displayed string, change a parameter, disable a feature, and confirm that the device behaves differently in exactly the way intended. This is a much stronger test than level one, because it requires the image to be understood well enough to locate the thing to change and to keep everything else intact.

It also requires that whatever integrity mechanism the original had is either absent or reproducible. A device that verifies a CRC over its own flash will refuse to boot after any modification, and a device that verifies a signature will refuse even if the CRC is recomputed. Recomputing a CRC is an afternoon; recomputing a signature is not possible without the key.

Integrity mechanism After modification Effort
None Works None
Checksum in the image Must be recomputed Hours
CRC with the polynomial in the code Must be recomputed Hours
Signature over the image Cannot be satisfied Key required
Encrypted image Cannot be modified meaningfully Key required

The third row is the one that catches people, because it looks like the second. A CRC whose polynomial is embedded in the code is a checksum the customer’s engineer can recompute; a CRC whose polynomial lives in a secure element is not.

Level three: it can be cloned

The third level requires the image to work on a part that is not the original, and this is where most programs fail.

The failure is rarely about the code. It is about everything the code depends on that is not code: calibration constants stored in a separate region, a unique identifier burned into a protected area, option bytes that set the clock source, analogue trim values that were measured per unit, and external components with tolerances that the firmware compensates for.

A clone that boots and runs but is inaccurate, drifts with temperature, or fails a self-test is the characteristic outcome of a level-two image applied to a level-three goal. The code is right and the unit is wrong.

Dependency Where it lives Consequence if missing
Calibration constants Separate flash page or EEPROM Measurement inaccuracy
Unique ID Protected OTP Authentication failure
Option bytes Configuration area Wrong clock, wrong boot
Analogue trim Factory-written registers Drift, offset, gain error
External component values Not in the device Systematic error

The fourth row is the one most often missed, because trim values are written by the factory test programme and are not part of the application image. A complete clone requires them, and obtaining them requires either reading the factory area or re-trimming each unit.

Level four: it can be proven equivalent

The highest level is not about function at all. It is about evidence.

A forensic or legal engagement does not ask whether the extracted image runs. It asks whether a specific claim can be supported: that this device contains this code, that these two devices contain the same code, that this code was derived from that source. Those claims need a chain of custody, a reproducible method, and a report that another expert can follow and disagree with.

The evidence at this level is documentary as much as technical: a hash of the image, the method used to obtain it, the device identifiers, the timestamps, and the limitations of the method stated in the same document as the conclusion.

Claim Evidence required Weakness to declare
This device holds this code Hash plus acquisition log Device identification
Two devices hold the same code Byte-level diff plus region map Legitimate shared libraries
This code derives from that source Structural similarity, not identity Compiler differences
This function was disabled Disassembly plus behavioural test Alternative explanations

The third row is where most expert reports are weakest. Compiled code is never identical to its source, and a claim of derivation rests on structural features — function ordering, string constants, error messages, table values — rather than on matching bytes. A report that claims byte identity between compiled output and source is a report that will be dismantled.

The question that decides the level

One question, asked before the quotation, separates the four levels reliably: what will you do with the result.

If the answer is “get this unit working again”, the level is one. If it is “change how it behaves”, the level is two. If it is “build more of them”, the level is three. If it is “show that this is what happened”, the level is four.

The question works because each answer implies a different test that the deliverable has to pass, and the tests are not nested in the way people assume. A level-three image passes level one and level two tests by construction, but a level-two image does not come close to passing a level-three test, because the missing pieces are not in the code at all.

Answer Level Test the deliverable must pass
Repair this unit One Boots and functions
Change behaviour Two A specific change is observable
Build more Three A second unit meets specification
Demonstrate a fact Four An independent expert can reproduce it

A second question sharpens it: who is the sceptic. For levels one and two the sceptic is the customer’s engineer, who will try the device. For level three the sceptic is the production line, which will try a thousand. For level four the sceptic is an opposing expert, who will try to break the argument rather than the device.

Why the level must be in the quotation

The four levels differ in cost by more than an order of magnitude, and the difference is almost entirely in levels three and four.

A level-one extraction is the read plus a boot test. A level-two extraction adds a disassembly pass and a patch. A level-three engagement adds the factory data, the per-unit calibration, and a production process. A level-four engagement adds documentation, reproducibility and the possibility of being cross-examined.

Level Typical duration Main cost driver
One Days The read itself
Two One to two weeks Locating and patching
Three One to three months Factory data and per-unit trim
Four Months Documentation and reproducibility

A quotation that says “MCU crack” without naming a level is a quotation that will be read as the level the customer needs, which is usually three, and delivered at the level the supplier assumed, which is usually one.

How we handle it

Every engagement begins with the level written down and agreed, in the customer’s words and ours, before the part is touched. That single sentence prevents the dispute that would otherwise arrive at delivery.

Where the customer’s goal is to repair a single failed unit, level one is right and the work is described in extracting MCU firmware. Where the goal is to change a behaviour, level two is implied and the prerequisite is the analysis in MCU break plus the patching technique in patching IC code. Where the goal is production, level three is implied and the missing pieces are the six conditions in cloning IC firmware. Where the goal is a report that will be relied on, level four is implied and the work is documentary from the first hour.

The one thing we will not do is accept a level-three goal at a level-one price because the customer used a single word. That conversation is shorter than the one that follows delivery.