Recognising the Symptoms of a Rootkit
- Unexpected and persistent high CPU usage, even when no demanding applications are running.
- Frequent system crashes or freezes that are not attributable to hardware issues or known software bugs.
- Unusual network activity, such as unexplained outgoing connections or high data transfer rates.
- Log files that are missing entries, appear tampered with, or contain suspicious, unrecognised activity.
- Changes to file permissions or ownership on critical system files without your knowledge.
- Antivirus or anti-malware software mysteriously failing to update, becoming disabled, or reporting false positives.
Good to know
Initial Investigation: Where to Look
- Check for hidden files and directories in critical system paths like
/bin,/sbin,/usr/bin, and/usr/sbinusing the commandls -la. - Examine running processes for anything suspicious or unknown using
ps auxand correlating them with known legitimate processes. - Review kernel modules with
lsmodfor any unfamiliar entries that might indicate a loaded rootkit component. - Inspect network connections and listening ports using
netstat -tulnpaorss -tulnpafor unauthorised services. - Look into system logs in
/var/logfor unusual login attempts, failed commands, or manipulated entries.
Tip
Using Standard Commands for Deeper Insight
- File Integrity Checks: Use
rpm -Vaon RPM-based systems (like Fedora, CentOS) ordebsumson Debian-based systems (like Ubuntu) to verify core package integrity. This can locate altered system files. - Process and Network Monitoring: Run
lsof -iorfuser -v /dev/kmemto get a detailed view of open files and network connections, which can sometimes bypass rootkit cloaking mechanisms. - Listing Hidden Processes: Try
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cputo get a comprehensive list of processes and look for parent processes that don't make sense or processes with strange names. - Disk Usage Analysis: Use
df -handdu -sh *in various directories to spot unexpectedly large or hidden files/directories that might belong to a rootkit. - Environment Variable Inspection: Check your system's environment variables with
envfor suspicious modifications that could redirect commands or load malicious libraries.
Important
Confirming a Rootkit Without Intervention
- Boot your system from a trusted 'live' Linux distribution (e.g., Ubuntu Live USB). This ensures you're running a clean operating system unaffected by any potential rootkit.
- From the live environment, mount your suspicious system's hard drive and use a rootkit detection tool like
chkrootkitorrkhunteron the mounted drive. For example:sudo chkrootkit -r /mnt/your_system_root. - Perform a thorough forensic analysis of disk images created from the compromised system on a separate, secure machine. This allows for in-depth inspection without touching the live system.
- Compare critical system files (e.g.,
/bin/ls,/sbin/init) from your suspicious system with known clean versions from your live environment or a trusted source. - Look for evidence of kernel module manipulation or hidden processes that standard tools might miss when run from the live system.
Good to know
Was this guide helpful?
Know someone who needs this? Send them the guide.
Written by
Jordan DicksonFounder, CyberSecurityGuides
Founder of CyberSecurityGuides, writing practical, jargon-free guides that help everyday people recover from and protect against online attacks.
Reviewed by CSG Security Engineers