x64 architecture and programming part 2 course trainsec

x64 Architecture and Programming (Part 2): Paging, Rings and System Calls

Go below user mode and see the x64 processor at the system level. Pavel Yosifovich, co-author of Windows Internals, covers privilege rings, CPUID, MSRs and control registers, segmentation and descriptor tables, four- and five-level page translation, system calls, interrupts and exceptions, and checks each one live in the kernel debugger.

42 Lessons
Lifetime access

$295

or $100 x 3 installments
blue depth
Windows Internal master badge 1

This course is part of Windows Internals Master

$1356 or $140 X 10 installments
Trusted by 10K+ students and companies
Sentinel one logo white
microsoft logo white
google logo white
mandiant logo white
intel logo white
cisco white logo tr
citibank logo white
alfa bank logo white
malwarebytes logo white
proofpoint logo white
epam logo white
Sentinel one logo white
microsoft logo white
google logo white
mandiant logo white
intel logo white
cisco white logo tr
citibank logo white
alfa bank logo white
malwarebytes logo white
proofpoint logo white
epam logo white

7+ hours

on-demand video

Live demos

in WinDbg and LiveKD

42

video lessons

2

downloadable resources

7 CPE

CEU credits, self-reported

Certification

Certificate of completion

x64 OS internals on Windows: what the CPU does beneath the kernel

Part 1 taught you to read and write x64 assembly. Part 2 continues into the system level of the x64 (x86-64) processor, the part that operating systems, hypervisors, debuggers and security tools are built on: operating modes and privilege rings, CPUID, MSRs and control registers, segmentation, descriptor tables and call gates, virtual page translation, system calls, and interrupts and exceptions. How does the CPU separate kernel mode from user mode? What happens on a system call? How does a virtual address become a physical one, and which bits in a page table entry decide whether memory can be written or executed?

Pavel Yosifovich, co-author of Windows Internals, answers these questions on slides and then proves each answer on a live Windows machine with WinDbg local kernel debugging and Sysinternals LiveKD. You query processor features with CPUID, read MSRs and control registers, decode GDT and IDT entries, follow privilege checks through call gates, and walk a virtual address to its physical address by hand.

The course has 42 pre-recorded video lessons with English captions, plus the slides PDF and the Struct Visualizer tool. You learn at your own pace, with lifetime access.

Pavel Yosifovich
Pavel Yosifovich
Developer, trainer, author and (sometimes) speaker. Co-founder of TrainSec academy.

Pavel has been working at the lowest levels of Windows for more than 25 years, as a developer, consultant, trainer, author and speaker, and is a Microsoft MVP. He is the co-author of “Windows Internals, 7th Edition, Part 1” (Microsoft Press) and the author of “Windows Kernel Programming”, “Windows 10 System Programming” and “Windows Native API Programming”.

In this course he shows the processor mechanisms that Windows is built on, the same ones he explains in Windows Internals, and checks each of them live in the kernel debugger.

What you will learn in the x64 Architecture and Programming (Part 2) course

Who is this x64 OS internals course for?

  • Students who finished x64 Architecture and Programming (Part 1) and want the system-level half of the architecture.
  • Security researchers and reverse engineers who need to understand rings, ring transitions, system calls and page protections such as NX, SMEP and SMAP.
  • Windows kernel and driver developers who want to know what the CPU does underneath IRQL, page faults, the IDT and the system call entry point.
  • Windows internals learners who want to verify virtual-to-physical address translation by hand in the kernel debugger.
  • Engineers curious about how hypervisors, virtualization-based security and UEFI fit into the privilege model (covered at overview level).

Not the right fit if you cannot yet read x64 assembly (take Part 1 first), if you want the Windows memory manager itself (that is Windows Internals: Day 4), floating point or SIMD programming, or hands-on exploit development.

Roles this course prepares you for: developers, malware analysts and security researchers.

What do you need before you start?

  • x64 Architecture and Programming (Part 1), or equivalent x64 assembly knowledge: registers, the stack and the Windows x64 calling convention.
  • Basic comfort with WinDbg, since most demos inspect registers, descriptor tables and page tables in the kernel debugger.
  • Basic C or C++, to follow the CPUID and cache benchmark demos.
  • A Windows 10 or 11 x64 machine with WinDbg set up for local kernel debugging, Sysinternals LiveKD and Visual Studio. The Struct Visualizer tool is provided as a download.

What does this x64 OS internals course cover?

Most developers never see the processor features that keep the operating system in control. Rings and privilege checks, descriptor tables, page tables and the system call path are invisible from user mode, yet they decide what code can run, which memory it can touch and how it reaches the kernel. This course makes them visible on a real Windows machine.

It has three chapters: advanced architecture (modes, rings, CPUID, MSRs, control registers, segmentation and privilege checks), virtual page translation, and system calls, interrupts and exceptions. It builds directly on x64 Architecture and Programming (Part 1).

Why learn the system level of x64?

Kernel debugging, driver development, EDR and rootkit research, hypervisor work and vulnerability research all depend on it. The course covers the CPU mechanisms security research relies on: ring transitions through SYSCALL and SWAPGS, the NX, SMEP and SMAP page protections, the CR0 write-protect bit, and the interrupt descriptor table. When a crash dump shows a page fault, when a driver runs at a raised IRQL, or when an exploit has to get past NX, SMEP or SMAP, you need to know what the CPU is enforcing and where that state lives: in CR3, in a page table entry, in an MSR or in the IDT.

How does x64 paging work, and how do you walk a page table in WinDbg?

The course follows address translation from legacy x86 two-level paging and PAE to today’s x64 four-level (PML4) and five-level (PML5) paging, with 4 KB, 2 MB and 1 GB pages. Then, in a 19-minute demo, Pavel walks a real kernel address through every level of the page tables by hand in WinDbg, reading each entry with !dq, and confirms the result with the pte and !vtop commands.

The rest of the course works the same way: you read MSRs with rdmsr, dump descriptors with dg, list interrupt handlers with !idt and read control registers with LiveKD. It is a strong foundation for Windows Internals: Day 3 and Day 4, Windows Kernel Programming 1 and EDR Internals, and it is part of the Windows Internals Master learning path.

What does each chapter of the course cover?

Advanced Architecture

The processor’s operating modes and the ring model, including the hypervisor and UEFI as informal lower rings. You query CPUID, read MSRs and control registers in WinDbg and LiveKD, then study segmentation in depth: selectors, the GDT, LDT and IDT, code, data, system and gate descriptors, and what 64-bit mode keeps of it. The chapter ends with CPL, DPL and RPL privilege checks for data access and far calls through call gates, and the task state segment with the IST and I/O bitmap.

Virtual Page Translation

Why paging exists, canonical addresses and the 48-bit and 57-bit address ranges, and how translation evolved from x86 two-level paging and PAE to x64 four-level and five-level paging. Page sizes (4 KB, 2 MB and 1 GB), CR3, CR2 and the TLB, page table entry fields including the NX bit, and the SMEP and SMAP protections. A WinDbg demo walks a real address through the page tables by hand.

Miscellaneous Topics

System calls with SYSCALL/SYSRET and the older SYSENTER/SYSEXIT, the MSRs behind them and the SWAPGS instruction. Interrupts and exceptions: the IDT, faults, traps and aborts, masking with CLI and STI, the NMI and how Windows lays out its handlers. The chapter closes with a conceptual introduction to shellcode and a course summary.

x64 OS internals course: frequently asked questions

Do I need Part 1 before taking Part 2?

Yes, in practice. Part 2 continues from where x64 Architecture and Programming (Part 1) left off and assumes you can read x64 assembly and know the registers and the calling convention.

Is x64 the same as x86-64?

Yes. x64 (also called x86-64 or AMD64) is the 64-bit extension of the x86 processor family, introduced by AMD, and the architecture behind Windows PCs and servers. “x64 OS internals” and “x86-64 OS internals” describe the same system-level topics this course covers.

What do I need to set up?

A Windows 10 or 11 x64 machine with WinDbg set up for local kernel debugging and Sysinternals LiveKD, plus Visual Studio for the small C/C++ demos. The Struct Visualizer tool is provided as a download.

Does it cover paging and virtual memory?

Yes, a whole chapter covers virtual page translation: legacy x86 paging, PAE, x64 four-level and five-level paging, page sizes, page table entry fields, the TLB, and protections such as NX, SMEP and SMAP, with a manual address translation demo in WinDbg.

Does it cover system calls and interrupts?

Yes. The final chapter covers SYSCALL/SYSRET and the older SYSENTER/SYSEXIT, SWAPGS, the IDT, exception classes, maskable and non-maskable interrupts, and how Windows lays out its interrupt handlers.

How is Part 2 different from Windows Internals Day 3 and Day 4?

Windows Internals: Day 3 covers interrupts, IRQLs and exceptions from the Windows kernel point of view, and Windows Internals: Day 4 covers the Windows memory manager. This course covers the processor side beneath them: the IDT, gates, fault, trap and abort classes, SYSCALL and SWAPGS, and the paging structures, CR3, the TLB and page protection bits. They complement each other. Mastering WinDbg makes the kernel debugging demos easier to follow.

Does it teach shellcode or exploitation?

Only at a conceptual level: one lesson explains what shellcode is and why it must be position independent, with a small standalone sample. It is not an exploit development or process injection course.

Does it cover floating point or SIMD/AVX?

No. The Floating Point Arithmetic lesson is a short note explaining that floating point and SIMD instructions are not covered. SIMD is partially covered in Part 1.

Does it cover hypervisors or UEFI in depth?

No. Hypervisors, virtualization-based security and UEFI are explained as part of the extended ring model, but their internals are out of scope.

Is the course live or recorded?

Pre-recorded and self-paced. The videos are recordings of Pavel’s live sessions, and every video has English captions.

How long is the course?

42 video lessons, more than 7 hours of video, plus the slides PDF and the Struct Visualizer tool.

Can I watch some lessons before I buy?

Yes. Two lessons are free to preview: Rings (Extended) and Segment Registers. Watch them on the course page.

Do I get a certificate?

Yes. When you complete every lesson you receive a certificate of completion and a Credly badge. The course earns 7 CPE/CEU credits, which you self-report to your certification body with your TrainSec certificate.

How much does it cost, and is there a payment plan?

$295 as a single payment, or 3 monthly payments of $100 ($300 in total). It is also included in the Windows Internals Master learning path.

How long do I have access?

Lifetime access, including future updates to the course.

What is the refund policy?

Refunds are available up to 14 days after purchase, to the original payment method. Email [email protected] to request one.

What should I take after this course?

Windows Internals Days 3 and 4 pair well with the interrupt and paging material. To write kernel code, continue with Windows Kernel Programming 1; for security research, EDR Internals: Research and Development.

Pavel Yosifovich
Pavel Yosifovich
Developer, trainer, author and (sometimes) speaker. Co-founder of TrainSec academy.

Pavel has been working at the lowest levels of Windows for more than 25 years, as a developer, consultant, trainer, author and speaker, and is a Microsoft MVP. He is the co-author of “Windows Internals, 7th Edition, Part 1” (Microsoft Press) and the author of “Windows Kernel Programming”, “Windows 10 System Programming” and “Windows Native API Programming”.

In this course he shows the processor mechanisms that Windows is built on, the same ones he explains in Windows Internals, and checks each of them live in the kernel debugger.

x64 architecture and programming part 2 course trainsec
x64 Architecture and Programming (Part 2)

Go below user mode and see the x64 processor at the system level. Pavel Yosifovich, co-author of Windows Internals, covers privilege rings, CPUID, MSRs and control registers, segmentation and descriptor tables, four- and five-level page translation, system calls, interrupts and exceptions, and checks each one live in the kernel debugger.