← How-Tos
electronics 16 days ago ◑ 22 views ◯ 5 min read

Hardware Attack Techniques for Embedded Security Research: Voltage Glitching, Fault Injection, and UART Bootloader Exploitation

voltage glitchingfault injectionembedded securityUART bootloaderhardware hackingside channelsecurity research

Most embedded security content for makers starts and ends with the Flipper Zero's party tricks — NFC cloning, sub-GHz replay, BadUSB. Those are real techniques, but they're a small corner of embedded hardware security research. A much larger body of technique sits one level deeper: attacking the microcontroller itself, at the point where firmware, bootloaders, and debug interfaces meet the physical hardware. Voltage glitching, fault injection, and bootloader exploitation are the tools that security researchers and reverse engineers use to recover firmware, bypass read-protection, and understand how a device actually behaves when it's pushed outside its designed operating envelope.

This is research-and-education content, not a how-to for breaking into anything you don't own or have explicit authorization to test. Every technique here should be practiced on your own development boards and devices, and a meaningful fraction of commercial devices have terms of service or legal protections against this kind of analysis — know what you're allowed to touch before you touch it.

Why Attack the Hardware Instead of the Firmware

Modern microcontrollers increasingly ship with read-out protection (ROP/RDP on STM32, lock bits on AVR, flash encryption on ESP32) specifically to stop firmware extraction through the normal debug and programming interfaces. When the software-level door is locked, hardware-level attacks target the physical implementation of that protection rather than the protection logic itself — because implementing security correctly in silicon, across every voltage, temperature, and timing condition, is extremely hard, and vendors routinely leave edge cases.

Voltage Glitching

Voltage glitching works by momentarily dropping (or less commonly spiking) a chip's supply voltage for a very short window — often tens to hundreds of nanoseconds — timed to coincide with a specific instruction, such as a security check comparing a password or verifying a read-protection flag. The brief voltage drop can cause that one instruction to execute incorrectly (skip, repeat, or return a corrupted result) without crashing the whole chip, effectively causing the security check to pass or fail in the attacker's favor by accident.

Purpose-built tools like the ChipWhisperer platform package the pulse generator, precision delay control, and target power measurement into one board specifically for this kind of sweep; a simpler DIY setup can use a fast GPIO-driven MOSFET glitcher and a logic analyzer to characterize results, at the cost of much more manual tuning.

UART and Serial Bootloader Exploitation

A huge number of microcontrollers — STM32, many PIC parts, ESP32 included — expose a factory serial bootloader over UART that can read and write flash memory, intended for in-field firmware updates without a full JTAG/SWD debugger. These bootloaders are a frequent target because they're simple, well-documented (vendors publish the protocol since it's meant to be used), and sometimes left accessible in production even when the "real" debug port is locked down.

  1. Identify candidate UART pins by probing test points or unpopulated headers with a logic analyzer while power-cycling the board — bootloaders typically announce themselves or respond to a specific sync byte sequence at power-on.
  2. Check the datasheet for the chip's documented bootloader entry condition — often a specific GPIO pin state (such as BOOT0 on STM32) sampled at reset.
  3. Connect a USB-to-serial adapter at the correct voltage level (3.3V logic on most modern parts — do not connect a 5V adapter directly) and attempt the vendor's documented bootloader handshake.
  4. If the bootloader responds, read-protection status and available commands (read memory, write memory, erase, go) determine what's actually reachable — on many parts, read-protection specifically blocks the "read memory" command while leaving "write" and "erase" available, which has its own implications.

JTAG/SWD as a Fallback and Recovery Path

Where a UART bootloader is locked or absent, JTAG and SWD debug ports are the next layer down, and they're worth understanding as a recovery tool even outside a security context — the same TAP (test access port) scan techniques used to find an undocumented debug header are what you'd use to recover a "bricked" board that won't boot. A simple continuity/voltage scan across unpopulated header pads, combined with a boundary-scan tool like JTAGulator or OpenOCD's interactive probing mode, can identify an active JTAG/SWD interface even when the silkscreen gives no hints.

A Basic Benchtop Setup

ToolRole
Logic analyzer (8+ channels, 24MHz+)Capturing UART traffic, finding bootloader sync bytes, timing glitch triggers
USB-to-serial adapter, 3.3V-capableTalking to UART bootloaders directly
Bench power supply with current limitingRunning the target safely and watching for current spikes that indicate a fault or lockup
Glitching platform (ChipWhisperer or DIY MOSFET glitcher)Generating and timing voltage fault pulses
JTAG/SWD debug probe (ST-Link, J-Link, or a Raspberry Pi running OpenOCD)Debug port access and recovery

Safety and Scope

Keep glitching experiments on development boards or hardware you own outright, and be aware that aggressive voltage faults can, and sometimes do, permanently damage the target silicon — this is expected collateral in security research and not something to attempt on a device you need to keep working. Treat any findings about a commercial device's vulnerabilities the way the broader security research community does: responsible disclosure to the vendor before any public write-up, and a clear read of the legal landscape (including the DMCA's research exemptions and your local computer-fraud statutes) before testing anything you don't own.

These techniques are a genuinely deep rabbit hole — ChipWhisperer's own documentation and the output of the annual academic side-channel and fault-injection conferences (CHES, FDTC) are the natural next step once a basic UART bootloader attack and a first successful glitch sweep are both working on your own test hardware.