scanrootkit

Types of Rootkits: User Mode, Kernel, Bootkit, Firmware and More

There are several types of rootkits, and the useful way to tell them apart is by where they run. A rootkit that patches a single program in memory is a nuisance a normal antivirus can clean. One that lives in the motherboard’s firmware can outlast a new hard drive and a fresh copy of Windows. Each step down the stack gives the rootkit more control and makes it harder to remove.

This guide walks through each layer from the top down, with a real rootkit example for each. For the basics of what a rootkit is and how hiding works, start with what is a rootkit.

Types of rootkits at a glance

Type Where it runs Privilege Real example Usual fix
Application / library Inside one program or shared library User Classic Unix “kits” that replaced ls and ps Antivirus, reinstall the program
User mode Injected into many processes User (often admin) Hiding components of many trojans Antivirus or rootkit scanner
Kernel mode As a driver inside the kernel Kernel Necurs, ZeroAccess Offline scan, or wipe and reinstall
Bootkit Boot sector or boot loader Before the OS TDL-4, BlackLotus Boot repair plus offline scan, or full wipe
Firmware (UEFI) SPI flash chip on the motherboard Before the boot loader LoJax, MoonBounce, CosmicStrand Vendor firmware reflash, sometimes a new board
Hypervisor Beneath the OS, using CPU virtualization Above the kernel Blue Pill (research proof of concept) Mostly theoretical for home users
Memory only RAM, nothing written to disk Varies Fileless loaders A reboot, unless something reinstalls it

Application and library rootkits

The oldest form. On early Unix systems, an intruder replaced specific system programs (ls, ps, netstat, login) with modified copies that left out the intruder’s files and processes, or accepted a secret password. This is where the word “rootkit” comes from.

The modern version targets shared libraries. On Linux, a malicious library can be loaded ahead of the real C library so that every program calling readdir() gets a filtered answer. On Windows, the equivalent is replacing or patching a DLL that a specific application uses.

These are the easiest to catch. A file-integrity check against the package manager’s known-good hashes shows the swap, and any tool that does not use the tampered library sees through the trick. rkhunter and chkrootkit on Linux look for exactly this.

User-mode rootkits

A user-mode rootkit runs with ordinary process privileges, usually as administrator, and hides by injecting code into other running programs. On Windows it typically hooks functions in ntdll.dll or kernel32.dll inside each process, so that File Explorer, Task Manager and the registry editor all receive edited results.

The weakness is that each process has its own copy of those hooks, and the kernel underneath still tells the truth. A scanner that asks the kernel directly, or reads the disk at a low level, sees what the hooked programs cannot. Most current antivirus products remove user-mode rootkits in a normal scan.

Kernel-mode rootkits

A kernel-mode rootkit loads as a device driver and runs inside the operating system kernel, with the same authority as Windows itself. From there it can edit the kernel’s own lists of processes and drivers, intercept file system requests for every program at once, and disable security software.

This is the classic hard case. There is nothing on the running machine with more authority to check its work. Modern 64-bit Windows makes it much harder to get here: drivers must be signed, Kernel Patch Protection (PatchGuard) watches core kernel structures, and memory integrity (HVCI) adds a virtualization-backed check. Attackers respond by abusing signed drivers that have security bugs, a technique called BYOVD. The kernel-mode rootkits guide covers all of this in detail.

Real examples include Necurs, whose kernel-mode rootkit disabled security tools, and ZeroAccess. Both are covered in famous rootkits.

A note on “rootkit in System32”

Windows drivers live in C:\Windows\System32\drivers, and kernel-mode rootkits often drop their driver there with a plausible name so it blends in with hundreds of legitimate ones. That is why people search for “rootkit in System32”. A file you do not recognise in that folder is not proof of anything, though. Check it with a rootkit scanner or an offline rootkit scan rather than deleting system files by hand, which can leave Windows unbootable.

Bootkits

A bootkit infects the code that starts the computer: the Master Boot Record (MBR) or Volume Boot Record on older BIOS systems, or the boot manager on the EFI System Partition on UEFI systems. Because it runs before Windows, it can patch the kernel as it loads and switch off protections such as driver signature checks before they start.

TDL-4 (also called Alureon or TDSS) was the best-known MBR bootkit. Kaspersky counted more than 4.5 million infected computers in the first three months of 2011, and its bootkit let it load an unsigned driver on 64-bit Windows. BlackLotus, analysed by ESET in March 2023, was the first public UEFI bootkit seen bypassing Secure Boot on fully patched Windows 11.

Bootkits sit on the disk, so a full wipe that includes the boot partitions removes them. See bootkits and firmware rootkits.

Firmware and UEFI rootkits

A firmware rootkit lives in the SPI flash chip that stores the motherboard’s UEFI firmware. It runs before the boot loader and can plant malware into Windows on every start. Reformatting or replacing the drive does nothing, because the infection is not on the drive.

These were long treated as a research topic until ESET found LoJax in 2018, the first UEFI rootkit seen in a real attack, attributed to the Sednit (APT28) group. Kaspersky later reported MoonBounce and CosmicStrand in 2022. They are rare and almost always tied to targeted espionage, but when present they need a vendor firmware reflash and sometimes a replacement motherboard.

Hypervisor (virtualization) rootkits

Modern processors include hardware virtualization (Intel VT-x, AMD-V) so a hypervisor can run several operating systems at once. A hypervisor rootkit abuses that feature: it slides underneath the running operating system and turns it into a guest, so the rootkit sees and controls everything while the OS has no direct view of it.

The best-known example is Blue Pill, a proof of concept Joanna Rutkowska demonstrated at Black Hat in August 2006. It originally used AMD’s virtualization extensions to move a running copy of Windows Vista into a virtual machine on the fly. Her claim that it could not be detected by software was disputed by other researchers at the time. Blue Pill was research, not malware, and hypervisor rootkits remain rare outside the lab. The idea mattered because it shows why Windows now uses the hypervisor defensively: memory integrity puts the code-integrity checks in a virtualized layer the kernel cannot reach.

Memory-only rootkits

Some rootkit components never touch the disk. They are injected into memory by an exploit or a loader and live only in RAM. That makes them hard to find with file scans, but they also disappear on reboot unless something else, such as a scheduled task, a registry entry or a compromised service, puts them back.

For a home user, the practical lesson is that a reboot followed by a full scan is worth doing, and that a memory-only component usually means there is a persistent loader somewhere else to find.

How the type changes what you do

The deeper the rootkit, the less you can trust a scan run from inside the infected system:

The step-by-step process is in how to remove a rootkit, and the platform-specific checks are in how to detect a rootkit.

Frequently asked questions

What are the main types of rootkits?
Rootkits are grouped by the layer they run in. User-mode rootkits live inside ordinary programs, kernel-mode rootkits run as drivers inside the operating system, bootkits infect the boot loader, firmware rootkits sit in the motherboard's UEFI chip, and hypervisor rootkits run beneath the whole operating system.
Which type of rootkit is the most dangerous?
Firmware (UEFI) rootkits are the hardest to remove, because they live on a chip on the motherboard and survive a wiped or replaced drive. Kernel-mode rootkits and bootkits are more common and still serious, since they run with the same authority as the operating system itself.
Is a file in System32 a sign of a rootkit?
No. System32 holds thousands of legitimate Windows files and drivers. Kernel-mode rootkits often drop a driver into System32\drivers to blend in, but the folder alone proves nothing. A rootkit scanner or an offline scan is the way to check a suspicious file.
What is an example of a rootkit?
Well-known examples include the Sony BMG XCP copy-protection software from 2005, the TDL-4 bootkit of 2011, LoJax, the first UEFI rootkit found in a real attack in 2018, and BlackLotus, a 2023 UEFI bootkit that bypassed Secure Boot.