home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso / altsrc / articles / 11263 < prev    next >
Internet Message Format  |  1994-09-15  |  3KB

  1. Path: wupost!math.ohio-state.edu!cs.utexas.edu!uunet!usenet.elf.com!hobbit
  2. From: hobbit@elf.com (*Hobbit*)
  3. Newsgroups: alt.security,comp.security.unix,alt.sources
  4. Subject: Son of Tripwire??
  5. Date: 16 Sep 1994 01:11:19 EDT
  6. Organization: large
  7. Lines: 56
  8. Sender: root
  9. Approved: God
  10. Expires: 1 Apr 95 12:34
  11. Message-ID: <35b9mi$mv5@usenet.elf.com>
  12. NNTP-Posting-Host: asylum.sf.ca.us
  13. Xref: wupost alt.security:19632 comp.security.unix:8830 alt.sources:11263
  14.  
  15. After examining Tripwire and deciding that it was *way* overkill for my own
  16. purposes, I decided to cobble together my own minimalist solution to the unix
  17. file integrity problem.  I call it "L5", for a variety of reasons, and have
  18. decided to present it to the community as a Useful Hack.  For all I know it
  19. may have already been done elsewhere, but I haven't yet seen such a thing
  20. mentioned, despite the simple underlying concept.
  21.  
  22. L5 can be FTPed from asylum.sf.ca.us:/pub/hobbit/L5.tar.Z.
  23.  
  24. L5 simply walks down Unix or DOS filesystems, sort of like "ls -R" or "find"
  25. would, generating listings of anything it finds there.  It tells you everything
  26. it can about a file's status, and adds on an MD5 hash of it.  Its output is
  27. rather "numeric", but it is a very simple format and is designed to be
  28. post-treated by scripts that call L5.  Here are some of its other features:
  29.  
  30.     Filenames come first, making sorting easier.
  31.  
  32.     Filenames are delimited in a non-[unix]-spoofable way; ending in
  33.     "//".  The single character after "//" indicates the file type.
  34.  
  35.     Scanning stops at device boundaries, so L5 doesn't go slogging
  36.     through random NFS trees or "tmpfs"es unless you tell it to.
  37.  
  38.     You can tell it not to walk any directories lower than the
  39.     one[s] you handed it as arguments.  [It always walks one level
  40.     of its given arguments.]
  41.  
  42.     You can tell it to only print the filenames.
  43.  
  44.     If a file looks like a script of some kind, it is shown as type
  45.     "K" instead of "F".  Useful for finding those setuid shell scripts...
  46.  
  47.     MD5 hashing can be output in hex, Tripwire's radix64 format, or
  48.     not at all, as you specify.  The hex hash for a given file is the
  49.     same as that of the CERT "md5check".
  50.  
  51.     You can feed it a list of files or directories to check as its
  52.     standard input.
  53.  
  54.     You can have it do its hash *on* standard input.  This feature is
  55.     useful for doing things like "l5 /critical/files | l5" to get a
  56.     small but secure summary hash.
  57.  
  58.     It is small and reasonably fast.
  59.  
  60. Some of it is based on code from Tripwire, but it doesn't use a DBM database
  61. and only offers one hash option.  The MD5 code, in particular, is the
  62. endian-independent version from Tripwire, which builds almost anywhere.
  63. Selection of files to ignore certain changes in is undoubtedly less versatile,
  64. but you can always filter the output through further scripts before, for
  65. example, diffing your "old" system snapshot against your "new" system
  66. snapshot.
  67.  
  68. [The rest of this file is in the README that comes with L5.]
  69.  
  70. _H*
  71.