Skip to content

Lesson 7 of 13 · 15m

Sniffing SPI, I2C, and LPC

Secrets cross exposed buses in plaintext — the discrete-TPM BitLocker attacks are a protocol property, not a trick.

The wires carry more than data

Attach a logic analyzer to the SPI flash pads while the board boots and the entire firmware streams past in plaintext — a Saleae- or DSLogic-class analyzer earns its keep here: a 25 MHz SPI clock wants 50 MSa/s at the bare Nyquist minimum and closer to 100 MSa/s for clean decode, while the $10 Cypress FX2LP clones top out at 24 MSa/s — below the signal you came to see — and silently decode garbage. Every byte the CPU reads comes off the same bus you are probing. That alone is useful: no clip-read needed, no write capability, just observation. sigrok-cli and PulseView decode SPI natively; with CS, CLK, MOSI, MISO tapped you get every flash transaction, address by address, including the moment the firmware reads a stored key blob out of a config partition to configure itself.

I2C is quieter but richer: EEPROMs, PMICs, temperature sensors, EDID on HDMI, and management buses all share two wires and 7-bit addresses. If you already have a shell, i2cdetect -y 0 walks the address space; without one, a probe on the bus during boot shows which slaves the firmware trusts — EEPROMs and EDID at 0x50 are routine, and a config EEPROM read early in boot often carries serials, MACs, or feature flags in the clear.

The case that matters: the TPM bus

The canonical demonstration is BitLocker against a discrete TPM. With the TPM-only protector — no PIN — Windows at boot asks the TPM to unseal the volume master key. The TPM, sitting on the LPC or SPI bus inside a QFN package, obliges, and the VMK travels across the motherboard traces in the clear. TPM Genie (Jeremy Boone, NCC Group, 2018) was the interposer that made this routine on LPC and I2C parts; later work repeated it against SPI-attached TPMs in shipping laptops. Boot, sniff, reassemble the key, decrypt the disk. The TPM did everything correctly. The bus betrayed it. The same trick works in the other direction: interposers between chip and board can emulate the flash itself — Trammell Hudson's spispy is an FPGA rig that serves a firmware image to a booting machine while logging every read, built because UEFI audit needed a flash chip that answers on demand and reports what firmware actually touches.

That is the causal chain to internalize: measured boot verified the machine, the TPM verified the measurements, and then the plaintext key crossed copper that a $10 probe could touch. Microsoft's own guidance acknowledged it — TPM+PIN exists precisely because the PIN's entropy never crosses the bus; the unseal needs it.

The wrong mental model

"TPM-sealed means the disk is sealed." Sealed means the TPM gates release on PCR state. It says nothing about the transport. A discrete TPM is a chip on wires; a firmware TPM (Intel PTT, AMD fTPM) lives inside the CPU package where there is no bus to sniff. Same TPM 2.0 API. Radically different physical answer.

For your own boards the generalization is direct: any secret that crosses a probeable bus in plaintext should be considered already lost. Keys in an external EEPROM, a MAC loaded from SPI config, a signature public key — fine, it is public. A decryption key on those wires — not fine.

What to actually do

Audit side: sniff a full boot, decode SPI and I2C in PulseView (sigrok-cli for scripting), and inventory what crosses — anything secret-shaped is a finding. Ship side: keep secrets inside silicon — fTPM/secure element, on-SoC key vaults, and silicon that supports encrypted off-chip storage where the BOM demands external flash. Quad-SPI boot flashes push the equipment floor higher still — four lanes at clocks past 50 MHz is oscilloscope work, not analyzer work — and where that is out of budget, the clip-and-dump approach from the earlier lesson is the honest fallback. On laptops and servers, enable TPM+PIN; the checkbox exists because the attack is real. And when evaluating a device, look at where the TPM sits in the schematic, not just whether one exists in the spec sheet.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.