Hardware Debug Interfaces Accessible
A device's circuit board exposes debug interfaces such as UART, JTAG or SWD, giving anyone with physical access a console, memory access or a way to read and change the firmware.
| Severity | Medium |
| CVSS 3.1 | 6.8 CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 7 CVSS:4.0/AV:P/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-1191: On-Chip Debug and Test Interface With Improper Access Control |
| MITRE ATT&CK | T1005 Data from Local System, T1059.004 Unix Shell |
| Category | Security Misconfiguration |
Description
Embedded devices are built with hardware debug interfaces for development and manufacturing: UART serial consoles, JTAG and Serial Wire Debug (SWD) for controlling the processor, and sometimes direct access to the flash memory chips. In production units these are often left active, with their pins brought out to labelled headers, unpopulated pads or test points on the circuit board.
A UART console commonly shows the boot process and offers a bootloader prompt, such as that of U-Boot, and a login prompt or root shell on the running system. JTAG and SWD, unless locked by the processor's security settings, allow the processor to be halted and its memory and flash to be read or written, exposing the firmware and any secrets stored on the device, such as Wi-Fi keys, credentials, certificates and cloud access keys, and can allow protections such as secure boot to be bypassed. An attacker with brief physical access and the casing open can therefore obtain a shell or full control of the processor, extract those secrets, and modify the firmware to keep control.
Secrets shared by every unit, once extracted from one device, can be used against all of them remotely, which is often the most serious consequence. The need for physical access limits the threat for devices in secure locations, and raises it for devices installed in public places or on customer premises. The weakness is identified by opening the device, locating candidate pins from board markings and voltage measurements, or with tools such as JTAGulator, then connecting a USB serial adapter or debug probe and testing what access is offered.
Remediation
- Disable debug interfaces in production units: lock JTAG and SWD through the processor's debug protection settings, such as read-out protection levels or eFuses, before shipping, and remove or disable the UART console in production firmware and in the bootloader.
- Where a console must remain for servicing, require authentication with a credential unique to each device, and disable the bootloader's interactive prompt or protect it with a password.
- Remove debug headers and test points from production boards where possible, though this only slows an attacker and is not a control on its own.
- Store secrets in a secure element or the processor's protected key storage rather than in readable flash, and avoid secrets shared across all units, so that extracting one device's contents does not compromise others.
- Enable secure boot so that modified firmware cannot run.
Where the devices are bought rather than built, raise the issue with the manufacturer. As an interim measure, install devices where they cannot easily be reached, use tamper-evident seals or enclosures, and change any credentials that may have been extracted. Confirm the fix by connecting to the interfaces again and checking that no console, memory access or debug control is available.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.