Rootkits: How They Work, Types, and Detection Techniques

Rootkits: Learn what they are, how they work, and the most common types. Detection techniques, real-world examples, and removal methods on Linux and Windows.
- Posted on 2026-10-15
- Reading time: 6 min
Rootkits: What They Are, How They Work, and Why They're So Hard to Find #
A rootkit is software, or a set of components, designed to hide the presence of an attacker, other malware, or certain activity on a system—not necessarily to maintain privileged access per se, but to ensure that access, once gained, remains invisible for as long as possible. It's not malware with a specific purpose, like ransomware or spyware ; it's the obfuscation infrastructure that allows other malware—or a real-life intruder—to remain invisible.
It's worth clearing up a common confusion right away: a rootkit is not the same as persistence . Persistence is the ability to maintain access to a system after a reboot or other changes; a rootkit is about hiding that access, not about its survival. A rootkit is often used to support persistence—by hiding the mechanism that provides it—but the two functions are conceptually distinct, and malware can achieve one without the other.
In short: A rootkit is software that hides processes, files, or network connections at the operating system level, allowing an attacker to maintain privileged access without being detected by standard security tools.
How a Rootkit Works #
The distinguishing mechanism is interception: a rootkit inserts itself between the operating system and the tools that are supposed to monitor it, filtering what these tools "see." If an antivirus program asks the operating system for a list of running processes, a rootkit can intercept that request and remove itself from the list before it's displayed—the antivirus program isn't looking at fake data, it's looking at real data from which exactly what it's looking for has been removed. The same goes for files, registry keys, and network connections. In general, the deeper a rootkit operates in the system (at the kernel level rather than just the application level), the more difficult it becomes to detect with conventional tools. However, this isn't a hard and fast rule: much depends on how well-written the specific implementation is, not just the level at which it operates.
Types of Rootkits, by Level of Depth #
| Type | Where it operates | Difficulty of detection |
|---|---|---|
| User mode | At the application level, it intercepts common program calls | Low-medium |
| Kernel mode | In the core of the operating system, with maximum privileges | High |
| Boot kit | In the system boot process, even before the operating system | Very high |
| Firmware | In BIOS/UEFI, survives OS reinstallation | Extreme |
Different from a firmware rootkit is a hardware implant : a physical component added or modified to the device itself, not simply code in its firmware. It shares with a firmware rootkit the ability to survive any software intervention, but requires physical access to the device to be installed—a barrier that makes it much rarer in practice.
How a Rootkit Gets Installed #
A rootkit is almost never the first step in an attack: first, it requires sufficient access to install it, which typically comes from elsewhere. The most common vectors are a Trojan or other malware already present on the system that downloads it as a second stage, the exploitation of an incorrect vulnerability, compromised administrative credentials, pirated software that hides it within itself, or, in the rarest cases, direct physical access to the device. Once the necessary access is gained, the level at which the rootkit installs itself—user mode, kernel mode, boot, or firmware—determines how difficult it will be to find and remove it later.
The Sony BMG Case: A Rootkit Installed by a Legitimate Company #
The most instructive case in the history of rootkits involves not cybercriminals, but one of the world's largest record labels. In 2005, Sony BMG distributed a copy protection system called XCP, developed by First 4 Internet, on approximately 25 million music CDs. When a user inserted the CD into a Windows computer, XCP silently installed itself, using exactly the same obfuscation techniques as a malicious rootkit, to prevent the user from removing the protection.
Researcher Mark Russinovich discovered it by accident on October 31, 2005, while testing his own rootkit detection tool on a computer where he had simply listened to a legally purchased CD. He published the full analysis on his Sysinternals blog. The discovery proved more serious than expected: XCP was not only hiding itself, but also “phoning home” to Sony's servers every time the CD was played, and its very presence opened a backdoor for other malware to hide using the same mechanism. The removal tool Sony initially released made the situation worse, rather than better. According to later estimates, the software ended up being installed on over 500.000 networks in more than 100 countries, including US military and government networks. Lawsuits and the forced recall of affected CDs ensued.
The case remains relevant today for one specific reason: it demonstrates that a rootkit doesn't require criminal intent to be dangerous. Once a stealth technique exists on a system, anyone else—not just the person who installed it—can potentially exploit it.
The ZeroAccess Case: When the Rootkit Is Criminal from the Start #
If Sony BMG shows how a rootkit is created by mistake, ZeroAccess shows how it's built on purpose. Discovered in 2011, this Trojan spread disguised as a crack or keygen for pirated software and, once executed, infected the disk's Master Boot Record using rootkit techniques to remain invisible to antivirus programs. The compromised system became a node in a peer-to-peer botnet estimated to number at least 9 million systems at its peak, used primarily for two lucrative activities: Bitcoin mining and advertising click fraud, the latter capable of generating up to $100.000 a day for its controllers. Unlike Sony BMG, here the rootkit wasn't a side effect of anti-copy protection: it was the infrastructure designed from day one to make the rest of the criminal operation sustainable on a million-dollar scale.
How to Detect a Rootkit #
Precisely because a rootkit fools the tools running within the compromised system, the most reliable detection often requires looking from the outside : booting the system from clean external media (a live USB stick) and scanning from there, where the rootkit was never loaded and cannot hide. Other indirect signs include behaviors that a rootkit cannot always perfectly mask: differences between the file list reported by the operating system and the one observed at a low level (hence the name "rootkit revealers"), resource usage that does not correspond to any visible process, and—in the most severe cases—a system that continues to behave abnormally even after a complete and apparently clean antivirus scan.
A first check, without claiming to be definitive, can be done with dedicated tools: on Linux, rkhunter (sudo rkhunter --check) to chkrootkit They run a series of checks looking for indicators and configurations associated with known rootkits and compromises — a “clean” result does not necessarily prove that the system is free of rootkits, especially newer or bespoke ones; on Windows, Autoruns Sysinternals's tool shows everything that starts up with the system, including entries that the standard Windows panels don't list. None of these tools replace a thorough analysis if you have a valid suspicion, but they're a better starting point than "everything looks normal."
How to Remove a Rootkit #
- Don't trust a scan performed on an infected system: If you suspect a kernel-level rootkit, boot from clean external media before scanning.
- Use specific anti-rootkit tools, not a generic antivirus: they are designed to compare what the operating system reports with what actually exists at a low level.
- For a firmware bootkit or rootkit, scanning from an external system is often not enough: consider a full firmware/BIOS restore when supported, or disk replacement.
- For a rootkit that operates exclusively at the operating system level, a complete reinstallation from a trusted media typically removes the compromise. For bootkits and firmware rootkits this is not enough: it is also necessary to check the components under the operating system, and when their integrity cannot be guaranteed, the only solution is reflashing with verified firmware or, in the most serious cases, replacing the hardware.
Think You Have a Rootkit Now? How to Check #
If the system behaves abnormally and normal checks still come back “clean” despite everything, this is exactly the scenario where it makes sense to suspect a rootkit instead of simpler malware.
- Linux: execute
sudo rkhunter --checkand read every line marked as “Warning” — not all of them indicate a real infection, but they should be checked one by one, not ignored altogether. - Windows: open Autoruns from Sysinternals and examine every entry that starts with the system, paying attention to unusual paths (a temporary folder instead of Program Files) or files without a digital signature.
- If you can, repeat the same check by booting from a clean live USB stick and compare the results with those obtained from the system running normally: a discrepancy between the two is the most concrete signal obtainable without professional tools.
- If the controls remain clean but the system continues to behave erratically, it's time to consider professional forensic analysis instead of trying it yourself — this is exactly the kind of case where a well-written rootkit eludes generic tools.
FAQ #
What is a rootkit? It's a set of tools that hides system-level processes, files, or network activity, allowing an attacker to maintain privileged access without being detected by standard security tools.
Is a rootkit a virus? No: a virus is defined by its replication through a host file, a rootkit by its ability to conceal itself. They often work together—a virus or Trojan installs a rootkit to better conceal itself.
Why are rootkits so difficult to detect? Because they operate at the same level, or deeper, than the tools meant to detect them: they can intercept and filter the information that antivirus programs and operating systems exchange.
Can a legitimate company install a rootkit? It actually happened: in 2005, Sony BMG distributed a copy protection system on its music CDs that used rootkit techniques, which ended up on over 500.000 networks worldwide before being discovered and removed.
How do I know if I have a rootkit? The signs are indirect—differences between what the system reports and what actually appears to exist, resources consumed by invisible processes—which is why the most reliable scan is often performed from clean external media, not the potentially compromised system.
Can a rootkit survive a Windows reinstallation? It depends on the type: a rootkit that only operates at the operating system level won't, as reinstallation will remove it. A bootkit or firmware rootkit will, because they exist at a level that reinstalling the operating system doesn't affect.
Can a rootkit infect the BIOS/UEFI? Yes, it's the category of firmware rootkits—the rarest but also the most persistent, because it survives not only operating system reinstallation but also disk replacement.








