0Pricing
Cloud & IT Cert Prep · Lesson

Hardware Security: TPM, Secure Boot, and Drive Encryption

Use Trusted Platform Modules, Secure Boot, and full-disk encryption (BitLocker, FileVault) to prevent cold-boot and evil-maid attacks on physical devices.

Hardware Security: TPM, Secure Boot, and Drive Encryption is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Physical Hardware Attack Threats

When an attacker gains physical access to a device, logical security controls are severely weakened. Cold-boot attacks freeze RAM and extract encryption keys from residual data. Evil-maid attacks involve modifying a device's bootloader or OS while it is temporarily unattended. DMA attacks use physical ports (Thunderbolt, FireWire) to directly read memory. Hardware security features — TPM, Secure Boot, and full-disk encryption — work together to defend against these physical-layer attacks.

Trusted Platform Module (TPM)

A Trusted Platform Module (TPM) is a dedicated security chip embedded in the motherboard that provides hardware-based cryptographic functions. TPM capabilities include: generating and storing cryptographic keys that cannot be extracted from the chip, measuring the boot process (Platform Configuration Registers store hashes of each boot component), sealing data to specific system states (data can only be decrypted when the system is in a trusted state), and remote attestation (proving to a remote server that the system hasn't been tampered with).

# TPM Platform Configuration Registers (PCRs):
# PCR0: BIOS/UEFI firmware hash
# PCR1: BIOS configuration data
# PCR2: Option ROM code
# PCR3: Option ROM configuration
# PCR4: Master Boot Record (MBR) / bootloader
# PCR5: Partition table
# PCR6: Resume from sleep (S4/S5 state)
# PCR7: Secure Boot state

# If bootloader is replaced (evil-maid attack):
# PCR4 value changes -> TPM detects mismatch
# -> BitLocker requires PIN or recovery key
# (TPM won't unseal disk encryption key)

TPM 1.2 vs TPM 2.0

TPM 1.2 supports only RSA-1024 and SHA-1, which are now considered weak. TPM 2.0 (current standard, required by Windows 11) supports modern algorithms: RSA-2048, ECC P-256, SHA-256, AES-128/256, and algorithm agility (new algorithms can be added). TPM 2.0 also supports multiple hierarchies (endorsement, storage, platform) that enable more granular control. Enterprise environments should ensure all devices use TPM 2.0 as the baseline hardware security root of trust.

Secure Boot: Protecting the Boot Chain

Secure Boot is a UEFI firmware feature that verifies the cryptographic signature of every piece of software in the boot chain before executing it — UEFI drivers, bootloader, OS kernel. Only software signed by keys in the firmware's Secure Boot database is permitted to execute. This prevents bootkits (malware that infects the MBR or bootloader and loads before the OS security software) and unauthorized OS installations from persisting on the device.

# Secure Boot chain verification:
# UEFI firmware (hardwired, immutable)
#   -> Verifies: bootloader signature (e.g., Windows Boot Manager)
#      Key: Microsoft CA cert in Secure Boot DB
#   -> Verifies: OS kernel signature
#      Key: Windows production PCA cert
#   -> Verifies: kernel drivers (code signing)
#      Key: Microsoft WHQL cert

# If bootkit replaces bootloader with unsigned code:
# UEFI: signature check FAILS
# -> System halts, boot denied
# -> Alert: 'Secure Boot violation'
# Evil-maid attack blocked

BitLocker: Full Disk Encryption on Windows

BitLocker is Microsoft's full-volume encryption tool, integrated into Windows 10/11 Pro and Enterprise. BitLocker encrypts the entire drive using AES-128 or AES-256 in XTS mode. Without the recovery key (stored in Active Directory or Azure AD) or a correct PIN/password at boot, the encrypted data is inaccessible — even if the drive is removed and connected to another system. When used with TPM, BitLocker seals the volume master key to specific PCR values, detecting boot tampering and requiring manual recovery if detected.

# BitLocker protection modes (from least to most secure):
# Mode 1: TPM only
#   -> Auto-unlocks if TPM PCR values match (no user input)
#   -> Protects against offline attacks (removed drive)
#   -> Does NOT protect against evil-maid (OS still boots auto)

# Mode 2: TPM + PIN
#   -> Requires PIN at every boot
#   -> Protects against evil-maid (attacker can't boot without PIN)
#   -> Recommended for laptops

# Mode 3: TPM + startup key (USB)
#   -> USB key required at boot
#   -> Suitable for servers that must boot unattended (key in USB)

# Recovery: 48-digit recovery key stored in AD/Azure AD

FileVault: Full Disk Encryption on macOS

FileVault 2 is Apple's full-disk encryption for macOS, using XTS-AES-128 encryption backed by the Apple T2 chip or Apple Silicon's Secure Enclave. FileVault encrypts the entire startup volume and requires the user's login password to unlock at boot. The encryption key is tied to the user's account — iCloud recovery keys enable decryption if the password is forgotten. FileVault is essential for Mac laptops in enterprise environments, especially given how frequently MacBooks are lost or stolen at conferences and airports.

Self-Encrypting Drives (SEDs)

Self-Encrypting Drives (SEDs) perform encryption within the drive's hardware controller — the encryption and decryption happen at the drive level, transparent to the OS. SEDs comply with the Opal Storage Specification (TCG Opal). When the drive powers off, data is automatically locked and can only be unlocked by the correct Authentication Key (AK). SEDs offer performance advantages over software encryption (no CPU overhead) and crypto-erase capability — resetting the encryption key instantly renders all data unreadable, enabling instant secure erasure for drive decommissioning.

Cold Boot Attack Defense

A cold boot attack exploits the fact that DRAM retains data for seconds to minutes after power loss. Attackers spray liquid nitrogen to extend retention, then boot a live OS to read the memory dump and extract encryption keys from RAM. Defenses include: TPM + PIN (key is in TPM, not exposed in RAM until after PIN entry), memory encryption (Intel TME or AMD SME encrypt RAM contents at the memory controller), requiring physical PIN entry at boot so that stealing a powered-off laptop means no keys are in RAM, and delayed memory clearing features in modern UEFI that zero RAM before boot.

Measured Boot and Remote Attestation

Measured Boot uses the TPM to record hashes of every boot component into PCRs, creating a tamper-evident log of the boot process. Remote attestation sends these PCR measurements to a remote attestation server, which verifies that the system booted with only trusted, unmodified components. Enterprise technologies like Microsoft Attestation Service, Microsoft Pluton, and Intel TXT implement remote attestation. Zero Trust platforms use attestation reports as a device health signal in Conditional Access policies — untrusted device states trigger additional authentication challenges.

Encrypting Removable Media

Endpoint encryption must extend to removable media — USB drives, external hard drives, and SD cards that leave the controlled environment. BitLocker To Go (Windows) encrypts removable drives using a password or smart card. macOS Disk Utility can create encrypted disk images. Enterprise DLP policies can be enforced at the OS level to require encryption on any USB storage device connected to corporate endpoints — unencrypted USB drives are blocked from receiving data. This prevents data loss when a USB drive is lost or stolen.

Key Management for Full Disk Encryption

The security of full-disk encryption depends entirely on proper key management. Recovery keys must be stored securely and separately from the encrypted device — an organization that loses all copies of recovery keys has effectively lost access to their encrypted data permanently. Best practices: store BitLocker recovery keys in Active Directory / Azure AD automatically via Group Policy, back up FileVault recovery keys to MDM (Jamf/Intune), use Hardware Security Modules (HSMs) for enterprise key management at scale, and test recovery procedures quarterly.

Quick Check

Test your understanding of CompTIA Security+ (SY0-701) concepts from this lesson.

Lesson Recap

In this lesson you learned: TPM provides a hardware root of trust that seals encryption keys to specific boot states, Secure Boot verifies the cryptographic signature of every boot component to block bootkits, and BitLocker with TPM+PIN combines hardware key protection with pre-boot authentication to defend against both offline drive theft and evil-maid attacks. Next up we explore Business Continuity Planning and Disaster Recovery — ensuring operations survive major disruptions.

Frequently asked questions

Is the “Hardware Security: TPM, Secure Boot, and Drive Encryption” lesson free?

Yes — the full text of “Hardware Security: TPM, Secure Boot, and Drive Encryption” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.

What will I learn in “Hardware Security: TPM, Secure Boot, and Drive Encryption”?

Use Trusted Platform Modules, Secure Boot, and full-disk encryption (BitLocker, FileVault) to prevent cold-boot and evil-maid attacks on physical devices. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cloud & IT Cert Prep?

No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Hardware Security: TPM, Secure Boot, and Drive Encryption” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cloud & IT Cert Prep lesson?

Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Physical Access Controls: Badges, Locks, and Mantraps
  2. Surveillance: CCTV, Motion Sensors, and Logging
  3. Data Center Environmental Controls
  4. Hardware Security: TPM, Secure Boot, and Drive Encryption
← Back to Cloud & IT Cert Prep