home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / infoguide / advanced / security / primer.txt < prev    next >
Text File  |  1997-12-01  |  103KB  |  3,422 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.       Coping with the Threat of Computer Security Incidents
  12.  
  13.             A Primer from Prevention through Recovery
  14.  
  15.                         Russell L. Brand ?
  16.  
  17.  
  18.                            June 8, 1990
  19.  
  20.  
  21.  
  22.                              Abstract
  23.  
  24.       As computer security becomes a more important issue in
  25.      modern society, it begins to warrant a systematic
  26.      approach.  The vast majority of the computer security
  27.      problems and the costs associated with them can be
  28.      prevented with simple inexpensive measures.  The most
  29.      important and cost effective of these measures are
  30.      available in the prevention and planning phases.  These
  31.      methods are presented followed by a simplified guide to
  32.      incident handling and recovery.
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. ---------------------------
  50.  ?Copyright ?c  Russell L.  Brand 1989,  1990  Permission to  copy
  51. granteddprovidede eachscopyfincludes  attributionoand the pversion
  52. information.  This  permission extends for one year minus  one day
  53. from June  8, 1990; past  that point, the  reader should obtain  a
  54. newer copy of the article as the information will  be out of date.
  55.  
  56.  
  57.                                 0
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. Contents
  65.  
  66.  
  67. 1 Overview                                                       4
  68.  
  69. 2 Incident Avoidance                                             5
  70.  
  71.   2.Passwords :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: : 5
  72.  
  73.     2.1Joe's  :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: : 6
  74.  
  75.     2.1Same Passwords on Different Machines  :: :: :: :: :: :: : 6
  76.  
  77.     2.1Readable Password Files  :: :: ::: :: :: :: :: :: :: :: : 7
  78.  
  79.     2.1Many faces of a person : :: :: ::: :: :: :: :: :: :: :: : 9
  80.  
  81.     2.1Automated Checks for Dumb Passwords : :: :: :: :: :: :: : 9
  82.  
  83.     2.1Machine Generated Passwords :: ::: :: :: :: :: :: :: :: :10
  84.  
  85.     2.1The Sorrows of Special Purpose Hardware  :: :: :: :: :: :12
  86.  
  87.     2.1Is Writing Passwords Down that Bad? : :: :: :: :: :: :: :13
  88.  
  89.     2.1The Truth about Password Aging ::: :: :: :: :: :: :: :: :13
  90.  
  91.     2.1How do you change a password : ::: :: :: :: :: :: :: :: :13
  92.  
  93.   2.Old Password Files :: :: :: :: :: ::: :: :: :: :: :: :: :: :14
  94.  
  95.   2.Dormant Accounts : :: :: :: :: :: ::: :: :: :: :: :: :: :: :14
  96.  
  97.     2.3VMS :: :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :14
  98.  
  99.   2.Default Accounts and Objects : :: ::: :: :: :: :: :: :: :: :14
  100.  
  101.     2.4Unix : :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :16
  102.  
  103.     2.4VMS :: :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :17
  104.  
  105.     2.4CMS :: :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :18
  106.  
  107.   2.File Protections : :: :: :: :: :: ::: :: :: :: :: :: :: :: :18
  108.  
  109.   2.Well Known Security Holes : :: :: ::: :: :: :: :: :: :: :: :19
  110.  
  111.   2.New Security Holes :: :: :: :: :: ::: :: :: :: :: :: :: :: :20
  112.  
  113.  
  114.                                 1
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.     2.7CERT : :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :20
  122.  
  123.     2.7ZARDOZ :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :21
  124.  
  125.     2.7CIAC : :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :21
  126.  
  127.   2.Excess Services :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :21
  128.  
  129.   2.Search Paths :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :21
  130.  
  131.   2.Routing : :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :21
  132.  
  133.   2.Humans :: :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :22
  134.  
  135.     2.1Managers  :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :22
  136.  
  137.     2.1Secretaries  :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :22
  138.  
  139.     2.1Trojan Horses : :: :: :: :: :: ::: :: :: :: :: :: :: :: :22
  140.  
  141.     2.1Wizards : :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :23
  142.  
  143.     2.1Funders : :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :23
  144.  
  145.   2.Group Accounts  :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :23
  146.  
  147.   2..rhosts and proxy logins :: :: :: ::: :: :: :: :: :: :: :: :24
  148.  
  149.   2.Debugging :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :24
  150.  
  151.   2.Getting People Mad at You : :: :: ::: :: :: :: :: :: :: :: :24
  152.  
  153.  
  154. 3 Pre-Planning your Incident Handling                           25
  155.  
  156.   3.Goals: :: :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :25
  157.  
  158.     3.1Maintaining and restoring data ::: :: :: :: :: :: :: :: :25
  159.  
  160.     3.1Maintaining and restoring service  :: :: :: :: :: :: :: :26
  161.  
  162.     3.1Figuring how it happenned : :: ::: :: :: :: :: :: :: :: :26
  163.  
  164.     3.1Avoiding the Future Incidents and Escalation : :: :: :: :26
  165.  
  166.     3.1Avoiding looking foolish :: :: ::: :: :: :: :: :: :: :: :27
  167.  
  168.     3.1.Finding out who did it  :: :: ::: :: :: :: :: :: :: :: :27
  169.  
  170.  
  171.                                 2
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.     3.1Punishing the attackers  :: :: ::: :: :: :: :: :: :: :: :27
  179.  
  180.   3.Backups : :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :27
  181.  
  182.     3.2Why We Need Back Ups  :: :: :: ::: :: :: :: :: :: :: :: :28
  183.  
  184.     3.2How to form a Back Up Strategy that Works : :: :: :: :: :29
  185.  
  186.   3.Forming a Plan  :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :30
  187.  
  188.   3.Tools to have on hand :: :: :: :: ::: :: :: :: :: :: :: :: :31
  189.  
  190.   3.Sample Scenarios to Work on in Groups :: :: :: :: :: :: :: :31
  191.  
  192.  
  193. 4 Incident Handling                                             33
  194.  
  195.   4.Basic Hints: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :33
  196.  
  197.     4.1Panic Level  :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :33
  198.  
  199.     4.1Call Logs and Time Lines :: :: ::: :: :: :: :: :: :: :: :33
  200.  
  201.     4.1Accountability and Authority : ::: :: :: :: :: :: :: :: :33
  202.  
  203.     4.1Audit Logs : :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :33
  204.  
  205.     4.1Timestamps : :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :34
  206.  
  207.   4.Basic Techniques : :: :: :: :: :: ::: :: :: :: :: :: :: :: :34
  208.  
  209.     4.2Differencing :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :34
  210.  
  211.     4.2Finding : :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :34
  212.  
  213.     4.2Snooping  :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :34
  214.  
  215.     4.2Tracking  :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :34
  216.  
  217.     4.2Psychology : :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :34
  218.  
  219.   4.Prosecution: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :35
  220.  
  221.   4.Exercise: :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :35
  222.  
  223. 5 Recovering From Disasters                                     36
  224.  
  225. A Micro Computers                                               36
  226.  
  227.  
  228.                                 3
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235. B VMS Script                                                    39
  236.  
  237.  
  238. C Highly Sensitive Environments                                 42
  239.  
  240. D Handling the Press                                            44
  241.  
  242.   D.Spin Control :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :44
  243.  
  244.   D.Time Control :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :44
  245.  
  246.   D.Hero Making: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :44
  247.  
  248.   D.Discouraging or Encouraging a Next Incident :: :: :: :: :: :45
  249.  
  250.   D.Prosecution: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :45
  251.  
  252.   D.No Comment : :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :45
  253.  
  254.   D.Honesty : :: :: :: :: :: :: :: :: ::: :: :: :: :: :: :: :: :45
  255.  
  256. E Object Code Protection                                        46
  257.  
  258.  
  259. F The Joy of Broadcast                                          47
  260.  
  261. G Guest Accounts                                                48
  262.  
  263.   G.Attack Difficulty Ratios :: :: :: ::: :: :: :: :: :: :: :: :48
  264.  
  265.   G.Individual Sponsors : :: :: :: :: ::: :: :: :: :: :: :: :: :48
  266.  
  267.   G.The No Guest Policy : :: :: :: :: ::: :: :: :: :: :: :: :: :48
  268.  
  269.  
  270. H Orange Book                                                   49
  271.  
  272. I Acknowledgements                                              50
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.                                 4
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292. 1 Overview
  293.  
  294.  
  295. Since 1984, I have been periodically distracted from my
  296. education, my research and from my personal life to help handle
  297. computer emergencies.  After presenting dozens of papers,
  298. tutorials talks on computer security, Roger Anderson and George
  299. Michale arranged for me to lead a one day intensive seminar on
  300. the practical aspects of computer security in an unclassified
  301. networked environment for IEEE Compcon.  This primer was written
  302. as a basic text for this type seminar and has been used for about
  303. 2 dozen of them in the past year , and is still in draft form.
  304.  
  305. The text is divided into four main sections with a number of
  306. appendices.  The first two major sections of this document
  307. contain the material for the morning lecture.  The two following
  308. sections contain the afternoon lecture contain the afternoon's
  309. material.  The remaining appendices include material that is of
  310. interest to those people who have to deal with other computer
  311. security issues.
  312.  
  313. Since this primer is a direct and simple ``how to guide'' for
  314. cost-effective solutions to computer security problems, it does
  315. not contain as many stories and examples as my other tutorials.
  316. Those readers interested in these stories or who are having
  317. difficulty convincing people in their organization of the need
  318. for computer security are referred to Attack of the Tiger Team,
  319. when it becomes available.  and those readers interested in
  320. comprehensive list of computer security vulnerabilities should
  321. contact the author regarding the Hackman project.
  322.  
  323. Suggestions, questions and other comments are always welcome.
  324. Please send comments to primer@cert.sei.cmu.edu.  I hope to
  325. publish a this set of notes in a more complete form in the
  326. future.  When sending comments or questions, please mention that
  327. you were reading version CERT 0.6 of June 8, 1990.
  328.  
  329.  
  330.                          Russell L. Brand
  331.                       brand@lll-crg.llnl.gov
  332.                     1862 Euclid Ave, Suite 136
  333.                        Berkeley, CA  94709
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.                                 5
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349. 2 Incident Avoidance
  350.  
  351.  
  352. ``An ounce of prevention is worth a pound of cure.''  In computer
  353. security this is an understatement by a greater factor than can
  354. be easily be believed.  Very little has historically been done to
  355. prevent computer break-ins and I have been told by a number of
  356. the country's top computer scientists that ``Computer Security is
  357. a waste of time.''  The belief that security measures or
  358. preventive medicine is a waste has led to giant expenditures to
  359. repair damage to both computers and people respectively.  Must of
  360. my surprise, several system managers reviewing this document were
  361. sure that even basic preventative measures would not be cost
  362. effective as compared to repairing disasters after they occurred.
  363.  
  364. The vast majority of the security incidents are caused by one of
  365. about a dozen well understood problems.  By not making these
  366. mistakes, you can prevent most of the problems from happening to
  367. your systems and avoid untold hassles and losses.  Almost every
  368. site that I survey and almost every incident that did not involve
  369. insiders was caused by one of these problems.  In the most of the
  370. insider cases, no amount of computer security would have helped
  371. and these are in many ways demonstrated problems with physical
  372. security or personnel policy rather than with computer security
  373. per se.
  374.  
  375. Most of the security incidents are caused by ``attackers'' of
  376. limited ability and resources.  Because of this and because there
  377. are so many easy targets, if you provide the most basic level of
  378. protection, most of the attackers will break into some other site
  379. instead of bothering yours.  There are of course exceptional
  380. cases.  If you are believed to have highly sensitive information
  381. or are on a ``hit list'' of one type or another, you may
  382. encounter more dedicated attackers.  Readers interested in more
  383. comprehensive defensive strategies should consult the appendices.
  384.  
  385. Over all, prevention of a problem is about four orders of
  386. magnitude cheaper than having to handling it in the average case.
  387. Proper planning can reduce the cost of incident handling and
  388. recovery and is discussed in the section on planning.  In
  389. addition to whatever other measures are taken, the greatest
  390. incremental security improvement will be obtained be implementing
  391. the simple measures described below.
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.                                 6
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406. 2.1 Passwords
  407.  
  408.  
  409. While ``good passwords'' is not a hot and sexy topic and will
  410. never command the prestige of exploitable bugs in the operating
  411. system itself, it is the single most important topic in incident
  412. prevention.  Doing everything else entirely correctly is almost
  413. of no value unless you get this right!
  414.  
  415.  
  416. 2.1.1 Joe's
  417.  
  418. A ``Joe'' is an account where the username is the same as the
  419. password.  This makes the password both easy to remember and easy
  420. to guess.  It is the single most common cause of password
  421. problems in the modern world.
  422.  
  423. In 1986, there was popular conjecture that every machine had a
  424. Joe.  There was fair amount of random testing done and in fact a
  425. Joe was found on each and every machine tested.  These included
  426. machines that had password systems designed to prevent usernames
  427. from being used as passwords.
  428.  
  429. This summer, while I was testing a series of sensitive systems,
  430. where hundred of thousands of dollars were spent to remove
  431. security holes including re-writing a fair fraction of the
  432. operating system, there were Joes.
  433.  
  434. It is worthwhile to include a process in your system batching
  435. file (cron on unix) to check for Joes explicitly.  The most
  436. common occurrences of Joes is the initial password that the
  437. system administrators set for an account which has never been
  438. changed.  Often this initial password is set by the administrator
  439. with the expectation the user will change it promptly.  Often the
  440. user doesn't know how to change it or in fact never logs in at
  441. all.  In the latter case a dormant account lies on the system
  442. accomplishing nothing except wasting system resources and
  443. increasing vulnerabilities.
  444.  
  445.  
  446.  
  447. 2.1.2 Same Passwords on Different Machines
  448.  
  449. Many years ago when a computing center had a single mainframe the
  450. issue of a user having the same password on multiple machines was
  451. moot.  As long the number of machines that a user accessed was
  452. very small, it was reasonable to request that a person to use a
  453. different password on each machine or set of machines.  With a
  454.  
  455.  
  456.                                 7
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463. modern workstation environment, it is no longer practical to
  464. expect this from a user and a user is unlikely to comply if
  465. asked.  There are a number of simple compromise measures that can
  466. and should be taken.
  467.  
  468. Among these measures is requesting that privileged users have
  469. different passwords for their privileged accounts than for their
  470. normal use account and for their accounts on machines at other
  471. centers.  If the latter is not the case, then anyone who gains
  472. control of one of these ``other'' machines which you have no
  473. control over, has gained privileged access to yours as well.
  474.  
  475. The basic question of when passwords should be the same is
  476. actually a simple one.  Passwords should be the same when the two
  477. machines are (1) logically equivalent (as in a pool of
  478. workstations), (2) ``trust each other'' to the extent that
  479. compromising one would compromise the others in other ways, or
  480. (3) are run by the same center with the same security measures.
  481. Passwords should be different when the computers are (1) run by
  482. different organizations, (2) have different levels of security or
  483. (3) have different operating systems.
  484.  
  485. Lest this seems too strict, be assured that I have on several
  486. occasions broken into machines by giving privileged users on the
  487. target machines accounts on one of my own and exploiting their
  488. use of the same password on both.  Further, machines with
  489. different operating systems are inherently vulnerable to
  490. different ``programming bugs'' and hence by having the same
  491. passwords on the two machines, each machine is open to the all
  492. the bugs that could exist on either system.
  493.  
  494. It is interesting (but of little practical value) to note that an
  495. attacker can gain a cryptographic advantage by having two
  496. different encrypted strings for the same password.  This would
  497. happen when the user has the same password on two machines but it
  498. has been encrypted with different salts.  In principle, this
  499. makes hostile decryption much easier.  In practice, the attack
  500. methods that are most often used do not exploit this.
  501.  
  502. The worst offenders of the ``shared password problem'' are
  503. network maintenance people and teams.  Often they want an account
  504. on every local area net that they service, each with the same
  505. password.  That way they can examine network problems and such
  506. without having to look up hundreds of passwords.
  507.  
  508. While the network maintainers are generally (but not always) good
  509. about picking reasonable passwords and keeping them secret, if
  510. any one machine that they are using has a readable password file
  511.  
  512.  
  513.                                 8
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520. (discussed below) or is ever compromised, this password is itself
  521. compromised and an attacker can gain unauthorized access to
  522. hundreds or thousands of machines.
  523.  
  524.  
  525. 2.1.3 Readable Password Files
  526.  
  527.  
  528. A readable password file is an accident waiting to happen.  With
  529. access to the encrypted password an attacker can guess passwords
  530. at his leisure without you being able to tell that he is doing
  531. so.  Once he has a correct password, he can then access your
  532. machine as that user.  In the case of certain operating systems,
  533. including older versions of VMS, there is a well know inversion
  534. for the password encryption algorithm and hence the attacker
  535. doesn't need to guess at all once he can read the password file.
  536.  
  537. Changing the encryption method to some other method that is also
  538. publically known doesn't help this set of problems, even if the
  539. crypto-system itself is much stronger.  The weakness here is not
  540. in the crypto-system but rather in the ease of making guesses.
  541.  
  542. It is vital to protect your password file from being read.  There
  543. are two parts to this.  First you should prevent anonymous file
  544. transfers from be able to remove a copy of the password file.
  545. While this is generally very easy to do correctly, there is a
  546. common mistake worth avoiding.  Most file transfer facilities
  547. allow you to restrict the part of the file system from which
  548. unauthenticated transfers can be made.  It is necessary to put a
  549. partial password file in this subsection so that an anonymous
  550. agent knows ``who it (itself) is''.  Many sites have put complete
  551. password files here defeating one of the most important purposes
  552. of the restrictions.  (Of course without this restriction ``World
  553. Readable'' takes on a very literal meaning:::)
  554.  
  555. The second part of the solution is somewhat harder.  This is to
  556. prevent unprivileged users who are using the system from reading
  557. the encrypted password from the password file.  The reason that
  558. this is difficult is that the password file has a great deal of
  559. information that people and programs need in it other than the
  560. passwords themselves.  Some version of some operating systems
  561. have privileged calls to handle the details of all this and hence
  562. their utilities have already been written to allow protection of
  563. the encrypted passwords.
  564.  
  565. Most of the current versions of Unix are not among of these
  566. systems.  Berkeley has distributed a set of patches to
  567. incorporate this separation (called shadow passwords) and the
  568.  
  569.  
  570.                                 9
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577. latest version of the SunOS has facilities for it.  For those who
  578. are using an operating system that does not yet have shadow
  579. passwords and cannot use one of the new releases, a number of ad
  580. hoc shadowing systems have been developed.  One can install
  581. shadow passwords by editing the binaries of /bin/login,
  582. /bin/passwd and similar programs that actually need to use the
  583. password fields and then modify /etc/vipw to work with both the
  584. diminished and shadow password files.
  585.  
  586. Of course, since most of us use broadcast nets, there is a real
  587. danger of passwords being seen as they go over the wire.  This
  588. class of problems is discussed in the the Joys of Broadcast
  589. appendix and the Guests appendix.
  590.  
  591. Kerberos, developed at MIT's Athena project has an alternative
  592. means of handling passwords.  It allows one to remove all the
  593. passwords from the normal use machines and to never have them
  594. broadcasted in clear text.  While Kerberos is vulnerable to a
  595. number of interesting password guessing and cryptographic attacks
  596. and currently has problems with multi-home machines (Hosts with
  597. more than one IP address), it does provide the first practical
  598. attempt and network security for a university environment.
  599.  
  600. An often overlooked issue is that of passwords for games.  Many
  601. multiplayer computer games, such as ``Xtrek'' and ``Empire''
  602. require the user to supply a password to prevent users from
  603. impersonating one another during the game.  Generally these
  604. passwords are stored by the game itself and are in principle
  605. unrelated to the passwords that the operating system itself uses.
  606. Unfortunately, these passwords are generally stored unencrypted
  607. and some users use the same password as they do for logging into
  608. the machine itself.  Some games now explicitly warn the users not
  609. use his login passwords.  Perhaps these games will eventually
  610. check that the password is indeed not the same as the login
  611. password.
  612.  
  613.  
  614. 2.1.4 Many faces of a person
  615.  
  616.  
  617. A single individual can have many different relationships to a
  618. computer at different times.  The system programmers are acting
  619. as ``just users'' when they read their mail or play a computer
  620. game.  In many operating systems, a person gets all of his
  621. privileges all of the time.  While this is not true in Multics,
  622. it is true in the default configuration of almost every other
  623. operating system.  Fortunately a computer doesn't know anything
  624. about ``people'' and hence is perfectly happy to allow a single
  625.  
  626.  
  627.                                 10
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634. person have several accounts with different passwords at
  635. different privilege levels.  This helps to prevent the
  636. accidentally disclosure of a privileged password.  In the case
  637. where the privileged user has his unprivileged account having the
  638. same password as his unprivileged account on other machines it
  639. will at least be the case that his privileges are not compromised
  640. when and if this other machine is compromised.
  641.  
  642. The one case where it is especially important to have separate
  643. accounts or passwords for a single individual is for someone who
  644. travels to give demos.  One can be assured that his password will
  645. be lost when he is giving a demo and something breaks.  The most
  646. common form of ``breakage'' is a problem with duplex of of delay.
  647. It would nice if all that was lost was the demo password and for
  648. the demo password to be of no use to an attacker.
  649.  
  650.  
  651. 2.1.5 Automated Checks for Dumb Passwords
  652.  
  653.  
  654. Automated checks for dumb passwords come in three varieties.  The
  655. first is to routinely run a password cracker against the
  656. encrypted passwords and notice what is caught.  While this is a
  657. good idea, it is currently used without either of the other two
  658. mechanisms we will describe.  Since it is computationally less
  659. efficient than the others by about a factor of 50,000, it should
  660. be used to supplement the others rather than be used exclusively.
  661. Among its many virtues is that an automated checking system that
  662. reads the encrypted passwords does not require having source for
  663. the operating system or making modification an system
  664. modifications.
  665.  
  666. The second method of preventing dumb password is to alter the
  667. password changing facility so that it doesn't accept dumb
  668. passwords.  This has two big advantages over the first method.
  669. The first of these is computational.  The second is more
  670. important.  By preventing the user from selecting the poor
  671. password to begin with, one doesn't need an administrative
  672. procedure to get him to change it later.  It can all happen
  673. directly with no human intervention and no apparent
  674. accountability.  As a general rule, people are not happy about
  675. passwords and really don't want to hear from another person that
  676. they need to change their password yet again.
  677.  
  678. While this change does require a system modification, it can
  679. often be done without source code by writing a pre-processor to
  680. screen the passwords before the new password is passed to the
  681. existing utilities.  The weakness in this approach lies with the
  682.  
  683.  
  684.                                 11
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691. users who are not required to use the new style of password
  692. facility.  As a result, one finds that facilities that use only
  693. this method have good passwords for everyone except the system
  694. staff and new users who have had their initial passwords set by
  695. the system staff.
  696.  
  697. The third method is designed primarily to catch the bad passwords
  698. that are entered in despite the use of the second method.  Once
  699. could check the ``dumbness'' of a password with each attempted
  700. use.  While this is computationally more expensive than the
  701. second method, it generally catches everyone.  Even the system
  702. programmers tend to use the standard login utility.  It has the
  703. nice feature of locking out anyone that finds a way to circumvent
  704. the second method.  This generally requires a small amount of
  705. system source and risks causing embarrassment to ``too clever''
  706. system staff members.
  707.  
  708. In terms of dumb passwords, there are a number of ``attack
  709. lists''.  An attack list is a list of common passwords that an
  710. attacker could use to try to login with.  Several of these have
  711. been published and more are constantly being formed.  These lists
  712. are used for the automated password guesser and they may also be
  713. used directly in the second and third method described above.
  714. With the second and third method one may also use criteria
  715. including minimum length, use of non-alphabetic characters, etc.
  716. Finally, information about the individual user found in standard
  717. system files can be scanned to see if the user has incorporated
  718. this information into his password.
  719.  
  720.  
  721. 2.1.6 Machine Generated Passwords
  722.  
  723.  
  724. Most users hate machine generated passwords.  Often they are
  725. unrememberable and accompanied by a warning to ``Never write them
  726. down'' which is a frustrating combination.  (We will discuss the
  727. the writing down of passwords later.)  Machine generated
  728. passwords come in four basic types
  729.  
  730.  
  731. Gibberish. This is the most obvious approach to randomness.
  732.      Independently selected several characters from the set of
  733.      all printable characters.  For a six character password,
  734.      this gives about 40 bits of randomness.  It is very hard to
  735.      guess and perhaps even harder to remember.
  736.      Often a little bit of post processing is done on these
  737.      passwords as well as on the random syllables discussed
  738.      below.  This post processing removes passwords that might
  739.  
  740.  
  741.                                 12
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.      prove offensive to the user.  When a potentially offensive
  749.      password is generated, the program simply tries again.  The
  750.      user often behaves the same way and runs the randomizer over
  751.      and over again until a password that seems less random and
  752.      more memorable to him is selected.  In principle, the clever
  753.      user could write a program that kept requesting new random
  754.      passwords until an English word was chosen for him; this
  755.      would take much too long to be practical.
  756.  
  757. Numbers. Numbers are a lot like letters.  People don't try to
  758.      pronounce them and there are very few numbers that are
  759.      ``offensive'' per se.  An eight digit random number has
  760.      about 26 bits of randomness in it and is of comparable
  761.      strength to a 4 character random password chosen from the
  762.      unrestricted set of printable characters.  (The amount of
  763.      randomness in a password is the log (base 2) of the number
  764.      of possible passwords if they were all equally likely to
  765.      occur.)
  766.      Eight digit numbers are hard to remember.  Fortunately
  767.      ``chunking'' them into groups (as 184---25---7546) makes
  768.      this less difficult than it would otherwise be.
  769.  
  770. Syllables. This is by far the most common method currently used.
  771.      The idea is to make non-words that are easy to remember
  772.      because they sound like words.  A three syllable, eight
  773.      letter non-word often has about 24 bits of randomness in it
  774.      making it not quite as strong as an 8 bit number but
  775.      hopefully a little bit more memorable.
  776.      The principle here is good.  In fact, this pseudo-word idea
  777.      should work very well.  In practice it fails miserably
  778.      because the standard programs for generating these
  779.      pseudo-syllables are very poor.  Eventually we may find a
  780.      good implementation of this and see a higher level of user
  781.      acceptance.
  782.  
  783. Pass Phrases. Pass phrases are the least common way to implement
  784.      machine generated passwords.  The idea here is very simple.
  785.      Take 100 nouns, 100 verbs, 100 adjective and 100 adverbs.
  786.      Generate an eight digit random number.  Consider it as four
  787.      2 digit random numbers and use that to pick one of each of
  788.      the above parts of speech.  The user is then given a phrase
  789.      like ``Orange Cars Sleep Quickly.''  The words within each
  790.      list are uniquely determined by their first two characters.
  791.      The user may then type the phrase, the first few letters of
  792.      each word or the eight digit number.
  793.      The phrases are easy to remember, the system remains just as
  794.      secure if you publish the list of words and has about 26
  795.      bits of randomness.  One can adapt the system down to three
  796.  
  797.  
  798.                                 13
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.      words with 20 bits of randomness and still be sufficiently
  806.      safe for most applications.
  807.  
  808.  
  809. I believe that machine generated passwords are generally a bad
  810. solution to the password problem.  If you must use them, I
  811. strongly urge the use of pass-phrases over the other methods.  In
  812. any event, if your center is using machine generated passwords,
  813. you should consider running an occasional sweep over the entire
  814. user file system looking for scripts containing these passwords.
  815. Proper selection of your password generation algorithm can make
  816. this much easier than it sounds.
  817.  
  818. As with almost all password issues, the user of a single computer
  819. center which gives him one machine generated password for access
  820. to all the machines he will use will not have nearly the level of
  821. difficulty as the user who uses computers at many centers and
  822. might have to remember dozens or even hundreds of such passwords.
  823.  
  824.  
  825. 2.1.7 The Sorrows of Special Purpose Hardware
  826.  
  827.  
  828. With the problems of broadcast networks and user selecting bad
  829. passwords or rebelling at machine generated password, some
  830. facilities have turned to special purpose hardware that generates
  831. keys dynamically.  Generally these devices look like small
  832. calculators (or smart card) and when a user enters a short
  833. password (often four digits) they give him a password that is
  834. good for a single use.  If the person wants to login again, he
  835. must get a new password from his key-generator.
  836.  
  837. With a few exceptions, the technology of these devices works very
  838. well.  The exceptions include systems with bad time
  839. synchronization, unreliable or fragile hardware or very short
  840. generated keys.  In at least one case the generated keys were so
  841. short that it was faster to attack the machine by guessing the
  842. password ``1111'' than by guessing at the user generated
  843. passwords it replaced.
  844.  
  845. Despite the technology of these devices working well and the
  846. installation generally being almost painless, there are two
  847. serious problems with their use.  The first is cost.  Buying a
  848. device for a user of large center can easily cost more than an
  849. additional mainframe.  The second problem is more serious.  This
  850. is one of user reluctance.  Most users are unwilling to carry an
  851. extra device and the people who are users of many centers are
  852. even less willing to hold a dozen such devices and remember which
  853. is which.
  854.  
  855.                                 14
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. In one center, these devices were used only for privileged
  863. accesses initiated from insecure locations.  Only a handful of
  864. them had to be made.  (Being innovative, the center staff built
  865. them from old programmable calculators.)  They were used only by
  866. the ``on call'' system programmer when handling emergencies and
  867. provided some security without being to obtrusive.
  868.  
  869.  
  870. 2.1.8 Is Writing Passwords Down that Bad?
  871.  
  872.  
  873. One of the first things that we were all told when we began using
  874. timesharing is that one should never write down passwords.  I
  875. agree that the users should not record their passwords on-line.
  876. There have been a large number of break-ins enable by a user
  877. having a batch script that would include a clear-text password to
  878. let them login to another machine.
  879.  
  880. On the other hand, how often has your wallet been stolen?  I
  881. believe that a password written down in wallet is probably not a
  882. serious risk in comparison to other the problems including the
  883. selection of ``dumb'' password that are easier to remember.  In
  884. classified systems, this is, of course, not permitted.
  885.  
  886.  
  887. 2.1.9 The Truth about Password Aging
  888.  
  889.  
  890. Some facilities force users to change their passwords on a
  891. regular basis.  This has the beneficial side effect of removing
  892. dormant accounts.  It is also the case that it limits the utility
  893. of a stolen password.
  894.  
  895. While these are good and worthwhile effects, most system
  896. administrators believe that changing passwords on a regular basis
  897. makes it harder for an attacker to guess them.  In practice, for
  898. an attacker that has gotten the crypt text of the password file,
  899. he generally only needs a few hours to find the passwords of
  900. interest and hence frequent changes do not increase the
  901. difficulty of his task.  For the attacker who is guessing without
  902. a copy of the encrypt password, even changing the password every
  903. minute would at most double the effort he would be required to
  904. expend.
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.                                 15
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919. 2.1.10 How do you change a password
  920.  
  921.  
  922. Users should be told to change their passwords whenever they have
  923. reason to expect that another person has learned their passwords
  924. and after each use of an ``untrusted'' machine.  Unfortunately
  925. many users are neither told this, nor how to change the password.
  926. Be sure both to tell you users how to change their passwords and
  927. include these instructions in the on-line documentation in an
  928. obvious place.  Users should not be expected to realize the
  929. password changing is (1) an option for directory maintenance
  930. under TOPS-20 and many versions of CMS, (2) is spelled passwd
  931. under unix or (3) is an option to set under VMS.
  932.  
  933.  
  934. 2.2 Old Password Files
  935.  
  936.  
  937. It is often the case at sites running shadow password systems,
  938. someone forgets to prevent the shadow password file from being
  939. publically readable.  While this is easy to prevent by having a
  940. batch job that routinely revokes read permissions that were
  941. accidently granted, there is an interesting variant of this
  942. problem that is harder to prevent.
  943.  
  944. When password files are edited, some editors leave backup files
  945. that are publically readable.  In fact when a new system is
  946. installed a password file is often created by extracting
  947. information from the password files of many existing systems.
  948. The collection of password files is all too often left publically
  949. readable in some forgotten disk area where it is found by an
  950. attacker weeks or months later.  The attacker then uses this data
  951. to break into a large number of machines.
  952.  
  953.  
  954. 2.3 Dormant Accounts
  955.  
  956. While requiring annual password changes does eventually remove
  957. dormant accounts, it is worthwhile to try a more active approach
  958. for their removal.  The exact nature of this approach will vary
  959. from center to center.
  960.  
  961.  
  962.  
  963. 2.3.1 VMS
  964.  
  965. In VMS, the account expiration field is a good method of retiring
  966. dormant accounts, but care should be taken as no advance notice
  967.  
  968.  
  969.                                 16
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976. is given that an account is near expiration.
  977.  
  978. Also VMS security auditing makes the removal of expired users a
  979. bad idea.  Because one of the most common errors is typing the
  980. password on the username line, DEC suppresses any invalid
  981. username from the logs until a breaking attempt is detected.  But
  982. if the username is valid and the password wrong, the username is
  983. logged.
  984.  
  985.  
  986. 2.4 Default Accounts and Objects
  987.  
  988.  
  989. One of the joys of many operating systems is that they come
  990. complete with pre-built accounts and other objects.  Many
  991. operating systems have enabled either accounts or prelogin
  992. facilities that present security risks.
  993.  
  994. The standard ``accounts'' for an attacker to try on any system
  995. include the following:
  996.  
  997.  
  998. Open. A facility to automatically create new accounts.  It is
  999.      often set by default to not require either a password or
  1000.      system manager approval to create the new accounts.
  1001. Help. Sometimes the pre-login help is too helpful.  It may
  1002.      provide phone numbers or other information that you wouldn't
  1003.      want to advertise to non-users.
  1004.  
  1005. Telnet. Or Terminal.  An account designed to let someone just use
  1006.      this machine as a stepping stone to get to another machine.
  1007.      It is useful for hiding origins of an attack.
  1008.  
  1009. Guest. Many operating systems are shipped with guest accounts
  1010.      enabled.
  1011. Demo. Not only are several operating systems shipped with a demo
  1012.      account, but when installing some packages, a demo account
  1013.      is automatically created.  All too often the demo account
  1014.      has write access to some of the system binaries (executable
  1015.      files).
  1016.  
  1017. Games. Or Play.  Often the password is Games when the account
  1018.      name is Play.  In some cases this account has the ability to
  1019.      write to the Games directory allowing an attacker to not
  1020.      only play games, and snoop around, but to also insert Trojan
  1021.      horses at will.
  1022.  
  1023. Mail. Quite often a system is shipped with or is given an
  1024.      unpassworded mail account so that people can report problems
  1025.  
  1026.                                 17
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.      (like their inability to login) without logging in.  In
  1034.      two-thirds of the systems that I have observed with such an
  1035.      account, it was possible to break into the main system
  1036.      through this account.
  1037.  
  1038.  
  1039. Often these default accounts are normal accounts with an
  1040. initialization file (.login, .profile, login.cmd, login.bat,
  1041. etc.)  or alternate command line interpreter to make it do
  1042. something non-standard or restrict its action.  These are
  1043. generally called, ``Captive Accounts'' or ``Turnkey Logins.''
  1044. Setting up a restricted login so that it stays restricted is very
  1045. hard.  It should of course be very easy, but in most cases a
  1046. mistake is made.
  1047.  
  1048.  
  1049. Subjobs. It is often the case that a restricted account is set up
  1050.      to only run a single application.  This single application
  1051.      program is invoked by a startup script or instead of the
  1052.      standard command interpreter.  Very often this program has
  1053.      an option to spawn a subprocess.
  1054.      In some cases this might be an arbitrary job (e. g. the
  1055.      /spawn option to Mail in VMS or ``:!''  to vi in unix) or
  1056.      might be limited to a small number of programs.  In the
  1057.      former case the problem is immediate, in the latter case, it
  1058.      is often the case that one of these programs in turn allows
  1059.      arbitrary spawning.
  1060.      A carefully written subsystem will prevent this (and all
  1061.      other such problems).  Generally these subsystems are
  1062.      created quickly rather than carefully.
  1063.  
  1064. Editors. Most editors are sufficiently powerfully that if the
  1065.      restricted system can use an editor, a way can be found to
  1066.      cause problems.
  1067.  
  1068. Full Filenames. Many restricted subsystems presume that by
  1069.      resetting the set of places the command interpreter looks
  1070.      for executable programs (called its ``search path'')
  1071.      functionality can be restricted.  In unix this might be done
  1072.      by altering the Path variable or the logical names table in
  1073.      VMS.
  1074.      All too often the clever attacker is able to defeat this
  1075.      plan by using the complete filename of the file of interest.
  1076.      Sometimes non-standard names for the file are necessary to
  1077.      circumvent a clever restriction program.
  1078.  
  1079. Removable Restriction Files. When a system relies on an
  1080.      initialization file to provide protection, it is important
  1081.      that this file cannot be altered or removed.  If an
  1082.  
  1083.                                 18
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.      restricted application is able to write to its ``home
  1091.      directory'' where these initialization files are kept it can
  1092.      often free itself.
  1093.  
  1094. Non-standard Login. Some network access methods do not read or
  1095.      respect the startup files.  Among these are many file
  1096.      transfer systems.  I have often been able to gain privileged
  1097.      access to a machine by using the the login and password from
  1098.      a captive account with the file transfer facility that
  1099.      didn't know that these accounts weren't ``normal.''  Many
  1100.      file transfer facilities have methods for disabling the use
  1101.      of selected accounts.
  1102.  
  1103. Interrupts. It is sad that a number of the captive accounts won't
  1104.      withstand a single interrupt or suspend character.  Try it
  1105.      just to be sure.
  1106.  
  1107. Making sure that you have not made any of the above listed
  1108. mistakes is of course not sufficient for having a perfectly safe
  1109. system.  Avoiding these mistakes, or avoiding the use of captive
  1110. accounts at all, is enough to discourage the vast majority of
  1111. attackers.
  1112.  
  1113. Each operating system for each vendor has some particular default
  1114. accounts that need to be disabled or otherwise protected.
  1115.  
  1116.  
  1117. 2.4.1 Unix
  1118.  
  1119.  
  1120. Under unix there are a lot of possible default accounts since
  1121. there are so many different vendors.  Below is a partial list of
  1122. the default accounts that I have successfully used in the past
  1123. that are not mentioned above.
  1124.  
  1125.  
  1126. Sysdiag. Or diag.  This is used for doing hardware maintenance
  1127.      and should have a password.
  1128.  
  1129. Root. Or Rootsh or rootcsh or toor.  All to often shipped without
  1130.      a password.
  1131. Sync. Used to protect the disks when doing an emergency shutdown.
  1132.      This account should be restricted from file transfer and
  1133.      other net uses.
  1134.  
  1135. Finger. Or Who or W or Date or Echo.  All of these have
  1136.      legitimate uses but need to be set up to be properly
  1137.      captive.
  1138.  
  1139.  
  1140.                                 19
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147. Among the things that one should do with a new unix system is
  1148.  
  1149.  
  1150.       grep ::  /etc/passwd
  1151.  
  1152.  
  1153. to see what unpassworded accounts exist on the system.  All of
  1154. these are worth special attention.
  1155.  
  1156.  
  1157. 2.4.2 VMS
  1158.  
  1159. Since VMS is available from only one vendor, the default account
  1160. here are better known.  On large systems, these appear with
  1161. standard well known passwords.  On smaller systems, these
  1162. accounts appear with no passwords at all.  With the exception of
  1163. Decnet, all have been eliminated on systems newer than version
  1164. 4.6.
  1165.  
  1166.  
  1167. Decnet
  1168.  
  1169. System
  1170. Systest
  1171.  
  1172. Field
  1173.  
  1174. UETP
  1175.  
  1176. Many of the networking and mail delivery packages routinely added
  1177. to VMS systems also have well know password.  In the past six
  1178. months these accounts have been commonly used to break into VMS
  1179. systems.
  1180.  
  1181.  
  1182. MMPONY
  1183.  
  1184. PLUTO
  1185.  
  1186. The password on all of these accounts should be reset when a new
  1187. system is obtained.  There are many problems with the DECNET
  1188. account and the with the Task 0 object.  System managers should
  1189. obtain one of the standard repair scripts to remove these
  1190. vulnerabilities.
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.                                 20
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204. 2.4.3 CMS
  1205.  
  1206.  
  1207. It has been many years since I have seriously used CMS. At last
  1208. glance the default configuration seemed to include well know
  1209. passwords for two accounts.
  1210.  
  1211.  
  1212. rcsc
  1213. operator
  1214.  
  1215.  
  1216.  
  1217. 2.5 File Protections
  1218.  
  1219. With file protections simple measures can avoid most problems.
  1220. Batch jobs should be run on a regular basis to check that the
  1221. protections are correct.
  1222.  
  1223.  
  1224. Writable Binaries and System Directories. The most common problem
  1225.      with file protections is that some system binary or
  1226.      directory is not protected.  This allows the attacker to
  1227.      modify the system.  In this manner, an attacker will alter a
  1228.      common program, often the directory listing program to
  1229.      create a privileged account for them the next time that a
  1230.      privileged user uses this command.
  1231.      When possible the system binaries should be mounted
  1232.      read-only.  In any event a program should systematically
  1233.      find and correct errors in the protection of system files.
  1234.      ``Public'' areas for unsupported executable should be
  1235.      moderated and these executable should never be used by
  1236.      privileged users and programs.  System data files suffer
  1237.      from similar vulnerabilities.
  1238.  
  1239. Readable Restricted System Files. Just as the encrypted passwords
  1240.      need to be protected, the system has other data that is
  1241.      worth protecting.  Many computers have passwords and phone
  1242.      numbers of other computers stored for future use.  The most
  1243.      common use of this type of information is for network mail
  1244.      being transported via UUCP or protected DECNET. It is
  1245.      difficult to rework these systems so that this information
  1246.      would not be necessary and hence it must be protected.  You
  1247.      have an obligation to protect this data about your neighbors
  1248.      just as they have a responsibility to protect similar data
  1249.      that they have about you.
  1250.  
  1251. Home Dir's and Init Files Shouldn't Be Writable. Checking that
  1252.      these directories and files can be written only by the owner
  1253.  
  1254.                                 21
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.      will prevent many careless errors.  It is also worthwhile to
  1262.      check that peoples mail archives are not publically
  1263.      readable.  Though this is not directly a security threat, it
  1264.      is only one more line of code while writing the rest of
  1265.      this.
  1266.  
  1267.      In many versions of the common operating systems special
  1268.      checks are placed in the command interpreters to prevent
  1269.      them from using initialization files that were written by a
  1270.      third party.  In this case there are still at least two
  1271.      types of interesting attacks.  The first is to install a
  1272.      Trojan horse in the person's home directory tree rather than
  1273.      in the initialization file itself and the second is to
  1274.      simple remove the initialization files themselves.  Often
  1275.      security weaknesses are remedied through the proper
  1276.      initialization file and without these files the
  1277.      vulnerabilities are re-introduced.
  1278. No Unexpected Publically Writable Files or Directories. There are
  1279.      of course places and individual files that should be
  1280.      publically writable but these are stable quantities and the
  1281.      script can ignore them.  In practice user seems to react
  1282.      well to being told about files that they own that are
  1283.      publically overwritable.
  1284.  
  1285. When Parents aren't Owners. While it is not unusual for someone
  1286.      to have a link to a file outside of his directory structure,
  1287.      it is unusual for there to be a file to be in his home
  1288.      directory that is owned by someone else.  Flagging this when
  1289.      the link-count is ``1'' is worthwhile.
  1290.  
  1291.  
  1292. Automated scripts can find these errors before they are
  1293. exploited.  In general a serious error of one of the types
  1294. described above is entered into a given cluster university system
  1295. every other week.
  1296.  
  1297.  
  1298. 2.6 Well Known Security Holes
  1299.  
  1300.  
  1301. While hundreds of security holes exist in commonly used programs,
  1302. a very small number of these account for most of the problems.
  1303. Under modern version of VMS, most of them relate to either DECNET
  1304. or creating Mailboxes.
  1305.  
  1306. Under unix, a handful of programs account for most of the
  1307. problems.  It is not that these bugs are any worse or easier to
  1308. exploit than the others, just that they are well known and
  1309.  
  1310.  
  1311.                                 22
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318. popular.  The interested reader is referred to the Hackman
  1319. Project for a more complete listing.
  1320.  
  1321.  
  1322. Set-Uid Shell Scripts. You should not have any set-uid shell
  1323.      scripts.  If you have system source, you should consider
  1324.      modifying chmod to prevent users from creating set-uid
  1325.      programs.
  1326.  
  1327. FTP. The file transfer utilities has had a number of problems
  1328.      both in terms of configuration management (remembering to
  1329.      disallow accounts like ``sync'' from being used to transfer
  1330.      files) and legitimate bugs.  Patched version are available
  1331.      for most systems.
  1332. Login on the Sun 386i and under Dec Ultrix 3.0, until a better
  1333.      fix is available,
  1334.  
  1335.           chmod 0100 /bin/login
  1336.  
  1337.      to protect yourself from a serious security bug.
  1338. Sendmail. Probably the only program with as many security
  1339.      problems as the yellowpages system itself.  Again a patched
  1340.      version should be obtained for your system.
  1341.  
  1342. TFTP. This program should be set to run as an unprivileged user
  1343.      and/or chrooted.
  1344.  
  1345. Rwalld. This program needs to be set to run as an unprivileged
  1346.      user.
  1347. Mkdir. Some versions of unix do not have an atomic kernel call to
  1348.      make a directory and hence can leave the inodes in a ``bad''
  1349.      state if it is interrupted at just the right moment.  If
  1350.      your system is one of these it is worthwhile to write a
  1351.      short program that increases the job priority of a job while
  1352.      it is making a directory so as to make it more difficult to
  1353.      exploit this hole.
  1354.  
  1355. YP & NFS. Both present giant security holes.  It is important to
  1356.      arrange to get patches as soon as they become available for
  1357.      these subsystems because we can expect more security
  1358.      problems with them in the future.  Sun has recently started
  1359.      a computer security group that will help solve this set of
  1360.      problems.
  1361.  
  1362.  
  1363. While the ambitious and dedicated system manager is encouraged to
  1364. fix all of the security problems that exist, fixing these few
  1365. will discourage most of the attackers.
  1366.  
  1367.  
  1368.                                 23
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375. 2.7 New Security Holes
  1376.  
  1377.  
  1378. New security holes are always being found.  There are a number of
  1379. computer mailing lists and advisory groups the follow this.
  1380. Three groups of particular interest are CERT, ZARDOZ and CIAC.
  1381.  
  1382.  
  1383. 2.7.1 CERT
  1384.  
  1385. Cert is a DARPA sponsored group to help internet sites deal with
  1386. security problems.  They may be contacted as
  1387. cert@cert.sei.cmu.edu.  They also maintain a 24 hour phone number
  1388. for security problems at (412) 268-7090.
  1389.  
  1390.  
  1391.  
  1392. 2.7.2 ZARDOZ
  1393.  
  1394. Neil Gorsuch moderates a computer security discussion group.  He
  1395. may be contacted as zardoz!security-request@uunet.UU.NET
  1396. or security-request@cpd.com.
  1397.  
  1398.  
  1399. 2.7.3 CIAC
  1400.  
  1401.  
  1402. CIAC is the Department of Energy's Computer Incident Advisory
  1403. Capability team led by Gene Schultz.  This team is interested in
  1404. discovering and eliminating security holes, exchanging security
  1405. tools, as well as other issues.  Contact CIAC as
  1406. ciac@tiger.llnl.gov.
  1407.  
  1408.  
  1409. 2.8 Excess Services
  1410.  
  1411.  
  1412. Every extra network service that a computer offers potentially
  1413. poses an additional security vulnerability.  I am emphatically
  1414. not suggesting that we remove those services that the users are
  1415. using, I am encouraging the removal of services that are unused.
  1416. If you are not getting a benefit from a service, you should not
  1417. pay the price in terms of system overhead or security risk.
  1418. Sometimes, as with rexecd under unix, the risks are not
  1419. immediately apparent and are caused by unexpected interactions
  1420. that do not include any bugs per se.
  1421.  
  1422.  
  1423.  
  1424.  
  1425.                                 24
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432. 2.9 Search Paths
  1433.  
  1434.  
  1435. If a user has set his search path to include the current
  1436. directory (``.''  on Unix), he will almost always eventually have
  1437. a serious problem.  There are a number of security
  1438. vulnerabilities that this poses as well as logistical ones.
  1439. Searching through the all of the users initialization files
  1440. and/or through the process table (with ps -e on unix) can detect
  1441. this problem.
  1442.  
  1443.  
  1444. 2.10 Routing
  1445.  
  1446.  
  1447. Routing can provide a cheap partial protection for a computer
  1448. center.  There are some machines that don't need to talk to the
  1449. outside world at all.  On others, one would might like to be able
  1450. to initiate contact outward but not have any real need to allow
  1451. others to contact this machine directly.
  1452.  
  1453. In an academic computer when administrative computers are placed
  1454. on same network as the student machines, limiting routing is
  1455. often a very good idea.  One can set up the system such that the
  1456. users on administrative machines can use the resources of the
  1457. academic machines without placing them at significant risk of
  1458. attack by the student machines.
  1459.  
  1460. Ideally one would wish to place the machines that need to be
  1461. protected on their own local area net with active routers to
  1462. prevent an attacker from ``listening in'' on the broadcast net.
  1463. This type of an attack is becoming increasingly popular.
  1464.  
  1465.  
  1466. 2.11 Humans
  1467.  
  1468. In almost all technological systems, the weakest link is the
  1469. human beings involved.  Since the users, the installers and the
  1470. maintainers of the system are (in the average case) all humans,
  1471. this is a serious problem.
  1472.  
  1473.  
  1474.  
  1475. 2.11.1 Managers
  1476.  
  1477. Managers, bosses, center directors and other respected people are
  1478. often given privileged accounts on a variety of machines.
  1479. Unfortunately, they often are not as familiar with the systems as
  1480.  
  1481.  
  1482.                                 25
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489. the programmers and system maintainers themselves.  As a result,
  1490. they often are the targets of attack.  Often they are so busy
  1491. that do not take the security precautions that others would take
  1492. and do not have the same level of technical knowledge.  They are
  1493. given these privileges as a sign of respect.  They often ignore
  1494. instructions to change passwords or file protections
  1495.  
  1496. The attackers rarely show this level of respect.  They break into
  1497. the unprotected managerial account and use it as a vector to the
  1498. rest of the system or center.  This leads to an embarrassing
  1499. situations beyond the break-in itself as the manager is made to
  1500. look personally incompetent and is sometimes accused of being
  1501. unfit for his position.
  1502.  
  1503. Prevent this type of situation form occurring by giving
  1504. privileges only to people that need and know how to use them.
  1505.  
  1506.  
  1507. 2.11.2 Secretaries
  1508.  
  1509.  
  1510. Secretaries are often give their bosses passwords by their
  1511. bosses.  When a secretary uses his bosses account, he has all the
  1512. privileges that his boss would have and generally does not have
  1513. the training or expertise to use them safely.
  1514.  
  1515. It is probably not possible to prevent bosses from giving their
  1516. passwords to their secretaries.  Still one can reduce the need
  1517. for this by setting up groups correctly.  One might consider
  1518. giving ``bosses'' two separate accounts one for routine use and
  1519. one for privileged access with a hope that they will only share
  1520. the former with their secretary.
  1521.  
  1522.  
  1523. 2.11.3 Trojan Horses
  1524.  
  1525.  
  1526. Having an ``unsupported'' or ``public'' area on disk where users
  1527. place binaries for common use simplifies the placement of Trojan
  1528. horse programs.  Having several areas for user maintained
  1529. binaries and a single user responsible for each reduces but does
  1530. not eliminate this problem.
  1531.  
  1532.  
  1533. 2.11.4 Wizards
  1534.  
  1535. Wizards and system programmers often add their own security
  1536. problems.  They are often the ones to create privileged programs
  1537.  
  1538.  
  1539.                                 26
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546. that are needed and then forgotten about without being disabled.
  1547. Thinking that an account doesn't need to be checked/audited
  1548. because it is owned by someone that should know better than to
  1549. make a silly mistake is a risky policy.
  1550.  
  1551.  
  1552. 2.11.5 Funders
  1553.  
  1554.  
  1555. Funders are often giving accounts on the machines that they
  1556. ``paid for.''  All to often these accounts are never used but not
  1557. disabled even though they are found to be dormant by the
  1558. procedures discussed above.  Again, this is a mistake to be
  1559. avoided.
  1560.  
  1561.  
  1562. 2.12 Group Accounts
  1563.  
  1564.  
  1565. A group account is one that is shared among several people in
  1566. such a way that one can't tell which of the people in the group
  1567. is responsible for a given action.
  1568.  
  1569. Those of you familiar with Hardin's ``The Tragedy of The Common''
  1570. will understand that this is a problem in any system computer or
  1571. otherwise.  Part of the problem here is with passwords.
  1572.  
  1573.  
  1574.   1. You can't change the password easily.  You have to find
  1575.      everyone in the group to let them know.
  1576.   2. If something Dumb happens you don't know who to talk to
  1577.      about it.
  1578.  
  1579.   3. If someone shares the group password with another person,
  1580.      you can never find out who did or who all the people who
  1581.      knew the password were.
  1582.  
  1583.  
  1584. Group accounts should always be avoided.  The administrative work
  1585. to set up several independent accounts is very small in
  1586. comparison to the extra effort in disaster recovery for not doing
  1587. so.
  1588.  
  1589. One must not only avoid the explicit group accounts, but also the
  1590. implicit ones.  This is where an individual shares his password
  1591. with dozens of people or allows dozens, perhaps hundreds of them
  1592. to use his through proxy logins or .rhosts.
  1593.  
  1594.  
  1595.  
  1596.                                 27
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603. 2.13 .rhosts and proxy logins
  1604.  
  1605.  
  1606. Just as some people trust each other, some accounts trust each
  1607. other and some machines trust each other.  There are several
  1608. mechanism for setting up a trust relationship.  Among these are
  1609. hosts.equiv, .rhosts, and proxy logins.
  1610.  
  1611. These mechanisms essentially allow a user to login from one
  1612. machine to another without a password.  There are three basic
  1613. implications to this.
  1614.  
  1615.  
  1616.   1. If you can impersonate a machine, you can gain access to
  1617.      other machines without having to provide passwords or find
  1618.      bugs.
  1619.   2. Once you get access to one account on one machine, you are
  1620.      likely to be able to reach many other accounts on other
  1621.      machines.
  1622.  
  1623.   3. If you gain control of a machine, you have gained access to
  1624.      all the machines that trusts it.
  1625.  
  1626.  
  1627. Various experiments have shown that by starting almost anywhere
  1628. interesting, once one has control of one medium size machine, one
  1629. can gain access to tens of thousands of computers.  In my most
  1630. recent experiment, starting from a medium size timesharing
  1631. system, I gained immediate access to 150 machines and surpassed
  1632. 5000 distinct machines before completing the second recursion
  1633. step.
  1634.  
  1635.  
  1636. 2.14 Debugging
  1637.  
  1638.  
  1639. About one third of the security holes that I have come across
  1640. depend on a debugging option being enabled.  When installing
  1641. system software, always check that all the ``debugging'' options
  1642. that you are not using are disabled.
  1643.  
  1644.  
  1645. 2.15 Getting People Mad at You
  1646.  
  1647. It is sad but true that a small number of sites have gotten
  1648. groups of hackers angry at them.  In at least two cases, this was
  1649. because the hackers had found an interesting security hole, had
  1650.  
  1651.  
  1652.  
  1653.                                 28
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660. tried to contact the administrators of the center and were given
  1661. a hard time when they were seriously trying to help.
  1662.  
  1663. When one is given a ``tip'' from someone that won't identify
  1664. themselves about a security problem, it is generally worth
  1665. investigating.  It is not worth trying to trick the informant
  1666. into giving his phone number to you.  It almost never works, and
  1667. it is the ``type of dirty trick'' that will probably get people
  1668. mad at you and at the very least prevent you from getting early
  1669. warnings in the future.
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.                                 29
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717. 3 Pre-Planning your Incident Handling
  1718.  
  1719.  
  1720. 3.1 Goals
  1721.  
  1722.  
  1723. Despite your best plans to avoid incidents they may very well
  1724. occur.  Proper planning can reduce their serverity, cost and
  1725. inconvenience levels.  There are about half dozen different goals
  1726. that one can have while handling an incident.
  1727.  
  1728.  
  1729.   1. Maintain and restore data.
  1730.   2. Maintain and restore service.
  1731.  
  1732.   3. Figure out how it happenned.
  1733.  
  1734.   4. Avoid the future incidents and escalation.
  1735.   5. Avoid looking foolish.
  1736.  
  1737.   6. Find out who did it.
  1738.  
  1739.   7. Punish the attackers.
  1740.  
  1741. The order shown above is what I believe the order of priorities
  1742. generally should be.  Of course in a real situation there are
  1743. many reasons why this ordering might not be appropriate and we
  1744. will discuss the whens and why of changing our priorities in the
  1745. next section.
  1746.  
  1747. For any given site, one can expect that a standard goal
  1748. prioritization can be developed.  This should be done in advance.
  1749. There is nothing so terrible as being alone in a cold machine
  1750. room at 4 on a Sunday morning trying to decide whether to shut
  1751. down the last hole to protect the system or try to get a phone
  1752. trace done to catch the attacker.  It is similarly difficult to
  1753. decide in the middle of a disaster whether you should shut down a
  1754. system to protect the existing data or do everything you can to
  1755. continue to provide service.
  1756.  
  1757. Noone who is handling the technical side of an incident wants to
  1758. make these policy decisions without guidance in the middle of a
  1759. disaster.  One can be sure that these decisions will be replayed
  1760. an re-analyzed by a dozen ``Monday Morning Quarterbacks'' who
  1761. will explain what should have been done could not be bothered to
  1762. make up a set of guidelines before.
  1763.  
  1764. Let us look at each of these goals in a little more detail.
  1765.  
  1766.  
  1767.                                 30
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774. 3.1.1 Maintaining and restoring data
  1775.  
  1776.  
  1777. To me, the user data is of paramount importance.  Anything else
  1778. is generally replacable.  You can buy more disk drives, more
  1779. computers, more electrical power.  If you lose the data, though a
  1780. security incident or otherwise, it is gone.
  1781.  
  1782. Of course, if the computer is controlling a physical device,
  1783. there may be more than just data at stake.  For example, the most
  1784. important goal for the computer in Pacemaker is to get the next
  1785. pulse out on time.
  1786.  
  1787. In terms of the protection of user data, there is nothing that
  1788. can take the place of a good back-up strategy.  During the week
  1789. that this chapter was written, three centers that I work with
  1790. suffered catastrophic data loss.  Two of the three from air
  1791. conditioning problems, one from programmer error.  At all three
  1792. centers, there were machines with irreplacable scientific data
  1793. that had never been backed up in their lives.
  1794.  
  1795. Many backup failures are caused by more subbtle problems than
  1796. these.  Still it is instructive to note that many sites never
  1797. make a second copy of their data.  This means than any problem
  1798. from a defective disk drive, to a water main break, to a typing
  1799. mistake when updating system software can spell disaster.
  1800.  
  1801. If the primary goal is that of maintaining and restoring data,
  1802. the first thing to do during an incident needs to be to check
  1803. when the most recent backup was completed.  If it was not done
  1804. very recently, an immediate full system dump must be made and the
  1805. system must be shutdown until it is done.  Of course, one can't
  1806. trust this dump as the attacker may have already modified the
  1807. system.
  1808.  
  1809.  
  1810. 3.1.2 Maintaining and restoring service
  1811.  
  1812. Second to maintaining the data, maintaining service is important.
  1813. Users have probably come to rely on the computing center and will
  1814. not be pleased if they can't continue to use it as planned.
  1815.  
  1816.  
  1817.  
  1818. 3.1.3 Figuring how it happenned
  1819.  
  1820. This is by far the most interesting part of the problem and in
  1821. practice seems to take precident over all of the others.  It of
  1822.  
  1823.  
  1824.                                 31
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831. course strongly conflicts with the two preceeding goals.
  1832.  
  1833. By immediately making a complete copy of the system after the
  1834. attack, one can analyze it at one's leisure.  This means that we
  1835. don't need to worry about normal use destroying evidence of about
  1836. the attacker re-entering to destroy evidence of what happenned.
  1837.  
  1838. Ultimately, one may never be able to determine how it happenned.
  1839. One may find several ways that ``could have happenned''
  1840. presenting a number of things to fix.
  1841.  
  1842.  
  1843. 3.1.4 Avoiding the Future Incidents and Escalation
  1844.  
  1845.  
  1846. This needs to be an explicit goal and often is not realized until
  1847. much too late.  To avoid future incidents one of course should
  1848. fix the problem that first occurred and remove any new security
  1849. vulnerabilities that were added either by the attackers or by the
  1850. system staff while trying to figure out what was going on.
  1851.  
  1852. Beyond this, one needs to prevent turning a casual attacker who
  1853. may not be caught into dedicate opponent, to prevent enticing
  1854. other attackers and to prevent others in one's organization and
  1855. related organizations from being forced to introduce restrictions
  1856. that would be neither popular nor helpful.
  1857.  
  1858.  
  1859. 3.1.5 Avoiding looking foolish
  1860.  
  1861.  
  1862. Another real world consideration that I had not expected to
  1863. become an issue is one of image management.  In practice, it is
  1864. important not to look foolish in the press, an issue that we will
  1865. discuss more fully in an appendix.  Also it is important for the
  1866. appropriate people within the organization to be briefed on the
  1867. situation.  It is embarrising to find out about an incident in
  1868. one's own organization from a reporter's phone call.
  1869.  
  1870.  
  1871. 3.1.6  Finding out who did it
  1872.  
  1873. This goal is often over emphasized.  There is definitely a value
  1874. in knowing who the attacker was so that one can debrief him and
  1875. discourage him from doing such things in the future.
  1876.  
  1877. In the average case, it effort to determine the attackers
  1878. identity than it is worth unless one plans to prosecute him.
  1879.  
  1880.  
  1881.                                 32
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888. 3.1.7 Punishing the attackers
  1889.  
  1890.  
  1891. This merits of this goal have been seriously debated in the past
  1892. few years.  As a practical matter it is very difficult to get
  1893. enough evidence to prosecuter someone and very few succesful
  1894. prosecutions.  If this is a one of the goals, very careful record
  1895. keeping needs to be done at all times during the investigation,
  1896. and solving the problem will be slowed down as one waits for
  1897. phone traces and various court orders.
  1898.  
  1899.  
  1900. 3.2 Backups
  1901.  
  1902.  
  1903. It should be clear that accomplishing most of the goals requires
  1904. having extra copies of the data that is stored on the system.
  1905. These extra copies are called ``Backups'' and generally stored on
  1906. magnetic tape.
  1907.  
  1908. Let us consider two aspects of keeping backup copies of your
  1909. data.  First, we will look at why this important and what the
  1910. backups are used for and then we will examine the charateristics
  1911. of a good backup strategy.
  1912.  
  1913.  
  1914. 3.2.1 Why We Need Back Ups
  1915.  
  1916. Good back ups are needed for four types of reasons.  The first
  1917. three of these are not security related per se, though an
  1918. insufficeint back up strategy will lead to problems with these
  1919. first three as well.
  1920.  
  1921. If a site does not have a reliable back up system, when an
  1922. incident occurs, one must seriously consider immediate shutdown
  1923. of the system so as not to endanger the user data.
  1924.  
  1925.  
  1926. User Errors. Every once in a while, a user delete a file or
  1927.      overwrites data and then realizes that he needs it back.  In
  1928.      some operating systems, ``undelete'' facilities or version
  1929.      numbering is enough to protect him, if he notices his
  1930.      mistake quickly enough.  Sometimes he doesn't notice the
  1931.      error for a long time, or deletes all of the versions, or
  1932.      expunges them and then wants the data back.
  1933.      If there is no backup system at all, the users data is just
  1934.      plain lost.  If there is a perfect backup system, he quickly
  1935.      is able to recover from his mistake.  If there is a poor
  1936.  
  1937.  
  1938.                                 33
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.      back up system, his data may be recovered in a corrupted
  1946.      form or with incorrect permission set on it.
  1947.  
  1948.      There have been cases where back up systems returned data
  1949.      files to be publically writeable and obvious problems have
  1950.      ensued from it.  Perhaps as seriously, there are sites that
  1951.      have stored all of the back up data in a publically readable
  1952.      form, including the data that was protected by the
  1953.      individual user.
  1954. System Staff Errors. Just as users make mistakes, staff members
  1955.      do as well.  In doing so, they may damage user files, system
  1956.      files or both.  Unless there is a copy of the current system
  1957.      files, the staff must restore the system files from the
  1958.      original distribution and then rebuild all of the site
  1959.      specific changes.  This is an error prone process and often
  1960.      the site specific changes including removing unwanted
  1961.      debugging features that pose security vulnerabilities.
  1962.  
  1963. Hardware/Software Failures. Hardware occassionally fails.  If the
  1964.      only copy of the data is on a disk that has become
  1965.      unreadable it is lost.  Software occasionally fails.  Given
  1966.      a serious enough error, it can make a disk unreadable.
  1967.  
  1968. Security Incidents. In this document, our main concern is with
  1969.      security incidents.  In determining what happen and
  1970.      correcting it, backups are essential.
  1971.      Basically, one would like to return every file to the state
  1972.      before the incident except for those that are being modified
  1973.      to prevent future incidents.  Of course, to do this, one
  1974.      needs a copy to restore from.  Naively, one would think that
  1975.      using that modification date would allow us to tell which
  1976.      files need to be updated.  This is of course not the case.
  1977.      The clever attack will modify the system clock and/or the
  1978.      timestamps on files to prevent this.
  1979.      In many attacks, at one the following types of files are
  1980.      modified.
  1981.  
  1982.        ? The system binary that controls logging in.
  1983.        ? The system authorization file lists the users and their
  1984.          privileges.
  1985.  
  1986.        ? The system binary that controls one or more daemons.
  1987.        ? The accounting and auditing files.
  1988.        ? User's startup files and permission files.
  1989.  
  1990.        ? The system directory walking binary.
  1991.  
  1992.  
  1993. Now that we understand why we need back ups in order to recover
  1994.  
  1995.                                 34
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002. 3.2.2 How to form a Back Up Strategy that Works
  2003.  
  2004.  
  2005. There are a few basic rules that provide for a good backup
  2006. strategy.
  2007.  
  2008.  
  2009.    ? Every file that one cares about must be included.
  2010.    ? The copies must be in non-volitile form.  While having two
  2011.      copies of each file, one on each of two separate disk drives
  2012.      is good for protection from simple hardware failures, it is
  2013.      not defense from an intelligent attacker that will modify
  2014.      both copies, of from a clever system staffer who saves time
  2015.      by modifying them both at once.
  2016.  
  2017.    ? Long cycles.  It may take weeks or months to notice a
  2018.      mistake.  A system that reuses the same tape every week will
  2019.      have destroyed the data before the error is noticed.
  2020.  
  2021.    ? Separate tapes.  Overwriting the existing backup before
  2022.      having the new one completed is an accident waiting to
  2023.      happen.
  2024.    ? Verified backups.  It is necessary to make sure that one can
  2025.      read the tapes back in.  One site with a programming bug in
  2026.      its back up utility had a store room filled with unreadable
  2027.      tapes!
  2028.  
  2029.  
  2030.  
  2031. 3.3 Forming a Plan
  2032.  
  2033. While the first major section (avoidance) contained a lot of
  2034. standard solutions to standard problems, planning requires a
  2035. great deal more thought and consideration.  A great deal of this
  2036. is list making.
  2037.  
  2038.  
  2039. Calls Lists. If there a system staffer suspects security incident
  2040.      is happening right now, who he should call?
  2041.      And if he gets no answer on that line?
  2042.  
  2043.      What if the people are the call list are no longer employees
  2044.      or have long since died?
  2045.      What if it Christmas Day or Sunday morning?
  2046.  
  2047. Time--Distance. How long will it take for the people who are
  2048.      called to arrive?
  2049.      What should be done until they get there?
  2050.  
  2051.  
  2052.                                 35
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059. This a user notices. If a user notices something odd, who should
  2060.      he tell?
  2061.  
  2062.      How does he know this?
  2063. Threats and Tips. What should your staffers do if they receive a
  2064.      threat or a tip-off about a breakin?
  2065.  
  2066. Press. What should a system staffer do when he receives a call
  2067.      from the press asking about an incident that he, himself
  2068.      doesn't know about?
  2069.      What about when there is a real incident underway?
  2070.  
  2071. Shutting Down. Under what circumstances should the center be
  2072.      shutdown or removed from the net?
  2073.      Who can make this decision?
  2074.  
  2075.      When should service be restored?
  2076. Prosecution. Under what circumstances do you plan to prosecute?
  2077.  
  2078. Timestamps. How can you tell that the timestamps have been
  2079.      altered?
  2080.      What should you do about it?
  2081.  
  2082.      Would running NTP (the network time protocal) help?
  2083. Informing the Users. What do you tell the users about all this?
  2084.  
  2085. List Logistics. How often to you update the incident plan?
  2086.      How does you system staff learn about it?
  2087.  
  2088.  
  2089. 3.4 Tools to have on hand
  2090.  
  2091.  
  2092. File Differencing Tools
  2093.  
  2094. Netwatcher
  2095.  
  2096. Spying tools
  2097.  
  2098. Backup Tapes
  2099.  
  2100. Blanks Tapes
  2101.  
  2102. Notebooks
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.                                 36
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116. 3.5 Sample Scenarios to Work on in Groups
  2117.  
  2118.  
  2119. In order to understand what goal priorities you have for you
  2120. center and as a general exercise in planning, let us consider a
  2121. number of sample problems.  Each of these is a simplified version
  2122. of a real incident.  What would be appropriate to do if a similar
  2123. thing happenned at your center?  Each new paragraph indicates new
  2124. information that is received later.
  2125.  
  2126.  
  2127.    ? A system programmer notices that at midnight each night,
  2128.      someone makes 25 attempts to guess a username--password
  2129.      combination
  2130.      Two weeks later, he reports that each night it is the same
  2131.      username--password combination.
  2132.  
  2133.    ? A system programmer gets a call reporting that a major
  2134.      underground cracker newsletter is being distributed from the
  2135.      administrative machine at his center to five thousand sites
  2136.      in the US and Western Europe.
  2137.      Eight weeks later, the authorities call to inform you the
  2138.      information in one of these newsletters was used to disable
  2139.      ``911'' in a major city for five hours.
  2140.  
  2141.    ? A user calls in to report that he can't login to his account
  2142.      at 3 in the morning on a Saturday.  The system staffer can't
  2143.      login either.  After rebooting to single user mode, he finds
  2144.      that password file is empty.
  2145.      By Monday morning, your staff determines that a number of
  2146.      privileged file transfer took place between this machine and
  2147.      a local university.
  2148.      Tuesday morning a copy of the deleted password file is found
  2149.      on the university machine along with password files for a
  2150.      dozen other machines.
  2151.  
  2152.      A week later you find that your system initialization files
  2153.      had been altered in a hostile fashion.
  2154.    ? You receive a call saying that breakin to a government lab
  2155.      occurred from one of your center's machines.  You are
  2156.      requested to provide accounting files to help trackdown the
  2157.      attacker.
  2158.  
  2159.      A week later you are given a list of machines at your site
  2160.      that have been broken into.
  2161.    ? A user reports that the last login time/place on his account
  2162.      aren't his.
  2163.  
  2164.  
  2165.  
  2166.                                 37
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.      Two weeks later you find that your username space isn't
  2174.      unique and that unauthenticated logins are allowed between
  2175.      machines based entirely on username.
  2176.  
  2177.    ? A guest account is suddenly using four CPU hours per day
  2178.      when before it had just been used for mail reading.
  2179.      You find that the extra CPU time has been going into
  2180.      password cracking.
  2181.  
  2182.      You find that the password file isn't one from your center.
  2183.      You determine which center it is from.
  2184.  
  2185.    ? You hear reports of computer virus that paints trains on
  2186.      CRT's.
  2187.      You login to a machine at your center and find such a train
  2188.      on your screen.
  2189.      You look in the log and find not notation of such a feature
  2190.      being added.
  2191.  
  2192.      You notice that five attempts were made to install it within
  2193.      an hour of each before the current one.
  2194.      Three days later you learn that it was put up by a system
  2195.      administrator locally who had heard nothing about the virus
  2196.      scare or about your asking about it.
  2197.  
  2198.    ? You notice that your machine has been broken into.
  2199.      You find that nothing is damaged.
  2200.      A high school student calls up and apologizes for doing it.
  2201.  
  2202.    ? An entire disk partition of data is deleted.  Mail is
  2203.      bouncing bouncing because the mail utilities was on that
  2204.      partition.
  2205.      When you restore the partition, you find that a number of
  2206.      system binaries have been changed.  You also notice that the
  2207.      system date is wrong.  Off by 1900 years.
  2208.  
  2209.    ? A reporter calls up asking about the breakin at your center.
  2210.      You haven't heard of any such breakin.
  2211.      Three days later you learn that there was a breakin.  The
  2212.      center director had his wife's name as a password.
  2213.  
  2214.    ? A change in system binaries is detected.
  2215.      The day that it is corrected they again are changed.
  2216.  
  2217.      This repeats itself for some weeks.
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.                                 38
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230. 4 Incident Handling
  2231.  
  2232.  
  2233. The difficulty of handling an incident is determined by several
  2234. factors.  These include the level of preparation, the sensitivity
  2235. of the data, and the relative expertise levels of the attacker(s)
  2236. and the defender(s).  Hopefully, preliminary work in terms of
  2237. gathering tools, having notification lists, policies and most
  2238. importantly backup tapes, will make the actual handling much
  2239. easier.
  2240.  
  2241. This section is divided into three parts.  The first of these
  2242. deal with general principles.  The second presents some
  2243. particular (simple) techniques that have proven useful in the
  2244. past.  Finally, the third section presents a description of a
  2245. simulation exercise based a set of real attacks.
  2246.  
  2247.  
  2248. 4.1 Basic Hints
  2249.  
  2250.  
  2251. There are a number of basic issues to understand when handling a
  2252. computer incident.  Most of these issues are present in handling
  2253. most of these issues and techniques are relevant in a wide
  2254. variety of unusual and emergency situations.
  2255.  
  2256.  
  2257. 4.1.1 Panic Level
  2258.  
  2259.  
  2260. It is critical to determine how much panic is appropriate.  In
  2261. many cases, a problem is not noticed until well after it has
  2262. occurred and another hour or day will not make a difference.
  2263.  
  2264.  
  2265. 4.1.2 Call Logs and Time Lines
  2266.  
  2267. All (or almost all) bad situations eventually come to an end.  At
  2268. that point, and perhaps at earlier points, a list of actions and
  2269. especially communications is needed to figure out what happened.
  2270.  
  2271.  
  2272. 4.1.3 Accountability and Authority
  2273.  
  2274.  
  2275. During an incident it is important to remind people what
  2276. decisions they are empowered to make and what types of decisions
  2277. that they are not.  Even when this is explicitly discussed and
  2278.  
  2279.  
  2280.                                 39
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287. formulated in a contingency plan, people have a tendency to
  2288. exceed their authorities when they are convinced that they know
  2289. what should be done.
  2290.  
  2291.  
  2292. 4.1.4 Audit Logs
  2293.  
  2294.  
  2295. Audit logs need to be copied to a safe place as quickly as
  2296. possible.  It is often the case that an attacker returns to a
  2297. computer to destroy evidence that he had previously forgotten
  2298. about.
  2299.  
  2300.  
  2301. 4.1.5 Timestamps
  2302.  
  2303. The second most powerful tool (second only to backup tapes) in an
  2304. incident handlers arsenal is timestamps.  When in doubt as to
  2305. what to do, try to understand the sequencing of the events.  This
  2306. is especially true when some of the actions will change the value
  2307. on the system clock.
  2308.  
  2309.  
  2310.  
  2311. 4.2 Basic Techniques
  2312.  
  2313. There are five basic sets of techniques for understanding what
  2314. has happened.
  2315.  
  2316.  
  2317. 4.2.1 Differencing
  2318.  
  2319.  
  2320. Differencing is that act of comparing the state of a part of the
  2321. computer system to the state that it was in previously.  In some
  2322. cases we have compared every executable system file with the
  2323. corresponding file on the original distribution tape to find what
  2324. files the attacker may have modified.  Checksums are often used
  2325. to decrease the cost of differencing.  Sometimes people look only
  2326. for differences in the protection modes of the files.
  2327.  
  2328.  
  2329. 4.2.2 Finding
  2330.  
  2331.  
  2332. Finding is generally cheaper than differencing.  Finding is the
  2333. act of looking at a part of a computer system for files that have
  2334. been modified during a particular time or have some other
  2335. interesting property.
  2336.  
  2337.                                 40
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344. 4.2.3 Snooping
  2345.  
  2346.  
  2347. Snooping is the act of placing monitors on a system to report the
  2348. future actions of an attacker.  Often a scripting version of the
  2349. command line interpreter is used or a line printer or PC is
  2350. spliced in to the incoming serial line.
  2351.  
  2352.  
  2353. 4.2.4 Tracking
  2354.  
  2355. Tracking is the use of system logs and other audit trails to try
  2356. to determine what an attacker has done.  It is particularly
  2357. useful in determining what other machines might be involved in an
  2358. incident.
  2359.  
  2360.  
  2361.  
  2362. 4.2.5 Psychology
  2363.  
  2364. A wide range of non-technical approaches have been employed over
  2365. the years with an even wider range of results.  Among these
  2366. approaches have been leaving messages for the attacker to find,
  2367. starting talk links, calling local high school teachers, etc.
  2368.  
  2369.  
  2370. 4.3 Prosecution
  2371.  
  2372.  
  2373. Prosecution has historically been very difficult.  Less than a
  2374. year ago, the FBI advised me that it was essentially impossible
  2375. to succeed in a prosecution.  More recently, FBI agent Dave
  2376. Icove, (icove@dockmaster.cnsc.mil, 703--640--1176) has assured me
  2377. that the FBI will be taking a more active role in the prosecution
  2378. of computer break-ins and has expressed interest in lending
  2379. assistance to investigation where prosecution is appropriate.
  2380.  
  2381.  
  2382. 4.4 Exercise
  2383.  
  2384.  
  2385. The bulk of this class hour is reserved for an incident handling
  2386. simulation.  A facility will be described.  A consensus policy
  2387. for incident handling will be agreed upon and then the simulation
  2388. will begin.
  2389.  
  2390. During the simulation, the effects of the attackers actions and
  2391. those of third parties will be described.  The participants can
  2392.  
  2393.  
  2394.                                 41
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401. choose actions and take measurements and will be informed of the
  2402. results of those actions and measurements.  In a sufficiently
  2403. small working group that had several days, we would run a
  2404. software simulation; but as many of the actions take hours (ega
  2405. full system comparison to the original distribution), we will
  2406. proceed verbal in the short version of this workshop.
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.                                 42
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458. 5 Recovering From Disasters
  2459.  
  2460.  
  2461. Incident recovery is the final portion of the of the incident
  2462. handling process.  Like the other portions of incident handling,
  2463. it is not particularly difficult but is sufficiently intricate to
  2464. allow for many errors.
  2465.  
  2466.  
  2467. Telling everyone that is over. For a large incident, it is not
  2468.      unusual to have contacted people at a dozen or more sites.
  2469.      It is important to let everyone know that you are done and
  2470.      to be sure to give your colleagues the information that they
  2471.      need.  It is also important that your staff knows that
  2472.      things are over so that they can return to normal work.
  2473.      Generally a lot of people need to thanked for the extra
  2474.      hours and effort that they have contributed.
  2475. Removing all Tools. Many of the tools that were installed and
  2476.      using during an incident need to removed from the system.
  2477.      Some will interfere with performance.  Others are worth
  2478.      stealing by a clever attacker.  Similarly a future attacker
  2479.      that gets a chance to look at the tools will know a lot
  2480.      about how you are going to track him.  Often extra accounts
  2481.      are added for handling the incident.  These need to be
  2482.      removed.
  2483.  
  2484. File and Service Restoration. Returning the file system to a
  2485.      ``known good state'' is often the most difficult part of
  2486.      recovery.  This is especially true with long incidents.
  2487.  
  2488. Reporting Requirements. Often, especially if law enforcement
  2489.      agencies have become involved, a formal report will be
  2490.      required.
  2491. History. After everything is over, a final reconstruction of the
  2492.      events is appropriate.  In this way, everyone on your staff
  2493.      is telling the same story.
  2494.  
  2495. Future Prevention. It is important to make sure that all of the
  2496.      vulnerabilities that were used in or created the incident
  2497.      are secured.
  2498.  
  2499.  
  2500. Just after an incident, it is likely to be a good time to create
  2501. sensible policies where they have not existed in the past and to
  2502. request extra equipment or staffing to increase security.
  2503. Similarly, it is a logical time for someone else to demand
  2504. stricter (nonsensical) policies to promote security.
  2505.  
  2506.  
  2507.  
  2508.                                 43
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515. A Micro Computers
  2516.  
  2517.  
  2518. While the bulk of this book and class has concerned multi-user
  2519. computers on networks, micro computers are also worth some
  2520. attentions.
  2521.  
  2522. Basically there are four issues that cause concern.
  2523.  
  2524.  
  2525. Shared Disks. In many settings, micro computers are shared among
  2526.      many users.  Even if each user brings his own data, often
  2527.      the system programs are shared on communal hard-disk,
  2528.      network or library or floppies.  This means that a single
  2529.      error can damage the work of many people.  Such errors might
  2530.      include destruction of a system program, intentional or
  2531.      accidental modification of a system program or entry of a
  2532.      virus.
  2533.      To combat this, systematic checking or reinstallation of
  2534.      software from a known protected source is recommended.  In
  2535.      most shared facilities, refreshing the network, hard-disk or
  2536.      floppy-library weekly should be considered.  Shared floppies
  2537.      should be write protected and the original copies of
  2538.      programs should be kept under lock and key and used only to
  2539.      make new copies.
  2540.      Trusted server the provide read only access to the system
  2541.      files have been successfully used in some universities.  It
  2542.      is absolute critical that these machines be used only as
  2543.      servers.
  2544.  
  2545. Viruses. A number of computer viruses have been found for
  2546.      micro-computers.  Many experts consider this problem to be
  2547.      practically solved for Macintoshes an soon to be solved for
  2548.      IBM-style PC's.
  2549.      Two basic types of anti-viral software are generally
  2550.      available.  The first type is installed into the operating
  2551.      and watches for virus's trying to infect a machine.
  2552.      Examples of this on the Mac include Semantic's SAM (Part 1),
  2553.      Don Brown's vaccine and Chris Johnson's Gate Keeper.
  2554.      The second type of anti-viral software scans the disk to
  2555.      detect and correct infected programs.  On the Mac, SAM (Part
  2556.      2), H. G. C. Software's Virex, and John Norstab's Disinfinct
  2557.      are commonly used disk scanners.
  2558.  
  2559.      On the PC type of machines we find three types of virus.
  2560.      The first of these is a boot sector virus that alters the
  2561.      machine language start up code found on the diskette.  The
  2562.      second infects the command.com startup file and the third
  2563.      alters the exe (machine language executable files).
  2564.  
  2565.                                 44
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.      Flu Shot Plus by Ross Greenberg is an example of a program
  2573.      to deal with command.com & some exe virus.  Novirus and
  2574.      cooperatively built by Yale, Alemeda and Merit is one of the
  2575.      boot track repair systems.
  2576.      There are a number of electronic discussion groups that deal
  2577.      with computer virus.  On BITNET (and forwarded to other
  2578.      networks), virus-l supports discussion about PC and Mac
  2579.      virus, while valert is used to announce the discovery of new
  2580.      ones.  Compuserve's macpro serves as a forum to discuss
  2581.      Macintosh viruses.
  2582.  
  2583. Network. The third is issue is the placement of single user
  2584.      computers on networks.  Since there is little or no
  2585.      authentication on (or of) these machines, care must be taken
  2586.      to not place sensitive files upon them in such a
  2587.      configuration.
  2588.  
  2589. Reliability. Finally there is a reliability issue.  Most single
  2590.      user computers were never designed for life and time
  2591.      critical applications.  Before using such a computer in such
  2592.      an application, expert advise should be sought.
  2593.  
  2594. In the use of single user computers, there are some basic issues
  2595. that need be considered and some simple advice that should be
  2596. given.
  2597.  
  2598. In the advice column, there are a few basic points.
  2599.  
  2600.  
  2601.   1. Where practical, each user should have his own system disks
  2602.      and hence be partially insulated from potential mistakes.
  2603.   2. When people are sharing disks have an explicit check out
  2604.      policy logging the users of each disk.  Be sure to set the
  2605.      write-protect them and teach the users how to write protect
  2606.      there own system disks.  (Most PC programs are sold on
  2607.      write-protected disks, this is not true of most Macintosh
  2608.      programs.
  2609.  
  2610.   3. Keep a back up copy of all system programs and system
  2611.      programs to allow for easy restoration of the system.
  2612.   4. Write lock originals and keep them under lock and key for
  2613.      emergency use only.
  2614.  
  2615.   5. Have an explicit policy and teach users about software theft
  2616.      and software ethics.
  2617.  
  2618.   6. Teach users to back up their data.  Just as with large
  2619.      computers, the only real defense from disaster is
  2620.      redundancy.
  2621.  
  2622.                                 45
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629. Even when the computer center is not providing the machines
  2630. themselves, it should generally help to teach users about
  2631. backups, write protection, software ethics and related issues.
  2632. Most PC users do not realize that they are their own system
  2633. managers and must take the responsibility of care for their
  2634. systems or risk the consequences.
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.                                 46
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686. B VMS Script
  2687.  
  2688.  
  2689. This script is courtesy of Kevin Oberman of Lawrence Livermore
  2690. National Labs.  It is used on DEC VMS systems to close a number
  2691. of the standard created by the normal installation of DECNET.
  2692. Rather than typing this in by hand, please request one by
  2693. electronic mail.  This DCL script is provided for reference
  2694. purposes only and is not guaranteed or warranted in any way.
  2695.  
  2696.  
  2697. $ Type SYS$INPUT
  2698.  
  2699. countpandedure  changes the  password for the  default DECnet  ac-
  2700. sets  up a  new account  for FAL  activity.  It prevents  unautho-
  2701. rized users
  2702. from  making  use of  the  default  DECnet account  for  any  pur-
  2703. pose except
  2704. file transfer.
  2705.  
  2706. This procedure assumes  a default DECnet account named  DECNET us-
  2707. ing a
  2708. directory on  SYS$SYSROOT. If this  is not the  case on this  sys-
  2709. tem, do
  2710. readypinceed!   It will  use UIC  [375,375]. If  this  UIC is  al-
  2711. use, do not continue.
  2712.  
  2713. $ Read/End=Cleanup/Prompt="Continue [N]: " SYS$COMMAND OK
  2714. $ If .NOT. OK Then Exit
  2715. $ Say := "Write SYS$OUTPUT"
  2716. $ Current_Default = F$Environment("DEFAULT")
  2717. $ Has_Privs = F$Priv("CMKRNL,OPER,SYSPRV")
  2718. $ If Has_Privs Then GoTo Privs_OK
  2719. $ Say "This procedure requires CMKRNL, OPER, and SYSPRV."
  2720. $ Exit
  2721. $POnvControl_Y Then GoTo Cleanup
  2722. $ On Error Then GoTo Cleanup
  2723. $ Set Terminal/NoEcho
  2724. $ Read/End=Cleanup/Prompt="Please  enter new default DECnet  pass-
  2725. word: " -
  2726.  SYS$Command DN_Password
  2727. $ Say " "
  2728. $ If F$Length(DN_Password) .GT. 7 Then GoTo DN_Password_OK
  2729. $ Say "Minimum password length is 8 characters"
  2730. $ GoTo Privs_OK
  2731. $DN_Password_OK:
  2732. $ Sayd"E"d=Cleanup/Prompt="Enter new FAL password: " SYS$COMMAND FAL_Password
  2733. $ If F$Length(FAL_Password) .GT. 7 Then GoTo FAL_Password_OK
  2734.  
  2735.  
  2736.                                 47
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743. $ Say "Minimum password length is 8 characters"
  2744. $ GoTo DN_Password_OK
  2745. $FAL_Password_OK:
  2746. $ Set Terminal/Echo
  2747. $ Type SYS$INPUT
  2748.  
  2749. The FAL account requires a disk quota. This quota should be large
  2750. enough to accomodate the the files typically loaded into this account.
  2751. formldefaultqouta  be  exhausted, the  system  will fail  to  per-
  2752. DECnet file transfers.
  2753.  
  2754. It  is  also  advisable  to  clear  old   files  from  the  direc-
  2755. tory on a daily
  2756. basis.
  2757.  
  2758. $ If .NOT. F$GetSYI("CLUSTER_MEMBER") Then GoTo Not_Cluster
  2759. $ Say "This system is a cluster member.
  2760. $ Read/Prom="Has this procedure already been run  on another clus-
  2761. ter member: "-
  2762. $ IfSClusterCTheneGoTo No_Create
  2763. $Not_Cluster:
  2764. $ Read/End=Cleanup -
  2765.   /Prompt="Disk  quota  for FAL  account  (0  if  quotas  not  en-
  2766. abled): " -
  2767.   SYS$COMMAND Quota
  2768. $ If F$Type(Quota) .EQS. "INTEGER" Then GoTo Set_Quota
  2769. $ Say "Diskquota must be an integer"
  2770. $ GoTo FAL_Password_OK
  2771. $Set_Quota:
  2772. $ Say "Setting up new FAL account."
  2773. $ Set NoOnult SYS$SYSTEM
  2774. $ UAF := "$Authorize"
  2775. $ UAF Copy DECNET FAL/Password='FAL_Password'/UIC=[375,375]/Directory=[FAL]
  2776. $ Create/Directory SYS$SYSROOT:[FAL]/Owner=[FAL]
  2777. $No_Create:
  2778. $ NCP := "$NCP"
  2779. $ NCP Define Object FAL USER FAL Password 'FAL_Password'
  2780. $ NCP Set Object FAL USER FAL Password 'FAL_Password'
  2781. $ If (Quota .eq. 0) .OR. Cluster Then GoTo NO_QUOTA
  2782. $ Say "Entering disk quota for FAL account.
  2783. $ Set Default SYS$SYSTEM
  2784. $ Open/WritetQuota"SET_QUOTA'PID'.COM
  2785. $ Write Quota "$ Run SYS$SYSTEM:DISKQUOTA"
  2786. $ Write Quota "Add FAL/Perm=''Quota'"
  2787. $ Close Quota
  2788. $ @SET_QUOTA'PID'
  2789. $ Delete SET_QUOTA'PID'.COM;
  2790. $No_Quota:
  2791.  
  2792.  
  2793.                                 48
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800. $ Say "Resetting default DECNET account password"
  2801. $ NCP Define Executor Nonpriv Password 'DN_Password'
  2802. $ NCP Set Executor Nonpriv Password 'DN_Password'
  2803. $ UAF Modify DECNET/Password='DN_Password'
  2804. $Cleanup:
  2805. $ Set Default 'Current_Default'
  2806. $ Set Terminal/Echo
  2807. $ Exit
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.                                 49
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857. C Highly Sensitive Environments
  2858.  
  2859.  
  2860. An computing environment should be considered highly sensitive
  2861. when it is potentially profitable to covert the data or when
  2862. great inconvenience and losses could result from errors produced
  2863. there.  In particular, you should consider you site sensitive if
  2864. any of the following conditions apply:
  2865.  
  2866.  
  2867.   1. You process data that the government considers sensitive.
  2868.   2. You process financial transactions such that a single
  2869.      transaction can exceed $25,000.00 or the total transactions
  2870.      exceed 2.5 Million dollars.
  2871.  
  2872.   3. You process data whose time of release is tightly controlled
  2873.      and whose early release could give significant financial
  2874.      advantage.
  2875.  
  2876.   4. Your function is life critical.
  2877.   5. Your organization has enemies that have a history of
  2878.      ``terrorism'' or violent protests.
  2879.  
  2880.   6. Your data contains trade secrete information that would be
  2881.      of direct value to a competitor.
  2882.  
  2883.  
  2884. Essentially money is more directly valuable than secrets and a
  2885. ``vilian'' can potentially steal more from one successful attack
  2886. on one financial institution than he will ever be able to get
  2887. selling state secrets for decades.  There is significant concern
  2888. that the electrical utility companies and and bank conducting
  2889. electronic funds transfer will be targets of terrorists in thee
  2890. next decade.
  2891.  
  2892. For centers the must support sensitive processing it is strongly
  2893. advised to completely separate the facilities for processing this
  2894. data from those facilities used to process ordinary data and to
  2895. allow absolutely no connection from the sensitive processing
  2896. systems to the outside world.  There is No substitute for
  2897. physical security and proper separation will require an attacker
  2898. to compromise physical security in order to penetrate the system.
  2899. Techniques for coping with the remaining ``insider threat'' are
  2900. beyond the scope of this tutorial.
  2901.  
  2902. In analysis of computing in sensitive environments, there are two
  2903. different security goals.  The first is that of protecting the
  2904. system.  All of the advice in this booklet should be considered
  2905.  
  2906.  
  2907.                                 50
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914. as a first step towards that goal.  The second goal is the
  2915. protection of job or ``Technical Compliance.''  This is is the
  2916. goal of showing that all of the regulations have been followed
  2917. and that protecting the system has been done with ``due
  2918. diligence.''
  2919.  
  2920. It is important to realize that these two security goals are
  2921. separate and potentially conflicting.  It may be necessary to
  2922. work towards the latter the goal and that is often more a legal
  2923. and bookkeeping question than a technical one.  It is also beyond
  2924. the scope of this work.
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.                                 51
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971. D Handling the Press
  2972.  
  2973.  
  2974. Often media inquiries can absorb more time than all of the others
  2975. issues in incident handling combined.  It is important to
  2976. understand this and to use your public affairs office if it
  2977. exists.  In the excitement, people, especially those who are not
  2978. experience speakers will often forget that they are not empowered
  2979. to speak for the center and that nothing is ever really said,
  2980. ``Off the record.''
  2981.  
  2982.  
  2983. D.1 Spin Control
  2984.  
  2985.  
  2986. The phrase ``Spin Control'' was first used in political circles.
  2987. It refers to altering the perceptions about an incident rather
  2988. than the delaying with the facts of the incident themselves.
  2989. Consider the two statements.
  2990.  
  2991.  
  2992.   1. To keep our machines safe, we decided to disconnect them
  2993.      from the network.
  2994.   2. We were forced to shut down our network connections to
  2995.      prevent damage to our machines.
  2996.  
  2997.  
  2998. I have found that the giving the press a state like the former
  2999. tends to produce a laudatory piece about one's staff while a
  3000. statement like the latter, produces an embarrassing piece.  The
  3001. two statements are of course essentially identical.
  3002.  
  3003. Your public affairs group is probably familiar with these issues
  3004. and can help you form press statements
  3005.  
  3006.  
  3007.  
  3008. D.2 Time Control
  3009.  
  3010. With a sufficiently large incident, the media attention can
  3011. absorb almost unbounded amounts of time.  The press will often
  3012. call employees at home.  It is important the staff that are
  3013. solving a problem understand that the solving the incident is
  3014. more important that dealing with the press.  At the very least
  3015. insist that all press representatives go through the public
  3016. affairs often so that the standard questions can be easily and
  3017. time-efficiently be answered.
  3018.  
  3019.  
  3020.  
  3021.                                 52
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028. D.3 Hero Making
  3029.  
  3030.  
  3031. The press likes to find outstanding heroes and villains.  As a
  3032. result, the media will tend to make one of your staff members
  3033. into a hero if at all possible from them to do so.  It is more
  3034. likely than not that the Hero will not be the person who has
  3035. worked the hardest or the longest.
  3036.  
  3037.  
  3038. D.4 Discouraging or Encouraging a Next Incident
  3039.  
  3040.  
  3041. The attention that an incident receives greatly affect the
  3042. likelihood of future incidents at that particular site.  It
  3043. probably also influences the decision process or potential future
  3044. crackers in the community at large.  Claiming that your site is
  3045. invulnerable is an invitation to a future incident.  Giving the
  3046. media step by step instructions on how to break in to a computer
  3047. is also not a wonderful idea.
  3048.  
  3049. I (personally) suggest stressing the hard work of your staff and
  3050. the inconvenience to the legitimate users and staff members.  To
  3051. the extent practical portray the cracker as inconsiderate and
  3052. immature and try to avoid making him seem brilliant at one
  3053. extreme or the attack seem very simple at the other.
  3054.  
  3055.  
  3056. D.5 Prosecution
  3057.  
  3058. If you considering prosecution, you need to consult with your
  3059. legal counsel and law enforcement official for advise on press
  3060. handling.
  3061.  
  3062.  
  3063.  
  3064. D.6 No Comment
  3065.  
  3066. One common strategy for avoiding (or at least bounding) time loss
  3067. with the press is to simply decline to comment on the situation
  3068. at all.  IF you are going to adopt this approach, your public
  3069. affairs office can advise you on techniques to use.  It is
  3070. important to tell everyone who is involved in the incident that
  3071. they should not discuss the situation; otherwise people will leak
  3072. things accidently.  Also, without correct information from your
  3073. center, the press may print many inaccurate things that represent
  3074. their best guesses.
  3075.  
  3076.  
  3077.  
  3078.                                 53
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085. D.7 Honesty
  3086.  
  3087.  
  3088. I recommend against trying to mislead the press.  It is hard to
  3089. keep a secret forever and when and if the press finds that you
  3090. have lied to them, the negative coverage that you may receive
  3091. will probably far exceed the scope of the actual incident.
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.                                 54
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142. E Object Code Protection
  3143.  
  3144.  
  3145. To keep object code safe from human attackers and virus, a
  3146. variety of techniques may be employed.
  3147.  
  3148.  
  3149. Checksums. Saving the checksums of each of the system files in a
  3150.      protected area an periodically comparing the stored checksum
  3151.      with those computed from the file's current contents is a
  3152.      common and moderately effective way to detect the alteration
  3153.      of system files.
  3154. Source Comparisons. Rather than just using a checksum the
  3155.      complete files may be compared against a known set of
  3156.      sources.  This requires a greater storage commitment.
  3157.  
  3158. File Properties. Rather the computing a checksum, some facility
  3159.      store certain attributes of files.  Among these are the
  3160.      length and location on the physical disk.  While these
  3161.      characteristics are easy to preserve, the naive attacker may
  3162.      not know that they are important.
  3163.  
  3164. Read-Only Devices. Where practical, the system sources should be
  3165.      stored on a device that does not permit writing.  On many
  3166.      system disk partitions may be mounted as ``Read-Only.''
  3167. Dates. On many systems the last modification date of each file is
  3168.      stored and recent modifications of system files are reported
  3169.      to the system administrator.
  3170.  
  3171. Refresh. Some system automatically re-install system software
  3172.      onto there machines on a regular basis.  Users of TRACK
  3173.      often do this daily to assure that systems have not be
  3174.      corrupted.
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.                                 55
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199. F The Joy of Broadcast
  3200.  
  3201.  
  3202. The majority of the local area nets (LAN's) use a system called
  3203. broadcast.  It is somewhat like screaming in a crowded room.
  3204. Each person tends to try to ignore messages that weren't meant
  3205. for them.
  3206.  
  3207. In this type of environment, eaves-dropping is undetectable.
  3208. Often passwords are sent unencrypted between machines.  Such
  3209. passwords are fair game to an attacker.
  3210.  
  3211. Various cryptographic solutions including digital signature and
  3212. one time keys have been used to combat this problem.  Kerberos,
  3213. developed at the MIT Athena project is available without cost and
  3214. presents one of the few promising potential solutions to the
  3215. broadcast problem.
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.                                 56
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256. G Guest Accounts
  3257.  
  3258.  
  3259. The computer center guest policy is among the most hotly debated
  3260. topics at many computer centers.  From a security standpoint, it
  3261. should be obvious that an attacker who has access to a guest
  3262. account can break into a computer facility more easily.
  3263.  
  3264.  
  3265. G.1 Attack Difficulty Ratios
  3266.  
  3267.  
  3268. Basically it is a factor of ten easier to break into a machine
  3269. where you can easily get as far as a login prompt that one where
  3270. you can't.  Being able to reach the machine through a standard
  3271. networking discipline and open connections to the daemons is
  3272. worth another order of magnitude.  Access to a machine that is
  3273. run by the same group is worth another factor of three and access
  3274. to a machine on the same LAN would grant a factor of three beyond
  3275. that.  Having a guest account on the target machine makes the
  3276. attack still another order of magnitude easier.
  3277.  
  3278. Essentially, having a guest account on the target simplifies an
  3279. attack at least a thousand fold from having to start cold.
  3280.  
  3281.  
  3282. G.2 Individual Sponsors
  3283.  
  3284.  
  3285. I strongly suggest requiring each guest to have an individual
  3286. staff sponsor who takes responsibility for the actions of his
  3287. guest.
  3288.  
  3289.  
  3290. G.3 The No Guest Policy
  3291.  
  3292.  
  3293. In centers that prohibit guests, staff members often share their
  3294. passwords with their guests.  Since these are generally
  3295. privileged accounts, this is a significant danger.
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.                                 57
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313. H Orange Book
  3314.  
  3315.  
  3316. You have doubtlessly by now heard of the ``Orange Book'' and
  3317. perhaps of the whole rainbow series.
  3318.  
  3319. Much of the ``Orange Book'' discusses discretionary and mandatory
  3320. protection mechanism and security labeling.  Another section
  3321. deals with ``covert channels'' for data to leak out.  While most
  3322. of these issues are not important in a university, the ideas of
  3323. protecting password files (even when encrypted), individual
  3324. accountability of users and password aging are worth implementing
  3325. in an unclassified environment.
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.                                 58
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370. I Acknowledgements
  3371.  
  3372.  
  3373. -- Help of a lot of people.  -- copies were sent out to 48 people
  3374. for peer review
  3375.  
  3376.  
  3377. Jerry Carlin. For examples from his training course.
  3378. Joe Carlson. For help with spelling and grammar.
  3379.  
  3380. James Ellis. For help with organization.
  3381.  
  3382. Alan Fedeli.
  3383. Paul Holbrook. For help getting this document distributed.
  3384.  
  3385. David Muir. For help with spelling, grammar and comments about
  3386.      computer games.
  3387.  
  3388. Kevin Oberman. For help with VMS issues, spelling and grammar.
  3389. Mike Odawa. For help with the microcomputers section.
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.                                             59
  3421.  
  3422.