LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 06-13-2006, 03:07 AM   #1
zonr
Guest
 
Posts: n/a
How can I uninstall rkhunter


Hi everyone:

I would like to know how to uninstall rkhunter (rkhunter-1.2.8).

The server is using CentOS 4.

Thanks.
 
Old 06-13-2006, 05:20 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If it's not an rpm just "slocate rkhunter" and remove the dirs/files.
Any particular reason why you would want to remove it?
 
Old 06-14-2006, 02:01 AM   #3
zonr
Guest
 
Posts: n/a
Thank you for your help.

The reason for removing rkhunter is as follows.

After installing rkhunter and psad I have had difficulties. My sites do not show up. I already removed psad but the problem continues.

My main problem is that the sites disappear from the net but after I run the command /sbin/service iptables stop my sites show up again.

I also just noticed that I can run /sbin/service iptables start and my site still show up. When I run /sbin/service iptables status I notice that the firewall is not active. I am now looking into the firewall.

I also think that maybe psad reconfigured my firewall, so I need to look into that possibility as well now. I know that psad requires to add some new rules but I do not understand how to do them.

I really do not even know if rkhunter is the problem but it was one of two software that I installed just before I started having difficulties. I have noticed that when I run rkhunter -c everything checks out [ok]. The few exceptions are,...
Checking /etc/inetd.conf [ Not found ]
- /etc/rc.local [ OK ]
- /etc/rc.d/rc.local [ OK ]
- /usr/local/etc/rc.local [ Not found ]
- /usr/local/etc/rc.d/rc.local [ Not found ]
- /etc/conf.d/local.start [ Not found ]
- /etc/init.d/boot.local [ Not found ]
and
* Filesystem checks
Checking /dev for suspicious files... [ OK ]
Scanning for hidden files... [ Warning! ]
---------------
/dev/.udev.tdb /etc/.passwd.swo
/etc/.pwd.lock
/etc/.passwd.swp
/etc/.demousers
/etc/.whostmgrft
/etc/.demodomains
---------------
Please inspect: /etc/.passwd.swo (data) /etc/.passwd.swp (data)
But I do not know what to inspect/check for?????

Vulnerable applications: 2

I know the problem has to do with the iptables and the firewall but I am a beginner and I still don't understand what I am doing. So, I though, just delete the software for now.

I do prefer to fix it, not remove it. And after I find out the error(s), I want to reinstall psad as well. If you can help I will be so grateful!

Thank you very much.
Zon

Last edited by zonr; 06-14-2006 at 02:56 AM.
 
Old 06-14-2006, 06:14 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
The reason for removing rkhunter is as follows. (..) My sites do not show up.
I can state that (if you got your copy of the version 1.2.8 tarball from a "known good" source and the checksums match) with a certainty close to onehundred percent, RKH can not be the culprit. There is *nothing* in the source of RKH that would (in comparison to say Bastille-Linux) proactively snuff features on your box. It simply is not possible.


after I run the command /sbin/service iptables stop my sites show up again
In contrast to other services "iptables stop" clears the firewall rules and basically sets everything else to ACCEPT (do a "/sbin/iptables -n -L" and you'll see).


I really do not even know if rkhunter is the problem but it was one of two software that I installed just before I started having difficulties.
While you may hate documenting things 0) running a file integrity checker (Aide, Samhain and such) and 1) keeping an admin changelog on the box would definately help you here. Write down any config changes so you don't have to rely on memory. The file integrity checker will pick up changes you forgot to jot down, changes made by updates and changes made by anyone else, all for you to investigate.


Checking /etc/inetd.conf [ Not found ]
- /usr/local/etc/rc.local [ Not found ]
- /usr/local/etc/rc.d/rc.local [ Not found ]
- /etc/conf.d/local.start [ Not found ]
- /etc/init.d/boot.local [ Not found ]

On most distro's Inetd was replaced with Xinetd one millennium ago.
The other files are local customisations (/usr/local/etc) or distro specific files.
If you have none of the above according to your distro, and they also do not appear w/o you knowing, then that is OK.


/dev/.udev.tdb /etc/.passwd.swo
/etc/.pwd.lock
/etc/.passwd.swp
/etc/.demousers
/etc/.whostmgrft
/etc/.demodomains
Please inspect: /etc/.passwd.swo (data) /etc/.passwd.swp (data)

The FAQ says: "Most system directories contain no hidden* directories and files, but there are a few special exceptions. (listing) If you are 100 percent sure a hidden directory/file is valid for your system, add it to the whitelist. See the configuration file for more information."
* dot-files are called "hidden" because one would need to use "extra" flags to see them while listing files.
So. How to determine if these files are valid? You'll usually start with matching the name of the file to it's purpose or package. To verify, use:
- toolkit (stat, fuser, lsof, slocate, man -k),
- visual inspection (vi -R, strings, less),
- system auth, logfiles,
- package management database (rpm -q --whatprovides) and,
- knowledge or shared knowledge, like LQ.

Let's put that to practice: we have file /etc/.x. It's name doesn't ring a bell. While not the "best" method, I'll start by running "file /etc/.x" showing what type of file it is. Next run "fuser /etc/.x", which shows if it's in use. If it is, then query the PID with "lsof -n -i -p (insert PID here)|less" for info on the process. If it's not in use and if it's readable, read it. If it's not use "strings -an1 /etc/.x|less" to try and see if something in the contents looks familiar. If it's not, see if "rpm -q --whatprovides /etc/.x" returns a packagename. If it doesn't run "stat /etc/.x". This gives the modification time (file contents changed) and access time (reading file contents). You can try and correllate the date to activity in the system logs (see /etc/syslog.conf for details) and system auth data ("last|more"), but if contents changed a long time ago and it wasn't recently "read" then it may have been a config/cache/database that was added at install or upgrade time. If nothing of the above works for the file, search / ask at LQ and other sites for info (you could also jump on the RKH mailinglist). (If that doesn't work either then there's a last resort chance and that would be moving the file to another location, reboot the box and see if something goes wrong. Of course you should not do that if it's a production box, if the box is in colo or if you have no means to safely boot and repair the box running say a rescue or LiveCD).

OK. So I didn't add an explanation per file, but I gave you the information you need to practice determining if a file is valid. If unsure after you've tried: post the filename and file details here.


I know the problem has to do with the iptables and the firewall but I am a beginner and I still don't understand what I am doing.
Then maybe it's time to start reading the IPTables Tutorial. It's quite compact, so maybe only read the basics. Now start your firewall and any app that gives you firewall trouble. Now run "/sbin/iptables-save 2>&1|tee /tmp/iptables_rules_current". The file /tmp/iptables_rules_current now contains all the rules that are loaded. Make a new thread, give it an appropriate title say like "PSAD denies access to tcp/80" and post the rules in a "code" block.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rkhunter atlaika Linux - Security 7 11-29-2005 10:47 AM
rkhunter cronjob simcox1 Linux - Security 11 11-21-2005 08:25 AM
Help with Rkhunter findings............................ M$ISBS Linux - Security 13 08-01-2005 07:28 PM
rkhunter found the following monroetech Linux - Security 3 12-20-2004 08:51 PM
rkhunter phatbastard Linux - Security 3 12-08-2004 09:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration