Building a hardware security research bench
The equipment for assessing embedded devices you own or are authorized to test: power and measurement, logic analyzers, UART adapters, JTAG/SWD probes, SPI flash readers, and the defenses they reveal.
Many security assessments of routers, cameras, industrial controllers and other embedded devices eventually leave the network and reach the circuit board. Debug interfaces left enabled in production, unencrypted firmware in external flash and verbose boot consoles are among the most common findings. They are also some of the easiest to fix once a vendor knows about them.
This guide describes a practical bench for assessing devices you own or are authorized to test, with the purpose of finding and fixing weaknesses. It focuses on equipment and methodology, not on attacking specific products.
Ground rules
- Authorization and scope. Written permission for anything you do not own; respect coordinated disclosure when you find vulnerabilities.
- Electrical safety. Never probe mains-powered boards while connected to mains; use an isolation transformer or, better, power the logic side from a bench supply. Capacitors in power supplies can hold dangerous charge.
- ESD protection. An anti-static mat and wrist strap protect the device under test and your own equipment.
- Documentation. Photograph the board before and after every change and keep a lab notebook.
Core equipment
| Tool | Why you need it | What to look for |
|---|---|---|
| Digital multimeter | Identify ground, voltage levels, continuity between pads | Continuity beeper, auto-ranging, CAT-rated probes |
| Bench power supply | Power boards safely and see current draw | Adjustable voltage, current limit, readout to milliamps |
| Logic analyzer | Capture and decode digital buses | Sample rate, channel count, voltage thresholds, sigrok support |
| USB-to-UART adapter | Talk to serial consoles | Selectable 3.3 V / 1.8 V logic, reliable chipset (FTDI, Silicon Labs CP210x) |
| JTAG/SWD probe | Debug and inspect microcontrollers and SoCs | OpenOCD support, target voltage range, SWO support |
| SPI/I2C flash reader | Read external flash to review firmware | Correct voltage, flashrom support, test clips |
| Oscilloscope | Analog view: noise, levels, unknown signals | Bandwidth well above the signals you study, two or four channels |
| Soldering station and hot air | Attach headers, lift chips when needed | Temperature control, fine tips, fume extraction |
| Microscope or magnifier | Read chip markings, inspect pads | Stereo microscope or a good USB microscope |
Buy quality where it protects you or the board (probes, power supply, soldering station) and save money on the rest.
Finding and using a UART console
Serial consoles are the most common debug interface on embedded Linux devices. A typical workflow:
- Locate candidate headers: groups of three to four pins or pads near the SoC, often labeled
TX,RX,GND,VCC, or unlabeled. - Find ground with continuity to a known ground (shielding, USB shell).
- Measure voltages at power-up. VCC is steady; TX from the device typically sits at logic high and fluctuates during boot output. Note whether logic is 3.3 V or 1.8 V.
- Confirm with a logic analyzer and measure the shortest bit width to estimate the baud rate (115200 is common).
- Connect TX to RX, RX to TX, GND to GND. Do not connect VCC from the adapter; the board powers itself. Make sure the adapter's logic level matches.
# Linux: find the adapter, then open a console at 115200 baud, 8N1
dmesg | grep tty
screen /dev/ttyUSB0 115200
# or
picocom -b 115200 /dev/ttyUSB0
What you learn from a boot log is valuable for defenders too: bootloader versions, kernel command line, whether secure boot is enforced, and whether the console drops to an unauthenticated shell. An open root shell on the production console is a finding worth reporting.
Logic analyzers and protocol decoding
A logic analyzer samples digital lines and lets software decode protocols (UART, SPI, I2C, CAN, 1-Wire and more). The open-source sigrok project and its PulseView interface support many affordable analyzers as well as higher-end ones.
sigrok-cli --scan
# Capture 2 seconds on two channels at 24 MHz, decode UART on channel D0
sigrok-cli -d fx2lafw --config samplerate=24m --time 2s \
-C D0,D1 -P uart:rx=D0:baudrate=115200 -A uart=rx-data
Selection criteria:
- Sample rate: at least four, ideally ten times the fastest signal you will decode.
- Voltage thresholds: 1.8 V logic is increasingly common; confirm the analyzer detects it reliably.
- Input protection: cheap analyzers can be damaged by overvoltage; buffered inputs are worth it.
- Streaming versus buffered capture: streaming depends on USB bandwidth, and long captures at high rates need onboard memory.
JTAG and SWD
JTAG (IEEE 1149.1) and Arm's two-wire Serial Wire Debug (SWD) give low-level access to processors: halting the CPU, reading memory and registers, and programming flash. On production devices they should be disabled or locked; checking that they are is a standard part of an assessment.
Common probes include SEGGER J-Link, ST-LINK, CMSIS-DAP probes, the Black Magic Probe and multi-protocol boards based on FTDI FT2232H/FT232H chips. OpenOCD is the usual open-source software layer:
# Example: connect to an STM32F1 target through an ST-LINK and open the telnet console
openocd -f interface/stlink.cfg -f target/stm32f1x.cfg
telnet localhost 4444
> halt
> flash info 0
If the connection fails with readout protection errors, that is the defense working. Report the protection level you observed, and do not attempt to bypass protections on devices outside your authorization.
Reading external flash
Many devices store firmware in an external SPI NOR flash (the common 8-pin SOIC chips). Reading it lets you review what the vendor ships: embedded credentials, outdated components, unsigned update mechanisms.
# Identify and read a SPI flash through a supported programmer
flashrom -p ch341a_spi
flashrom -p ch341a_spi -r firmware.bin
flashrom -p ch341a_spi -r firmware2.bin && sha256sum firmware.bin firmware2.bin # read twice, compare
binwalk firmware.bin
Check the flash voltage from its datasheet first. Some inexpensive CH341A-based programmers are known to drive 5 V on data lines, which can damage 3.3 V or 1.8 V chips; use a revision with correct level shifting or a 1.8 V adapter. In-circuit reading with a test clip may back-power the whole board; if readings are unstable, lift the chip or hold the SoC in reset.
What defenders should take from this
Every tool above maps to a hardening control that manufacturers and integrators should verify before shipping:
| Finding on the bench | Mitigation |
|---|---|
| Serial console gives a root shell | Disable console in production builds or require authentication; remove headers |
| JTAG/SWD enabled | Blow debug-disable fuses or set readout protection; use authenticated debug where available |
| Firmware readable and unencrypted in external flash | Encrypt sensitive partitions; keep secrets out of firmware; use the SoC's secure storage |
| Firmware updates not signature-checked | Signed updates verified by a secure boot chain anchored in ROM or fuses |
| Hard-coded credentials or keys | Per-device credentials provisioned at manufacturing |
Enterprises buying IoT and OT equipment can ask vendors directly about these controls, or include a bench assessment in procurement for critical devices.
A starter bench, in order of purchase
- Multimeter, anti-static mat and wrist strap, basic hand tools and a set of jumper wires and test hooks.
- USB-to-UART adapter with 3.3 V and 1.8 V support.
- Sigrok-compatible logic analyzer (8 channels, 24 MS/s is enough to start).
- Adjustable bench power supply with current limiting.
- JTAG/SWD probe supported by OpenOCD.
- SPI flash programmer with a proper level shifter and test clips.
- Soldering station, then an oscilloscope once you need to see analog behavior.
Build up gradually, around the devices you actually need to assess.