Lesson 2 of 9 · 26m
UART Consoles: The First Shell Is Usually Serial
Find UART pins safely, connect at the right voltage and baud rate, capture boot logs, and assess what bootloader or shell access exposes.
UART is the embedded world's porch light. Manufacturers leave it on because factories need it, developers need it, and support teams need it. Attackers like it because one correctly wired serial adapter can turn a sealed plastic box into a boot log, a bootloader prompt, or occasionally a root shell. The trick is not finding serial; the trick is reaching it without destroying the board or confusing noise for access.
Find the candidate pins
A typical UART header has three or four contiguous pads: ground, a reference voltage, the device's transmit pin, and the device's receive pin.
GND ground; VCC reference, often do-not-connect; TX device transmit; RX device receiveUse continuity to locate ground. Power the board and measure candidates. A pin that idles near logic high and fluctuates during boot is often TX. RX may idle high or low and will not speak unless software is listening.
Choose the adapter correctly
USB serial adapters come in logic-voltage families. Match the target, not the USB port: 1.8 V for low-voltage embedded SoCs, 3.3 V for common routers and cameras, 5 V for older boards, and never confuse TTL with real RS-232 voltage levels. If the marking is unclear, measure. A level shifter is cheaper than a dead SoC.
Connect only what you need
target GND -> adapter GND
target TX -> adapter RX
target RX -> adapter TX
target VCC -> leave unconnected unless specifically requiredDo not power the target from the adapter unless you understand the power budget. Some adapters feed 3.3 V or 5 V into the board, back-powering rails and causing inconsistent boots.
Listen before you type
python3 -m serial.tools.miniterm /dev/ttyUSB0 115200 --rawCommon baud rates are 115200, 57600, 38400, and 9600. Framing errors produce repeating garbage in recognizable bursts. Save the full boot transcript with script -a uart-boot.log before starting the terminal. The first seconds reveal the boot ROM string, bootloader version, memory layout, kernel command line, root filesystem type, login behavior, and interrupted-boot keystrokes.
Bootloader access is leverage
U-Boot often prints Hit any key to stop autoboot. A prompt may expose commands such as:
printenv
setenv bootargs console=ttyS0,115200 init=/bin/sh
boot
tftpboot 0x82000000 recovery.binChanging bootargs in memory can alter the runtime environment without writing persistent state. Saving the environment is a stronger mutation and can brick boot flow. Prefer reversible memory-only experiments unless modification is explicitly authorized.
What access means
A login prompt is not a failure by itself. The security question is what the interface permits: read-only boot logs, interruptible bootloader control, an unauthenticated shell, authenticated debug functionality, or hidden factory test commands. Also check whether output continues after production lockdown; sensitive logs may expose keys, addresses, versions, panic traces, or update URLs.
Field notes
- Cross TX/RX once, then stop guessing. Reversing data wires is common; reversing voltage is not forgiving.
- Use
dmesgimmediately after plugging in because adapter paths change across reboots. - Garbage usually means wrong baud rate, wrong voltage reference, missing ground, or multiple serial devices.
- Some boards multiplex UART pins with other functions; boot output can vanish when the application reconfigures the pin.
- Do not type quickly into an unknown bootloader. Some devices treat stray input as permission to erase or reformat flash.
Was this lesson helpful?