Deep dive into the object creation flow in Windows - PART 1: Allocation and Pre-Initialization

2026-05-20

Subreddit: r/lowlevel

Discussion: View on Reddit (3 points, 0 comments)

This post kicks off a four-part series by u/_WinAsm dissecting one of the most fundamental — yet rarely explained — mechanisms in the Windows kernel: how the Object Manager creates kernel objects. Nearly every Windows primitive you've ever touched — files, processes, threads, mutexes, events, registry keys, sections — is a "kernel object" born through this exact code path. Yet most developers, even those writing drivers, treat ObCreateObject as an opaque black box.

Part 1 focuses on allocation and pre-initialization. The author walks through what actually happens between the moment a user-mode CreateFile or CreateMutex call enters the kernel and the moment the object body is handed off for type-specific initialization. Key topics covered across the series include:

Why this matters: understanding the Object Manager is the prerequisite for everything interesting in Windows internals — rootkit detection, EDR hooking, handle hijacking attacks, privilege escalation via handle leaks, and even ordinary driver debugging. When you see a tool like Process Hacker enumerate handles, or a malware sample duplicate a SYSTEM token handle, this is the machinery underneath.

The series leans heavily on disassembly and the public ntoskrnl symbols, which makes it more rigorous than the typical "Windows Internals" textbook summary. If you've read Russinovich's book and wanted the next layer down, this is it.

Why read this: A rare, code-level tour through the Object Manager — the hidden machinery behind every HANDLE in Windows.

All newsletters