Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-01-2005, 06:03 PM
|
#1
|
Member
Registered: Mar 2005
Posts: 141
Rep:
|
Chkrootkit Alert. Am I actually compromised
I was reviewing my nightly notifications from my linux server this afternoon and I saw the following from chkrootkit
Quote:
/etc/cron.daily/chkrootkit:
You have 1 process hidden for readdir command
You have 1 process hidden for ps command
chkproc: Warning: Possible LKM Trojan installed
eth0: PACKET SNIFFER(/usr/sbin/snort[26839])
|
I ran chkrootkit again and it only shows snort. So I than ran -x lkm and got the following.
Quote:
nix:/sbin# chkrootkit -x lkm
ROOTDIR is `/'
###
### Output of: ./chkproc -v -v -p 2
###
CWD 3541: /var/lib/mysql
EXE 3541: /usr/sbin/mysqld
CWD 3542: /var/lib/mysql
EXE 3542: /usr/sbin/mysqld
CWD 3543: /var/lib/mysql
EXE 3543: /usr/sbin/mysqld
CWD 3544: /var/lib/mysql
EXE 3544: /usr/sbin/mysqld
CWD 3547: /var/lib/mysql
EXE 3547: /usr/sbin/mysqld
CWD 3548: /var/lib/mysql
EXE 3548: /usr/sbin/mysqld
CWD 3549: /var/lib/mysql
EXE 3549: /usr/sbin/mysqld
CWD 3550: /var/lib/mysql
EXE 3550: /usr/sbin/mysqld
CWD 3551: /var/lib/mysql
EXE 3551: /usr/sbin/mysqld
|
What's the likelyhood I've actually been compromised and this isn't a false positive? The server is still up and running and I haven't killed any processes. I'm wondering if I shoudn't scratch chkrootkit and install fresh from source and then scan it again?
My reading on google suggests that LKM Trojan can frequently be reported as a false positive so I don't want to jump the gun and do a complete format / reinstall if it's not necessary.
Any advice/suggestions are greatly appreciated!
|
|
|
12-01-2005, 07:16 PM
|
#2
|
Senior Member
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658
Rep:
|
The lkm check is prone to false positives especially for threaded processes, whioh I wouldn't be surprised to see spawning from mysql. That being said, check the integrity of the mysqld binary; on rpm-based distros you can use rpm -V <package_name>. Otherwise you can compare it's md5 hash to a known good version.
Also, is snort supposed to be on this box?
|
|
|
12-01-2005, 07:35 PM
|
#3
|
Member
Registered: Mar 2005
Posts: 141
Original Poster
Rep:
|
Quote:
Originally posted by Capt_Caveman
The lkm check is prone to false positives especially for threaded processes, whioh I wouldn't be surprised to see spawning from mysql. That being said, check the integrity of the mysqld binary; on rpm-based distros you can use rpm -V <package_name>. Otherwise you can compare it's md5 hash to a known good version.
Also, is snort supposed to be on this box?
|
Yup. Snort is intentional. I'm running Debian and MySQL was originally installed via apt-get.
Here's what I see on my system.
Quote:
$ sudo mysql -V
mysql Ver 14.7 Distrib 4.1.11, for pc-linux-gnu (i386)
|
Quote:
$ md5sum -b /usr/sbin/mysqld
7d68a5b3adab3eb7cbed1add8ae37d37 */usr/sbin/mysqld
|
Apparently that version of Mysql is several revisons behind, although apt never found a newer version to upgrade to. I checked the mysql source archives at http://downloads.mysql.com/archives....l-4.1&v=4.1.11 and didn't find any package name or MD5 that matched. Is there someplace else I should be looking for a valid MD5 sum or am I SOL?
|
|
|
12-01-2005, 07:44 PM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,415
|
The lkm check is prone to false positives especially for threaded processes
I'd like to rephrase that as "the way the LKM check is done *any* short-lived process can cause an FP".
One way to diminish chances of running alien binaries could be to use GRSecurity's "Trusted Path Execution". This means no binaries can be run except those in $PATH, provided PATH is set to a sane choice of dirs and those dirs and binaries can not be tainted (ownership, attributes, extended attributes, mount flags). If you're running a server as well check on mounting $TEMP dirs with noexec and/or nosuid mount flags where possible. Do run a check if this causes trouble for applications though.
|
|
|
12-01-2005, 08:00 PM
|
#5
|
Member
Registered: Mar 2005
Posts: 141
Original Poster
Rep:
|
Quote:
Originally posted by unSpawn
The lkm check is prone to false positives especially for threaded processes
I'd like to rephrase that as "the way the LKM check is done *any* short-lived process can cause an FP".
One way to diminish chances of running alien binaries could be to use GRSecurity's "Trusted Path Execution". This means no binaries can be run except those in $PATH, provided PATH is set to a sane choice of dirs and those dirs and binaries can not be tainted (ownership, attributes, extended attributes, mount flags). If you're running a server as well check on mounting $TEMP dirs with noexec and/or nosuid mount flags where possible. Do run a check if this causes trouble for applications though.
|
Thanks for the info UnSpawn. I already have my /tmp directory mounted as such
/dev/hda8 /tmp ext3 rw,noexec,nosuid
I'm still hoping I can find the correct MD5 to compare to.. I'd rather not have to do a complete re-install of the server 
|
|
|
12-03-2005, 04:15 PM
|
#6
|
Member
Registered: Jun 2005
Location: Lilburn, Ga
Distribution: FC5
Posts: 175
Rep:
|
Might be a good idea to get rkhunter. I always like to have at least two ways to look at these things.
|
|
|
12-06-2005, 07:48 PM
|
#7
|
Moderator
Registered: May 2001
Posts: 29,415
|
Might be a good idea to get rkhunter.
Spreading your detection capabilities a way better idea would be to get Aide, Samhain or even tripwire running.
|
|
|
03-18-2006, 01:37 AM
|
#8
|
Member
Registered: Mar 2003
Location: Mansfield Queensland Australia
Distribution: Linux Mint - Tara
Posts: 497
Rep:
|
Quote:
Originally Posted by unSpawn
Might be a good idea to get rkhunter.
Spreading your detection capabilities a way better idea would be to get Aide, Samhain or even tripwire running.
|
I agree with unSpawn. The more detection tools the better, the more layers of security the better. Rootkithunter also looks for other system security vulnerabilities besides rootkits. Bastille and Aide as well as tripwire are very good tools.
|
|
|
All times are GMT -5. The time now is 01:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|