LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-12-2012, 07:17 PM   #1
chrisanto_2000
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Rep: Reputation: Disabled
Unknown process consumes 100% CPU forever - Linux server


Hi All,

None of the applications in our server is accessible. When we checked the processes using "top" command, we found that a process CMD "exploit" was continuosly using 100% of CPU. And we were unable to switch in as any other non-root user.

Output of that line in process:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10745 1003 17 0 1664 496 432 R 99 0.0 1675:15 exploit

The process seems to have been triggered by an id, which is not known to us. Also I am unable to kill the process either using "kill" or "kill -9". The only option we are left with is to restart the server. But this has occurred for the second time in the past one week. The server was working fine before that.

Note: I did a search on the server to find the executable/file "exploit" on the server. But I did not get any.

Please help on this.

Regards,
Antony

Last edited by chrisanto_2000; 03-12-2012 at 07:19 PM. Reason: Missed a point.
 
Old 03-12-2012, 08:06 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Do you have security team you can call? .. this looks extremely suspicious.
 
Old 03-12-2012, 11:02 PM   #3
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
Is it possible for you to boot with a live CD, and have a look thru your log files? You may find something interesting there.

What distribution are you on ? What does your server do ? Web, Email ???? Does it, ( did it ) face the internet ?

What kernel are you using ? I found some Linux Exploit items in a search, and a few of them mentioned an 2.6 XX kernel.

Keep us posted if you can, and good luck !
 
Old 03-13-2012, 04:49 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Agreed with kbp here; this looks very suspicious. If the suspicion that you have some kind of security breach seems to be confirmed, you could report your thread to a moderator in order to get it moved to the security sub-forum, where it should get the kind of attention that it deserves.

In the interim, you could do worse than dig out your organisation's procedure on responding to a compromise and read the CERT Intruder Detection checklist at http://web.archive.org/web/200801092...checklist.html (this is an archived version).

Much more that is useful is linked here (which is where the CERT link comes from), but I am very aware that this might be a bad time to tell you to go and read everything.
 
Old 03-13-2012, 06:02 PM   #5
chrisanto_2000
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Unknown process consumes 100% CPU for every restart - Linux server

Hi All,

None of the applications in our server is accessible. When we checked the processes using "top" command, we found that a process CMD "exploit" was continuosly using 100% of CPU. And we were unable to switch in as any other non-root user.

Output of that line in process:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10745 1003 17 0 1664 496 432 R 99 0.0 1675:15 exploit

The process seems to have been triggered by an id, which is not known to us. Also I am unable to kill the process either using "kill" or "kill -9". The only option we are left with is to restart the server. But this has occurred for the second time in the past one week. The server was working fine before that.

Everytime, the process runs in a different user, either a know user in the server or some unknown ID.

Note: I did a search on the server to find the executable/file "exploit" on the server. But I did not get any.

Please help on this.

Regards,
Antony
 
Old 03-13-2012, 06:13 PM   #6
elfenlied
Member
 
Registered: Dec 2004
Posts: 83

Rep: Reputation: 8
Is your machine publicly accessible? If so have you verified if it's been compromised? (rkhunter, chkrootkit).
 
Old 03-14-2012, 10:43 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. Your same topic threads have been merged now.

Last edited by unSpawn; 03-16-2012 at 01:01 AM.
 
Old 03-19-2012, 09:59 PM   #8
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
What is the result of these commands:

Code:
lsof -n -p 10745
ls -Al /proc/10745{,/fd/*}
cat /proc/10745/maps
Replace 10745 in each command with the process ID you do see for a later incident.

Last edited by Skaperen; 03-19-2012 at 10:05 PM.
 
Old 03-20-2012, 04:54 AM   #9
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
I agree with Skaperen, trace the process to find it's thread chain as well as any files it opens.
I would recommend the following additional commands, which will give you a lot more detailed information on the process, look through your cron tasks to see if there is an entry to respawn this process, and see if there are any open network connections associated with it:

Code:
ps acxfwwwe,  ls -al /var/spool/cron, netstat -anpe
You mentioned that it is owned by a user you are not familiar with, which in this case was user 1003. Normally, user account s in the 1000+ range are user accounts. Did you map the ID back to a particular account?
 
Old 03-22-2012, 11:08 PM   #10
chrisanto_2000
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks All. At the moment, we don't find that suspicious process. But I am not sure, if it can happen again.

Under /var/spool/cron/oracle, we found the entry * * * * * /u02/home/oracle/scripts/osbws/.b/y2kupdate >/dev/null 2>&1.
This .b folder contains unknown files like b, f, sl etc.

File type is "j: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped".

I tried to download these files to my desktop. My Anti-virus scanner scanned and deleted those, as they were viruses. Now, I need a way where I can verify that the server does not contain suspicious files in any other file system. Is there any way to do that ?
 
Old 03-23-2012, 01:31 AM   #11
chrisanto_2000
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
We have installed clamav tool and have started scanning. This has identified few files, but it is unable to detect the files which identified by my Windows desktop.

We found another issue. None of the "non-root" users are able to login to the system. We get "Server unexpectedly closed network connection". When I gave wrong password, it says "Access Denied". If I key in the correct password, it throws the error. When I do an "su" of the user from "root", it works fine.

How can I get rid of this issue?
 
Old 03-23-2012, 04:48 AM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by chrisanto_2000 View Post
None of the "non-root" users are able to login to the system. We get "Server unexpectedly closed network connection". When I gave wrong password, it says "Access Denied". If I key in the correct password, it throws the error. When I do an "su" of the user from "root", it works fine. How can I get rid of this issue?
The question is not how to get rid of the problem but what is causing it. To help us help you members have posted questions. Your replies contain useful information but not nearly as much as was asked. For instance the 'ps' forest tree would have been very welcome at this stage. Could you please read more carefully and respond in a more timely and detailed manner? Thanks in advance.


Quote:
Originally Posted by chrisanto_2000 View Post
Under /var/spool/cron/oracle, we found the entry * * * * * /u02/home/oracle/scripts/osbws/.b/y2kupdate >/dev/null 2>&1.
This .b folder contains unknown files like b, f, sl etc. File type is "j: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped".
Nice find. "y2kupdate" comes as part of the standard installation of the EnergyMech IRC bot (we've been seeing it mentioned on LQ since about 2004). The name the process will be running as should be in file "r" if it is a shell script (run 'file r' first). The fact the perpetrator was able to download, unpack and install the archive and run it under the oracle account means you have a problem with Oracle products, Secure Backup specifically, the web server or whatever 'net-facing service runs on top of it. Which one it is can be gleaned from the log files as often the remote file will be downloaded using curl, wget or other readily available downloaders. Copy the system and daemon logs to a different, known safe workstation (pull the logs in from the remote machine, not push them to your workstation) and run Logwatch on it. (See this post about patching Logwatch.)
If the processes are confined to this particular non-root user (asserting no rootkit was used see '/bin/ps axfwww -o pid,ppid,uid,gid,cmd') then to stop anyone but root from using cron run 'echo root > /etc/cron.allow', list process details ('lsof -Pwln; ') and kill the offending processes.


Quote:
Originally Posted by chrisanto_2000 View Post
I tried to download these files to my desktop. My Anti-virus scanner scanned and deleted those, as they were viruses. Now, I need a way where I can verify that the server does not contain suspicious files in any other file system.
If this was a production machine you might first need to check if migrating services is possible. Before you actually migrate them ensure the new machine is clean and properly hardened and audited regularly. That said best first stop unnecessary services (or firewall them to only allow traffic to and from your management IP range) and reread the CERT link previously posted. As a part of that assess which files are under your distributions package management and which ones check out OK.
 
  


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
pthread_mutex_call blocks forever causing cpu usage 100% koool.vaibhav@gmail.com Programming 4 02-06-2011 06:04 AM
gil = TCP/IP process consumes a lot of CPU pete83 AIX 1 05-09-2008 02:57 AM
QjackCtl or Qsynth window consumes 100% of CPU (without actually starting services) Xdrummer Slackware 1 03-18-2008 01:20 PM
pdftotext consumes 100%cpu power alaios Linux - Software 1 04-02-2007 06:27 PM
Drake 10.1 find goes forever 100%cpu kristi Linux - General 4 02-08-2005 05:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:37 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