home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3524 < prev    next >
Encoding:
Internet Message Format  |  1991-06-23  |  7.2 KB

  1. From: df@sei.cmu.edu (Dan Farmer)
  2. Newsgroups: alt.sources
  3. Subject: perl COPS, part 0/3
  4. Message-ID: <27542@as0c.sei.cmu.edu>
  5. Date: 22 Jun 91 04:27:33 GMT
  6.  
  7.  
  8.   Hello!  Here is the beta release of perl cops.  Not too many 
  9. incredibly major changes from the alpha version, but for the next 
  10. (real :-)) release I should have a uucp checking module ready, and 
  11. both perl and shell versions will be up to 1.03.  This should happen
  12. Real Soon Now!  (Drum roll please...)  The real big thing that needs
  13. to be updated is the documentation (of course).  Sigh.
  14.  
  15.   For those not in the know, cops is a collection of security modules
  16. that hunts around your system and tells you what problems it finds.
  17. The shell version probably finds a root-serious hole 75%+ of the time,
  18. if you've never run it before.  I'm not so sure about the perl version --
  19. porting a project to perl, even only of this size (only about 5K lines of
  20. code, I think) has brought some interesting questions about the portability
  21. of anything but bourne shell.  Sigh.  Anyway, if it works, it should
  22. be faster, smarter, and generally just neater than the shell version.
  23. In particular, I've had trouble with my DECstation (ultrix really bites);
  24. your mileage may vary.  I'd like to hear about any troubles or suggestions
  25. you may have with it, in any case, so that the final version will be
  26. as trouble free as possible.
  27.  
  28.   Tom Christiansen (tchrist@convex.com) is the co-author of the perl
  29. version; I'd also like to thank Steve Romig (Mr. Kuang Jr.), Jeff Kellem, 
  30. Mitch Wright, Tim Tessin, Matthew Farwell, Martin Foord, David Lawrence,
  31. Vik Lall, Brian Utterback, Terry McGonigal, and Chris (ckd@cs.bu.edu), who 
  32. all helped out in this project.
  33.  
  34.   Enjoy!
  35.   -- dan
  36.  
  37. p.s.  You can get this and the shell cops beta release for 1.03 via
  38. anon-ftp, at cert.sei.cmu.edu, in ~pub/cops/1.03.beta, in either
  39. the shell or perl subdirectory.  Here's some more comprehensive
  40. info, stolen from my last release:
  41.  
  42. ====================================================================
  43.  
  44.    Welcome!  This is a quick intro to COPS (Computer Oracle and Password
  45. System.)  COPS is a collection of security tools that are designed
  46. specifically to aid the typical UNIX systems administrator, programmer,
  47. operator, or consultant in the oft neglected area of computer security.
  48.  
  49. 1) Specifics
  50. -------------
  51.  
  52.    COPS is a collection of about a dozen (actually, a few more, but
  53. a dozen is such a good sounding number) programs that each attempt
  54. to tackle a different problem area of UNIX security.  Here is what it
  55. currently checks:
  56.  
  57. o  file, directory, and device permissions/modes.
  58.  
  59. o  poor passwords.
  60.  
  61. o  content, format, and security of password and group files.
  62.  
  63. o  the programs and files run in /etc/rc* cron(tab) files.
  64.  
  65. o  finds SUID files, and checks for their writability and if they are
  66.    shell scripts.
  67.  
  68. o  runs a crc check against important binaries or key files, and reports
  69.    any changes therein.
  70.  
  71. o  writability of users home directories and startup files (.profile,
  72.    .cshrc, etc.), as well as the readability of .netrc and .rhosts files.
  73.  
  74. o  anonymous ftp setup.
  75.  
  76. o  unrestricted tftp, decode alias in sendmail, SUID uudecode problems.
  77.  
  78. o  miscellaneous root checks -- current directory in the search path,
  79.    a "+" in /etc/host.equiv, unrestricted NFS mounts, ensures root is
  80.    in /etc/ftpusers, etc.
  81.  
  82. o  includes the Kuang expert system, that takes a set of rules and tries
  83.    to determine if your system can be compromised (for a more complete list
  84.    of all of the checks, look at the kuang documentation.)
  85.  
  86.    All of the programs merely warn the user of a potential problem --
  87. COPS DOES NOT ATTEMPT TO CORRECT OR EXPLOIT ANY OF THE POTENTIAL PROBLEMS
  88. IT FINDS!  COPS either mails or creates a file (user selectable) of any
  89. of the problems it finds while running on your system.  And because COPS
  90. does not correct potential hazards it finds, it does _not_ have to be
  91. run by a privileged account (i.e. root or whomever.)  The only security
  92. check that should be run by root to get maximum results is the SUID checker;
  93. although it can be run as an unprivileged user, to find all the SUID files
  94. in a system, it should be run as root.  In addition, COPS cannot used to
  95. probe a host remotely; all the tests and checks made require a shell that
  96. is on the site being tested.
  97.  
  98. 2) What COPS is _not_
  99. ----------------------
  100.  
  101.    COPS merely provides a method of checking for common procedural errors.
  102. It is not meant to be used as a replacement for common sense or user/
  103. operator/administrative alertness!  Think of it as an aid, a first line
  104. of defense -- not as an impenetrable shield against security woes.  An
  105. experienced wrong-doer could easily circumnavigate _any_ protection that
  106. COPS can give.  However, COPS _can_ aid a system in protecting its users
  107. from (their own?) ignorance, carelessness, and the occasional malcontent
  108. user.
  109.  
  110.    Once again, COPS does not correct any errors found.  There are several
  111. reasons for this; first and foremost, computer security is a slippery
  112. beast.  What is a major breach in security at one site may be a standard
  113. policy of openness at another site.  Additionally, in order to correct all
  114. problems it finds, it would have to be run as a privileged user; and I'm
  115. not going to go into the myriad problems of running SUID shell scripts
  116. (See the bibliography at the end of the technical report for pointer to a
  117. good paper on this subject by Matt Bishop.)
  118.  
  119.    At this time, COPS does not attempt to detect bugs or features (such
  120. as infamous ftpd, fingerd, etc) that may cause security problems.  Although
  121. this may change in future versions, the current line of reasoning to avoid
  122. general publication of programs such as these is that all the problems that
  123. COPS detects can be repaired on any system it runs on.  However, many bugs
  124. can be readily repaired only be having source code (and possibly a good
  125. vendor to repair it), and many sites would have serious troubles if they
  126. suddenly discovered unrepairable problems that could compromise their
  127. livelihood.
  128.  
  129. Summary
  130. --------
  131.  
  132.    COPS is meant to be a tool to aid in the tightening of security, not
  133. as a weapon to be used by an enemy to find security flaws in a system.
  134. It may be argued that allowing anyone to have access to such a tool may
  135. be dangerous.  But hopefully the overall benefit for systems that use
  136. this package will outweigh any negative impact.  To me it is akin to a
  137. law enforcement problem -- that although telling the public how to break
  138. into a house may foster a slight rise in break-in attempts, the overall
  139. rise in public awareness on how to defend themselves would actually result
  140. in a drop in break-ins.  The crackers with black hats already know how
  141. to crush system defenses and have similar tools, I'm sure.  It's time
  142. we fought back.
  143.  
  144.   COPS is not the final answer to anyone's security woes.  You can use
  145. the system as long as you realize that COPS has no warranty, implied
  146. or otherwise, and that any problems that you may have with it are
  147. not my or any of the other authors' fault.  I will certainly attempt to
  148. help you solve them, if I am able.  If you have ideas for additional
  149. programs, or a better implementation of any of the programs here, I would
  150. be very interested in seeing them.
  151.  
  152.    So good luck, and I hope you find COPS useful as we plunge into UNIX
  153. of the 1990's.
  154.  
  155.    dan
  156.    df@cert.sei.cmu.edu
  157.  
  158.    May 17, 1991
  159.