Hardware security

Table of Contents

Embedded systems

Pervade nearly every aspect of modern life, and their state of security often lags behind.

Embedded system: special-purpose computing system, running software tightly coupled to hardware, as part of a larger system

May have: no/specialized user interfaces, low power consumption and computational power, interfaces to physical world, non-customizable software, non-Avon Neumann architecture

Core components

Memory

Non-volatile: data persists even if power is removed. holds code, static data, config. Examples are NAND/NOR flash.

Volatile: holds runtime data (stack, heap) and code (copied from NV memory). Examples are DRAM and SRAM (info stored in transistor logic, no refresh needed)

Peripherals

Input/output devices, typically interfaced via memory-mapped IO (MMIO)

On-chip: shares chip with processing unit, directly interfaces. Example is a timer.

Off-chip: physical separation from processing unit, connected via bus. Example is WiFi chipset.

Processing unit

Generally have workload specific instruction set architecture.

Variants:

Inspection tools

Multimeter: measures voltage, current, resistance. Can be used to see if two pieces of metal on circuit are connected to each other.

Logic analyzer: like a debugger, lets you measure and visualize digital signals. May even provide a decoder.

Oscilloscope: measures and visualizes analog signals over time

Protocols & interfaces

Universal asynchronous receiver/transmitter (UART)

Used for serial comms between two components

Separate receive (RX) and transmit (TX) lines.

Configurable data format and transmission speeds, agreed beforehand.

UART electrical signal

Options and common choices:

Discovering UART ports:

  1. Consult datasheet if possible
  2. Locate promising headers
  3. Identify grounded pins: continuity test
  4. Identify TX pin: if data transmission enabled, fluctuating voltage observable
  5. Identify RX pin: may require connection to all possible RX pins

Serial peripheral interface (SPI)

Synchronous serial bus protocol, connects two or more components on a bus.

Controller/peripheral architecture, with four lines:

SPI electrical signal

Multi-peripheral configurations:

SPI multi peripheral configuration

Discovering SPI flashes:

Inter-integrated circuit (I2C)

Synchronous serial bus protocol, connects two or more components on a bus.

Multi-controller/multi-target architecture, with two lines:

Uses messages:

I2C electrical signal

Multi-target architectures:

Discovering I2C bus:

  1. If available, consult datasheet, look for part IDs on components
  2. Find likely I2C pins, use multimeter to test connection between components
  3. Attach logic analyzer/oscilloscope, check for characteristic I2C comms

Joint test action group (JTAG)

Standardized debugging interface, present on almost every prototyping board, and sometimes on production.

Defines:

JTAG test access port (TAP)

JTAG state machine

Discovering JTAG ports: