Study guide
5.2 Partition Tables & Boot Structures: MBR, GPT, VBR, BIOS vs. UEFI Secure Boot
Computer Hacking Forensic Investigator CHFI 312-49
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Foundations of Digital Forensics & Cybercrime Investigation
1.1 Cybercrime Classifications, Forensic Science Principles & Legal Admissibility 1.2 RFC 3227 Order of Volatility, Live vs. Dead Acquisition & Forensic Readiness 1.3 Indicators of Compromise (IoCs), Cyber Attribution & Threat Intelligence 1.4 AI-Assisted Forensics, GitOps, Automation/Orchestration & Forensics-as-a-Service (FaaS)
2 Chapter 2: Modern Forensic Environments & Emerging Threats
2.1 Fileless Malware, In-Memory Execution & Living-off-the-Land (LotL) 2.2 IoT & Operational Technology (OT/SCADA) Forensic Fundamentals 2.3 Dark Web, Tor Network, Onion Routing & Hidden Services Forensics 2.4 Blockchain Transactions, Cryptocurrency Tracing & Digital Asset Investigations
3 Chapter 3: Legal Frameworks, Search Warrants & Evidence Rules
3.1 Federal Rules of Evidence (FRE 702, 901, 902, 1001-1003) & Daubert/Frye Standards 3.2 Fourth Amendment, Warrant Exceptions, Workplace Search & Consent Protocols 3.3 International Standards: ISO/IEC 27037, ACPO Principles & ENFSI Guidelines 3.4 Cybercrime Statutes, Privacy Compliance, CAN-SPAM & International Cooperation
4 Chapter 4: eDiscovery, Chain of Custody & Professional Ethics
4.1 Electronic Discovery Reference Model (EDRM) & Legal Spoliation Holds 4.2 Chain of Custody Documentation, Evidence Packaging & Tamper-Evident Handling 4.3 Expert Witness Testimony, Report Writing Standards & EC-Council Code of Ethics
5 Chapter 5: Storage Architecture, Boot Sequences & Media Forensics
5.1 Storage Media Architecture: Sectors, Clusters, RAM/File Slack & Unallocated Space 5.2 Partition Tables & Boot Structures: MBR, GPT, VBR, BIOS vs. UEFI Secure Boot 5.3 RAID Reconstruction (RAID 0, 1, 5, 6, 10) & SSD Forensic Challenges (TRIM, Wear Leveling)
6 Chapter 6: Windows File Systems: NTFS & FAT
6.1 NTFS Architecture: Master File Table ($MFT) Record Structure & Attribute Headers 6.2 NTFS Artifacts: Alternate Data Streams (ADS), Volume Shadow Copies (VSS) & $LogFile 6.3 FAT12/16/32 and exFAT Architecture, Directory Entries & File Deletion Mechanics
7 Chapter 7: Non-Windows File Systems & File Signatures
7.1 Linux File Systems: ext2/ext3/ext4 Inode Architecture, Superblocks & Journaling Forensics 7.2 macOS File Systems: HFS+ and Apple File System (APFS) Architecture & Snapshots 7.3 File Signatures, Magic Bytes, Hex Headers/Footers & File Carving Techniques
8 Chapter 8: Investigation Lifecycle, Lab Setup & First Response
8.1 Forensic Laboratory Accreditation: ISO/IEC 17025 Standards & Hardware/Software Controls 8.2 First Responder Duties: Crime Scene Containment, Electronic Triage & Volatile Triage 8.3 Physical Evidence Packaging, Anti-Static/Faraday Protection & Transport Security
9 Chapter 9: Forensic Acquisition & Verification Methodology
9.1 Hardware and Software Write-Blockers: Operational Validation & Bridge Verification 9.2 Bit-Stream Disk Imaging, Physical vs. Logical vs. Targeted Acquisition Methodology 9.3 Forensic Image Formats (RAW/DD, E01, AFF) & Cryptographic Hashing Verification (MD5, SHA-256)
10 Chapter 10: Anti-Forensics Techniques & Countermeasures
10.1 Steganography Detection: Spatial/Frequency Domain Steganalysis & Hidden Carrier Extraction 10.2 Timestomping Countermeasures: Comparing $STANDARD_INFORMATION vs $FILE_NAME Timestamps 10.3 Secure Wiping, Degaussing, File Shredding Countermeasures & Residual Artifact Recovery
11 Chapter 11: Windows Operating System Forensics
11.1 Windows Registry Forensics: SYSTEM, SOFTWARE, SAM & NTUSER.DAT Hive Analysis 11.2 Execution Artifacts: Prefetch (.pf), Shimcache (AppCompatCache), Amcache.hve & UserAssist 11.3 User Activity Artifacts: ShellBags, LNK Shortcut Files, Jump Lists & Recycle Bin ($I/$R) 11.4 Windows Event Log Forensics: Security Audit IDs (4624, 4625, 4688, 4720, 7045) & EVTX Parsing
12 Chapter 12: Memory Forensics & Malware Analysis
12.1 Volatile Memory Acquisition: RAM Capture, Crash Dumps, Hiberfil.sys & Pagefile.sys 12.2 Memory Analysis with Volatility 3: pslist, pstree, malfind, netscan & Vadinfo 12.3 Static Malware Triage: Strings, PE Headers, Import Tables, Hashes & YARA Rule Matching 12.4 Dynamic Malware Analysis: Sandboxing, Process Monitor (Procmon), Regshot & Network Callouts 12.5 .NET Managed Malware Analysis & the GOOTLOADER Fileless Infection Chain
13 Chapter 13: Network, Web Application & Email Forensics
13.1 Network Forensics: PCAP Analysis, Protocol Dissection, Snort/Suricata & Flow Analysis 13.2 Web Server Forensics: Apache/IIS Access Logs, SQL Injection, XSS & Web Shell Detection 13.3 Email Forensics: RFC 5322 Headers, Authentication (SPF, DKIM, DMARC) & Mbox/PST Extraction 13.4 SIEM Event Correlation, Cross-Source Timeline Analysis & Super-Timeline Construction 13.5 Investigating Directory Traversal, Command Injection, Parameter Tampering, XXE, Cookie Poisoning & Brute Force 13.6 Network Device & Service Log Forensics: Firewall, IDS, Honeypot, Router, DHCP, Switch, VPN, DNS & SSH 13.7 Wireless Network Forensics: Rogue APs, Evil Twins, MAC Spoofing, Deauthentication & Jamming
14 Chapter 14: Mobile, Cloud & IoT Forensics
14.1 Mobile Device Forensics: Manual, Logical, File System & Physical Extraction (Android/iOS) 14.2 Mobile Artifact Analysis: Call Logs, SMS/Chat SQLite Databases, Location Data & Plists 14.3 Cloud Forensics: AWS CloudTrail, Azure Activity Logs & Multi-Tenant Evidence Collection 14.4 IoT Forensics: UART/JTAG Physical Interfaces, Firmware Extraction & Sensor Telemetry
15 Chapter 15: Commercial & Open-Source Forensic Suites
15.1 Commercial Forensic Platforms: EnCase Forensic, FTK (Forensic Toolkit) & FTK Imager 15.2 Open-Source Forensic Platforms: Autopsy, The Sleuth Kit (TSK) & SIFT/CAINE Workstations 15.3 Specialized DFIR Utilities: Eric Zimmerman Tools (EZ Tools) & Sysinternals Forensic Suite
16 Chapter 16: Analysis Toolkits, Python Scripting & Tool Validation
16.1 Reverse Engineering & Password Cracking: Ghidra, IDA Pro, Hashcat & John the Ripper 16.2 Python for Digital Forensics: Parsing Raw Artifacts, Custom Scapy Scripts & Evidence Automation 16.3 Forensic Tool Testing & Validation: NIST CFTT Methodology, ISO/IEC 17025 Standards & Daubert Compliance
17 Chapter 17: Database Forensics & Web Application Firewalls
17.1 MySQL Forensics: Internal Architecture, Data Directory, Information Schema & Utility Programs 17.2 SQL Server Forensics: SSMS, ApexSQL, SQLCMD Transaction-Log Collection, Plan Cache & Trace Files 17.3 Web Application Firewall (WAF) Architecture, Audit Logs, Benefits & Limitations
18 Chapter 18: Social, Virtualized, Multimedia & Browser Investigations
18.1 Social Media, Social Engineering, Insider Threat & Identity Theft Forensics 18.2 Virtualization, Container & Microservices Forensics, Bluetooth and Electron Chat Applications 18.3 Multimedia Forensics: Image, Audio & Video Authentication, EXIF, PRNU and Deepfake Detection 18.4 Browser Artifact Recovery, Private Browsing, USB Enumeration, Partition Recovery & Packer Unpacking Tools
5.2 Partition Tables & Boot Structures: MBR, GPT, VBR, BIOS vs. UEFI Secure Boot
Key Takeaways Explain This Topic AI
The Master Boot Record (MBR) at LBA 0 encapsulates 446 bytes of bootstrap code, four 16-byte partition table records (64 bytes total), and the two-byte boot signature 0x55AA, imposing an architectural limit of 2.19 TB due to 32-bit sector addressing.
The GUID Partition Table (GPT) architecture provides resilience against corruption through a Protective MBR at LBA 0, a Primary GPT Header at LBA 1, a 128-entry Partition Entry Array (LBA 2–33), and a mirrored Backup GPT located at the terminal sectors of the physical disk, verified by CRC32 checksums.
The Volume Boot Record (VBR) resides in the first sector of a formatted partition and contains the BIOS Parameter Block (BPB), which defines critical file system geometry including bytes per sector, sectors per cluster, reserved sectors, and total sector counts.
Legacy BIOS executes real-mode 16-bit code starting at physical memory address 0xFFFF0, executing the MBR bootstrap code, whereas UEFI operates in 32-bit or 64-bit mode, reading EFI executables directly from an FAT32-formatted EFI System Partition (ESP).
UEFI Secure Boot implements a hierarchical cryptographic trust chain consisting of the Platform Key (PK), Key Exchange Key (KEK), Authorized Signature Database (db), and Forbidden Signature Database (dbx) to prevent unauthorized bootkits from executing.
Last updated: September 2026
5.2 Partition Tables & Boot Structures: MBR, GPT, VBR, BIOS vs. UEFI Secure Boot
Quick Answer: Partition tables and boot structures dictate how a storage device initializes and transfers execution to the operating system. The legacy Master Boot Record (MBR) resides at Sector 0 (LBA 0), containing 446 bytes of bootstrap code, four 16-byte partition entries (64 bytes), and the validation signature 0x55AA , capped at 2.19 TB due to 32-bit sector addressing. Modern systems utilize the GUID Partition Table (GPT) under UEFI, which features 64-bit addressing, supports up to 128 partitions, maintains a Protective MBR at LBA 0, and guards against disk tampering via dual headers (Primary at LBA 1, Backup at disk end) verified by CRC32 checksums . Modern UEFI Secure Boot enforces a cryptographic chain of trust (PK, KEK, db, dbx) to prevent unauthorized bootkits from executing prior to kernel initialization.
Master Boot Record (MBR) Internals & Hex Anatomy
Introduced with IBM PC DOS 2.0 in 1983, the Master Boot Record (MBR) occupies the very first sector of a partitioned hard drive ( LBA 0 / Cylinder 0, Head 0, Sector 1 ) and spans exactly 512 bytes. +-------------------------------------------------------------------------+
- | MASTER BOOT RECORD (LBA 0: 512 BYTES) |
- +-------------------------------------------------------------------------+
- | Offset 0x000 - 0x1BD (446 Bytes): Master Bootstrap Executable Code |
- | Offset 0x1BE - 0x1CD (16 Bytes): Partition Entry #1 |
- | Offset 0x1CE - 0x1DD (16 Bytes): Partition Entry #2 |
- | Offset 0x1DE - 0x1ED (16 Bytes): Partition Entry #3 |
- | Offset 0x1EE - 0x1FD (16 Bytes): Partition Entry #4 |
- | Offset 0x1FE - 0x1FF (2 Bytes): Boot Signature / Magic Bytes [0x55 AA]|
- +-------------------------------------------------------------------------+
- The MBR Structure Breakdown
Bootstrap Code (446 Bytes, Offsets 0x000 – 0x1BD ): Executable machine instructions loaded into RAM by the system BIOS. Its primary function is to parse the partition table, identify the single active (bootable) partition, load that partition's Volume Boot Record (VBR) into physical memory at address 0x7C00 , and pass CPU execution to it.
Partition Table (64 Bytes, Offsets 0x1BE – 0x1FD ): Contains exactly four 16-byte records defining primary partitions. Because the table is hardcoded to 64 bytes, an MBR disk can host a maximum of four primary partitions (or three primary partitions and one extended partition containing logical drives linked via Extended Boot Records [EBRs]).
Boot Signature (2 Bytes, Offsets 0x1FE – 0x1FF ): The two-byte hexadecimal word 0x55 0xAA (displayed in little-endian hex viewers as 55 AA ). BIOS firmware checks for this exact signature before executing the bootstrap code; if these bytes are corrupted or zeroed, the system halts with "No bootable device found."
Detailed Breakdown of a 16-Byte MBR Partition Entry
Every partition entry in the MBR conforms to a strict 16-byte binary structure:
Byte Offset Length Description Forensic Significance
0x00 1 Byte Boot Indicator / Drive Status 0x80 = Active/Bootable partition; 0x00 = Inactive. Only one partition should be 0x80 .
0x01 – 0x03 3 Bytes Starting CHS Address Cylinder-Head-Sector coordinates of the partition start (legacy).
0x04 1 Byte Partition Type ID Hex flag defining the file system type (e.g., 0x07 = NTFS/exFAT, 0x0B / 0x0C = FAT32, 0x83 = Linux Native, 0xEE = GPT Protective MBR).
0x05 – 0x07 3 Bytes Ending CHS Address Cylinder-Head-Sector coordinates of the partition end (legacy).
0x08 – 0x0B 4 Bytes Starting LBA Sector 32-bit unsigned integer (little-endian) representing the starting sector offset (e.g., 00 08 00 00 = LBA 2048).
0x0C – 0x0F 4 Bytes Total Sectors in Partition 32-bit unsigned integer (little-endian) defining the total sector count of the partition.
The Mathematical 2TB Limit of MBR
Why does MBR fail on modern drives larger than 2 Terabytes?
The limitation stems directly from the 4-byte (32-bit) field allocated for the total sector count and starting LBA:
A 32-bit integer can address a maximum of 2 32 = 4 , 294 , 967 , 296 2^{32} = 4,294,967,296 2 32 = 4 , 294 , 967 , 296 unique sectors.
Multiplied by the standard sector size of 512 bytes: 4 , 294 , 967 , 296 sectors × 512 bytes = 2 , 199 , 023 , 255 , 552 bytes ≈ 2.199 TB (2 TiB) 4,294,967,296 \text{ sectors} \times 512 \text{ bytes} = 2,199,023,255,552 \text{ bytes} \approx 2.199 \text{ TB (2 TiB)} 4 , 294 , 967 , 296 sectors × 512 bytes = 2 , 199 , 023 , 255 , 552 bytes ≈ 2.199 TB (2 TiB)
Any storage capacity beyond 2.19 TB on an MBR disk is completely unaddressable and invisible to the operating system.
GUID Partition Table (GPT) Architecture
Part of the Unified Extensible Firmware Interface (UEFI) specification, the GUID Partition Table (GPT) completely supersedes MBR. It utilizes 64-bit logical block addressing, expanding maximum addressable storage to 2 64 2^{64} 2 64 sectors (9.4 Zettabytes with 512-byte sectors; 75.5 Zettabytes with 4Kn sectors). +-------------------------------------------------------------------------+
- | GUID PARTITION TABLE (GPT) DISK MAP |
- +-------------------------------------------------------------------------+
- | LBA 0: Protective MBR (Type 0xEE spanning disk; prevents wiping)|
- | LBA 1: Primary GPT Header (Signature: 'EFI PART'; CRC32 check) |
- | LBA 2 - 33: Partition Entry Array (128 partition records x 128 bytes)|
- | LBA 34: First Usable LBA (Beginning of Volume Storage) |
- | ... ... Usable Partitions (NTFS, ext4, APFS, ESP) ... |
- | LBA N - 34: Last Usable LBA |
- | LBA N - 33..2: Backup Partition Entry Array (Secondary GPT Table) |
- | LBA N - 1: Backup GPT Header (Mirrored Header at Disk End) |
- +-------------------------------------------------------------------------+
- GPT LBA Breakdown
LBA 0: Protective MBR:
To prevent legacy MBR disk utilities (e.g., older versions of FDISK) from failing to recognize the GPT disk and mistakenly reporting it as unpartitioned space, LBA 0 contains a "Protective MBR".
It contains a single partition table record covering the entire disk with Partition Type ID 0xEE .
Legacy utilities see a single massive, unrecognized partition and refuse to overwrite the disk, preserving GPT structures.
LBA 1: Primary GPT Header:
Contains metadata defining the disk's partition architecture.
Header Signature (Offsets 0x00 – 0x07 ): The 8-byte ASCII string "EFI PART" ( 0x54 0x52 0x41 0x50 0x20 0x49 0x46 0x45 in little-endian).
Header CRC32 Checksum (Offset 0x10 ): 32-bit CRC checksum of the GPT header itself (computed with the CRC field zeroed during calculation). Any tampering with the header causes firmware CRC validation to fail.
Current LBA (Offset 0x18 ): Pointer to LBA 1.
Backup LBA (Offset 0x20 ): Pointer to the Backup GPT Header located at LBA N − 1 N-1 N − 1 .
First Usable LBA (Offset 0x28 ): Typically LBA 34.
Last Usable LBA (Offset 0x30 ): Typically LBA N − 34 N-34 N − 34 .
Disk GUID (Offset 0x38 ): Unique 128-bit GUID assigned to the physical drive.
Partition Array Starting LBA (Offset 0x48 ): Points to LBA 2.
Number of Partition Entries (Offset 0x50 ): Typically 128 entries.
Size of Partition Entry (Offset 0x54 ): Exactly 128 bytes.
Partition Array CRC32 (Offset 0x58 ): CRC32 checksum verifying the integrity of the entire partition entry array.
LBAs 2–33: Partition Entry Array:
Standard GPT allocates 32 sectors for partition records. With each record measuring 128 bytes, this accommodates a minimum of 128 partition entries ( 32 sectors × 512 bytes = 16 , 384 bytes ÷ 128 bytes/entry = 128 32 \text{ sectors} \times 512 \text{ bytes} = 16,384 \text{ bytes} \div 128 \text{ bytes/entry} = 128 32 sectors × 512 bytes = 16 , 384 bytes ÷ 128 bytes/entry = 128 ).
Structure of a 128-Byte Partition Entry:
Offsets 0x00 – 0x0F (16 Bytes): Partition Type GUID (defines role, e.g., Basic Data, Recovery, ESP).
Offsets 0x10 – 0x1F (16 Bytes): Unique Partition GUID (unique identifier for this specific partition instance).
Offsets 0x20 – 0x27 (8 Bytes): Starting LBA (64-bit integer, little-endian).
Offsets 0x28 – 0x2F (8 Bytes): Ending LBA (64-bit integer, little-endian).
Offsets 0x30 – 0x37 (8 Bytes): Attribute Flags (bit 0 = System partition; bit 60 = Read-only; bit 62 = Hidden; bit 63 = Do not automount).
Offsets 0x38 – 0x7F (72 Bytes): Partition Name (36 UTF-16LE characters).
LBAs N − 33 N-33 N − 33 through N − 1 N-1 N − 1 : Backup (Secondary) GPT:
A major forensic advantage of GPT is structural redundancy. The Backup Partition Entry Array sits at LBAs N − 33 N-33 N − 33 to N − 2 N-2 N − 2 , and the Backup GPT Header resides in the very last sector ( LBA N − 1 N-1 N − 1 ).
Forensic Recovery Impact: If a threat actor or wiper malware executes an anti-forensics zeroing attack against the first 34 sectors (LBA 0–33) to destroy partition definitions, an investigator can recover the entire partition table by extracting the secondary GPT header and array from the end of the raw disk image.
Common Partition Type GUIDs
- Partition Role Partition Type GUID Operating System
- EFI System Partition (ESP) C12A7328-F81F-11D2-BA4B-00A0C93EC93B UEFI Universal (FAT32)
- Microsoft Basic Data EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Windows (NTFS/exFAT)
- Microsoft Reserved (MSR) E3C9E316-0B5C-4DB8-817D-F92DF00215AE Windows System
- Windows Recovery (WinRE) DE94BBA4-06D1-4D40-A16A-BFD50179D6AC Windows Recovery Tools
- Linux Filesystem Data 0FC63DAF-8483-4772-8E79-3D69D8477DE4 Linux (ext4, XFS, Btrfs)
- Apple APFS Container 7C3457EF-0000-11AA-AA11-00306543ECAC macOS High Sierra & Later
- Volume Boot Record (VBR) & BIOS Parameter Block (BPB)
While the MBR/GPT defines physical disk slicing, the Volume Boot Record (VBR) —also known as the Partition Boot Sector —is the very first sector of an individual logical volume or formatted partition (e.g., LBA 2048 for Partition 1). +-------------------------------------------------------------------------+
- | VOLUME BOOT RECORD (VBR) STRUCTURE |
- +-------------------------------------------------------------------------+
- | Jump Instruction (3 Bytes) + OEM ID / File System Type (8 Bytes) |
- | BIOS Parameter Block (BPB): Bytes/Sec, Sec/Cluster, Reserved Sectors |
- | Extended BPB: Volume Serial Number, Volume Label, Total Sectors |
- | Bootstrap Code: File system loader (e.g., loads NTLDR or BOOTMGR) |
- | End of Sector Signature: 0x55 AA |
- +-------------------------------------------------------------------------+
- The BIOS Parameter Block (BPB)
The VBR contains critical file system geometry stored in the BIOS Parameter Block (BPB) . When analyzing corrupted or partially wiped partitions, examiners parse the BPB to recover cluster size and volume geometry:
Bytes Per Sector (Offset 0x0B , 2 Bytes): Typically 0x00 0x02 (512 bytes).
Sectors Per Cluster (Offset 0x0D , 1 Byte): Crucial allocation metric (e.g., 0x08 = 8 sectors = 4,096-byte clusters).
Reserved Sectors (Offset 0x0E , 2 Bytes): Number of sectors preceding the file allocation tables (e.g., in FAT32, typically 32 sectors).
Media Descriptor (Offset 0x15 , 1 Byte): 0xF8 identifies fixed hard disks.
Total Sectors (Offset 0x28 in NTFS, 8 Bytes): 64-bit integer specifying the volume size.
MFT Cluster Offset (Offset 0x30 in NTFS, 8 Bytes): Cluster address where the Master File Table ( $MFT ) begins.
Clusters Per MFT Record (Offset 0x40 in NTFS, 1 Byte): In signed integer format: 0xF6 = -10, meaning 2 10 = 1024 bytes 2^{10} = 1024 \text{ bytes} 2 10 = 1024 bytes per $MFT record.
Tip
NTFS Backup VBR: NTFS maintains a duplicate copy of the Volume Boot Record at the very last sector of the partition. If ransomware or an anti-forensic tool corrupts the primary VBR at LBA 2048, an investigator can copy the backup VBR from the partition's terminating sector to fully restore partition readability.
Loading diagram... GUID Partition Table (GPT) Layout and UEFI Secure Boot Verification Flow
Legacy BIOS vs. UEFI Boot Sequences
The boot sequence represents the handoff of system control from firmware to the operating system kernel. Investigating boot-level persistence (bootkits, rogue hypervisors) requires understanding the differences between legacy BIOS and modern UEFI boot pipelines. +-------------------------------------------------------------------------+
- | LEGACY BIOS vs. UEFI BOOT PIPELINE |
- +-------------------------------------------------------------------------+
- | LEGACY BIOS: |
- | Power On -> POST -> BIOS ROM (0xFFFF0) -> Read MBR (0x7C00) |
- | -> Parse Partition Table -> Read Active VBR -> Load BOOTMGR |
- | |
- | UEFI PIPELINE: |
- | Power On -> SEC (Security) -> PEI (Pre-EFI Init) -> DXE (Driver Exec) |
- | -> BDS (Boot Device Select) -> Load \EFI\...\bootmgfw.efi |
- | -> ExitBootServices() -> OS Kernel Execution |
- +-------------------------------------------------------------------------+
- The Legacy BIOS Boot Pipeline
Power-On & POST: CPU initializes in 16-bit real mode and executes the BIOS firmware located at reset vector 0xFFFF0 in ROM/Flash memory. The Power-On Self-Test (POST) validates motherboard chipset, CPU registers, and RAM.
MBR Loading: BIOS interrogates boot priority devices, loads the first 512 bytes (LBA 0) into RAM at physical memory address 0x0000:7C00 , verifies the 0x55AA signature, and jumps execution to the MBR bootstrap code.
Active Partition Search: MBR bootstrap code parses the 64-byte partition table looking for the active boot indicator flag ( 0x80 ).
VBR Execution: The MBR reads the active partition's Volume Boot Record (VBR) into RAM at address 0x7C00 , which in turn parses the BPB and loads the OS boot manager ( BOOTMGR in Windows, NTLDR in legacy systems, or GRUB Stage 1.5/2 in Linux).
Kernel Transition: The boot manager transitions the CPU from 16-bit real mode into 32-bit protected mode or 64-bit long mode, loads kernel drivers, and initializes ntoskrnl.exe .
The UEFI Boot Pipeline (Five Architectural Phases)
UEFI completely abandons 16-bit real mode, executing 32-bit or 64-bit code from the first instruction cycle across five distinct phases:
SEC (Security Phase): Executes directly from SPI flash. Initializes temporary memory (Cache-as-RAM [CAR]) because physical DRAM is not yet initialized. Authenticates the initial firmware volume and acts as the system root of trust.
PEI (Pre-EFI Initialization Phase): Initializes physical memory controllers, basic chipset structures, and CPU sockets. Builds the Hand-Off Block (HOB) table passed to the next phase.
DXE (Driver Execution Environment Phase): The core operational engine of UEFI. Loads hardware device drivers (PCIe, USB, NVMe, SATA), initializes system tables, and enforces Secure Boot policy checks .
BDS (Boot Device Selection Phase): Evaluates non-volatile RAM (NVRAM) boot variables ( BootOrder , Boot#### ), identifies the target boot volume, and reads the EFI System Partition (ESP) .
TSL (Transient System Load Phase): The UEFI firmware executes the operating system loader binary directly from the ESP (e.g., \EFI\Microsoft\Boot\bootmgfw.efi or grubx64.efi ). The OS loader prepares memory maps and calls the UEFI runtime function ExitBootServices() , terminating UEFI execution and transferring complete control to the operating system kernel.
UEFI Secure Boot Architecture & Cryptographic Key Hierarchy
UEFI Secure Boot is a security standard defined in the UEFI specification that ensures endpoints execute exclusively authentic, cryptographically signed firmware, option ROMs, and operating system bootloaders. +-------------------------------------------------------------------------+
- | UEFI SECURE BOOT CRYPTOGRAPHIC HIERARCHY |
- +-------------------------------------------------------------------------+
- | [Platform Key (PK)] Root OEM Key; controls updates to the KEK |
- | | |
- | v |
- | [Key Exchange Key (KEK)] Issued by OS Vendor (Microsoft) / OEM; updates db|
- | | |
- | +----+----+ |
- | | | |
- | v v |
- | [db DB] [dbx DB] db = Whitelist of allowed signatures/hashes |
- | (Allowed) (Forbidden) dbx = Blacklist of revoked bootkit binaries |
- +-------------------------------------------------------------------------+
- The Four Cryptographic Key Databases
Platform Key (PK): The root of trust for the hardware platform. Installed into SPI flash by the hardware OEM (e.g., Dell, HP, Lenovo). Establishes a mutual trust relationship between the platform owner and the firmware. Authorizes updates to the Key Exchange Key (KEK).
Key Exchange Key (KEK): Intermediate cryptographic keys issued by operating system vendors (primarily the Microsoft Corporation KEK CA) and OEMs. Enforces authorization checks before any modifications can be committed to the signature databases ( db and dbx ).
Authorized Signature Database ( db ): The signature whitelist. Contains X.509 digital certificates and SHA-256 cryptographic hashes of authorized EFI executables, third-party hardware Option ROMs, and OS boot managers.
Forbidden Signature Database ( dbx ): The revocation blacklist. Contains hashes and certificates of known vulnerable bootloaders, revoked signing keys, and malicious bootkits. If a binary's hash appears in dbx , the UEFI firmware immediately terminates execution.
Bootkit Forensics & Secure Boot Bypass Mechanics
A Bootkit is an advanced form of rootkit that modifies or replaces boot components (MBR, VBR, or EFI bootloaders) to execute prior to the operating system kernel. Running at this privileged tier, a bootkit subverts kernel security controls, hypervisor-protected code integrity (HVCI), and endpoint detection and response (EDR) sensors.
How Bootkits Bypass Secure Boot (The BlackLotus Case Study)
In 2022, security researchers identified BlackLotus , the first in-the-wild UEFI bootkit capable of bypassing Secure Boot on fully patched Windows 11 systems.
The Vector (Baton Drop / CVE-2022-21894): BlackLotus did not compromise the private Microsoft signing keys. Instead, it exploited an unrevoked, legitimately signed 2020 Windows bootloader ( bootmgfw.efi ) that contained a known vulnerability allowing arbitrary memory modification.
The Exploit Sequence:
The malware replaced the target system's current bootloader in the EFI System Partition with the vulnerable 2020 binary.
Because the 2020 binary was legitimately signed by Microsoft and had not yet been added to the system's dbx blacklist , UEFI Secure Boot verified its signature and executed it without error.
During execution, the malware triggered CVE-2022-21894 to hijack memory, disabled BitLocker enforcement, deactivated Windows Defender and HVCI, and established persistence as an EFI runtime driver.
Forensic Investigation of the EFI System Partition (ESP)
To investigate suspected UEFI bootkit compromises, the examiner must mount and analyze the ESP: # Mount EFI System Partition on Linux
mount -t vfat /dev/nvme0n1p1 /mnt/esp
- # Or on Windows via administrative command prompt
- mountvol S: /S
- # Compute SHA-256 hashes of all EFI boot applications
- sha256sum /mnt/esp/EFI/Microsoft/Boot/*.efi
- # Inspect NVRAM boot variables and Secure Boot status using efibootmgr
- efibootmgr -v
- # Query Secure Boot key status in PowerShell
- Get-SecureBootUEFI -Name PK
- Get-SecureBootUEFI -Name db
- Get-SecureBootUEFI -Name dbx
- Partition Parsing with The Sleuth Kit: mmls
The Sleuth Kit utility mmls displays the layout of partitions in a volume system, supporting MBR, GPT, BSD disk labels, and Sun slices: # Analyze partition layout of a suspect physical image
mmls -t gpt /evidence/suspect_drive.raw
# Sample Output:
- # GUID Partition Table (Sector size: 512)
- # Units are in 512-byte sectors
- # Slot Start End Length Description
- # 000: Meta 0000000000 0000000000 0000000001 Safety Table (LBA 0)
- # 001: Meta 0000000001 0000000001 0000000001 GPT Header (LBA 1)
- # 002: Meta 0000000002 0000000033 0000000032 Partition Table
- # 003: 000 0000002048 0000206847 0000204800 EFI System Partition
- # 004: 001 0000206848 0000239615 0000032768 Microsoft Reserved
- # 005: 002 0000239616 0976771071 0976531456 Basic Data Partition
- # 006: Meta 0976773135 0976773166 0976000032 Backup Partition Table
- # 007: Meta 0976773167 0976773167 0000000001 Backup GPT Header
From this output, an investigator identifies that the Primary Basic Data Partition begins at LBA 239616 . To mount or inspect this volume directly with file system tools, the examiner supplies the sector offset:
fls -o 239616 /evidence/suspect_drive.raw .