PostHeaderIcon Break MCU: Four Different Deliverables Hiding Behind One Verb

A request that begins with “we need this MCU broken” almost never means one thing. In practice it means one of four things, and the four are not points on a scale of difficulty. They are different products. Two of them are compatible with each other. Two of them are mutually exclusive with almost everything else. The reason this matters commercially is that the phrase “break MCU” is quoted as if it were a single line item, and the misunderstanding only surfaces after the sample has been opened.

The four outcomes are: a raw bit image of the memory, a loadable image that will run on a replacement part, a maintainable engineering project that can be edited and rebuilt, and a written behavioural specification of what the device does. A fifth outcome, a working clone, is sometimes implied but is a manufacturing problem rather than an extraction problem. Sorting a request into one of these four before touching the part is the entire discipline.

The four outcomes and what each one consumes

Deliverable What the customer receives What it costs irreversibly
Raw bit image A binary or hex file, no interpretation The protection state of the sample, often the sample itself
Loadable image A file that programs a blank part and boots The sample, plus any calibration unique to it
Engineering project Disassembly, recovered structure, buildable source The sample, plus weeks of interpretation
Behavioural specification Timing, protocols, state transitions, no code Usually nothing; often obtainable without opening the part

The right-hand column is the part nobody asks about at quotation time. A raw image and a loadable image are close relatives: both come from the same read, and the difference is whether the address map and the configuration bytes were captured along with the code. An engineering project starts from either of those and adds interpretation, which is where the schedule goes. A behavioural specification may require none of the above and can sometimes be produced from a logic analyser and a bench full of stimulus.

Why “unlock” and “read out” cannot both be satisfied

The single most common impossible request is to remove the protection and keep the contents. On most flash-based microcontrollers, the protection is stored in the same non-volatile block as the code, and the only primitive that clears it is a full erase. The erase is not selective. It clears the lock and the code in one operation, because both are the same kind of cell.

This is not a vendor trick. It is what the silicon can do. A protection bit that could be cleared without disturbing its neighbours would be a protection bit an attacker could clear, which defeats its purpose. So the design choice is forced: either the lock survives an erase, or the erase takes everything.

Once that is understood, the request decomposes. If the customer needs the code, the route is a read that was never authorised by the lock — a physical or side-channel route. If the customer needs a working unlocked part, the route is an erase, and the code is gone by definition. Restoring embedded information covers what can still be salvaged in the second case, which is more than most people expect but never includes the original program.

Identity before method

Every method choice depends on facts that are settled before any tool is connected. Whether the die is flash, OTP or mask ROM changes everything: mask ROM has no erase primitive at all, so the “unlock” conversation does not apply. Whether the package is plastic or ceramic changes the physical route. Whether the part is a genuine device or a remarked clone changes what the read even means.

Question Why it decides the method
Flash, OTP or mask ROM? Only flash has an erase path; OTP and mask are read-only by construction
Protection in the array or in a separate fuse block? Separate fuses can sometimes be isolated; in-array bits cannot
Debug port disabled or merely unprotected? A disabled port may still respond to a specific entry sequence
Single die or stacked package? Stacked packages change which surface is reachable

A wrong answer to the first row sends the whole project down a road that does not exist. This is why a competent first response to “break MCU” is a set of questions about the part number, the package marking and the failure mode, not a price.

The read is not the deliverable

A read that produces bytes has proved almost nothing. The bytes must be shown to be a coherent image: a vector table at a plausible address, a stack pointer that points into RAM, checksums that close, strings that decode, and code that disassembles into a plausible instruction mix rather than noise. An image that fails these tests is either a partial read, a read through a protection mechanism that returns a decoy pattern, or a read of the wrong address window.

The decoy case deserves emphasis. Some devices return all zeros or all ones when a protected region is read, and a naive pipeline will happily write that out as a file. A file of uniform bytes is not evidence of an empty device. It is evidence that the read was refused, and the refusal looks exactly like data unless somebody checks.

Where interpretation starts

The jump from a loadable image to an engineering project is the point where the work stops being extraction and becomes analysis. Tools can produce a disassembly in minutes. Producing something a firmware engineer can maintain takes longer, because the losses are structural: register allocation is gone, inlined functions have no call site, macros have been expanded, and the optimiser has reordered blocks. Cracking microcontroller source code sets out those four losses and what can be reconstructed around them.

The honest framing is that the deliverable is a reconstruction, not a recovery. It will compile, it will behave, and it will not be the original file. Projects that expect the original file are projects that will be disappointed at delivery, no matter how well the work was done.

Matching the route to the family

Different families fail in different places, and the failure mode is the most useful thing to know before starting. On Microchip’s 8-bit parts the decisive interaction is between row erase and the code protect bit, which is covered in attacking Microchip MCU firmware. On ARM parts it is usually the debug authentication rather than the flash lock. On CPLD and FPGA the object being read is a configuration pattern rather than a program, and the vocabulary of “firmware” starts to mislead.

A single intake form that records family, package, protection state, observed behaviour and the required deliverable will route a request correctly in most cases. The same form filled in badly produces a quotation that cannot be honoured. Where the chosen route is the classic one of isolating the protection structure on the die, MCU break describes that procedure in the narrow sense the phrase originally carried.

Services at this boundary

Work in this area covers session readout where the port still answers, physical extraction where it does not, image validation before delivery, and reconstruction of a buildable project from a validated image. It does not cover recovering contents that a full erase has already destroyed, and it does not cover clearing a protection bit while preserving the data it protected, because on the parts where that matters the two share the same cells.

The useful conversation is therefore short: what is the part, what state is it in, and which of the four deliverables does the project need. Everything else follows from those three answers.

Comments are closed.