PostHeaderIcon Clone Protective GD32F303ZET6 Code: Past Active Anti-Debug

The GD32F303ZET6 is the 144-pin member with 512 KB of flash, and the parts we see locked at this size are usually finished products with active defences, not just a static option-byte lock. It is the part where active defence becomes the rule rather than the exception, and where a clone that merely copies bytes is guaranteed to fail on first boot. To clone the protective GD32F303ZET6 code you defeat those live measures as well as the level-1 read lock, then build an image a blank part will run, with the protection removed so the clone is useful rather than self-defeating.

Active protection is different from a lock

The SPC level is a passive gate: it either opens the flash or it does not. Active protection is code that runs to keep you out — a watchdog armed in the first milliseconds, a debug-disable written early, a checksum that resets the part if the image changes, or a routine that senses a halted core. None of these stop extraction, but each defeats a naive clone that simply copies bytes, because the copy would trip the trap on first boot and hand you a part that resets forever.

Reading past the live traps

The image is pulled by early-boot fault injection, the same method used across the line, verified in blocks. The 144-pin body fixtures firmly and the 512 KB gives the read room to verify. What changes at this level is the analysis: once the image is clean, the startup path is traced to find the watchdog arm, the debug-disable and the checksum, because each must be handled before the clone will run. Our clock glitch notes cover the read; the clone is the harder half, and the one that decides whether the duplicate actually works.

Building a clone that survives boot

Cloning means writing the application and information blocks to a blank ZET6, neutralising the anti-debug routines so the part does not reset or relock, and setting the new option bytes to level 0. The result boots and runs like the original with the protection removed. If the goal is study rather than production, we instead return a disassembly and recovered source. The defence mindset is detailed in our flash-protection overview, which is where the active measures are catalogued.

What 144 pins and 512 KB imply

More pins mean more peripherals and more places for active checks, but also more structure to follow, so the traps are easier to locate by tracing the boot path than by guessing. The table lists the traps and the response, which is the checklist we run before any clone is declared done.

Active trap Effect Clone response
Early watchdog resets paused core step past
Debug disable blocks attach open after read
Checksum resets on change patch check

How active protection varies by product

Not every ZET6 defends itself the same way. A consumer peripheral tends to lean on a single early watchdog and a checksum, because the designer wanted a speed bump, not a fortress. An industrial controller is more likely to combine a debug-disable, a checksum and a routine that polls for a halted core, because the cost of cloning is higher and the incentive to stop it is real. Medical and automotive parts occasionally add a self-read that wipes the array if the boot path looks altered. Reading the startup code tells us which of these we are facing before the clone is attempted, and the answer changes how long the job takes and how the clone is built. We have seen two units with the same marking defend themselves completely differently, because the protection is in the firmware, not the silicon, and the firmware is the customer’s own. That is also why a generic unlock tool never works here: it knows nothing about the code it is trying to free.

Delivering the protective clone

The finished clone is boot-tested on a spare ZET6 and returned with the original image so both are in hand. This is how we clone protective GD32F303ZET6 code without a mass erase, resting on the decrypted data and the recovery that opened the part in the first place, with the active defences accounted for rather than hoped away.

Comments are closed.