• $270 or 3 monthly payments of $95

Advanced Windows Kernel Programming

  • Course
  • 85 Lessons
  • Discord access

The course is designed for experienced Windows developers and security researchers who want to deepen their understanding of kernel-level programming. This course is suitable for those who have completed "Windows Kernel Programming 1" and "Windows Kernel Programming 2." It assumes prior experience in Windows driver development, familiarity with Windows internals, and a basic understanding of kernel debugging tools.

Contents

Introduction

00-Introduction
AdvancedKernelProgrammingLabs.pdf
Advanced Windows Kernel Programming.pdf
Labs.zip
Demos.zip

1: Kernel and System Design

This section provides a deep dive into the core principles of system architecture, focusing on how modern operating systems interact with hardware and manage system resources. It covers essential topics such as system calls, memory management, kernel functions, and object handling, forming a solid foundation for advanced kernel programming. Students will gain both theoretical knowledge and practical insights into designing, debugging, and optimizing kernel-level code.

01-01-System Atchitecture
Preview
01-02-System Calls
01-03-System Call Implementation
01-04-Nt vs Zw
Preview
01-05-Memory Related APIs
01-06-Exported Functions
01-07-Handles and Objects
01-08-Lab Part 1
01-09-Lab Part 2
01-10-Solution Walkthrough
01-11-Q&A

2: Programming Techniques

This section introduces core programming techniques used in kernel development, including memory management, object structures, and kernel data structures. These topics are crucial for writing efficient and secure kernel-mode code, as well as for understanding how the Windows kernel manages resources.

02-01-Programming Techniques Intro-1
02-02-Strings
02-03-Dynamic Memory
02-04-Move Semantics
02-05-Lookaside Lists
02-06-Linked Lists
02-07-Object Attributes
02-08-Permanent Objects
02-09-Tables
02-10-Callback Objects
02-11-Process Attaching
02-12-Labs Description
02-13-Solutions Walkthrough Part 1
02-14-Solutions Walkthrough Part 2-1

3: Tracing and Debugging

This section focuses on debugging techniques, trace logging, and diagnostic tools used in kernel development. Effective debugging is critical for kernel developers, as errors in kernel-mode code can lead to system crashes and security vulnerabilities.

03-01-DbgPrint(Ex)
03-02-Trace Logging
03-03-Trace Logging (cont.)
03-04-Debugging

4: Synchronization

Synchronization is one of the most critical aspects of kernel programming. Since kernel-mode code often runs in a multi-threaded environment and interacts with hardware, proper synchronization ensures that race conditions, deadlocks, and inconsistent data states do not occur. This section covers the various synchronization mechanisms available in the Windows kernel, such as mutexes, spin locks, semaphores, and asynchronous procedure calls (APCs). Understanding these techniques is crucial for students developing device drivers, file system filters, and other kernel components that require safe concurrent execution.

04-01-Synchronization Basics
04-02-Mutexes
04-03-APCs (Asynchronous Procedure Calls)
04-04-Fast Mutex
04-05-Semaphores
04-06-Events
04-07-IRQL (Interrupt Request Level) Recap
04-08-High IRQL Synchronization
04-09-Spin Locks
04-10-Lab Intro
04-11-Labs Walkthrough
04-12-APC Lab Walkthorugh

5: File System Mini-Filters

Minifilter drivers are a fundamental part of the Windows kernel, allowing developers to intercept and modify file system operations without directly modifying the file system driver itself. They are widely used for security applications (e.g., antivirus software), data monitoring, and custom file system behavior implementations. This section covers how minifilter drivers work, how they interact with file system I/O, and best practices for writing efficient and stable minifilter drivers. Mastering these concepts is essential for students interested in kernel-level file system development and security applications.

05-01-Minifilter Architecture
05-02-Loading and Unloading
05-03-Minifilter Registration and Initialization
05-04-Processing Operations
05-05-Operations and Parameters
05-06-File and Directory Information
05-07-File Names
05-08-Contexts
05-09-Accessing Data
05-10-User Kernel Communication
05-11-Labs
05-12-Labs Walkthrough

6: Windows Filtering Platform

The Windows Filtering Platform (WFP) is a powerful framework that allows kernel-mode and user-mode applications to interact with the network stack, enabling advanced packet filtering, traffic inspection, and firewall functionality. This section introduces students to WFP concepts, the API, and practical applications in networking security and custom firewall development.

06-01-WFP Architecture
Preview
06-02-WFP Objects and Properties
06-03-WFP API
06-04-Callouts
06-05-Actions
06-06-Lab WFP API
06-07-Lab Callouts
06-08-More WFP
06-09-More on Filter Arbitration

7: Miscellaneous Topics

This section covers advanced topics in driver development, focusing on debugging techniques, Plug and Play (PnP) drivers, and filter drivers. Understanding these topics is crucial for developing stable, efficient, and reliable drivers that interact with the Windows operating system. The lessons in this section will help students navigate common pitfalls, troubleshoot driver issues, and implement drivers that work seamlessly with the Windows kernel.

07-01-Securing Device Objects
07-02-Plug & Play
07-03-Plug & Play Drivers
07-04-IRP Flow
07-05-Filter Drivers
07-06-Completion Routines
07-07-Lab Walkthrough - Beep Filter

8: Introduction to KMDF

This section focuses on the Kernel Mode Driver Framework (KMDF), which simplifies driver development by providing a structured framework for handling common driver tasks. KMDF abstracts much of the complexity involved in writing Windows drivers, making it easier to develop stable, maintainable, and efficient drivers. This section covers the fundamentals of KMDF, including driver initialization, request handling, and debugging techniques.

08-01-What is KMDF
08-02-KMDF Object Model
08-03-DriverEntry
08-04-Creating a Device
08-05-Handling Requests
08-06-Booster Sample - DriverEntry
08-07-Booster Sample - Adding Device
08-08-Booster Sample - Device Control
08-09-Booster Sample - Booster Client
08-10-KMDF Debugging
08-11-Driver Installation