Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Are SPI and I2C?

SPI and I2C are the short-range buses that connect a microcontroller to flash memory, sensors, and secure chips on the same board. Tapping them reveals firmware, keys, and the traffic between components.

Illustration for the cybersecurity term SPI and I2C
Home / Blog / Cybersecurity Terms / What Are SPI and I2C?
17 November 2026

What Are SPI and I2C?

What Are SPI and I2C?

Inside almost every connected product, the processor talks to its neighbours over one of two short-range buses. The Serial Peripheral Interface is fast and uses four wires; the Inter-Integrated Circuit bus is slower and uses two. Neither was designed with an adversary in mind, because both were designed for traffic that travels a few centimetres across a board nobody was expected to open.

That assumption is why bus analysis is one of the first things a hardware tester does. The external flash chip holding the firmware is on SPI. The EEPROM holding configuration is usually on I2C. Whatever travels between them is available to anyone with a logic analyser and a clip.

How the Two Buses Differ

SPII2C
SignalsSCLK, MOSI, MISO, and one chip select per deviceSDA and SCL, shared by all devices
AddressingSeparate chip select line7-bit address in the first byte
SpeedTens of megahertz, full duplex100 kHz to 1 MHz typically, half duplex
Typical devicesNOR flash, displays, SD cards, radio modulesSensors, EEPROMs, real-time clocks, secure elements

In practice the choice is made on pin count and bandwidth. The security consequences are identical: no authentication, no encryption, and no concept of a trusted party.

Reading a Flash Chip

The most productive technique in embedded testing is also the simplest. An 8-pin SOIC package marked W25Q64 or similar is a SPI NOR flash holding the firmware. A SOIC-8 test clip, a CH341A programmer or Bus Pirate, and flashrom will dump its contents in place:

flashrom -p ch341a_spi -r firmware.bin
binwalk -Me firmware.bin

Two practical obstacles arise. The host processor may drive the bus while you are reading it, which is solved by holding the processor in reset or, less elegantly, by lifting the chip’s power pin. And the read may be unstable because the programmer cannot supply enough current through the clip, which is solved by desoldering the chip onto an adapter. From there, firmware analysis proceeds as normal.

Passive Capture

Where reading is blocked, listening is not. A logic analyser — a Saleae unit, or one of the inexpensive clones driven by sigrok and PulseView — connected to the bus while the device boots records every transaction, and the built-in protocol decoders turn edges into bytes. What appears is often more interesting than the flash contents: configuration read from an EEPROM, sensor calibration data, and, in poorly designed products, a key being fetched from an external chip and passed to the processor in clear.

That last case deserves emphasis. Fitting a secure element and then asking it to return a key over I2C achieves nothing — the whole point of the chip is that the key never crosses the bus. The element should perform the cryptographic operation internally and return only the result.

Active Attacks

Both buses can be written as well as read. An attacker can glitch the chip select line to corrupt a boot-time read and influence what the processor believes it loaded, substitute an EEPROM holding modified configuration, or impersonate a sensor to feed false readings to a controller — which in an industrial context is a safety matter, not merely a data integrity one. Writing directly to flash to install modified firmware is the blunt version, and it is only prevented by secure boot verifying the image before execution.

Designing So a Tap Reveals Nothing

At Privia Security, our Hardware Penetration Test Services include bus capture and flash extraction on production samples, which is usually the quickest route to the secrets a design assumed were private.

FAQ – Frequently Asked Questions

Do I Need to Desolder the Flash Chip to Read It?

Usually not. A SOIC-8 test clip reads most NOR flash in circuit, provided the host processor is held in reset so it does not contend for the bus. Desoldering becomes necessary when the clip cannot make reliable contact, when other components load the bus, or when the package is a BGA with no accessible pins at all.

What Is the Cheapest Way to Start Bus Analysis?

A CH341A programmer and a SOIC-8 clip cost a few pounds together and handle most SPI flash dumping. Add an inexpensive eight-channel logic analyser supported by sigrok for passive capture with protocol decoding. A Bus Pirate covers both roles at slightly higher cost and is useful when you want to interact with a bus rather than only observe it.

Can I Encrypt Traffic on an I2C Bus?

The bus itself has no security layer, so protection has to be applied at the application level: authenticate and encrypt the payloads between the two chips. In practice the better design is to avoid putting anything sensitive on the bus at all, by performing cryptographic operations inside a secure element and transferring only the results.

Does Bus Analysis Work on Devices with BGA Packages?

It is harder. Ball grid array packages have no exposed pins, so a clip cannot be attached and signals must be found on vias, test points, or inner layers. Where the memory is embedded in the SoC package, there is no external bus to tap at all, and testers fall back to debug interfaces, fault injection, or chip-off techniques.

Related Terms

You May Be Interested In These

What Is Railway Signalling Security?

Cybersecurity Terms

17 November 2026

What Is Railway Signalling Security?

Read More
What Happened in the Uber Breach?

Cybersecurity Terms

17 November 2026

What Happened in the Uber Breach?

Read More
What Is Static Malware Analysis?

Cybersecurity Terms

17 November 2026

What Is Static Malware Analysis?

Read More