From Boot to Shutdown - Kernel Design, Security, Virtualization and Debugging in Windows 10, 11 and Server
Introduction
Chapter 1: The Windows Boot Process - From Power-On to Desktop
- UEFI Firmware and the Handoff to Bootmgr
- Boot Configuration Data (BCD) and Dual-Boot Architecture
- Kernel Loading: winload.efi, Registry Hives and Driver Initialization
- Session Manager Subsystem (smss.exe) and the First User-Mode Process
- Winlogon, Services Control Manager and Desktop Startup
- Common Boot Failures and Recovery Mechanisms
Chapter 2: The Windows Kernel Architecture - Kernel, Executive and HAL
- Historical Context: OS/2, NT 1.0 and the Hybrid Microkernel Design
- The Kernel Proper (ntoskrnl.exe): Threads, Synchronization, IPC, Interrupts
- The Executive Subsystems: Object Manager, I/O Manager, Security Reference Monitor, Memory Manager, Process/Thread Manager, Cache Manager, Configuration Manager, Power Manager
- Hardware Abstraction Layer (HAL): ACPI, Multiprocessor Support and Abstracted Hardware Interfaces
- Kernel Mode vs. User Mode: Privilege Levels, Ring 0/Ring 3 and the Transition Boundary
Chapter 3: System Calls, Interrupts and Exception Handling
- The System Call Interface: Nt* API Functions and the syscall Instruction
- System Call Dispatch: KiSystemService, Fast Calls and Argument Copying
- Hardware Interrupt Processing: IDT, ISR/DPC Model and Interrupt DPCs
- Software Exceptions: Structured Exception Handling (SEH), Vectorized EH and Exception Propagation
- Debug Exceptions and the Kernel Debugger Interface
- Comparison with Linux syscalls and interrupt handling
Chapter 4: Process and Thread Management
- EPROCESS and ETHREAD Internal Structures
- Process Creation: NtCreateProcess, PEB/TEB and DLL Loading
- Thread Creation and the Thread Environment Block (TEB)
- Context Switching: KTHREAD, Save/Restore and Stack Management
- Job Objects and Process Groups
- Comparison with Linux task_struct, fork/exec Model
Chapter 5: The Windows Scheduler - Preemption, Priority and Quantum Management
- Priority Levels and Priority Classes (Idle, Below Normal, Normal, Above Normal, High, Real-Time)
- Time Quantum Allocation and Dynamic Priority Boosting
- Multiprocessor Scheduling: Processor Affinity, NUMA Awareness and the Ready Queue
- I/O Completion Ports and Asynchronous I/O Scheduling
- Real-Time Threads and Starvation Prevention
- Comparison with Linux CFS Scheduler
Chapter 6: Virtual Memory Management - Address Spaces, Paging and Physical Memory
- Virtual Address Space Layout: User Mode vs. Kernel Mode Split
- Page Tables: CR3, PML4/PDP/Directory/Page Table Hierarchy and Hardware Support
- Page Fault Handling: Demand Paging, Copy-on-Write and Hard/Soft Faults
- Working Set Management: Eviction, Trimming and the Standby List
- Physical Memory Manager: PFN Database, Memory Partitions and NUMA Nodes
- Shared Sections, Mapped Files and Section Objects
Chapter 7: Synchronization Primitives and Interprocess Communication
- Kernel Synchronization: Mutexes, Semaphores, Events and Critical Sections
- Wait Mechanisms: KeWaitForSingleObject, Alertable Waits and Timeout Handling
- Interlocked Operations and Atomic Instructions (CMPXCHG, LOCK prefix)
- Interprocess Communication: Mailslots, Named Pipes, LPC/ALPC, Shared Memory
- Reader/Writer Locks, Slim Reader/Writer (SRW) and Spinlocks
- Deadlock Detection, Debugging Synchronization Issues
Chapter 8: The I/O Manager and Driver Architecture
- I/O Request Packets (IRP): Structure, Stack Locations and Completion Routines
- The Driver Object and Device Object Model
- Dispatch Routines: Major Function Codes and IOCTL Handling
- Filter Drivers: Upper/Lower Filters and Stream Inspectors
- Plug and Play Manager: Device Enumeration, Power Management and Resource Assignment
- Windows Driver Kit (WDK): KMDF, UMDF and Modern Driver Development
Chapter 9: Storage Stack, File Systems and NTFS Internals
- The Storage Stack: Classpnp, Disk.sys, Storport and SCSI/Storage Miniport Drivers
- Filter Manager and Volume Snapshots (VSS)
- NTFS File System Architecture: MFT, B-Trees, Resident vs. Non-Resident Attributes
- NTFS Data Structures: Boot Sector, Master File Table, Attribute Lists, Security Descriptors
- ReFS, FAT32, exFAT and the File System Filter Framework
- Storage Spaces, Tiered Storage and DirectStorage
Chapter 10: Networking Stack - From TCP/IP to Winsock
- The TCP/IP Protocol Stack: Tcpip.sys, NDIS and Protocol Drivers
- Network Driver Interface Specification (NDIS): Miniport Drivers and Filter Drivers
- Winsock 2 API: Socket Implementation, Overlapped I/O and IOCP Integration
- TCP Connection State Machine and Performance Tuning
- Windows Filtering Platform (WFP) and Firewall Architecture
- SDN, Hyper-V Virtual Switch and Container Networking
Chapter 11: Security Architecture - Tokens, Privileges, Authentication and Mitigations
- Access Tokens: Structure, Privileges, Mandatory Levels and Impersonation
- Security Reference Monitor (SRM): ACL Evaluation, Object Security Descriptors and Access Checks
- Local Security Authority (LSASS): Authentication Packages, Kerberos, NTLM and Credential Management
- Integrity Levels and Mandatory Integrity Control (MIC)
- Modern Exploit Mitigations: DEP, ASLR, CFG, Stack Cookies and Guard Pages
- Kernel Exploit Mitigations: PatchGuard, KASLR and Pool Vulnerability Protection
Chapter 12: Virtualization - Hyper-V, Containers and WSL
- Hyper-V Architecture: Root Partition, Child Partitions, Virtual Processor Scheduling and vGPU
- Hardware Virtualization: Intel VT-x/AMD-V, Nested Paging/EPT and Direct Execution
- Windows Containers: Process Isolation, Hyper-V Isolation and the Container Runtime
- Windows Subsystem for Linux (WSL): WSL1 Translation Layer, WSL2 Lightweight VM and Interop
- Device Emulation, Paravirtualization and SR-IOV
Chapter 13: Debugging, Performance Analysis and Crash Dump Forensics
- WinDbg Fundamentals: Breakpoints, Symbol Loading, Extension Commands (exts) and Debugger Scripts
- Kernel Debugging: Serial/1394/USB/Network Debugging and Live Kernel Dump
- Event Tracing for Windows (ETW): Providers, Sessions, Manifests and Analysis with PerfView/Xperf
- Crash Dump Analysis: Full/Memory/Hiberfil Dumps, Analyzing BSODs and Common Bug Checks
- Performance Counters, Sampling Profilers and Memory Leak Detection
- Practical Case Studies: Real Debugging Scenarios and Forensic Investigations
Chapter 14: Modern Security - VBS, HVCI, Credential Guard and the Future
- Virtualization-Based Security (VBS): Isolated Memory Regions and Secure Launch
- Hypervisor-Protected Code Integrity (HVCI): Kernel Mode Signing Enforcement and DMA Protection
- Credential Guard: Protected LSASS, Secure Boot Chain and Identity Protection
- Windows Defender Application Control (WDAC) and Attack Surface Reduction Rules
- Secure Boot, TPM Integration and Measured Boot
- Future Directions: Confined Virtualization, Pluton SoC and Zero Trust Architecture

