Kernel Mode
Cheat sheet · https://pcornel.dk/topic.php?topic=2929
Answer
Kernel mode is Windows’ privileged execution mode. Core NT operating-system components and many device/filesystem/filter drivers execute there with access to kernel address space and privileged processor operations, so defects can affect the entire system rather than a single process.
Remember
- Kernel-mode code is highly privileged and shares protected kernel resources.
- A kernel-mode fault can trigger a bugcheck to prevent continued corruption.
- Not every driver is kernel mode; Windows also supports user-mode driver frameworks.
- A kernel-mode stack proves privileged execution occurred, not which module originally caused bad state.
- User identity/elevation and CPU execution mode are separate concepts.
First checks
driverquery /v /fo csv— drivers with state and pathGet-WinEvent -FilterHashtable @{LogName='System';Id=41,1001}— bugchecksGet-PnpDevice -PresentOnly | ? Status -ne 'OK'— devices with problemsverifier /query— Driver Verifier status
Verify in this order
driver loaded in kernel mode → handles hardware/I/O → error → bugcheck or device problem logged
Where it usually breaks
First mismatch in target identity/version → persistent configuration/source of truth → provider/service/control plane → runtime/effective state → user/workload-visible result → event/log evidence; preserve identity/native error/pre-state before mutation.
Kernel-mode evidence boundaries
| Observation | Proves | Does not prove |
|---|---|---|
| Bugcheck occurred | Windows stopped after a fatal kernel condition | root-cause module by itself |
| Driver on stack | driver participated in captured path | driver created the bad state |
| WHEA hardware event | hardware/firmware reported an error class | which replaceable component is certainly bad |
| Kernel CPU/DPC time high | privileged work consumed CPU | exact driver/function without deeper sampling |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2929