What does a rootkit actually do?
The name comes from Unix: root is the all-powerful account, and a kit is a bundle of tools. An attacker who gained root on a server installs a rootkit to keep that access and to hide it. Typical features are a backdoor login, concealment of certain files, processes and network connections, and tampering with logs. A rootkit is usually not how the attacker got in; it is what they leave behind after an exploit, a stolen password or a malicious package gave them control.
Which kinds of rootkit exist?
| Type | Where it runs | How it hides |
|---|---|---|
| User mode | Replaced binaries or injected libraries | Trojaned ps, ls and netstat, or an LD_PRELOAD library that filters output |
| Kernel mode | A loadable kernel module | Hooks system calls so every program sees a cleaned view |
| eBPF based | Programs attached inside the kernel | Filters what tools can observe without a classic module |
| Bootkit | Boot loader or early boot stage | Loads before the operating system and its defenses |
| Firmware | UEFI, disk or NIC firmware | Survives reinstalls; rare and mostly targeted |
Kernel-level kits are the dangerous class on servers, because once the kernel lies, every tool running on that kernel lies too.
What signs might point to a rootkit?
- Load or network traffic that no visible process explains; compare
topwith the byte counters fromip -s link. - Commands that behave oddly, such as
lsmissing files thatfindor a static busybox shows. - Unknown entries in
/etc/ld.so.preload, which should normally not exist at all. - Kernel modules that do not belong to any package, or a tainted kernel flag in
/proc/sys/kernel/tainted. - New SSH keys in
authorized_keysfiles, unknown users with UID 0, or logs with unexplained gaps.
Which tools help check a Linux server?
cat /etc/ld.so.preload 2>/dev/null || echo "no preload file (normal)"
awk -F: '$3==0{print "uid0:", $1}' /etc/passwd
lsmod | awk 'NR>1{print $1}' | while read m; do modinfo -F filename "$m" >/dev/null 2>&1 || echo "no file for module $m"; done
apt install -y rkhunter chkrootkit debsums && rkhunter --check --sk --rwo; chkrootkit -q; debsums -s
rpm -Va --nomtime | grep -E '^..5' | head # AlmaLinux or Rocky Linux: binaries whose hash changed
debsums and rpm -Va compare installed files with the hashes recorded by the package manager, which catches replaced binaries quickly. rkhunter and chkrootkit look for known kits and suspicious traits but produce some false positives, so read warnings rather than panic. Remember the limit: on a system with a kernel rootkit, every check run on that kernel can be fooled. File Hash explains integrity baselines that live off the machine.
What is the right response if a rootkit is found?
Do not try to clean it. You cannot trust any tool on the compromised system to tell you that the removal worked. The reliable path is:
- Copy off logs and anything you need for investigation, treating the copies as untrusted.
- Rotate every credential the machine held: SSH keys, database passwords, API tokens, and keys for any other system it could reach.
- Reinstall the machine from the panel with a fresh image; our images install from known clean sources.
- Restore application data from backups taken before the intrusion, and rebuild configuration from version control rather than copying old files.
- Find and fix the entry point, or the new install will be compromised the same way.
Firmware rootkits are the rare exception that survives a reinstall. If you have reason to suspect one, open a ticket and ask for the hardware to be checked or swapped.
How do I make a rootkit harder to install?
- Patch promptly; most server compromises use known bugs. Unattended upgrades or dnf-automatic help.
- Use SSH keys, disable password logins and limit who can reach port 22. Harden SSH on Linux has the details.
- Keep Secure Boot enabled where the platform supports it, which blocks unsigned kernel modules.
- Set
kernel.modules_disabled=1after boot on machines that never load new modules, so even root cannot add one until the next restart. - Ship logs to another machine, so an intruder cannot quietly erase the trail.
Why does single tenancy help here?
On a bare metal machine no other customer shares your kernel or hypervisor, so an intrusion elsewhere cannot reach yours through the host. Your own patching, access control and monitoring decide the outcome. Even a modest box like the S2 gives you full control of the stack to harden it end to end.
Single-Tenant Machines You Harden Yourself
| Server | Processor | Cores / threads | Memory | Storage | Network | Per month | Smallest order |
|---|---|---|---|---|---|---|---|
| E1 | Intel Xeon E3-1240 v3 | 4 / 8 | 16 GB DDR3 | 2x 240 GB SSD | 2x 1 Gbps | $30.52 | $91.56 (3 months) |
| S2 | Intel Xeon E-2356G | 6 / 12 | 64 GB DDR4 | 1x 1 TB NVMe | 2x 10 Gbps | $58.39 | $58.39 (1 month) |
| S6 | Intel Xeon E-2288G | 8 / 16 | 64 GB DDR4 | 2x 1 TB NVMe | 2x 10 Gbps | $89.92 | $89.92 (1 month) |
Keep Reading
Malware
Software written to harm, spy on or take over systems: the main families, how each reaches a Linux server and what keeps it out.
OpenFile Hash
A short fingerprint computed from a file, how it proves downloads and backups are intact, and the commands to create and verify one.
OpenHarden SSH on Linux
A practical hardening list for sshd on a fresh dedicated box: keys, users, rate limits, firewall scope and an outside audit.
OpenSet up fail2ban
Install fail2ban, write a jail.local for SSH and nginx, read the ban list and unban an address you locked out by mistake.
OpenFAQ
Quick Answers
Malware that keeps privileged access to a system while hiding its files, processes and connections from the owner.
No. It finds known kits and suspicious signs, but a kernel rootkit can hide from any tool running on the same system.
No. Save what you need, rotate credentials, reinstall from a clean image and restore data from backups made before the intrusion.
It removes all operating system level kits. Firmware rootkits are rare but can survive; ask support to check hardware if you suspect one.
After gaining root through an unpatched bug, stolen credentials or malicious software, they install the kit to keep and hide access.