SSHD Rootkit Rolling around

Status
Not open for further replies.

SiMmER

Active Member
422
2010
61
0
Quick survey, anyone seen a rootkit being used to send spam through sshd involving a library called 'libkeyutils.so.1.9'?

If so what OS did you see it on?

UPDATE (Feb 21): Adding fire to the local vulnerability theory, cPanel has just released the following statement. cPanel is not the cause of every rooted server obviously, but merely one of the avenues through which server credentials were stolen.

Quote: You are receiving this email because you have opened a ticket with our support staff in the last 6 months. cPanel, Inc. has discovered that one of the servers we utilize in the technical support department has been compromised. While we do not know if your machine is affected, you should change your root level password if you are not already using ssh keys. If you are using an unprivileged account with "sudo" or "su" for root logins, we recommend you change the account password. Even if you are using ssh keys we still recommend rotating keys on a regular basis.

As we do not know the exact nature of this compromise we are asking for customers to take immediate action on their own servers. cPanel's security team is continuing to investigate the nature of this security issue.

UPDATE (Feb 21): Several Linux anti-malware scanners such as AVG now detect the malicious libkeyutils files based on signature instead of just name.

UPDATE (Feb 20): Evidence is increasingly pointing towards a local vulnerability. The exploit filename also appears to be changing: libkeyutils-1.2.so.2 is popping up on CentOS 5.

--

If /lib64/libkeyutils.so.1.9 or /lib/libkeyutils.so.1.9 exist on your server, it is very likely that your server has been compromised at the root level and is currently sending out spam. Removing this file may be a temporary fix, but since the attack vector is still unknown, that is not likely a permanent fix. At this point, if your server has been rooted, the only 100% way to clean your server is to wipe your drives and do a clean installation.

Possibilities being discussed in this thread include a 0-day exploit of SSHD itself, curl vulnerabilities or even a local vulnerability attacking users through software like Adobe Flash and gaining root access to their servers via their computers.

Based on community input, it appears that both RHEL-based and Debian servers are affected. Servers with control panels such as cPanel, DirectAdmin, and Plesk are also affected. Servers with both standard and non-standard SSH ports are vulnerable and even servers that only accept key authentication have been compromised. Consider all passwords (including root) and private/public keys compromised. If you've made SSH connections to other servers from your exploited server, that login information is likely also compromised.

Recommended Actions: Since we still do not know the attack vector, we can only provide guidelines for things you should probably do.
Change all of your root passwords and key pairs from a clean computer
Keep your server software up-to-date
Disable root logins and/or firewall off your SSH port
Upgrade Flash and Java on your computers
Do malware scans on your computers
Keep checking this thread for updates! This thread summary will be constantly updated when we have new information.

WARNING: There are multiple scripts floating around the internet that promise to automatically clean up your server, but please be aware that they are not guaranteed to fix anything and have the potential to cause more problems. Run them at your own risk!


orignal thread at wht

http://www.webhostingtalk.com/showthread.php?t=1235797


my box is also effected .. have you checked ur vps or box ?

if you use seebox then chances are that ur box has been rooted..
 
19 comments
A client of mine had this issue the other day i came across.

uname -a
2.6.32-042stab059.7

md5sum /lib64/libkeyutils.so.1.9
d81217186da61125f4dad7a87857b697 /lib64/libkeyutils.so.1.9

Who ever it is is not using root, remove lib & restart sshd and they will no longer be able to get in. Also make sure iptables is running properly.
 
wow .. keep dreaming.. you will get root again when ever they want...

i'm effected by this rootkit..

this is the 8th day and i still can't get rid of this rootkit..

btw do you mind sharing his vps OS ? is that a xen or openvz ?

about the iptables.. u can't stop it.. if u'll ban it attack will come from another ip i have a list of those ip's and it goes above 4mb in size..

i can't restrict ssh to a certain ip or subnet because i have dynamic ip range with diffrent subnets..
 
Last edited:
Openvz on cent os


If you want i can get rid of it for you, shoot me a pm and ill help you when I'm free I specialize in Linux security
 
yes gavo i saw that after i posted this thread ..

@DLow bro i don't know weather you have been properly seen this rootkit in action or not but i have.. and i have informed beamservers Sahil about this.. we tried everything possible now i suggested em another idea .. i'm waiting for his reply i will let you know what happens..

once you have been rooted u will be rooted again in a matter on minutes..
 
I bet you money on it that I can stop it from happening agian.

I have numorous amounts of expertise in Linux security and hardening. It's what I do for a living aside of being a fiber optic network engineer.
 
DLow bro i don't want to do an argument here you may have more knowledge than me in linux security.. but please read few pages of the wht thread you will understand the nature of this exploit..

anyways let me first see the outcome of the test we're doing.. if we're not successful then i'll surely let you my vps details for checking.. thanks for lending your helping hand..

edit : btw bro if you know that linux security then why don't you contribute something over at wht in that thread.. i will be watching your posts..
 
Im not a big fan of WHT and don't really get along with Bear anymore.

Hopefully you guys can figure out a way to fix / remote the rootkit.


What ways have you tried ?
 
@simmer mind sending me a pm so we can discuss the method you found I would like to create a patch for this exploit from what I know and what you have found out I'd like to work with you on it.
 
hahah :D

If any of you managed to fully read my thread i posted how to block the exploit in two different methods since it first came out.
 
DLow, a respected and well known member, is offering a free service in getting a rootkit off your server and you reject him...

/logic

DLow is a respected member ? well i did'nt know about that,and i respecst EVERYONE and yes i really appreciate that he is willing to help me but why not try to fix the problem your self first ? this is a golden chance to learn something new ? i mean i have never encountered an exploit like this before.. the server got rooted within minutes.. this attack is running on entire SUBNET of my vps provider since my vps came under attack..

right now i have disabled SSHD completely... and i saw that the ip which was able to successfully broke in was listed on US honeypot blacklist.. in addition i have permanently blocked all those ip's in CSF..

this attack is automated..

please if i hurt someone's feelings then i apologize..

well i know how it feels if your slice or box got rooted by an intruder.. so i also wrote in my post that i'm willing to help others..
 
@Cheetah unfortunately i have to close the sshd service.. and block all those ip's.. btw that script posted on wht which reboots the vps/server if it founds the file name in lib folder does not work either.. this exploit is very sophisticated.. i doubt any patch would be able to fix this.. since the nature of the exploitation is not clear.. i'm waiting for this exploit to go public..
 
@Cheetah unfortunately i have to close the sshd service.. and block all those ip's.. btw that script posted on wht which reboots the vps/server if it founds the file name in lib folder does not work either.. this exploit is very sophisticated.. i doubt any patch would be able to fix this.. since the nature of the exploitation is not clear.. i'm waiting for this exploit to go public..


You sir clearly have not read my thread also hahhaha...

Its not a sophisticated exploit at all just highly resourceful using other aspects you would not think of.

Maybe take the time to read.. Then the bot wont be so sophisticated for you..
 
I bet you money on it that I can stop it from happening agian.

I have numorous amounts of expertise in Linux security and hardening. It's what I do for a living aside of being a fiber optic network engineer.


ihZuLZ4.jpg
 
Status
Not open for further replies.
Back
Top