Published on: April 5, 2025
Linux systems are known for their robust security features. However, malicious software such as rootkits can compromise even the most secure environments by operating at the kernel level.
In this guide, you’ll learn how to install and use rkhunter
(Rootkit Hunter), a powerful open-source tool designed to detect rootkits, backdoors, and local exploits on Linux systems.
rkhunter
(Rootkit Hunter) is an open-source security tool used to scan Linux systems for signs of rootkits, backdoors, and other security vulnerabilities. It works by checking system binaries, files, and processes for known signatures of malicious software.
Follow these steps to easily install rkhunter
on your Linux system:
sudo apt update
sudo apt install rkhunter -y
sudo rkhunter --update
sudo rkhunter --check
sudo rkhunter --check --sk
–sk stands for “skip all prompts” — this runs the scan automatically.
sudo rkhunter --check --system-language en --skip-keypress --enable all --disable none
After the scan completes, you may see output like this:
[Rootkit Hunter version 1.4.6]
Checking system for rootkits...
Possible rootkit installed: Possible Linux/Ebury - Based SSH Trojan
Warning | Meaning |
---|---|
Possible rootkit installed |
A rootkit might be present on your system. |
Application 'ps' has been modified |
The ps command might have been tampered with. |
Hidden file found |
A hidden file or directory was detected. |
Suggested action |
Recommended steps to take based on the warning. |
rkhunter
saves all scan results in a log file. You can view it with the following command:
cat /var/log/rkhunter/rkhunter.log
If rkhunter
detects a potential threat:
chkrootkit
for cross-verification.sudo apt install chkrootkit -y
sudo chkrootkit
journalctl -xe
ss -tulnp
Topic | Description |
---|---|
What is rkhunter? | A tool to detect rootkits, backdoors, and local exploits |
Installation | Installed via apt install rkhunter |
Scanning | Use rkhunter --check for scanning |
Log File | Located at /var/log/rkhunter/rkhunter.log |
Extra Tools | Use chkrootkit for additional scanning |