<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:osnews="http://osnews.com/rss2#">
	<channel>
		<title>OSNews: </title>
		<link>http://www.osnews.com/story/16816/Various_Ways_of_Detecting_Rootkits_in_GNU_Linux</link>
		<description>Exploring the Future of Computing</description>
		<language>en-us</language>
		<copyright>Copyright 2001-2010, David Adams</copyright>
		<webMaster>adam+nospam@osnews.com</webMaster>
		<lastBuildDate>Sat, 20 Mar 2010 08:05:20 GMT</lastBuildDate>
		<image>
			<url>http://www.osnews.com/images/osnews.gif</url>
			<title>OSNews.com</title>
			<link>http://www.osnews.com</link>
		</image>
		<item>
			<title> Rootkit Hunter</title>
			<link>http://osnews.com/thread?196246</link>
			<guid isPermaLink="true">http://osnews.com/thread?196246</guid>
			<description>I have used Rootkit Hunter in the past, but to be quite honest I have never detected a rootkit.<br />
However running Rootkit Hunter is a good thing because it will check some of your default security settings, and believe me, not all distros have a tight security policy.</description>
			<pubDate>Tue, 26 Dec 2006 17:10:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous Penguin)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>su -</title>
			<link>http://osnews.com/thread?196260</link>
			<guid isPermaLink="true">http://osnews.com/thread?196260</guid>
			<description>First of all, I have to admit that I don't use Linux (except for toying around), so maybe I got something wrong. I have a question:<br />
<br />
Maybe you have a user &quot;bob&quot; installed, and &quot;bob&quot; does know the root password, can he su root?<br />
<br />
bob@myserver:~$ su -<br />
Password: <br />
root@myserver:/# _<br />
<br />
Maybe it's not related to the topic directly, but I'd like to mention the following thing: In FreeBSD (as in other BSDs, too), users need to be in a special group to su root. This is the &quot;wheel&quot; group. Users usually are in the &quot;staff&quot; group or any other group or subgroup for determining access controls.<br />
<br />
So let's assume &quot;bob&quot; is in &quot;staff&quot;, and he tries:<br />
<br />
bob@myserver:~% su -<br />
su: Sorry<br />
bob@myserver:~% _<br />
<br />
Even if &quot;bob&quot; knows the correct root password, he will not be able to su root until someone places him into &quot;wheel&quot; which requires rw access to /etc/group which is -rw-r--r--, so only root:wheel can change it. &quot;bob&quot; even won't know if his root password really is correct.</description>
			<pubDate>Tue, 26 Dec 2006 18:24:00 GMT</pubDate>
			<author>donotreply@osnews.com (Doc Pain)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: su -</title>
			<link>http://osnews.com/thread?196289</link>
			<guid isPermaLink="true">http://osnews.com/thread?196289</guid>
			<description>In Linux the wheel group is also used.</description>
			<pubDate>Tue, 26 Dec 2006 19:17:00 GMT</pubDate>
			<author>donotreply@osnews.com (siride)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>rootkit? what rootkit?</title>
			<link>http://osnews.com/thread?196310</link>
			<guid isPermaLink="true">http://osnews.com/thread?196310</guid>
			<description>In FreeBSD security tools send me every day messages about what's going on:<br />
<br />
# mail<br />
Mail version 8.1 6/6/93.  Type ? for help.<br />
&quot;/var/mail/root&quot;: 2 messages 2 new<br />
&gt;N  1 root@localhost.local  Tue Dec 26 13:16 244/10722 &quot;pcbsd-6956 security run output&quot;<br />
 N  2 root@localhost.local  Tue Dec 26 13:16  73/2677  &quot;pcbsd-6956 daily run output&quot;<br />
&amp;                      <br />
<br />
Checking setuid files and devices:<br />
<br />
pcbsd-6956 changes in mounted filesystems:<br />
--- /var/log/mount.today        Mon Dec 25 01:38:53 2006<br />
+++ /tmp/security.cxgru6i5      Tue Dec 26 13:15:54 2006<br />
@@ -3,5 +3,3 @@<br />
 /dev/ad0s2e    /usr    ufs rw  1 1<br />
 /dev/md0       /tmp    ufs rw  2 2<br />
 linprocfs      /usr/compat/linux/proc  linprocfs rw    0 0<br />
-/dev/ad0s1     /media/disk     ntfs rw,noexec,nosuid   0 0<br />
-/dev/ad0s3     /mnt/backup     msdosfs rw      0 0<br />
<br />
Checking for uids of 0:<br />
root 0<br />
toor 0<br />
<br />
Checking for passwordless accounts:<br />
Checking for passwordless accounts:<br />
<br />
pcbsd-6956 pf denied packets:<br />
+++ /tmp/security.BaS1as55      Tue Dec 26 13:15:55 2006<br />
+block return in log all [ Evaluations: 422 Packets: 61 Bytes: 7412 States: 0 ]<br />
+block drop in quick on ! lo0 inet from 127.0.0.0/8 to any [ Evaluations: 64 Packets: 0 Bytes: 0 States: 0 ]<br />
+block return in from no-route to any [ Evaluations: 64 Packets: 3 Bytes: 1728 States: 0 ]<br />
+block return on nve0 from  to any [ Evaluations: 422 Packets: 0 Bytes: 0 States: 0 ]<br />
<br />
..........<br />
..........<br />
pcbsd-6956 login failures:<br />
<br />
pcbsd-6956 refused connections:<br />
<br />
Checking for a current audit database:<br />
<br />
Downloading fresh database.<br />
auditfile.tbz                                           40 kB   21 kBps<br />
New database installed.<br />
Database created: Tue Dec 26 13:10:11 EET 2006<br />
<br />
Checking for packages with security vulnerabilities:<br />
<br />
0 problem(s) in your installed packages found.<br />
<br />
-- End of security output --<br />
<br />
  <br />
<br />
There is no similar features on GNU/Linux?</description>
			<pubDate>Tue, 26 Dec 2006 19:47:00 GMT</pubDate>
			<author>donotreply@osnews.com (antik)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>automatic versus manual</title>
			<link>http://osnews.com/thread?196340</link>
			<guid isPermaLink="true">http://osnews.com/thread?196340</guid>
			<description>The upside of the BSD approach is that the audits get done.<br />
<br />
The downside is that the output is noisy when there are no problems so it becomes easy to miss a problem when it shows up.<br />
<br />
This is pretty much the trade off between automatic check ing versus manual checking.<br />
<br />
But manual checking can also have the problem of too much noise so the signal can be missed.<br />
<br />
Meanwhile, the article missed pointing out a key rule for using any rootkit checker:  You have to install it each time you run it, unless it's self checking, because it could be a target of the rootkit.<br />
<br />
Self checkers should verify themselves against a signed checksum. Do these?</description>
			<pubDate>Tue, 26 Dec 2006 21:26:00 GMT</pubDate>
			<author>donotreply@osnews.com (Cloudy)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Some interesting comments on the article's site</title>
			<link>http://osnews.com/thread?196366</link>
			<guid isPermaLink="true">http://osnews.com/thread?196366</guid>
			<description>Reading some of the comments on the article's site really shows how ineffectual running rootkitunter etc are.  <br />
<br />
I guarantee that if you've been rooted, neither rootkithunter or chkrootkit will detect anything, because they'll be maliciously manipulated to show nothing by the rootkit itself.  <br />
<br />
As someone pointing out, loading a read only cdrom with the root kit detectors on it won't work either.  The best way would be to have a bootable cdrom with the rootkit detector on it that loads everything into RAM and runs it from there.  You then mount your partitions as read only, and scan, using known good commands that are based ON the read-only cdrom.  That's the only safe way to be sure.  <br />
<br />
I'm VERY surprised that no one seems to have created a live distro that specifically does this (at least to my knowledge).  <br />
<br />
For most people, as long as they don't run as root, they should be fine.  Always run trusted binaries and src code.  Always check the md5sums etc.  <br />
<br />
Thom, might be a good idea to put a blurb about running something like tripwire in the article intro on osnews.com.  Of course, like with the rootkit hunters, you'd have to put the tripwire dbase onto a bootable Linux distro somehow to ensure that it's entirely safe and not using altered commands.<br />
<br />
Dave</description>
			<pubDate>Tue, 26 Dec 2006 22:58:00 GMT</pubDate>
			<author>donotreply@osnews.com (melkor)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Some interesting comments on the article's site</title>
			<link>http://osnews.com/thread?196381</link>
			<guid isPermaLink="true">http://osnews.com/thread?196381</guid>
			<description>The devices most likely to have rootkits (servers) are the last thing you want to reboot regularly to check out with your live-cd rootkit detection test. <img src="/images/emo/smile.gif" alt=";)" />  Most of us cannot afford any downtime.<br />
<br />
The only real &quot;solution&quot; to rootkits is to never contract them. Keeping current with security patches/bugfixes, having fine-grained access policies, proper firewall design, etc - it's all part of the equation.<br />
<br />
Network monitoring policies are best to detect possible problems with servers, if you see outside access that shouldn't be there - the box is probably compromised. Restricting access with network policies is also one of the most effective ways of stopping such problems in the first place. Go figure. <img src="/images/emo/smile.gif" alt=";)" /></description>
			<pubDate>Wed, 27 Dec 2006 00:29:00 GMT</pubDate>
			<author>donotreply@osnews.com (ormandj)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: rootkit? what rootkit?</title>
			<link>http://osnews.com/thread?196435</link>
			<guid isPermaLink="true">http://osnews.com/thread?196435</guid>
			<description>Logwatch comes enabled with RedHat systems (and CentOS). As far as I can tell it does more or less the same thing.<br />
<br />
It's modular, easy to configure/extend to your needs. And if you consolidate your logs files by using a remote syslog server, you'll have a much useful output (overview of all your servers coming as a daily mail report).<br />
<br />
Ok, to make is similar here's how the report looks:<br />
<br />
################### LogWatch 5.2.2 (06/23/04) #################### <br />
       Processing Initiated: Mon Nov 13 04:02:03 2006<br />
       Date Range Processed: yesterday<br />
     Detail Level of Output: 0<br />
          Logfiles for Host: <br />
 ################################################################  <br />
<br />
 --------------------- pam_unix Begin ------------------------ <br />
<br />
crond:<br />
   Unknown Entries:<br />
      session closed for user root: 5 Time(s)<br />
      session opened for user root by (uid=0): 5 Time(s)<br />
<br />
<br />
 ---------------------- pam_unix End ------------------------- <br />
<br />
<br />
 --------------------- sendmail Begin ------------------------ <br />
<br />
<br />
<br />
Bytes Transferred: 1488<br />
Messages Sent:     2<br />
Total recipients:  2<br />
 ---------------------- sendmail End ------------------------- <br />
<br />
<br />
<br />
------------------ Disk Space --------------------<br />
<br />
/dev/mapper/Server-Root<br />
                      7.9G  4.6G  3.0G  62% /<br />
/dev/sda1              99M   44M   51M  47% /boot<br />
/dev/mapper/<br />
                      4.0G   41M  3.7G   2% /home<br />
...<br />
<br />
 ###################### LogWatch End ######################### <br />
<br />
It's from a backend server (so there are little logins, no attacks and almost no mail processed), I removed some parts, and many modules are not enabled for this system (e.g: no httpd), but it gives a general idea on the capabilities.</description>
			<pubDate>Wed, 27 Dec 2006 03:46:00 GMT</pubDate>
			<author>donotreply@osnews.com (sukru)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: rootkit? what rootkit?</title>
			<link>http://osnews.com/thread?196563</link>
			<guid isPermaLink="true">http://osnews.com/thread?196563</guid>
			<description>There probably is in some distros, although the ones I've used don't have anything like that by default.Edited 2006-12-27 15:19</description>
			<pubDate>Wed, 27 Dec 2006 15:18:00 GMT</pubDate>
			<author>donotreply@osnews.com (Gullible Jones)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE[2]: su -</title>
			<link>http://osnews.com/thread?196564</link>
			<guid isPermaLink="true">http://osnews.com/thread?196564</guid>
			<description>But I never added myself to wheel and I can su to root on my Mandriva systems.  I think there is a way you can make it work that way, but I never checked into it because I'm the only user on my systems.  This is probably the case for a large number of GNU/Linux systems.</description>
			<pubDate>Wed, 27 Dec 2006 15:20:00 GMT</pubDate>
			<author>donotreply@osnews.com (KenJackson)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE[3]: su -</title>
			<link>http://osnews.com/thread?196587</link>
			<guid isPermaLink="true">http://osnews.com/thread?196587</guid>
			<description>GNU su has to be patched to support the &quot;wheel&quot; group for political reasons.<br />
<br />
Type &quot;info su&quot; into a console or visit:<br />
<br />
<a href="http://www.fifi.org/cgi-bin/info2www?(sh-utils" rel="nofollow">http://www.fifi.org/cgi-bin/info2www?(sh-utils</a>)su+invocation <br />
<br />
IMHO Stallman is mad.</description>
			<pubDate>Wed, 27 Dec 2006 16:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (r3m0t)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE[4]: su -</title>
			<link>http://osnews.com/thread?196599</link>
			<guid isPermaLink="true">http://osnews.com/thread?196599</guid>
			<description>Interesting.  Your link has a section titled Why GNU `su' does not support the `wheel' group, but it's not there when I type &quot;info su&quot;.  I wonder what else Mandriva deletes.<br />
<br />
BTW, while the issue is totally moot for single-user systems, I appreciate Stallman's position.<br />
Edit: I guess 'mute' should be 'moot'.Edited 2006-12-27 18:17</description>
			<pubDate>Wed, 27 Dec 2006 18:11:00 GMT</pubDate>
			<author>donotreply@osnews.com (KenJackson)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Another way: use rpm</title>
			<link>http://osnews.com/thread?196609</link>
			<guid isPermaLink="true">http://osnews.com/thread?196609</guid>
			<description>To go totally undetected, a rootkit would also have to replace the rpm command.  Otherwise the following command will reveal any binary that is modified. (Legitimate conflicts also show up, but that's helpful too.)<br />
<br />
rpm -Va | grep bin</description>
			<pubDate>Wed, 27 Dec 2006 18:34:00 GMT</pubDate>
			<author>donotreply@osnews.com (KenJackson)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE[2]: Some interesting comments on the article's site</title>
			<link>http://osnews.com/thread?196686</link>
			<guid isPermaLink="true">http://osnews.com/thread?196686</guid>
			<description>I agree, but sadly, rootkits don't just affect servers, they can, and do affect ordinary users of GNU/Linux, hence my suggestion.  <br />
<br />
I know that as an IT guy, you don't want server downtime, quite simply, sometimes it's unavoidable.  True, do everything possible to minimise the risk of ever getting rooted is a sound policy, the old saying &quot;prevention is better than the cure&quot; rings very true.<br />
<br />
Dave</description>
			<pubDate>Thu, 28 Dec 2006 01:30:00 GMT</pubDate>
			<author>donotreply@osnews.com (melkor)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Another way: use rpm</title>
			<link>http://osnews.com/thread?196696</link>
			<guid isPermaLink="true">http://osnews.com/thread?196696</guid>
			<description>&quot;To go totally undetected, a rootkit would also have to replace the rpm command.&quot;<br />
<br />
Not at all, it just have to make rpm think that there are no modified files. Modifying the rpm database isn't hard once you have root.</description>
			<pubDate>Thu, 28 Dec 2006 02:39:00 GMT</pubDate>
			<author>donotreply@osnews.com (Soulbender)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE[2]: Some interesting comments on the article's site</title>
			<link>http://osnews.com/thread?196697</link>
			<guid isPermaLink="true">http://osnews.com/thread?196697</guid>
			<description>&quot;Most of us cannot afford any downtime. &quot;<br />
<br />
If it's that critical that you don't have any downtime you already have redundant systems in place. Then bringing individual systems offline for checking isn't a problem.</description>
			<pubDate>Thu, 28 Dec 2006 02:42:00 GMT</pubDate>
			<author>donotreply@osnews.com (Soulbender)</author>
			<category>Comments</category>
		</item>
	</channel>
</rss>
