home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / cops_104.zip / cops_104 / extra_src / pass.mail < prev    next >
Text File  |  1992-03-10  |  5KB  |  137 lines

  1. #!/bin/sh
  2. #
  3. #  Usage: pass.mail cops_result_file
  4. #
  5. # This scans through a result file and mails a warning note to
  6. # anyone who had their password guessed.  You'll need to edit
  7. # the note sent to correspond with your own site information.
  8. #
  9. #  Originally was sent to me by Bud Bowman -- I changed it a bit;
  10. # put everything in one file, rather than having a separate
  11. # warning message file, and put in what I think to be a more
  12. # generic warning note, mostly stolen from Dave Curry's excellent
  13. # "white paper" from SRI (via anon-ftp, SPAM.ITSTD.SRI.COM (128.18.4.3)
  14. # as the file "pub/security-doc.tar.Z, last time I looked.)
  15. #
  16.  
  17. AWK=/bin/awk
  18. MAIL=/bin/mail
  19. TEST=/bin/test
  20. ECHO=/bin/echo
  21.  
  22. # usage stuff:
  23. if $TEST $# -gt 1 -o $# -eq 0 ; then
  24.         $ECHO "Usage: $0 cops_result_file"
  25.         exit 2
  26.     fi
  27.  
  28. if $TEST ! -f "$1" ; then
  29.     $ECHO "Can't open $1"
  30.     exit 2
  31.     fi
  32.  
  33. #
  34. # Search for guessed passwords and notify the owners
  35. ######################################################
  36. #
  37. # for user in zen
  38. for user in `$AWK '/Guessed:/ {print $5}' $1` 
  39.     do
  40.     $MAIL $user << END_OF_NOTE
  41.  
  42.   Hello, $user -- your password has been discovered by our automatic
  43. security password guesser.  This means that you must change your
  44. password within 7 days, or your account will be disabled (you can get
  45. the account reinstated by calling or mailing the number provided below.)
  46. If you are not sure how to choose a "good", or difficult to guess
  47. password, I've included some guidelines at the bottom of this letter.
  48. In case you are wondering, you have not been singled out -- all passwords
  49. on the system are checked periodically.
  50.  
  51.   If you have any comments/questions regarding this message, or
  52. if you believe you received this note in error, feel free to call
  53. or e-mail <name #2> at:
  54.  
  55. <foo@bar>
  56.  
  57. x99999
  58.  
  59. =====================================
  60.  
  61.      The object when choosing a password is to  make  it  as
  62. difficult as possible for a cracker to make educated guesses
  63. about what you've chosen.  This leaves  him  no  alternative
  64. but  a brute-force search, trying every possible combination
  65. of letters, numbers, and  punctuation.   A  search  of  this
  66. sort, even conducted on a machine that could try one million
  67. passwords per second (most machines can try  less  than  one
  68. hundred per second), would require, on the average, over one
  69. hundred years to complete.  With this as our  goal,  and  by
  70. using the information in the preceding text, a set of guide-
  71. lines for password selection can be constructed:
  72.  
  73.      o    Don't use your login  name  in  any  form  (as-is,
  74.           reversed, capitalized, doubled, etc.).
  75.  
  76.      o    Don't use your first or last name in any form.
  77.  
  78.      o    Don't use your spouse's or child's name.
  79.  
  80.      o    Don't use other information easily obtained  about
  81.           you.   This  includes license plate numbers, tele-
  82.           phone numbers, social security numbers, the  brand
  83.           of  your  automobile,  the  name of the street you
  84.           live on, etc.
  85.  
  86.      o    Don't use a password of all  digits,  or  all  the
  87.           same  letter.   This  significantly  decreases the
  88.           search time for a cracker.
  89.  
  90.      o    Don't use a word contained in (English or  foreign
  91.           language)  dictionaries,  spelling lists, or other
  92.           lists of words.
  93.  
  94.      o    Don't use a password shorter than six characters.
  95.  
  96.      o    Do use a password with mixed-case alphabetics.
  97.  
  98.      o    Do use a password with  nonalphabetic  characters,
  99.           e.g., digits or punctuation.
  100.  
  101.      o    Do use a password that is easy to remember, so you
  102.           don't have to write it down.
  103.  
  104.      o    Do use a  password  that  you  can  type  quickly,
  105.           without  having  to  look  at  the keyboard.  This
  106.           makes it harder for someone to steal your password
  107.           by watching over your shoulder.
  108.  
  109.      Although this list may seem to restrict passwords to an
  110. extreme,  there  are  several  methods  for choosing secure,
  111. easy-to-remember passwords that obey the above rules.   Some
  112. of these include the following:
  113.  
  114.      o    Choose a line or two from a song or poem, and  use
  115.           the  first letter of each word.  For example, ``In
  116.           Xanadu did Kubla  Kahn  a  stately  pleasure  dome
  117.           decree'' becomes ``IXdKKaspdd.''
  118.  
  119.      o    Alternate between one consonant  and  one  or  two
  120.           vowels,  up  to  eight  characters.  This provides
  121.           nonsense words that are usually pronounceable, and
  122.           thus  easily remembered.  Examples include ``rout-
  123.           boo,'' ``quadpop,'' and so on.
  124.  
  125.      o    Choose  two  short  words  and  concatenate   them
  126.           together with a punctation character between them.
  127.           For    example:    ``dog;rain,''     ``book+mug,''
  128.           ``kid?goat.''
  129.  
  130.      The importance  of  obeying  these  password  selection
  131. rules  cannot be overemphasized.  The Internet worm, as part
  132. of its strategy for breaking into new machines, attempted to
  133. crack  user passwords.
  134. END_OF_NOTE
  135.  
  136. done
  137.