PostHeaderIcon Clone Protected STM32G474VET6 Binary: LQFP100 512 KB Copy

The STM32G474VET6 is the largest part in this batch, a 100-lead LQFP100 with 512 KB of dual-bank flash organised as two 256 KB banks with the HRTIM high-resolution timer and the full G4 digital-power periphery. To clone protected STM32G474VET6 binary you treat the device as two coordinated images rather than one flat file.

The dual-bank layout

The same discipline is used in our firmware clone process, where a dual-bank part is captured bank by bank rather than as one linear span. The read-while-write feature lets the firmware update one bank while running from the other, so the live image can be a mix of old and new blocks depending on where the boot selector points.

Capturing each bank

With readout protection at level 1 the SWD and bootloader doors are closed, but each bank is recoverable once the security check is passed. The STM32G474VET6 image is read bank by bank and checksummed, with the 1 KB OTP and the option bytes taken alongside so the bank mapping and the lock state are both recorded.

Capturing only the bank that happened to be active gives you half a product, which is exactly the failure that a flat linear read produces. We therefore read both, note the boot configuration, and record which bank held the live code at the moment of capture.

Where the protection sits

The readout protection on the STM32G474VET6 lives in the option bytes and is sampled at reset by the flash controller. Level 0 is open, level 1 blocks SWD and bootloader reads of main flash, and level 2 is permanent. Regressing level 1 to 0 erases both banks, so the unlock must never be the path.

Our notes on flash protection methods explain why these gates are treated as data to be carried rather than obstacles to be removed. It typically holds a boot locator or a small validation routine that the rest of the firmware trusts, and a read that walks only the visible array misses it entirely. The setting lives in the option bytes, so capturing those alongside the array is what makes the hidden slice appear in the recovered image.

The package route when sealed

When a level-two seal is suspected, the LQFP100 is chemically decapsulated while the die remains electrically live, then the image is restored by optical fault injection at the boot security check or by microprobing. The opening is documented on our silicon package decapsulation page, and the STM32G474VCT6 source break in this batch uses the same route for the smaller 256 KB part.

The compound is removed in stages and the last step is taken back to the silicon face, leaving the bond pads and the lead frame untouched, so the part can still be powered and interrogated while it is open. The die stays attached to the board throughout, which is the condition that makes a timed fault possible: the security decision happens in the first instants after reset.

Bank Read at RDP 1 After decap In clone
Bank 1 256 KB no yes yes
Bank 2 256 KB no yes yes
OTP 1 KB no yes yes
Option bytes read-only yes yes

Stitching the copy

The two bank images are re-assembled in the order the boot selector expects, and the HRTIM timing tables and analog setup are placed against the constants that calibrate them. The result is written to a blank STM32G474VET6 and checked for a clean boot, then compared block by block against the original capture.

A flash recovery pass confirms the stitched image is whole before anything is written to the blank part. The banks follow in the order the boot selector expects, then the OTP contents are written where they were readable. Verification is not a single comparison: the flash is checksummed against the source capture, the option bytes are read back, and a boot test confirms that the same code path runs on the replacement as on the original.

What the client receives

The client receives the complete STM32G474VET6 binary image across both banks, the option bytes and OTP, a disassembly-based source reconstruction where useful, and a verification report confirming the clone boots. The decapped part is returned in a sealed carrier so the open die is not disturbed in transit.

Comments are closed.