A virus wants to reproduce. A rootkit wants to stay.
More precisely: a rootkit wants to become the operating system's memory of what is running. Destruction and exfiltration come later. The first objective is to own the record. To become the source of truth that every monitoring tool, every task manager, every security scanner consults when it asks the question: what is actually happening on this machine?
If you own the answer to that question, you own the machine. The user can look directly at the process list and see a clean system. The administrator can run diagnostics and get reassuring output. The security tool can scan and report nothing. The malware is present, active, and consuming resources, and the OS has simply stopped reporting it.
Greg Hoglund and James Butler documented exactly how this worked in Rootkits: Subverting the Windows Kernel (2005). Two decades later, the technique is still operational. The delivery method has changed. The target has moved deeper. The trust problem has not been solved.
Ring 0 and the Hierarchy of Truth
The x86 architecture divides CPU privilege into rings. Ring 3 is where applications run, your browser, your text editor, your terminal. Ring 0 is where the operating system kernel runs. Kernel code has broad access to operating-system memory and hardware interfaces. Hypervisor-enforced protections can still restrict it. Ring 0 alone does not describe every trust boundary on a modern Windows machine.
When your Task Manager asks what processes are running, it does not look directly at the hardware. It asks the kernel. The kernel tells it. The kernel is the witness.
A rootkit that achieves Ring 0 access does not need to hide from the hardware. It needs to modify what the witness reports.
The 2005 technique was the SSDT hook, System Service Descriptor Table. The SSDT is the kernel's index of system calls: a dispatch structure indexed by system-service number. A user-mode process-information request can reach the corresponding kernel service through the system-call path. Different Windows versions and tools use different interfaces; one hooked query does not account for every observation a security product can make.
A rootkit with kernel access replaces the pointer in that table with a pointer to its own function. The real function still runs, the rootkit calls it to get the genuine data. Then it filters the output before returning it to the caller.
In a process-enumeration hook, the replacement routine calls the original query and, after a successful response, edits the returned process records before the caller receives them. The filtering routine must preserve the buffer's record layout and lengths. Changing the dispatch pointer and changing the result buffer are separate operations. This describes the historical mechanism, not a driver implementation tested here.
A caller using the intercepted process-enumeration path gets back an accurate-looking list. The rootkit's process is not on it. The user sees a clean system. The wolf is in the room reading the newspaper.
DKOM: Editing the Kernel's Memory of Itself
The SSDT hook has a detection surface: if you know where the SSDT is and what the legitimate function pointers should be, you can check for modifications. Hoglund and Butler documented the deeper technique, Direct Kernel Object Manipulation.
The kernel maintains its own internal list of running processes in a structure called EPROCESS. Every process has an EPROCESS block. The blocks are linked in a doubly-linked list, each one points to the next and the previous. Enumeration through that active-process list depends on its links. Other observations, including thread and object evidence, can expose discrepancies.
DKOM edits the list directly in kernel memory. No hook required. You find your process's EPROCESS block and relink the pointers around it, the previous entry points to the next entry, skipping yours entirely. The entry still exists in memory. The kernel has just stopped walking past it.
Before unlinking, the neighboring entries point through the target process's list entry. After unlinking, those neighbors point to each other. The process object may remain allocated while enumeration through that list skips it.
You can inspect that distinction without loading a driver. This runnable userspace fixture keeps an allocation map and a separate linked enumeration. Relinking the neighbors removes an entry from one view while leaving it in the other:
def enumerate_links(nodes, head):
seen, current = [], head
while current is not None:
if current in seen:
raise ValueError("Cycle in fixture")
seen.append(current)
current = nodes[current]["next"]
return seen
def replay():
nodes = {
10: {"prev": None, "next": 20},
20: {"prev": 10, "next": 30},
30: {"prev": 20, "next": None},
}
before = enumerate_links(nodes, 10)
nodes[10]["next"] = 30
nodes[30]["prev"] = 10
after = enumerate_links(nodes, 10)
allocated_but_unlinked = sorted(set(nodes) - set(after))
assert before == [10, 20, 30]
assert after == [10, 30]
assert allocated_but_unlinked == [20]
assert nodes[30]["prev"] == 10
return {"before": before, "after": after,
"allocated_but_unlinked": allocated_but_unlinked,
"scope": "Userspace fixture; no Windows structures, driver, hook or memory acquisition."}
The complete replay prints both views and checks the links. Recorded result: [10, 20, 30] becomes [10, 30], while allocated entry 20 remains. These are Python objects, not Windows offsets or an SSDT hook. The old C block called an undefined RemoveProcessFromList; this one actually performs the relink and the independent-view comparison. A kernel investigation needs a trustworthy acquisition and version-correct structures.
Tools that check for SSDT hooks find nothing because no hooks exist. The kernel consults its own data structures, which have been surgically modified. A tool that relies only on the altered list can miss the process. Cross-view analysis compares that enumeration with independently acquired memory or other process evidence. The acquisition method and Windows version matter; a debugger is not automatically limited to the same enumeration path.
This is the technique that made administrators distrust their own machines, a discrepancy between what the system reported and what was actually present, with no reliable way to know which one was the truth.
PatchGuard, HVCI, Secure Boot: and the Attack Surface Moved Down
Between 2005 and 2026, Microsoft deployed a serious stack of kernel defenses:
Kernel Patch Protection (PatchGuard): introduced in 64-bit Windows, periodically checks critical kernel structures including the SSDT for unauthorized modifications. If it detects tampering, it issues a BSOD. This killed the naive SSDT hook on 64-bit systems.
Driver Signature Enforcement: kernel-mode drivers must be signed by Microsoft-approved certificates. Loading unsigned code into Ring 0 is blocked by default. This raised the cost of kernel access significantly.
Hypervisor-Protected Code Integrity (HVCI): uses virtualization-based security to isolate kernel code-integrity enforcement. Kernel pages become executable only after validation, and executable pages are not writable. It does not make all kernel data immutable. Microsoft documents memory integrity and its enforcement boundary.
Secure Boot: the UEFI firmware verifies the bootloader signature before executing it, and the bootloader verifies the kernel. An unsigned or tampered kernel should not load.
Each of these is a real defense. None of them solved the trust problem. They moved the attack surface.
BYOVD: Walking Through the Front Door
Bring Your Own Vulnerable Driver is the technique that made the 2005 playbook operational in 2026.
Driver Signature Enforcement means you cannot load your own unsigned kernel driver. It does not mean every signed kernel driver is secure. There is a long history of legitimate drivers, written by hardware vendors, signed by Microsoft, shipped in real products, that contain kernel-level vulnerabilities. Buffer overflows. Arbitrary memory read/write primitives. Direct hardware access that can be weaponized.
An attacker who finds one of these drivers does not need to bypass signature enforcement. They load the legitimate signed driver through the normal Windows driver loading mechanism. The OS accepts it, it is signed. Then they exploit the vulnerability in that driver to gain Ring 0 access and perform DKOM-style operations.
In the BlackByte sample analyzed by Sophos, RTCore64.sys supplied arbitrary kernel-memory reads and writes used to remove security callbacks. Sophos's analysis identifies the driver and affected telemetry. A different path appears in Mandiant's POORTRY/STONESTOP investigation: a malicious signed driver implements process termination, with a user-mode loader directing it. Abusing a vulnerable legitimate driver and obtaining a signature for a malicious driver are distinct routes into the kernel.
A valid signature does not exempt subsequent memory modifications from PatchGuard. Whether an exploit trips a check depends on the protected structure and operation. Driver admission, exploitability, code integrity, and runtime tamper detection are separate controls.
The AI EDR Problem
Modern endpoint detection and response platforms, CrowdStrike Falcon, Microsoft Defender, SentinelOne, have shifted from signature-based detection to behavioral analysis. Machine learning models trained on process behavior, file access patterns, network activity, and kernel event telemetry. Behavioral analysis complements signatures, reputation, and other controls. Product architectures differ; no comparative detection test accompanies this article.
This is a genuine improvement. A novel rootkit that has no known signature will still produce behavioral patterns, suspicious kernel calls, unusual process relationships, timing anomalies in system call sequences, that a well-trained model can flag.
The problem is where the EDR agent lives.
The EDR kernel driver runs at Ring 0. It can collect telemetry through registered callbacks and other supported interfaces. Registering a callback differs from patching the SSDT. Analysis can run locally, in the cloud, or across both; it does not all occupy one kernel-dependent layer.
A firmware rootkit runs below it.
LoJax, attributed to APT28 and first documented in 2018, persists in the UEFI firmware, the software that runs before the OS loads, before Secure Boot runs its checks, before any kernel driver initializes. Firmware persistence can survive OS reinstallation and drive replacement. ESET documented LoJax in September 2018. PatchGuard is a kernel-tamper control, not a firmware-removal mechanism. It reimplants itself on every boot before the EDR agent has started.
BlackLotus, documented in 2023, used CVE-2022-21894 and vulnerable boot components to bypass Secure Boot. Its payload files reside on the EFI System Partition (ESP), unlike LoJax's firmware persistence. “Fully patched” described the conditions in the original reporting, not a permanent claim about current Windows systems. Microsoft's BlackLotus investigation guidance identifies the exploit and disk artifacts.
The AI model running on the EDR agent is analyzing telemetry collected by a kernel driver. A boot- or firmware-level implant may tamper with later operating-system execution. Firmware residence alone does not prove that every telemetry source has been filtered. That claim needs evidence of the interception and the affected data path. It is the 2005 Task Manager consulting a hooked SSDT, getting clean-looking data from a compromised witness.
The sophistication of the analysis does not matter if the data it analyzes has already been edited.
October 2026: collect the state Windows reports
Open an elevated Windows PowerShell 5.1 session on Windows 10 or 11. This block queries Secure Boot, the running memory-integrity state, and the system-driver inventory, then prints JSON. It changes no security settings. Failed queries stay unknown and carry their error messages.
$observedAt = [DateTime]::UtcNow.ToString('o')
$collectionErrors = @()
$secureBootEnabled = $null
$hvciRunning = $null
$vbsStatus = $null
$driverRows = @()
$driverQuerySucceeded = $false
try {
$secureBootEnabled = Confirm-SecureBootUEFI -ErrorAction Stop
} catch {
$collectionErrors += "SecureBoot: $($_.Exception.Message)"
}
try {
$deviceGuard = Get-CimInstance -Namespace 'root\Microsoft\Windows\DeviceGuard' `
-ClassName Win32_DeviceGuard -ErrorAction Stop
$vbsStatus = $deviceGuard.VirtualizationBasedSecurityStatus
if ($null -ne $deviceGuard.SecurityServicesRunning) {
$hvciRunning = @($deviceGuard.SecurityServicesRunning) -contains 2
} else {
$collectionErrors += 'DeviceGuard: SecurityServicesRunning unavailable'
}
} catch {
$collectionErrors += "DeviceGuard: $($_.Exception.Message)"
}
try {
$driverRows = @(Get-CimInstance -ClassName Win32_SystemDriver -ErrorAction Stop |
Sort-Object Name |
Select-Object Name, State, StartMode, PathName)
$driverQuerySucceeded = $true
} catch {
$collectionErrors += "SystemDrivers: $($_.Exception.Message)"
}
[pscustomobject]@{
ObservedAtUtc = $observedAt
ComputerName = [Environment]::MachineName
SecureBootEnabled = $secureBootEnabled
VirtualizationBasedSecurityStatus = $vbsStatus
HvciRunning = $hvciRunning
DriverQuerySucceeded = $driverQuerySucceeded
SystemDrivers = $driverRows
CollectionErrors = $collectionErrors
} | ConvertTo-Json -Depth 5
SecurityServicesRunning containing 2 means memory integrity is running. A configured registry value alone does not establish that runtime state. In the driver rows, State distinguishes reported running drivers from other registered entries. PathName identifies the reported image path, not its signature status or trustworthiness. Microsoft's memory-integrity guidance and Secure Boot cmdlet documentation describe the queries.
Save the output with the case evidence. Compare the driver names and paths with the machine's approved inventory, then verify suspect binaries and their provenance separately. An unavailable query is a collection gap. Secure Boot returning true does not establish certificate-revocation coverage or a clean boot chain. A compromised operating system may also lie to these queries. For that case, acquire evidence through a separately trusted environment and compare the views.
This collector has not been executed on a Windows host in this article's October 25 revision. No sample output or clean-machine verdict is claimed.
The Witness Moved to Firmware. The Battle Didn't Change.
Hoglund and Butler published Rootkits: Subverting the Windows Kernel in 2005. The core insight, that controlling the kernel means controlling the truth the system tells about itself, has not aged. The implementation has moved: from SSDT hooks to DKOM, from Ring 0 kernel drivers to BYOVD signed certificates, from OS-level persistence to UEFI firmware that survives below the OS entirely.
Microsoft's response has been real and technically serious. PatchGuard, HVCI, Secure Boot, and driver signing are all meaningful defenses. They have moved the attack surface downward, from the OS kernel to the firmware, from the software layer to the hardware trust chain. That is progress. The solution remains open.
The backwards compatibility requirement is the perpetual constraint. Code running on 2026 Windows must coexist with drivers, interfaces, and security models that were designed in 2005. Every legacy interface is a potential BYOVD target. Every signed driver from a vendor who stopped issuing security patches is a crowbar waiting to be picked up.
The lesson Hoglund and Butler wrote is the same lesson the firmware rootkits are still proving: if you control what the witness reports, you control what is true about the machine. Moving the witness deeper, from the kernel to the hypervisor to the firmware, changes where the battle is fought. It does not change what the battle is for.
The witness moves further still in the AI era. An agent may also act on a compromised observation, which connects to the trust-boundary questions across agentic AI. A classifier is not a CPU privilege ring, and a prompt does not patch a system-service table. Different layer, same battle for what counts as ground truth.
Correction, October 25, 2026: removed incomplete code and diagram fences, corrected HVCI and PatchGuard claims, distinguished supported callbacks from SSDT patching, and separated ESP bootkit persistence from firmware implants. Narrowed universal telemetry and product claims. No rootkit was executed or detector evaluated for this article.
GhostInThePrompt.com // If the kernel is lying, the truth doesn't matter.
Reference: 'Rootkits: Subverting the Windows Kernel', Greg Hoglund & James Butler (2005, Addison-Wesley).