← All projects

Embedded Security

UART & IoT Pentesting

A technical walkthrough of UART testing: electrical identification, boot captures, console access, and evidence-based IoT findings.

The question behind the connector

A device can have a polished web interface and still expose a very different view of its internals on a circuit board. That is what interests me about UART testing: following the connection between physical hardware, startup behavior, and the software controls that protect a system. This article lays out a testing workflow; it does not claim a confirmed vulnerability in a particular product.

A useful investigation starts with a concrete question. Does the interface only print diagnostics? Does it accept input? Does it expose a login prompt or an interactive console? Those are different outcomes, and the evidence should make the distinction clear.

Identify the electrical interface first

UART sends asynchronous serial data over transmit and receive lines. A connection needs a shared ground, with the device’s TX connected to the adapter’s RX and, when interaction is needed, the device’s RX connected to the adapter’s TX. The adapter’s logic level must match the target. Logic-level UART and RS-232 are not electrically interchangeable. SparkFun’s wiring guide explains the signal-level distinction.

Before connecting an adapter, document the board revision and candidate pads, check the component documentation, and measure the interface. A connector’s shape does not establish its pinout or voltage. Begin by observing the target’s transmit line; add a transmit connection only after the interface is understood. Keep the target’s power arrangement explicit rather than assuming the adapter should power the board.

Capture a complete boot sequence

A readable capture depends on matching baud rate, data bits, parity, and stop bits. For example, Espressif documents 115200 baud with eight data bits, no parity, and one stop bit for the ESP32 console. That is a documented example, not a universal IoT setting. Resetting the board with a terminal already open captures the early output that would otherwise be missed. Espressif’s serial connection guide also covers port identification and terminal setup.

Keep the raw capture and an accompanying note with the board revision, firmware version if known, adapter, voltage, serial settings, and reset method. Mark where the output changes from early boot to the application. A later reader should be able to tell whether a message appeared on every boot or only after an interaction.

Separate bootloader access from application access

A bootloader prompt, an operating-system login, and an application command interface have different capabilities. On a U-Boot-based device, commands such as coninfo describe console devices, while env print displays environment variables when those commands are included in the build. These can help explain the boot configuration without changing it. Command availability depends on the firmware. See the console information and environment command documentation.

The presence of a prompt does not establish unrestricted access. Record which operations are available and which are denied, then connect that observation to the security question. Keep configuration changes separate from initial observation so the evidence still describes the device’s original behavior.

Turn console output into testable findings

OWASP’s UART test cases cover console authentication, bootloader access, sensitive information in serial output, and command input handling. They provide a useful structure for checking both the startup path and normal operation. A finding should identify what access is required and the capability actually demonstrated. Production controls may include restricting console access and removing unnecessary diagnostic disclosure. OWASP UART testing guide.

For a report, pair each claim with a short, reproducible observation. “Boot output contains a software version” is different from “the console accepts commands without authentication.” Record the conditions, the expected behavior, the observed behavior, and the reason the difference matters. Redact credentials or identifying data in any excerpt intended for publication.

What a useful lab record looks like

Device / board revision: [record exact markings]
Firmware: [version and how it was identified]
Interface: [pad locations, measured logic level]
Connection: [adapter and serial settings]
Capture: [cold boot / reset / normal operation]
Access observed: [output only / login / console]
Evidence: [capture timestamps and repeatable steps]
Impact: [capability demonstrated, not assumed]

The part I find most interesting is moving from an electrical signal to an explanation of system behavior. Good notes make that process repeatable: another test can distinguish a firmware change, a wiring issue, and a real change in access. Device-specific captures and verified results would turn this workflow into a case study.