◇ OpenCyber Academy
Engineering · Chapter 8 · English

Chapter 8 — Computer architecture

Open, free learning for anyone who wants to protect people and technology. No account is required to read this text or its worked answers.

Chapter 8 — Computer architecture

Lesson map

Lesson 08 published. Map, example, EX022.

flowchart TD
  N0["Learning outcomes"]
  N1["8.1 Components"]
  N2["8.2 Privilege levels"]
  N3["8.3 Speculative execution"]
  N4["8.4 Trusted Platform Module"]
  N5["8.5 Firmware settings"]
  N6["Firmware as a target"]
  N7["Microcode"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6 --> N7
  N7 --> EX["Worked example"]
  EX --> Q["Exercise EX022"]

Logical drawing

flowchart LR
  N0["Learning outcomes"]
  N1["8.1 Components"]
  N2["8.2 Privilege levels"]
  N3["8.3 Speculative execution"]
  N4["8.4 Trusted Platform Module"]
  N5["8.5 Firmware settings"]
  N6["Firmware as a target"]
  N7["Microcode"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6 --> N7 --> Q["EX022"]
[Learning outcomes]
    |
    v
[8.1 Components]
    |
    v
[8.2 Privilege levels]
    |
    v
[8.3 Speculative execution]
    |
    v
[8.4 Trusted Platform Module]
    |
    v
[8.5 Firmware settings]
    |
    v
[Firmware as a target]
    |
    v
[Microcode]
    |
    v
[Worked example] --> [Exercise EX022]

Learning outcomes

You will (1) describe processors, memory, firmware and boot; (2) explain privilege levels; (3) relate architecture to security features.

8.1 Components

A PC has a processor, memory, storage, firmware (UEFI) and peripherals. Firmware starts first, initialises hardware and loads the bootloader, which loads the operating system.

Mateo follows the sequence on a lab PC with Marta, pausing at the firmware screen to show where boot order and Secure Boot are set. Each stage hands control to the next, so a weakness early in the chain affects everything after it. That idea of a chain becomes central to the boot-chain models later in the course.

8.2 Privilege levels

Processors separate privileged kernel code from user code. User programs cannot directly change kernel memory; this separation underpins operating system security.

For Fernhill this explains why patrons use standard accounts without administrator rights. A program a patron runs works at user level and cannot alter the system's own files or settings directly. Most unwanted software in the library's records had been installed by users with more rights than they needed. Removing those rights stops much of the problem before the nightly restore has to deal with it.

8.3 Speculative execution

Kocher et al. (2019) showed that processors executing instructions speculatively can leak data across these boundaries. Vendors responded with microcode and operating system updates, which public PCs must receive.

The flaws are difficult to fix in software alone and depend on the processor model. Mateo's inventory records each PC's processor and the update level of its operating system and microcode, so he can confirm that every machine has received the published fixes. Older models that no longer receive updates are flagged for replacement.

8.4 Trusted Platform Module

Many PCs include a TPM, a small chip that stores keys and records measurements of boot components. It supports disk encryption and boot integrity checks.

For Fernhill the TPM does two jobs. It holds the key that unlocks the encrypted disk, releasing it only when the boot measurements match the expected values. It also supports checks that the PC started from approved components. Both depend on the TPM being enabled and the measurements being configured, which the worked example shows was not yet the case.

8.5 Firmware settings

UEFI settings control boot order, Secure Boot and passwords. If patrons can change boot order, they can start other operating systems.

A firmware password stops patrons from changing these settings at the start-up screen. Disabling boot from USB and network, unless an administrator allows it, removes the most common route to starting another system. Mateo records the intended settings for each model, since menus differ between vendors, and checks them during his inventory rather than assuming they match. Settings are rechecked after each firmware update.

Firmware as a target

Firmware runs before the operating system and can control what loads. If firmware or its settings are changed, every later protection can be bypassed. This is why NIST SP 800-147 recommends authenticated firmware updates and SP 800-193 adds detection and recovery. For Fernhill, the practical steps are firmware passwords, Secure Boot and keeping firmware updated through the vendor's signed packages.

Microcode

Processor microcode updates, delivered with firmware or OS updates, address issues such as speculative execution flaws.

Checking firmware versions

Mateo records firmware versions for each PC model and compares them with vendors' latest signed releases. Twelve PCs at Millbrook are two versions behind and are scheduled for update in a quiet week.

Worked example

Mateo inventories Fernhill's PC models and finds all have TPM 2.0 and UEFI Secure Boot support, but firmware passwords are not set. He notes this as a design input.

Synthetic case. Synthetic inventory.

Errors and limits

Hardware features help only if enabled and configured.

Exercises

Synthesis

Architecture features become controls only when configured.

Continue studying — chapter 08 of 50

← Chapter 07 (draft) · Course chapter index · Chapter 09 (draft) →