Installation of rkhunter and chkrootkit

Hi People,

Something I should have done long ago, I know.

I have looked at installing rkhunter and chkrootkit and I have searched the forum but can’t find the info I need.

I found this thread with instructions https://www.virtualmin.com/node/6561 which says :-

Webmin > System > Software Packages Browse YUM for rkhunter, pick the version for your OS, Install

Rkhunter does not show up on a search of YUM.

I also found the following thread
https://www.virtualmin.com/node/7983
which mentions installing the compiler.

Both of these are quite old now. Is there a more up to date instruction somewhere? This server is running so well I don’t want to do something which will mess it all up.

Many thanks for reading and any advice you can offer.

Tim

CentOS Linux 5.6
Webmin 1.550
Virtualmin 3.84 Pro

Howdy,

Yeah, while those apps are available in Debian and Ubuntu, they’re unfortunately not included in the CentOS yum repository.

So to install them, you’ll either have to build them manually, or find a trustworthy source with a .rpm file containing those.

Note that I don’t recommend enabling a third party repository, but downloading a couple of apps such as what you’re after from a third party source is typically fine.

-Eric

would this do?
http://pkgs.org/centos-5-rhel-5/rpmforge-i386/chkrootkit-0.47-1.el5.rf.i386.rpm.html

So you got all that on the first run?

That’s weird, there’d be no point of reference :slight_smile:

Whenever it gives you all that info, it would typically be during a comparison to the last time rkhunter ran. Is it possible a version of rkhunter was already installed, and had been run awhile ago?

Anyhow –

You should get a notice about users added to the /etc/passwd file since the last time it ran. There’s no need to run --propupd for that, it’ll always tell you that information once. I’d suggest each time you see those, doing a quick review of the users to make sure they’re all legitimate.

As far as the file warnings go – after installing rkhunter, one of the first things you should do is run “–propupd”. That’ll generate a database of certain files on your system. Each time you run rkhunter from here on out, it’ll compare your files to what’s in that database. The only time those files should be different is if you recently ran a package update that changed them.

-Eric

Thanks Eric for making me feel a little more confident in what I was doing and Ronald for pointing me in the right direction.

But you knew I would be back with some questions I guess.

I started with rkhunter and install via Webmin>System>Software Packages went like a dream. Brilliant!

Then I ran rkhunter and got many (maybe hundreds) warnings like this

/bin/cat [ Warning ] Warning: The file properties have changed: File: /bin/cat Current hash: a12455633de1b36ce0e0b50e6999eee38588b442 Stored hash : 76e738a04dcaa29189e50852cf13bc67a9fe355e Current file modification time: 1301505162 (30-Mar-2011 18:12:42) Stored file modification time : 1256609348 (27-Oct-2009 02:09:08)

None of the dates I see coincide with the dates that the update was run via YUM or the times I would have been working on the server.

I Googled and found that this is most likely all false positives and I should run with the ‘–propupd’ option but I should check the hash with a known good file, I did find some references to doing that but where could I find a list/method of doing that with the Webmin installation?

I also see many (maybe for all users) of these:

Warning: Changes found in the passwd file for user ‘somebody.rothlp’:
Warning: User ‘another.rothlp’ has been removed from the passwd file.
Warning: User ‘aperson.rothlp’ has been added to the passwd file.

I couldn’t find a reliable post confirming that these would also be resolved when running with ‘–propupd’ option.

The good news is “Possible rootkits: 0”

Many thanks for any inout anyone can offer,

Tim

Dammitall !

Thanks for the reply’s people.

I wasn’t happy with things and decided to do some more digging around.

Unfortunately the box must have been compromised.

There are a number of signs that I see reported elsewhere that conforms this. :o(

The worst part of all this is that although I took backups of the os and configs and sites, I did that to a second drive in the same server. The OS and config backups have been deleted.

LESSON LEARNED !

Do I sound bitter and twisted ?

Well, if the feeling that you want to kick someones teeth so far down theit throat that they have to see a proctologist instead of a dentist, then yes, I guess I am bitter and twisted. :o)

New server ordered so I can transfer stuff over.

I’m sure I will have some questions, sorry guys.