Posts Tagged ‘Ataque o sistema de proteção do microprocessador TMS320F28235PG e restaure o arquivo binário incorporado da memória flash mcu tms320f28235pg mcu;’

PostHeaderIcon Attacking Secured TMS320F28235PG Protection System

To attack secured TMS320F28235PG protection system is to face a single-zone Code Security Module, not an encrypted image. This F2823x Delfino runs a fixed-point C28x at 150 MHz with no FPU, and its 256K x 16 flash stores plain 16-bit words. The CSM gates the JTAG pod and data accesses from code running in non-secure memory, while the CPU keeps executing its own protected flash. The decisive fact is that the eight 16-bit password words sit at 0x33FFF8-0x33FFFF, because flash is mapped from 0x300000 to 0x33FFFF. Reaching for 0x3F7FF8-0x3F7FFF, the generic F28x range, is the classic fatal mistake here.

Attack TMS320F28235PG Microprocessor Protection System and restore embedded binary file from mcu tms320f28235pg mcu flash memory
Attack TMS320F28235PG Microprocessor Protection System and restore embedded binary file from mcu tms320f28235pg mcu flash memory

The address exception that governs every read

The TMS320F28235PG PWL 0x33FFF8 not 0x3F7FF8 distinction follows from the memory map in SPRS439Q and SPRUI07. The eight 32K x 16 sectors A-H occupy 0x300000-0x33FF7F, with the password locations at the top. The 118 reserved words below at 0x33FF80-0x33FFF5 must be 0x0000, and 0x33FFF6-0x33FFF7 hold the boot-to-flash entry. A read scripted at 0x3F7FF8 sees nothing, when the probe was simply outside the flash window. All C2000 flash is 16-bit word wide, so 256K x 16 is the 512 KB TI quotes, with 16-bit words sometimes labelled as kByte.

How to attack secured TMS320F28235PG protection system from the pod

With the right address, the Password Match Flow is standard for the generation. At reset KEY0-7 at 0x0AE0-0x0AE7 read all ones and the part is locked. A dummy read of all eight PWL words and a 128-bit write to KEY0-7 unsecure the array on a match. Erased PWL of 0xFFFF unlock on the dummy read alone; 0x0000 locks the part permanently. On first attach a Wait boot mode keeps the 150 MHz core out of user code. ECSL disconnects JTAG on a secure-region touch, so a dummy read of all eight PWL plus the low 64 bits into KEY0-3 holds the link while staying locked.

The locked JTAG boundary

CSM draws a hard line between what the pod can and cannot see; the table is that inventory.

Resource on the TMS320F28235PG Size or location Locked JTAG outcome
Flash sectors A-H eight 32K x 16 at 0x300000-0x33FF7F reads return zero
Password locations PWL 0x33FFF8-0x33FFFF dummy read needed to hold the link
Reserved words below PWL 118 words at 0x33FF80-0x33FFF5 reads return zero
OTP ROM 1K x 16 reads return zero
Secure SARAM L0 and L1 within 34K x 16 reads return zero
Flash configuration registers CSM space reads return zero
Non-secure SARAM within 34K x 16 visible
Boot ROM 8K x 16 visible
Peripheral registers peripheral frames visible
PIE vector table vector space visible
Instruction fetch CPU path always allowed

Zero returns are the CSM blocking the read path while the CPU keeps executing those sectors.

atacar el sistema de protección del microprocesador TMS320F28235PG y restaurar el archivo binario embebido de la memoria flash mcu tms320f28235pg mcu;

atacar el sistema de protección del microprocesador TMS320F28235PG y restaurar el archivo binario embebido de la memoria flash mcu tms320f28235pg mcu;

FORCESEC, SECURE and the re-lock path

CSMSCR at 0x0AEF is the state register a session polls. Bit 0, SECURE, reports the locked state, and bit 15, FORCESEC, re-locks the device when asserted by CPU code. The TMS320F28235PG FORCESEC CSMSCR 0x0AEF relationship explains why an open link can close mid-session: the firmware restores the protected condition itself. Instruction fetch always remains allowed, and the C28x reads its own protected flash. The CSM restricts the external debug tool and data reads or writes to secure memory from code executing in non-secure memory. Seeing SECURE set again after a match means re-running the PMF, not a changed password.

What the visible resources actually prove

The TMS320F28235PG locked JTAG readable range is narrow. Non-secure SARAM within the 34K x 16 array, the 8K x 16 Boot ROM with software boot modes and standard math tables, peripheral registers and the PIE vector table remain visible. Boot ROM is separate from flash, so a readable ROM image is not firmware. The visible peripheral frames include the 12 ePWM outputs of six ePWM modules, the 16-channel 12-bit ADC at 12.5 MSPS with 80 ns conversion, 6 eCAP and 2 eQEP blocks. Seeing them proves the pod is alive, nothing more. Decoding an F28234 flash program, an F28232PGFA software assessment and breaking an F28232PGFA protection scheme share this boundary.

The eight-sector array and the cost of a full erase

The TMS320F28235PG eight 32K x 16 sector map is the largest array here, and the password sits at the top of Sector A in the same flash as the code. A full erase returns the PWL to 0xFFFF and clears the CSM, but also destroys the 512 KB of user firmware, leaving a blank reprogrammable part, not a recovered image. With an unknown password and a locked part, standard TI tools will not unlock then erase, and the TI FAQ advises replacing the chip. PG shortens the full orderable TMS320F28235PGFA, with PGF the 176-pin LQFP code; PTP, ZJZ, ZHH and ZAY packages also exist. Reversing F28062 flash firmware on a family with eight 16K x 16 sectors, or a related flash binary reversal, reaches the same conclusion: erasing security is not reading firmware.

extract texas instrument mcu tms320f2812pg code
extract texas instrument mcu tms320f2812pg code

To attack secured TMS320F28235PG protection system is therefore to map a boundary: the 0x33FFF8 password gate, the zero-returning secure regions and the readable resources are the entire surface. A report naming the obtained sectors is the only defensible deliverable, which our service provides.