Using chkrootkit to check for rootkits.

I'm concerned about potential rootkits on my Linux system. How can I use chkrootkit to effectively scan for them and interpret the results?

1 Answers

✓ Best Answer

🛡️ Using Chkrootkit to Check for Rootkits

Chkrootkit is a popular tool for detecting rootkits on Unix-like systems. Here's a step-by-step guide on how to use it:

Step 1: Installation 📦

First, you need to install chkrootkit. The installation process varies depending on your distribution.

Debian/Ubuntu:

sudo apt update
sudo apt install chkrootkit

CentOS/RHEL/Fedora:

sudo yum install chkrootkit

Alternatively, you can download the source and compile it manually:

wget http://www.chkrootkit.org/files/chkrootkit.tar.gz
tar zxvf chkrootkit.tar.gz
cd chkrootkit-*
make sense
sudo make install

Step 2: Running Chkrootkit 🚀

To run a basic check, simply execute:

sudo chkrootkit

This command will perform a series of checks on your system.

Step 3: Interpreting the Results 🔍

Chkrootkit will output a lot of information. Here's how to interpret some of the key findings:

  • INFECTED: Indicates a potential rootkit or suspicious file. Investigate further.
  • NOT INFECTED: Suggests that the specific test did not find any signs of infection.
  • Warning: Flags potential issues that require further inspection.

Example output:

Checking `ps'... INFECTED
Checking `netstat'... NOT INFECTED
Checking `strings'... Warning: Possible Trojan horse

Step 4: Advanced Usage 🛠️

You can perform specific checks using the -k option:

sudo chkrootkit -k ps netstat strings

To create a log file, use the -l option:

sudo chkrootkit -l /var/log/chkrootkit.log

Step 5: Updating Chkrootkit 🔄

Keep chkrootkit updated to ensure it has the latest rootkit signatures:

sudo chkrootkit -u

Important Considerations 🤔

  • Chkrootkit is not foolproof. It can produce false positives or miss some rootkits.
  • Always investigate any warnings or infections flagged by chkrootkit.
  • Combine chkrootkit with other security tools like rkhunter for a more comprehensive check.

Know the answer? Login to help.