Skip to main content

Pulling firmware from a connected device

Case study · Firmware extraction and analysis

How a product security team learned to review its own hardware before devices reached customers.

The brief

A smart home device maker had relied on external testers for hardware security reviews. Its product security team was strong on web and mobile testing but had little hands-on experience with circuit boards, and wanted to catch issues earlier in the development cycle.

How the course worked

Over three days on-site, participants started with our lab boards, learning to identify UART and SWD interfaces, connect to debug consoles and read SPI flash directly. On the second day they moved to boards from a previous generation of the client's own product, supplied for the course. The final day focused on unpacking the firmware they had extracted, reviewing start-up scripts and services, and checking how updates were verified.

The memory on the board

The client's hub used the layout we see on many connected devices: a small SPI NOR flash chip holding the first-stage bootloader, and an eMMC chip holding everything else. Each needed a different approach.

SPI NOR flash

The boot flash came in an 8-pin SOIC package, with its pins exposed at the edge of the chip. Participants identified it from its markings, looked up its datasheet and read it in-circuit with a test clip and a SPI programmer. The main lesson was bus contention: with the board powered, the main processor (SoC) also drives the flash pins, which can corrupt the read. The team held the SoC in reset during the dump, then read each chip several times and compared checksums to confirm a clean image.

eMMC in a BGA package

The main storage was an eMMC chip in a 153-ball BGA (ball grid array) package. All of its connections are solder balls underneath the chip, so a clip cannot reach them. We covered two ways in:

  • In-system reading. Using the eMMC pinout and continuity testing, participants traced the CMD, CLK and DAT0 lines to test points and nearby components. They wired these to an SD/eMMC reader, supplied the core (VCC) and I/O (VCCQ) voltages, held the SoC in reset and read the chip in 1-bit mode. This leaves the board intact but depends on finding usable test points.
  • Chip-off. On spare boards, participants baked out moisture, preheated the board and removed the eMMC with hot air, watching for underfill and nearby components. They then cleaned the pads, checked the balls and read the chip in a BGA-153 socket adapter. Chip-off is the most reliable way to get a full image, but it destroys the board, so we treat it as a last resort.

The dumps covered the eMMC's separate hardware partitions: the user data area, the two boot partitions and the replay-protected memory block (RPMB). Participants learned why RPMB cannot simply be read back, and why a copy of the user area alone can miss bootloader code and environment data.

Other parts you may meet

We also showed raw NAND flash in TSOP-48 and BGA packages, which the client used on another product line. Unlike eMMC, raw NAND has no built-in controller: a raw dump includes the spare (out-of-band) area, error-correction data and bad blocks, and has to be rebuilt before a filesystem such as UBIFS can be mounted.

From dump to findings

On day three, participants parsed the partition table, located the U-Boot environment, kernel, SquashFS root filesystem and a writable data partition, and extracted each one. They reviewed the boot chain and found where signature checks were and were not applied, searched for hard-coded credentials and keys, and traced how the update service fetched and verified new images.

What the team took away

The team left with a hardware review checklist for new products, a set of reusable extraction scripts and several findings in the older firmware to verify against current builds. Two team members now lead hardware reviews as part of the client's product release process.

Explore firmware extraction training · All case studies