LinuxQuestions.org
Help answer threads with 0 replies.
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 12-26-2009, 07:52 PM   #1
FlGator81
Member
 
Registered: Nov 2008
Location: Baltimore
Distribution: Ubuntu
Posts: 65

Rep: Reputation: 21
OSSEC says "Suckit" rootkit possibly detected


Hi,
I am running Ubuntu 9.10 desktop on a Dell Inspiron E1505. OSSEC is hitting on a possibly trojaned file. The alert is:

Quote:
Trojaned version of file '/proc/1/maps' detected. Signature used: 'init.' (Suckit rootkit)
I ran RKhunter and it said it did not detect "Suckit" rootkit, but it is hitting on a similar file (sbin/init) and some others. Then I ran ChkRootkit and it did detect "Suckit" rootkit. I can't find ChkRootkit's logs at this time though. /var/log/chkrootkit is empty.

So does anyone have any ideas as to whether I can confirm that there is or is not an infection? And if there is an infection, how can I remedy this problem?
 
Old 12-26-2009, 10:49 PM   #2
FlGator81
Member
 
Registered: Nov 2008
Location: Baltimore
Distribution: Ubuntu
Posts: 65

Original Poster
Rep: Reputation: 21
I got it fixed. I just backed everything up and did a clean re-install. It seemed like the only way to make sure the job really got done right.
 
Old 01-03-2010, 04:29 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I kind of doubt it...

Quote:
Originally Posted by FlGator81 View Post
I ran RKhunter and it said it did not detect "Suckit" rootkit, but it is hitting on a similar file (sbin/init) and some others.
Shame you're just telling stuff instead of posting the Rootkit Hunter version and actual log and file details that could help us help you (at all, better).


Quote:
Originally Posted by FlGator81 View Post
Then I ran ChkRootkit and it did detect "Suckit" rootkit. I can't find ChkRootkit's logs at this time though. /var/log/chkrootkit is empty.
Chkrootkit logs to stdout by default.


Quote:
Originally Posted by FlGator81 View Post
So does anyone have any ideas as to whether I can confirm that there is or is not an infection?
Quite a few things actually:

* Read The Signs
- An attack will often be preceded by reconnaissance. This means that reading logs and filtering for signs of potentially malicious network activity serves as an Early Warning system. Add passive and active response capabilities like `man hosts_access`, iptables, Snort (+Guardian?), Denyhosts, Fail2ban, mod_security, OSSEC-HIDS, et cetera provide (that's an AND'ed choice not OR'ed), a passive logfile reader like Logwatch or Swatch, an active filesystem integrity scanner like Samhain or a passive one like Aide (or maybe even tripwire), reading alerts and and acting on anomalies can help avoid more attacks or alert you an investigation is necessary.

* Rootkits in general
- In general rootkit infections have dropped dramatically over the past years. As far as I can see they're becoming pretty rare. That said False Positives, especially for Suck-IT, I think would be equally rare due to what sk-1.3 and 2.x subvert.

* Suck-IT specific
- The link count of the /sbin/init binary,
- Files with a '.xrk' or '.mem' suffix could "disappear" meaning it's active,
- Common installed files like /sbin/initsk12, /sbin/initxrk, /usr/share/locale/sk/.sk12/sk,
- If it was built on the box (depending on version) also a sniffer file, install script and login binary,
- Strings in the login and init binary,
- The 'skdet' binary finding a hidden process,


Quote:
Originally Posted by FlGator81 View Post
And if there is an infection, how can I remedy this problem? () I got it fixed. I just backed everything up and did a clean re-install. It seemed like the only way to make sure the job really got done right.
The only way to do the job right would be making certain that re-installation (and restoring anything from backup without inspection) does not re-introduce the same vulnerability that allowed the cracker to abuse the machine in the first place. There's actually quite a few thing you should do to harden a new installation. Please list the measure you took and then feel free to ask for comments.
 
1 members found this post helpful.
Old 01-12-2010, 11:17 PM   #4
FlGator81
Member
 
Registered: Nov 2008
Location: Baltimore
Distribution: Ubuntu
Posts: 65

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by unSpawn View Post
Shame you're just telling stuff instead of posting the Rootkit Hunter version and actual log and file details that could help us help you (at all, better).
Rgr, I will remember to include software versions next time. It was OSSEC HIDS 2.2, Rkhunter 1.3.4-5, and Chkrootkit 0.48-10. Rkhunter and Chkrootkit were both downloaded and installed via Synaptic. The only reason I didn't include the Rkhunter logs was because they seemed so ambiguous; it was hitting on similar files as suspicious, but then it said definitively that SuckIT was not detected. In any case I will include these next time.

Quote:
The only way to do the job right would be making certain that re-installation (and restoring anything from backup without inspection) does not re-introduce the same vulnerability that allowed the cracker to abuse the machine in the first place. There's actually quite a few thing you should do to harden a new installation. Please list the measure you took and then feel free to ask for comments.
The first thing I did was just saving stuff to a CD-RW; documents, pdf's, pictures, videos, MP3's, etc. I got into the habit of routinely backing stuff up anyway so this was not a problem.

The second thing was the re-installation using the Ubuntu 9.10 disc. Integrity of the ISO was verified before it was burned. Then I did a clean re-install from scratch, completely reformatting the entire HDD, just as if I was blowing away the stock Windows installation.

As for possibly re-introducing the vulnerability/exploit, I have been extra careful with anything I put on the computer since the re-install. Where possible, signatures, MD5 and/or SHA1 hashes and sums have been verified, and each new file gets virus-scanned with ClamAV and Avast. However I have not yet imported any of the backed-up material onto the system; most of it isn't very important anyway.

Aside from that, if it was not a false positive, I'm completely at a loss as to how I could have stumbled across a malicious Linux rootkit. I never run anything as root unless the software in question is essentially required by the operating system and needs such privileges to function. I only download software from the repositories, the only exception being OSSEC, and I make use of the hashes and signatures they provide. And for the most part, I don't download random files or code that cannot be verified as legitimate, the only (very rare) exceptions being a video or MP3 file.

Thank you for your response! Any further criticisms or comments are welcome!
 
Old 01-13-2010, 11:31 AM   #5
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 FlGator81 View Post
Rgr, I will remember to include software versions next time. (..) I didn't include the Rkhunter logs
Detection capabilities may change between SW versions. OSSEC currently is at 2.3, Chkrootkit is 0.49 and RKH is at 1.3.6. Logs can show us clues or false positives to check. With most things security-wise you'll want to read logs (and well in advance of serious trouble so you have time to respond) and in some cases run tests from a Live or rescue CD to bypass manipulation.


Quote:
Originally Posted by FlGator81 View Post
The first thing I did was just saving stuff to a CD-RW; documents, pdf's, pictures, videos, MP3's, etc. I got into the habit of routinely backing stuff up anyway so this was not a problem.
Backing up stuff is always good (OK, as long as you have independent means of verifying the integrity of what you store.)


Quote:
Originally Posted by FlGator81 View Post
As for possibly re-introducing the vulnerability/exploit, I have been extra careful with anything I put on the computer since the re-install. Where possible, signatures, MD5 and/or SHA1 hashes and sums have been verified, and each new file gets virus-scanned with ClamAV and Avast. However I have not yet imported any of the backed-up material onto the system; most of it isn't very important anyway.
Still you might want to have a look at your firewall policies and other access controls. Reading ubuntuforums it seems some get caught by (unknowingly) allowing remote VNC-ish connections. I don't know if that's enabled by default on a desktop installation BTW as I only have on headless server install.


Quote:
Originally Posted by FlGator81 View Post
Aside from that, if it was not a false positive, I'm completely at a loss as to how I could have stumbled across a malicious Linux rootkit.
I'm not saying it was a rootkit. The problem is that without "evidence" there is no way to tell if it was a false positive or not...
 
1 members found this post helpful.
Old 01-13-2010, 08:48 PM   #6
FlGator81
Member
 
Registered: Nov 2008
Location: Baltimore
Distribution: Ubuntu
Posts: 65

Original Poster
Rep: Reputation: 21
Thumbs up

Quote:
Originally Posted by unSpawn View Post
With most things security-wise you'll want to read logs (and well in advance of serious trouble so you have time to respond) and in some cases run tests from a Live or rescue CD to bypass manipulation.
I really like OSSEC and Rkhunter so much because they email their logs to you. It just makes things so much easier to have "one-stop shopping" when performing routine maintenance activity, especially given time constraints, other demands, etc. However I don't actually mind reading the logs themselves. They have not only helped me learn more about my system and Linux in general, but have helped me tell the difference between the "normal" activity and the suspicious activity.

Quote:
Still you might want to have a look at your firewall policies and other access controls. Reading ubuntuforums it seems some get caught by (unknowingly) allowing remote VNC-ish connections. I don't know if that's enabled by default on a desktop installation BTW as I only have on headless server install.
Will do. But I'm not completely sure of how to check the firewall thoroughly. I ran "sudo ufw status verbose" and got the following:

Quote:
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip
I also ran "lsof -i" and didn't see anything strange (Empathy had the only active connections). As for VNC, I am not sure what that is yet, but Gnome's Remote Desktop server was enabled on startup, and I think I disabled that (went into the list of apps that launch on startup and removed it). I'll do some research on VNC but it does not appear to be an issue at this point. Do you have any other recommendations? Thanks again!
 
Old 01-14-2010, 11:09 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
Quote:
Originally Posted by FlGator81 View Post
I don't actually mind reading the logs themselves. They have not only helped me learn more about my system and Linux in general, but have helped me tell the difference between the "normal" activity and the suspicious activity.
I wish more people could say that. Until they do we'll still see peoples machines getting compromised and the admins doing nothing while recon started months ago...


Quote:
Originally Posted by FlGator81 View Post
But I'm not completely sure of how to check the firewall thoroughly. I ran "sudo ufw status verbose" and got the following:
Code:
Default: deny (incoming), allow (outgoing)
In terms of policies that looks good for a workstation (e.g. not providing any services). Running 'echo -en "raw\nfilter" | sudo xargs -iX /sbin/iptables -n -L -t 'X';' should produce a more complete list of iptables rules to look at.


Quote:
Originally Posted by FlGator81 View Post
Gnome's Remote Desktop server was enabled on startup
That's what I meant! I think.


Quote:
Originally Posted by FlGator81 View Post
, and I think I disabled that
Good!


Quote:
Originally Posted by FlGator81 View Post
Do you have any other recommendations?
No, not really: you already make backups, you already restrict access to your machine and you regularly audit it.
 
1 members found this post helpful.
  


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
tcl/expect stdout redirected to file stops (possibly due to a "@" in exp_send) cejennings_cr Programming 1 07-08-2009 06:01 PM
Restoring data after SucKIT rootkit hacking. How can I tell what if any is safe? mazinoz Linux - Security 15 05-14-2009 06:58 PM
LKM Trojan and "suspicious activity" in /tmp/firstbootX.log, says Rootkit Hunter moxieman99 Linux - Security 2 04-05-2009 11:49 AM
server (Redhat) compromised by Suckit Rootkit! Thanks for help! a_whitecloud Linux - Security 5 07-14-2006 08:49 AM
Can't exec "firefox 1.5", "prompts glibc detected" SPo2 Linux - General 1 06-04-2006 11:02 PM

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

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