Boot Chain Lab: Following Trust from Firmware to Userspace

Live lab: lab.init.wtf (https://lab.init.wtf/)
Source: github.com/Mik3XC/BootKitLab (https://github.com/Mik3XC/BootKitLab)

Every operating system begins by trusting something it did not create.

Before the desktop appears, before authentication begins, and before most security products are awake, a sequence of firmware, policy, loaders, drivers, kernels, and early system components has already decided what the machine is allowed to become.

That sequence is the boot chain.

I built Boot Chain Lab to make that hidden sequence visible.

The Most Trusted Code Runs First

Modern security conversations usually begin after the operating system has loaded. We talk about endpoint detection, identity, network segmentation, logging, and response. Those controls matter, but they inherit the state created by everything that ran before them.

If trust is compromised beneath the operating system, the rest of the security stack may be observing a version of reality that has already been altered.

Boot Chain Lab approaches the startup process as a series of explicit trust transitions:

Power
  ↓
Firmware
  ↓
Platform policy
  ↓
Boot manager
  ↓
Operating-system loader
  ↓
Kernel and early drivers
  ↓
Initial userspace
  ↓
Running system

Each stage receives control from the stage before it. Each stage must decide whether the next component is authentic, authorized, correctly configured, and safe to execute.

A failure at any transition changes the meaning of everything that follows.

From a Black Box to an Observable System

For most users, booting is a progress indicator.

For an architect or security engineer, it is a chain of custody.

Boot Chain Lab is designed to help examine that custody without treating startup as magic. The objective is not simply to make a machine boot. It is to understand why it booted, which components were trusted, what evidence was produced, and where that evidence can fail.

The lab follows the major layers of the process:

Firmware Initialization

The system begins inside platform firmware. Hardware is initialized, platform configuration is loaded, and the first executable components are selected.

This is the earliest meaningful security boundary. Firmware configuration, update integrity, boot order, enrolled keys, and recovery behavior all influence what the platform will trust next.

Secure Boot and Platform Policy

Secure Boot is often described as a switch. In practice, it is a policy system built around keys, signatures, revocation data, and authorized transitions.

The important question is not merely whether Secure Boot reports itself as enabled. The important questions are:

  • Which keys establish trust?

  • Which signatures are accepted?

  • Which components have been revoked?

  • Can policy be changed without authorization?

  • What happens when validation fails?

  • Is the recovery path held to the same standard?

A green status indicator is not the same thing as a verified trust model.

Boot Manager and Loader

The boot manager selects the operating-system path. The loader prepares the kernel, supporting files, configuration, and early execution environment.

This transition connects platform trust to operating-system trust. Modified loaders, unsafe fallback paths, stale recovery partitions, configuration changes, and rollback conditions can all weaken the chain without producing an obvious failure.

Kernel and Early Drivers

By the time the kernel starts, the machine has crossed several security boundaries—but the operating system is still not fully operational.

Early drivers and kernel components receive extraordinary authority. Defensive tooling may not yet be active, normal userspace logging may not exist, and errors can be difficult to distinguish from ordinary startup problems.

This is why boot-chain integrity matters: code executing at this stage can influence what the completed system is later able to observe.

Initial Userspace

Linux moves through the initramfs and initialization system. Windows continues through its protected startup components, services, and security infrastructure.

Different operating systems implement the transition differently, but the architectural question remains the same:

When does the machine become capable of validating its own earlier assumptions?

That question has no simple answer. A running system can inspect artifacts, configuration, measurements, and logs—but it cannot blindly assume that every layer beneath it is telling the truth.

Windows and Linux: Different Paths, Shared Questions

Boot Chain Lab examines Windows and Linux as different implementations of the same underlying problem.

Both platforms must establish an initial root of trust. Both must select and validate executable components. Both must transition from firmware-controlled execution into an operating-system-controlled environment. Both require recovery mechanisms, and both must confront the danger of a recovery path becoming weaker than the primary path.

The value is not in pretending the two boot processes are identical. It is in comparing their trust boundaries:

  • Where is policy stored?

  • Which component selects the next stage?

  • What is signed?

  • What is measured?

  • Where are failures recorded?

  • Which components can be replaced?

  • What does recovery trust?

  • What evidence remains after startup?

These questions turn platform-specific details into reusable architectural thinking.

Secure Boot Is Not Measured Boot

One of the most important distinctions in the lab is the difference between enforcement and evidence.

Secure Boot determines whether a component is permitted to execute according to the current platform policy.

Measured Boot records information about components and configuration into hardware-backed measurements, creating evidence that another system may evaluate.

They complement one another, but they are not interchangeable.

A component may be allowed by policy while still being unexpected for a particular environment. A measurement may reveal that something changed, but the measurement alone does not prevent execution. Detection depends on having a known-good baseline, retaining evidence, and acting when the observed state diverges from expectation.

Security fails when organizations collect evidence but never develop the operational ability to use it.

The Defensive View

Boot-chain security is often discussed through dramatic persistence techniques. The defensive work is quieter.

It means knowing the expected firmware state. It means controlling configuration changes, maintaining key and revocation policy, monitoring recovery paths, validating update processes, comparing measurements, and investigating unexplained drift.

A useful defensive workflow asks:

  1. What should this machine boot?

  2. Who is authorized to change that decision?

  3. Which evidence proves what actually happened?

  4. Where is that evidence stored?

  5. Can the machine being investigated alter the evidence?

  6. What is the recovery procedure when trust cannot be established?

The final question matters most.

A system that cannot prove its boot integrity should not be asked to prove its own innocence.

Why Build a Lab?

Boot architecture is difficult to learn from diagrams alone. The most important behavior happens between the boxes—in handoffs, validation decisions, configuration state, and failure paths.

Boot Chain Lab creates a controlled place to study those transitions and reason about their security implications. It is intended for education, defensive research, architecture review, and authorized experimentation.

The goal is not to produce invisible persistence. The goal is to understand how early trust works well enough to recognize when it has been weakened.

That means learning to observe:

  • Firmware and platform configuration

  • Boot entries and selection order

  • Signature and policy state

  • Loader and kernel integrity

  • Hardware-backed measurements

  • Recovery and fallback behavior

  • Differences between expected and observed startup

  • Evidence available to incident responders

The machine should not be treated as trustworthy simply because it reached a login screen.

Who This Lab Is For

Boot Chain Lab is intended for:

  • Security engineers studying platform integrity

  • Infrastructure architects responsible for trusted endpoints

  • Incident responders investigating low-level persistence

  • Students learning Windows, Linux, UEFI, and operating-system startup

  • Detection engineers exploring boot telemetry and integrity evidence

  • Researchers working inside isolated and explicitly authorized environments

The project is deliberately a lab. Low-level system experimentation can render a machine unbootable, destroy data, or undermine the security guarantees of the test platform. Use disposable virtual machines or dedicated research hardware. Preserve recovery media and known-good images. Never test against systems you do not own or have explicit authorization to examine.

Trust Begins Before the Operating System

The boot chain is easy to ignore because, when it works, it disappears.

That silence can be mistaken for security.

Boot Chain Lab exists to slow the process down—to examine every transition, identify what is trusted, and ask whether the available evidence supports that trust.

Because by the time the operating system starts watching the machine, the machine has already made some of its most important decisions.

The question is whether anyone was watching then.

Enter the lab: https://lab.init.wtf/ (https://lab.init.wtf/)
Review the source: https://github.com/Mik3XC/BootKitLab (https://github.com/Mik3XC/BootKitLab)

Boot Chain Lab is intended exclusively for education, defensive research, and authorized security testing in isolated environments.

Next
Next

What Is DevOps?