Re: Checking for rootkits

From: Matt Zimmerman (mdz@csh.rit.edu)
Date: 02/25/02


Date: Mon, 25 Feb 2002 00:35:04 -0500
From: Matt Zimmerman <mdz@csh.rit.edu>
To: incidents@securityfocus.com

On Fri, Feb 22, 2002 at 05:55:24PM -0500, Jason Dixon wrote:

> md5sum chkrootkit >> /etc/chkrootkit.md5
> [run the same command for each binary; command is 'md5' in *BSD]
>
> chattr +i /etc/chkrootkit.md5 [Linux]
> chflags schg /etc/chkrootkit.md5 [*BSD]
>
> To automate these utilities, I've setup a cron job to execute a perl script
> I've created which first authenticates our stored md5 digests against the
> current md5 values.

There is little point in going to so much trouble to protect
/etc/chkrootkit.md5 when an attacker could simply subvert your cron job, the
script, the MD5 module, perl, the shell, or even the kernel. You must not
use components from an untrusted system in order to perform validation of
the system.

One way to perform a trusted validation would be to boot the system from
read-only, known good media, and check the system against a database. Both
the database and the tools used to verify it must also reside on read-only,
known good media. This kind of procedure is also best performed while the
system is disconnected from the network.

-- 
 - mdz

---------------------------------------------------------------------------- This list is provided by the SecurityFocus ARIS analyzer service. For more information on this free incident handling, management and tracking system please see: http://aris.securityfocus.com



Relevant Pages

  • Re: MD5 question
    ... I have a database of employee information used at a company I ... > I have a SSN field with of course each employee's SSN. ... > that two different SSN's would generate the same MD5 hash? ...
    (sci.crypt)
  • Re: [Full-Disclosure] Rootkit
    ... I already run my own database of MD5 checksums on all system files. ... > Some OS propose to public a MD5 signatures databases of all official ...
    (Full-Disclosure)
  • Re: [Full-Disclosure] Rootkit
    ... > into for the various rootkits. ... An MD5 database of "hacked" programs would be like a hash db on existing ... backup everything (the evidence) and reinstall the whole lot. ...
    (Full-Disclosure)
  • pgAccess & phpPgAdmin with postgresql under FC6
    ... I'm trying to access a postgresql database via the graphical frontends ... host all all 127.0.0.1/32 md5 ... With phpPgAdmin, when I enter http://localhost/phpPgAdmin in the ...
    (Fedora)
  • Re: Anti-rootkit / Check rootkit
    ... Solaris has a programs called sfpc. ... hases of solaris binaries. ... You need to run md5 against each binary and use ... sfpc to check them agains the database. ...
    (Security-Basics)