Hardware security
SecurityX CAS-005 · Lesson 16 of 24 · 2:12:06
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the CompTIA SecurityX (CAS-005) exam. In this lesson: roots of trust (TPM, HSM, and vTPM), security coprocessors and secure enclaves, host-based encryption and self-encrypting drives, Secure Boot, measured boot, and self-healing hardware, and attacks on firmware, USB, memory, and through EMI and EMP. Includes three original practice questions, with Thornbury Biotech, a fictional biotech company whose security architect designs and runs its security, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
New hardware, old worries
Thornbury Biotech is buying new lab servers and laptops, and the review board wants hardware that protects keys and proves that each device started cleanly. Last year, a contractor plugged an unknown USB device into a lab PC, and a card reader in the cafeteria was found with a thin device hidden inside. This lesson covers the hardware controls that answer both concerns.
Roots of trust
A root of trust is a component that the rest of the system trusts without checking, so it must be small, protected, and hard to tamper with, which usually means hardware. The Trusted Platform Module, or TPM, is a chip or firmware component that stores keys, measures the boot process into platform configuration registers, and can seal secrets so they are released only when those measurements match. A hardware security module, or HSM, is a hardened device or cloud service that generates and stores keys for many systems, signs and encrypts inside its boundary, and never exports private keys in plain text. HSMs are validated against FIPS 140-3, and they protect certificate authority keys, payment keys, and code signing keys. A virtual TPM gives each virtual machine its own TPM, backed by the hypervisor, so guests can use disk encryption and attestation, but its secrets are only as safe as the host that protects them.
Coprocessors, enclaves, and virtual hardware
Security coprocessors take sensitive work away from the main processor and the operating system, so a compromised kernel cannot reach their keys. CPU security extensions add hardware features like blocking execution from data pages, memory encryption, and protected memory regions, and they only help when the firmware and the operating system turn them on. A secure enclave is an isolated, encrypted area of memory, or a dedicated core, where code runs and keys stay protected even from the operating system and the hypervisor, as in confidential computing. Phones and laptops use secure enclaves to hold biometric templates and device keys, so a stolen device does not give up its secrets easily. Virtual hardware, like virtual TPMs, virtual network cards, and emulated devices, extends the attack surface to the hypervisor, so keep hypervisors patched, remove unused virtual devices, and watch for escape attempts.
Encryption and boot integrity
Host-based encryption protects data on the host itself, with full disk or file encryption managed by the operating system, and keys often sealed in the TPM, so a stolen disk is useless on its own. A self-encrypting drive, or SED, encrypts everything in the drive's own hardware, with no load on the processor, and an instant secure erase works by destroying the drive's key. Secure Boot lets the firmware start only boot loaders and drivers signed by trusted keys, so a tampered boot loader is refused before it can run. Measured boot goes further: each stage hashes the next one into the TPM, and a remote server checks those measurements through attestation, so a device that started something unexpected can be denied access. Secure Boot blocks, measured boot proves, and together with conditional access, they keep compromised devices away from sensitive data.
Self-healing and tamper detection
Self-healing hardware checks its own firmware at every start, and when it finds corruption, it restores a known good copy from protected storage, without an administrator. Some platforms also monitor firmware while the system runs, and log each event, so the security team learns about the attempt. Tamper detection uses seals, chassis intrusion switches, and sensors for light, temperature, or voltage, to show or detect that someone opened a device. Countermeasures range from an alert at the next start, to an HSM that erases its keys the instant its enclosure is breached. Supply chain checks belong here too: buy through trusted channels, verify seals and firmware versions on arrival, and keep an inventory of each device's components.
Attacks on firmware and devices
Firmware tampering replaces code in the BIOS or UEFI, a network card, or a drive controller, so the implant survives reinstalls, and even a new disk. UEFI attacks target the boot process itself, through vulnerable boot loaders, writable firmware settings, or a disabled Secure Boot, so set a firmware password, keep firmware patched, and add vulnerable boot loaders to the revocation list. Shimming hides a paper-thin device inside a card reader's slot, between the card and the reader, to capture card data, so inspect readers regularly and use tamper-resistant terminals. USB-based attacks include devices that pretend to be keyboards and type commands in seconds, malicious charging cables, and drives carrying malware, and some devices even destroy hardware with a power surge. Block unknown USB device classes by policy, allow only approved and encrypted drives, disable autorun, and provide charging ports that carry no data.
Attacks on memory and the environment
Memory attacks go after data in RAM: a cold boot attack chills the memory chips and dumps keys before the data fades, and direct memory access through fast ports can copy memory from a running machine. Rowhammer flips bits in nearby memory rows by accessing one row over and over, and it can break isolation between processes. Defenses include memory encryption, DMA protection that blocks new devices until the system trusts them, a pre-boot PIN for disk encryption, and error correcting memory. Electromagnetic interference, or EMI, disrupts electronics or leaks signals that can be captured at a distance, so shield sensitive rooms and cables, and keep critical equipment away from strong sources. An electromagnetic pulse, or EMP, from a weapon or a severe solar storm, can destroy electronics outright, so critical sites use shielding, surge protection, and spare equipment kept offline in protected containers.
Recap
Let's recap. TPMs measure the boot and seal keys, HSMs protect keys for many systems under FIPS 140-3, and virtual TPMs serve virtual machines. Coprocessors, CPU extensions, and secure enclaves keep secrets away from the operating system, and virtual hardware widens the hypervisor's attack surface. Host-based encryption and self-encrypting drives protect data at rest, Secure Boot blocks unsigned code, and measured boot proves the boot through attestation. Self-healing firmware restores itself, and tamper detection ranges from seals to HSMs that erase their keys. And firmware, UEFI, shimming, USB, memory, EMI, and EMP attacks each have hardware or policy controls.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Thornbury’s two issuing certificate authorities must share one signing key, generated and used only inside validated hardware, and never exported. What should Thornbury use?
- The TPM of each issuing server
- A self-encrypting drive on each server
- A network HSM shared by both servers
- A secure enclave on the admin laptops
Show the answer
A network HSM shared by both servers
An HSM generates and keeps keys for several systems, signs inside its boundary, and is validated against FIPS 140-3. “The TPM of each issuing server” would give each server its own key, because a TPM key stays bound to one machine. “A self-encrypting drive on each server” only encrypts data at rest on a disk. And “A secure enclave on the admin laptops” is about one personal device, not the servers that sign.
Thornbury wants lab laptops to reach research data only if their firmware, boot loader, and boot drivers are exactly what was approved, and to prove it to a server before access is granted. Which capability provides this?
- Measured boot with remote attestation
- Secure Boot alone, with default keys
- Self-encrypting drives in every laptop
- A tamper-evident seal on each chassis
Show the answer
Measured boot with remote attestation
Measured boot hashes each stage into the TPM, and attestation proves those measurements to a server, which can then allow or deny access. “Secure Boot alone, with default keys” only blocks unsigned code on the laptop, and it proves nothing to a server. “Self-encrypting drives in every laptop” only protects data at rest if a laptop is stolen. And “A tamper-evident seal on each chassis” only shows a physical opening, not what the device started.
During a visit, a contractor plugs a small USB device into a lab PC, and within seconds, a command window opens and a script types itself. Which control would have blocked this?
- Full disk encryption with a pre-boot PIN on the PC
- A tamper-evident seal on the case
- Measured boot with remote attestation
- Blocking unknown USB device classes by policy
Show the answer
Blocking unknown USB device classes by policy
The device pretends to be a keyboard, so a policy that blocks unknown USB device classes stops it from typing anything. “Full disk encryption with a pre-boot PIN on the PC” only protects data when the PC is off or stolen. “A tamper-evident seal on the case” only shows that someone opened the case. And “Measured boot with remote attestation” only checks how the PC started, not devices plugged in later.