Malware & ransomware

What Is the Purpose of a Rootkit? How Attackers Hide and Stay In

A rootkit rarely steals data itself. Its job is concealment: hiding the attacker's files, processes and backdoor so the rest of the malware can work undisturbed.

Cysoro Security TeamPublished · 11 min read
MALWARE & RANSOMWARE ROOTKIT PURPOSE Hide the attacker. Keep the access. Stay invisible for months. backdoor.exe — hidden ? The system reports: nothing wrong. CYSORO
Quick answer

The purpose of a rootkit is to hide an attacker's presence on a computer and keep their access after they have broken in. It does this by intercepting the operating system's own reporting functions, so files, processes, network connections and other malware become invisible to the user and to security tools. A rootkit is a concealment and persistence tool, not the payload that steals data or demands a ransom.

Key takeaways

  • A rootkit's main purpose is concealment: it hides other malware, files, processes and network connections from the operating system and security tools.
  • Rootkits also provide persistence, keeping an attacker's access alive through reboots and security scans, sometimes from firmware or the boot process.
  • Because a rootkit subverts the tools you would use to find it, detection usually needs an offline scan, memory forensics or a clean rebuild.

Most malware wants to be noticed eventually: a ransom note, a stolen password, a crashed system. A rootkit wants the opposite. Its whole job is to make sure nobody notices anything at all.

What is the purpose of a rootkit?

The purpose of a rootkit is to hide an attacker's presence on a system and keep their access after the initial break-in. It conceals files, processes, network connections and other malware, and it preserves a covert route back in.

NIST defines a rootkit as a set of tools an attacker uses after gaining root-level access to a host, to conceal their activities and to maintain root-level access through covert means. That definition, from the NIST CSRC glossary, captures the two jobs in one sentence: hide, and stay.

MITRE ATT&CK catalogs the technique as T1014: Rootkit, under the defense evasion tactic. The placement matters. A rootkit rarely does the damage itself. It protects whatever does the damage — the backdoor, the credential stealer, the cryptominer, the ransomware staging tool — by making it invisible.

Think of it this way: the break-in gets the attacker through the door, and the rootkit removes the footprints, turns off the alarm's display, and hides a spare key under the mat.

How does a rootkit work?

A rootkit works by intercepting the operating system's own reporting functions. When a program asks the system to list files, processes or network connections, the rootkit filters the answer and removes the attacker's entries before the program sees them.

This is called hooking. The operating system provides application programming interface (API) calls that supply system information. A rootkit hooks those calls — it inserts itself between the request and the answer — and edits the results. Your file manager, task manager and antivirus all ask the same compromised source, so they all get the same edited answer.

That is what makes rootkits so dangerous. The tools you would normally use to check a system are asking the system to report on itself, and the system has been taught to lie.

How a rootkit hides the attacker Your tools asklist files, processes,network connections Rootkit interceptshooks the API calls andfilters out attacker entries Clean-looking answertask manager, antivirusand logs see nothing wrong Meanwhile, hidden below the surfacebackdoor process, stolen credential store and command channel keep running —invisible to every tool that asks the compromised operating system
A rootkit sits between your tools and the operating system, editing the answers. Illustration by Cysoro.

Rootkits can live at several depths. User-mode rootkits hook functions inside individual processes, for example by overriding the library call that lists directory contents. Kernel-mode rootkits load as a driver or kernel module and tamper with the structures the kernel itself uses. Below those sit bootkits, which modify the boot process, and firmware rootkits, which live in UEFI or device firmware and can survive a wiped hard drive.

The deeper the rootkit, the harder it is to find and remove — and the more completely it controls what the system reports.

What are the five main purposes of a rootkit?

A rootkit serves five purposes: concealment, persistence, privilege maintenance, security-tool evasion, and enabling the attacker's real payload. Concealment comes first; everything else follows from staying hidden.

1. Concealment

This is the defining purpose. The rootkit hides programs, files, network connections, services, drivers and other system components, in MITRE's words. A cryptominer's process disappears from the task list. A backdoor's network connection never shows up in the connection table. A stolen file never appears in a directory listing.

2. Persistence

The second purpose is to keep access alive. A rootkit can reinstall its payload after a reboot, restore a deleted backdoor, or re-establish a connection if the first one is cut. Firmware and bootkit variants persist even after the operating system is reinstalled, which is why they are so feared.

3. Privilege maintenance

Rootkits need administrator, SYSTEM or root privileges to install, and their purpose is to protect that privileged position. Some hide the user account the attacker created, or intercept the authentication functions that would reveal it, so the account keeps working unnoticed.

4. Security-tool evasion

A rootkit blinds the defenses. It can stop antivirus services from starting, block security updates, filter its own entries out of logs, and fake clean scan results. MITRE notes that rootkits bypass file monitoring, host intrusion prevention, process allowlisting, signature-based detection and antivirus.

5. Enabling the real attack

Finally, a rootkit buys time for the payload. Espionage groups use rootkits to quietly collect documents for months. Criminal groups use them to hide cryptominers and banking trojans. Ransomware operators use them to hide their staging tools until the encryption starts. The rootkit is the cover; the payload is the crime.

What are the main types of rootkit?

The main types are user-mode, kernel-mode, bootkit and firmware rootkits, plus hypervisor rootkits that sit below the operating system entirely. The type is defined by where in the system the rootkit lives.

TypeWhere it livesHow it hidesHow hard is it to remove?
User-modeInside applications and librariesHooks library calls such as directory listingsModerate — antivirus can often catch it
Kernel-modeAs a driver or kernel moduleHooks system calls and kernel structuresHard — runs below security tools
BootkitBoot sector or boot loaderLoads before the operating systemVery hard — needs offline repair
FirmwareUEFI or device firmwareControls hardware before bootExtreme — may need a firmware reflash
HypervisorBelow the operating systemRuns the OS as a guest it controlsExtreme — the OS cannot see it at all

User-mode rootkits are the most common and the least powerful. A well-known technique is modifying /etc/ld.so.preload on Linux so the system's own library loader runs the attacker's code first, overriding functions like readdir() so files vanish from listings. MITRE records this in the Hildegard malware and in the Rocke group's cryptomining operations.

Kernel-mode rootkits are far more dangerous. Drovorub, attributed to Russia's GRU, used a Linux kernel module to hide processes, files, executables and network artifacts from user-space view. Once a rootkit is in the kernel, no tool running above the kernel can trust what it sees.

What are real examples of rootkits?

Real rootkit cases include LoJax, a UEFI firmware implant used by APT28; Drovorub, a Linux kernel-module rootkit; Stuxnet, which used a Windows rootkit to mask its files; and the Ebury rootkit, which hid in SSH servers for years.

LoJax: a firmware rootkit in the wild

LoJax, used by the APT28 group, is a UEFI rootkit that persists remote access software on a target system. Because it lives in firmware, it survives reinstalling the operating system and replacing the hard drive. ESET researchers documented it as the first UEFI rootkit found in the wild, and MITRE lists it under T1014.

Drovorub: a kernel rootkit from a nation-state

Drovorub is a Linux kernel module rootkit that hides processes, files and network artifacts. The US National Security Agency and FBI jointly warned about it in 2020, attributing it to Russian military intelligence. It shows the top end of the threat: a rootkit built by a nation-state, aimed at long-term espionage.

Stuxnet: hiding industrial sabotage

Stuxnet used a Windows rootkit to mask its binaries and other files while it sabotaged industrial control systems. MITRE also records a related ICS rootkit technique, T0851, where a rootkit hides the presence of malicious code on industrial devices and can feed false information back to operators.

Ebury: hiding in servers for a decade

Ebury acts as a user-land rootkit using the SSH service, hiding on Linux servers. ESET tracked versions of it operating for years, stealing credentials and redirecting traffic while remaining invisible to the server's own administrators.

TeamTNT and Rocke: hiding cryptominers

Not all rootkits are espionage tools. The TeamTNT group used the open-source Diamorphine rootkit to hide cryptocurrency mining on cloud servers, and the Rocke group modified system libraries to hide its mining dropper from process lists. The purpose is the same — concealment — but the payoff is stolen computing power instead of stolen secrets.

How is a rootkit different from a virus, a backdoor or a trojan?

A rootkit is different because its purpose is hiding, not spreading or stealing. A virus copies itself into other files, a trojan pretends to be legitimate software, and a backdoor provides remote access. A rootkit protects those other tools.

The confusion is understandable because the tools often arrive together. A trojan gets the attacker in, a backdoor keeps the door open, and a rootkit hides both of them. NIST's SP 800-83 guide groups rootkits with backdoors and keystroke loggers as attacker tools — distinct from viruses, worms and trojans — because they serve the attacker after the initial infection rather than causing it.

One useful test: if you removed the rootkit but left everything else, the other malware would still work — it would just be visible. If you removed the other malware but left the rootkit, the rootkit alone would do little damage. It is a support tool, and a very effective one.

What are the signs of a rootkit infection?

There is no single reliable sign of a rootkit, because hiding is its purpose. The clues are indirect: things that should work but do not, and things that should be visible but are not.

  • Security software misbehaves. Antivirus will not start, will not update, or reports clean results suspiciously fast.
  • Settings change back. A setting you changed reverts on its own, or a service you stopped restarts itself.
  • Performance drops without explanation. High CPU or network use with no visible process responsible.
  • System tools give odd results. A file you know exists does not appear in a listing, or a network connection you made is missing.
  • Strange network traffic. Outbound connections at odd hours, or traffic to unfamiliar addresses, with no matching process.
  • Failed updates and crashes. The system resists patching, or crashes when you run a security scan.

None of these proves a rootkit — a failing drive or a buggy update can cause similar symptoms. They are reasons to investigate, not a diagnosis. If you suspect a rootkit, check the same system from outside it: boot from clean media and compare what the offline scan finds with what the running system reports.

How do you detect a rootkit?

You detect a rootkit by comparing what the running system claims with what an independent check finds. Because a rootkit can lie to every tool on the infected system, detection has to happen from outside the compromised operating system.

MITRE's detection guidance for T1014 points to the same idea: monitor for unauthorized loading of kernel-mode drivers or DLLs, concealed services, abnormal modification of boot components, tampering with system files and directories, and the loading of unsigned kernel extensions.

Detecting a rootkit: check from outside the system 1. Offline scanBoot from clean USB media and scan thedisk while the infected OS is not running. 2. Memory forensicsCapture RAM and analyze it on a cleanmachine; hidden processes show up here. 3. Behavioral monitoringWatch for unsigned drivers, hidden servicesand boot-component changes at the network. 4. Firmware integrityVerify UEFI and boot measurements withSecure Boot and attestation where available.
Rootkit detection works best from outside the infected system. Illustration by Cysoro.

Practical steps for a home user or small business:

  1. Run a dedicated rootkit scanner from your security vendor, and run it from a bootable rescue disk rather than inside the infected system.
  2. Compare views. List files and processes from inside the system, then again from an offline scan. Differences are the rootkit's hiding places.
  3. Check the network. A firewall or router log can show connections the infected machine denies making.
  4. Look at boot and firmware. Check Secure Boot status and firmware versions against the vendor's published values.

If the offline scan and the running system disagree, trust the offline scan. For more on spotting a compromised device, see our guide on how to know if your phone is hacked, which covers similar warning signs on mobile.

How do you remove a rootkit?

For a user-mode rootkit, a dedicated scanner or a full antivirus scan from clean boot media may remove it. For a kernel-mode, bootkit or firmware rootkit, the reliable answer is to wipe and rebuild the system from known-good media.

That sounds drastic, and it is. But it is the honest answer. A kernel rootkit can hide parts of itself from any removal tool running on the same system, and a firmware rootkit can reinfect a freshly installed operating system.

A safe removal sequence:

  1. Disconnect the device from the network so the attacker cannot watch or interfere.
  2. Back up only data you can verify — documents and photos, not programs or system files. Scan the backup from a clean machine.
  3. Wipe the drive completely and reinstall the operating system from official media.
  4. Check firmware. Update UEFI from the manufacturer's site and, if a firmware rootkit is suspected, reflash it following the vendor's recovery process.
  5. Change every password used on that device, from a different, clean device. Check whether any of them appear in known breaches with our pwned password checker.
  6. Restore data only after scanning it, and watch the rebuilt system closely for a few weeks.
Do not trust a quick cleanIf a scan claims to have removed a kernel or firmware rootkit but the system still behaves oddly, assume it is still infected. Rebuilding is slower than re-scanning, but it is the only way to be sure.

How do you prevent rootkits?

Prevention works because a rootkit needs high privileges to install. MITRE notes that rootkits cannot easily be mitigated with preventive controls alone, since they abuse system features — but blocking the path to administrator access stops most of them before they start.

  • Use a standard account day to day. Do not browse or open email as an administrator or root user.
  • Enable Secure Boot and keep firmware updated. Secure Boot checks the boot chain and blocks unsigned bootkits.
  • Patch promptly. Many rootkits arrive through known vulnerabilities in drivers and system software.
  • Use application allowlisting where practical, so unsigned drivers and unknown programs cannot load. MITRE's mitigation for T1014 recommends allowlisting tools such as AppLocker.
  • Do not run cracked software or unknown drivers. These are classic rootkit delivery vehicles.
  • Keep offline backups. A backup the rootkit cannot reach is your fastest route back to a clean system.
  • Monitor for unsigned kernel modules. On servers, alert on any new driver or kernel module that is not on an approved list.

For a small business, these controls belong in a baseline: standard accounts, patched firmware, Secure Boot on, and backups that are tested. Our small business cybersecurity checklist covers them alongside the other essentials.

The bottom line

A rootkit's purpose is concealment and persistence: it hides the attacker, hides the attacker's tools, and keeps the door open. It is not the theft, the ransom or the espionage — it is the invisibility cloak that lets those things happen undisturbed for months.

That is why rootkits are treated as a defense evasion technique rather than a payload. Stop the attacker reaching administrator privileges, keep Secure Boot and firmware current, and make sure you can check a system from outside itself. And if a deep rootkit is confirmed, do not try to clean around it — rebuild the machine and change the passwords.

Frequently asked questions

What is the purpose of a rootkit in simple terms?

A rootkit hides an attacker inside a computer. Once an attacker has broken in, the rootkit makes their files, programs and network connections invisible to the operating system and to antivirus software, so they can stay in control for weeks or months without being noticed.

Is a rootkit a virus?

No. A virus spreads by copying itself into other files, while a rootkit is a hiding tool. A rootkit is usually installed after an attacker already has access, and its job is to protect whatever other malware is already on the machine, such as a backdoor, a keylogger or a cryptominer.

Can a rootkit steal my passwords?

A rootkit itself usually does not steal passwords, but it can hide the malware that does. Some rootkits include keylogging or credential capture, and MITRE lists rootkits with command execution and credential logging capability. The stolen data comes from the payload the rootkit protects.

How do I know if I have a rootkit?

Common signs include a system that runs slowly for no reason, security software that will not start or update, settings that change back on their own, and network traffic you cannot explain. None of these proves a rootkit, so confirm with an offline scan from clean boot media or a memory forensics check.

Can antivirus remove a rootkit?

Sometimes, for user-mode rootkits, yes. Kernel-mode and firmware rootkits are much harder because they run below the antivirus software and can hide from it. In those cases the reliable fix is to wipe the drive, reflash firmware if needed, and rebuild from known-good media.

What is the difference between a rootkit and a bootkit?

A bootkit is a type of rootkit that targets the boot process. It loads before the operating system starts, so it can control what the operating system sees from the very beginning. Firmware rootkits go deeper still, living in UEFI or device firmware that survives a wiped hard drive.

Are rootkits always malicious?

Almost always in practice, but the technique itself is neutral. Some legitimate security and anti-cheat software uses rootkit-like hiding techniques, which is controversial precisely because it creates the same blind spots attackers exploit. Any tool that hides from the operating system should be treated with suspicion.

How can I prevent a rootkit infection?

Keep the operating system and firmware updated, use Secure Boot, run as a standard user instead of an administrator, enable application allowlisting where possible, and keep backups offline. Most rootkits need administrator or root privileges to install, so limiting those privileges is the strongest prevention.

Sources

  1. MITRE ATT&CK — Rootkit, Technique T1014
  2. NIST CSRC Glossary — rootkit
  3. NIST — Guide to Malware Incident Prevention and Handling (SP 800-83)
  4. MITRE ATT&CK — Rootkit, Technique T0851 (ICS)
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against MITRE ATT&CK technique T1014 and the NIST definitions in SP 800-83 and the NIST CSRC glossary.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free