Quoting Ian C. Sison ([EMAIL PROTECTED]):

> Not wanting to go into another set of detail picking on this issue, i'd
> simply want to say that MD5 checking effectivity is accurate on a case to
> case basis.  It will give you on occasion an idea that a box has been
> rooted, and it will show you just which binaries and config files may be
> compromised, but as with any other solution, is not the end all and
> be-all of intrusion detection.

Agreed -- _if and only if_ you have reason to trust (1) the
checksum-verification tool and the environment it runs in, and (2) the
checksum database.

In other words, if you check your package database (without looking
after those troublesome details) and see clear signs of funny business
going on, you can probably rely on that and call the warning A Good
Thing.  But a clean result doesn't mean jack.

Let me say that again:  A clean result doesn't mean _jack_.

I got permanently barred from the mailing list of a California user
group (NBLUG) dominated by semi-clued Red Hat users, but it's an important
truth:  People who just do "rpm -Va" and conclude they're not root
compromised are kidding themselves.  Others who advise them to do that
are _not_ their friends.

And, of course, my point is that I see both of those things all the
time.  I was, in effect, thrown off that mailing list for exposing the
fact that the group was dispensing horrifically bad security advice to
the unwary.  The clique in charge enjoyed being looked up to, by raw
newcomers.

> Even a total reinstall from trusted media can give you a false sense of
> security. If what you did is just simply reinstall, and copy over (for
> instance) of your web pages with cgi scripts which contain
> vulnerabilities, then you will be rooted again.

I've said it before, and I'll probably have to say it again:  You cannot 
trust either the executables or configuration files of a compromised
system.

>> There are lots of reasons.  For one thing, the intruder's actions might
>> involve only your configuration files, not your binaries.  Your MD5 sums
>> don't cover the former, do they?  If they do, that would be very
> 
> Yes they do.
> 
> An  'rpm -Va' will give md5 sum failures for files such as inittab or
> httpd.conf if you even modified it from its original state.

This is _not_ the whole truth:  There is an RPM build option to omit
configuration files from the stored md5 values.  Some RPM packages are
built with that option, others are not.  Those who use it are doing so 
largely because of people getting alarmed at normal, local-system
changes to configuration files.  

What this means, in effect, is that comparing conffiles' md5sums against 
those of initial default versions that were immediately discarded
following installation isn't particularly useful.  (Compare AIDE,
Tripwire, Integrit, and the like -- which more usefully fill that role.)

> > And that raises the question of where you have the MD5 sums _stored_.
> > Would that be on the host itself, on media that aren't hardware
> > write-protected?  Like, for example, /var/lib/rpm/* ?  If so, what
> > reason do you have to trust that those MD5 sums haven't been changed by
> > the intruder?
> 
> The only way an intruder can change that is to use RPM itself to 'update'
> packages on your system.

That is absolutely incorrect, and I'm disapointed that you would claim
that.  The RPM database is a simple BerkeleyDB database!  Hello!  This 
is documented, Ian!  It's not some super-secret protected storage
facility.

>> And what do you run to check those MD5 sums?  A utility that's on the
>> compromised system?  What earthly reason do you have to expect it to
>> give you results that haven't been specified _by_ the intruder?  Pretty
>> much the only way you can avoid that risk is to boot from
>> non-compromised media (e.g., a CDR or maintenance floppy) and run
>> programs entirely from it.
> 
> Which is what something like chkrootkit suggests.  Again, it's another way
> of detecting intrusion, and it's not a total solution.  It's just one of
> the tools you use.

So, to reiterate:  A clean "rpm -Va" result doesn't mean _jack_.  That's
imaginary, toy security.

-- 
Cheers,      "On the face of it, Microsoft complaining about the source license 
Rick Moen    used by Linux is like the event horizon calling the kettle black."
[EMAIL PROTECTED]             -- Adam Barr, former Microsoft Corp. programmer
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to