Skip to content

Doors of Durin: The Veiled Gate to Siemens S7 Silicon

Engineers explore architecture and security mechanisms for Doors of Durin: The Veiled Gate to Siemens S7 Silicon.

Summary

## Overview

Researchers Ali Abbasi (PhD student; hardware focus) and collaborators (one postdoc researcher; software focus) presented security analysis of Siemens S7-1200 Programmable Logic Controllers (PLCs), uncovering special access features within the bootloader. PLCs are industrial automation controllers managing sensors (inputs) and actuators/motors (outputs) via downloadable logic programs (Ladder Logic or Structured Text). Applications span chemical plants, power grids, manufacturing—critical infrastructure where PLC compromise enables physical destruction. Market concentration is extreme: Siemens and Rockwell Automation control >50% of global PLC market. Prior attacks (Stuxnet 2010; Ukraine power grid 2015-2016) demonstrate feasibility of large-scale industrial compromise. The S7-1200 (~€250) is relatively accessible yet deployed in critical environments. The research combines firmware analysis with hands-on hardware investigation—decapping CPUs, custom mechanical mounts for chip access, X-ray imaging to locate functionality—to reverse-engineer bootloader security mechanisms and uncover undocumented access features.

## PLC Architecture and Siemens S7-1200 Hardware

**Process Automation Fundamentals**: PLCs implement closed-loop control: sensor inputs (temperature, liquid level, etc.) feed logic programs; outputs (motor control, pump activation) execute based on logic decisions. Complex industrial setups involve multiple heterogeneous PLCs speaking different protocols; gateway appliances translate between them. Human-Machine Interfaces (HMIs) display operational data and allow operator interaction. Critical applications demand reliability and safety—chemical plant accidents or power grid shutdowns have severe economic and life-safety consequences.

**S7-1200 Hardware Organization**: Physically organized as stacked PCB boards. Main computational and storage components reside on first PCB layer. Key components: (1) ARM CPU (Renaissance model, circa 2010; Cortex-A4 core)—performs general-purpose computation; (2) Main flash chip—stores firmware image; (3) Large RAM chip—program memory; (4) SPI flash chip (smaller, flip-side mounted)—stores bootloader code; (5) MPU (Memory Protection Unit)—configurable hardware memory protection to prevent buffer overflow exploits, prevent code execution from data sections, enforce separation between bootloader and firmware.

**Hardware Identification via Decapping**: Researchers physically decapped the ARM CPU to expose silicon and identify exact model/revision. ARM instruction set allows reading hardware identification fields (bit fields encoded in special registers); revealed Cortex-A4 core with specific revision numbers. This verification ensures exploit code targets the correct processor variant. Process required careful IC decapsulation (removing plastic package to expose silicon).

## Firmware Architecture, Bootloader Access, and Specialized Tools

**Storage Architecture—Firmware vs. Bootloader Separation**: Firmware (main application code) resides on main flash chip; bootloader (initialization code) resides on separate SPI flash chip. Separation allows independent updates and security isolation. Bootloader executes first at power-on, initializes MPU and memory protections, verifies firmware signature, then loads firmware into RAM and transfers control. Bootloader is privileged code with access to protected hardware resources.

**Custom Hardware Access Mounts**: Bootloader chip is surface-mounted on PCB flip-side. Standard debugging interfaces may be absent or restricted. Researchers built a custom mechanical mount on top of the Cortex-A4 CPU that routes electrical connections down through PCB vias to the bootloader chip (accessible on reverse side). This mount enables physical probing, eavesdropping, or fault injection attacks against bootloader—facilitating analysis that would be impossible through normal interfaces.

**X-ray Imaging for PCB Reverse Engineering**: X-ray imaging penetrates plastic packages and PCB material to visualize internal traces, vias, and component connections without destruction. Used to identify bootloader chip mounting, power/ground plane routing, signal connections to bootloader—mapping the physical layout necessary for custom mount design and understanding bootloader connectivity to CPU and memory protection unit.

**Bootloader Special Access Features**: Research identified undocumented or deliberately hidden access mechanisms within bootloader code. "Doors of Durin" metaphor references hidden gates (from LOTR)—suggesting bootloader contains concealed entry points or bypass mechanisms. Demos showed practical exploitation of these features. Details withheld pending responsible disclosure, but such access typically allows: circumventing signature verification, reading protected firmware, writing unauthorized bootloader updates, or entering debug/test modes disabled in production.

Related talks

FIRST·1 hr 6 min

Backdoors in Back Doors

Security researchers examine technical aspects of Ken Munro - Backdoors in Back Doors.

munrobackdoordoor+1