Debian – Warning: Possible LKM Trojan installed

debianSecurity

I am running chkrootkit every night on 3:04. More than 1 year it was not returning any problems but 1 month ago this warning started to appear:

=======================
Checking `lkm'...                                           You have     1 process hidden for readdir command
You have     1 process hidden for ps command
chkproc: Warning: Possible LKM Trojan installed
=======================

Now I run chkrootkit every hour and at

3:02
3:03
3:04
3:05

No warnings at other times but 2-3 times per week chkrootkit returns this warning at 3:02 or at 3:04. The next scan after 1 minute doesn't retur this warning. Any ideas? Why this warning appears at 3 am? Is there any way how to run chkrootkit so that it shows more info about hidden process?

Yes, I know there are a lot of articles saying that it may be a false positive but why this warning started to appear so often?

Rkhunter, Clamav, LFD/CSF doesn't report any problems on the server.

Best Answer

I do not think it is possible for anyone here to properly figure out what is wrong with your system, unless we have direct access.

You can assume it is a false positive and that is what most likely is the case. In my experience I have had the odd false positive as well and after some investigation I had satisfactory confirmed to myself that indeed it was a false positive. Some processes can be hidden from the ps command for perfectly legitimate reasons. And are often short-lived.

However if you want to be sure you could do something as described below. I understand it is a bit extreme and may not apply at all in your situation, but I can't be sure of that, that is a decision you need to make.

I personally take a lot of wisdom on what to do in such and other situations, from Securing Debian Manual, especially in your case check Chapter 11 - After the compromise

The general advise is to unplug a compromised system from the network first and foremost, then back up the system. Then perform more investigation. This should be a separate activity and doesn't need to get in the way of restoring the system. It'd be a good idea to try and find out how it was compromised.

In the meantime completely wipe the system, re-install the OS from a non suspect read only source (say a dvd) and restore from backup only the data which you can be certain of is not infected. If such data is contained in repositories, then just retrieve it from there instead of the backup.

Assume any files on the system and its backups are suspect and try as much as possible to restore it without copying files from the backup. Restore configuration files by just repeating what you did, copy pasting text etc.