home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / general / cert0063.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  12.4 KB  |  272 lines

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. ===========================================================================
  5. CA-93:10                        CERT Advisory
  6.                      July 14, 1993
  7.                             Anonymous FTP Activity
  8.  
  9. - ---------------------------------------------------------------------------
  10.  
  11. The CERT Coordination Center has been receiving a continuous stream of 
  12. reports from sites that are experiencing unwanted activities within their 
  13. anonymous FTP areas.  We recognize that this is not a new problem, and we 
  14. have been striving to handle requests for assistance on a one-to-one basis 
  15. with the reporting administrator. However, since this activity does not seem 
  16. to be diminishing, CERT believes that a broad distribution of information 
  17. concerning this problem and corresponding solution suggestions should help 
  18. to address the widespread nature of this activity.
  19.  
  20. We are seeing three types of activity regarding anonymous FTP areas.
  21.  
  22.    A. Improper configurations leading to system compromise.
  23.  
  24.    B. Excessive transfer of data causing deliberate over-filling of
  25.       disk space thus leading to denial of service.
  26.  
  27.    C. Use of writable areas to transfer copyrighted software and other
  28.       sensitive information.
  29.  
  30. This advisory provides an updated version of the anonymous FTP configuration
  31. guidelines that is available from CERT.  The purpose of these guidelines is
  32. to assist system administrators at sites that offer anonymous FTP services.
  33. These guidelines are intended to aid a system administrator in configuring
  34. anonymous FTP capabilities so as to minimize unintended use of services or
  35. resources.  Systems administrators should be aware that anonymous FTP
  36. capabilities should be configured and managed according to the policies
  37. established for their site.
  38.  
  39. You may obtain future copies of these guidelines through anonymous FTP from
  40. cert.org in /pub/tech_tips/anonymous_ftp.
  41.  
  42. - ---------------------------------------------------------------------------
  43.  
  44.  
  45.         ANONYMOUS FTP CONFIGURATION GUIDELINES
  46.  
  47. Anonymous FTP can be a valuable service if correctly configured and
  48. administered. The first section of this document provides general guidance in
  49. initial configuration of an anonymous FTP area.  The second section addresses
  50. the issues and challenges involved when a site wants to provide writable
  51. directories within their anonymous FTP areas. The third section provides
  52. information about previous CERT advisories related to FTP services.
  53.  
  54. The following guidelines are a set of suggested recommendations that have been
  55. beneficial to many sites. CERT recognizes that there will be sites that have
  56. unique requirements and needs, and that these sites may choose to implement
  57. different configurations.
  58.  
  59. I.  Configuring anonymous FTP
  60.  
  61.     A. FTP daemon
  62.  
  63.        Sites should ensure that they are using the most recent version
  64.        of their FTP daemon.
  65.  
  66.     B. Setting up the anonymous FTP directories
  67.  
  68.        The anonymous FTP root directory (~ftp) and its subdirectories 
  69.        should not be owned by the ftp account or be in the same group as
  70.        the ftp account.  This is a common configuration problem.  If any of 
  71.        these directories are owned by ftp or are in the same group as the 
  72.        ftp account and are not write protected, an intruder will be able to 
  73.        add files (such as a .rhosts file) or modify other files.  Many sites
  74.        find it acceptable to use the root account.  Making the ftp root 
  75.        directory and its subdirectories owned by root, part of the system 
  76.        group, and protected so that only root has write permission will help 
  77.        to keep your anonymous FTP service secure.
  78.  
  79.        Here is an example of an anonymous FTP directory setup:
  80.  
  81.            drwxr-xr-x  7   root    system  512 Mar 1       15:17 ./
  82.            drwxr-xr-x 25   root    system  512 Jan 4       11:30 ../
  83.            drwxr-xr-x  2   root    system  512 Dec 20      15:43 bin/
  84.            drwxr-xr-x  2   root    system  512 Mar 12      16:23 etc/
  85.            drwxr-xr-x 10   root    system  512 Jun 5       10:54 pub/
  86.  
  87.        Files and libraries, especially those used by the FTP daemon and
  88.        those in ~ftp/bin and ~ftp/etc, should have the same protections
  89.        as these directories.  They should not be owned by ftp or be in the 
  90.        same group as the ftp account; and they should be write protected.
  91.  
  92.     C. Using proper password and group files
  93.  
  94.        We strongly advise that sites not use the system's /etc/passwd file as 
  95.        the password file or the system's /etc/group as the group file in the 
  96.        ~ftp/etc directory.  Placing these system files in the ~ftp/etc 
  97.        directory will permit intruders to get a copy of these files. 
  98.        These files are optional and are not used for access control.
  99.  
  100.        We recommend that you use a dummy version of both the ~ftp/etc/passwd 
  101.        and ~ftp/etc/group files. These files should be owned by root. The
  102.        dir command uses these dummy versions to show owner and group
  103.        names of the files and directories instead of displaying arbitrary 
  104.        numbers.
  105.  
  106.        Sites should make sure that the ~/ftp/etc/passwd file contains no 
  107.        account names that are the same as those in the system's /etc/passwd 
  108.        file.  These files should include only those entries that are relevant 
  109.        to the FTP hierarchy or needed to show owner and group names. In 
  110.        addition, ensure that the password field has been cleared.  The 
  111.        examples below show the use of asterisks (*) to clear the password 
  112.        field.
  113.  
  114.        Below is an example of a passwd file from the anonymous FTP area on
  115.        cert.org:
  116.  
  117.            ssphwg:*:3144:20:Site Specific Policy Handbook Working Group::
  118.            cops:*:3271:20:COPS Distribution::
  119.            cert:*:9920:20:CERT::
  120.            tools:*:9921:20:CERT Tools::
  121.            ftp:*:9922:90:Anonymous FTP::
  122.            nist:*:9923:90:NIST Files::
  123.  
  124.        Here is an example group file from the anonymous FTP area on cert.org:
  125.  
  126.            cert:*:20:
  127.            ftp:*:90:
  128.  
  129.  
  130. II. Providing writable directories in your anonymous FTP configuration
  131.  
  132.     There is a risk to operating an anonymous FTP service that permits 
  133.     users to store files.  CERT strongly recommends that sites do not 
  134.     automatically create a "drop off" directory unless thought has been 
  135.     given to the possible risks of having such a service.  CERT has received 
  136.     many reports where these directories have been used as "drop off" 
  137.     directories to distribute bootlegged versions of copyrighted software or 
  138.     to trade information on compromised accounts and password files.  CERT 
  139.     has also received numerous reports of files systems being maliciously 
  140.     filled causing denial of service problems.  
  141.  
  142.     This section discusses three ways to address these problems. The first is 
  143.     to use a modified FTP daemon. The second method is to provide restricted 
  144.     write capability through the use of special directories. The third method
  145.     involves the use of a separate directory.
  146.  
  147.     A. Modified FTP daemon
  148.  
  149.        If your site is planning to offer a "drop off" service, CERT suggests 
  150.        using a modified FTP daemon that will control access to the "drop off" 
  151.        directory.  This is the best way to prevent unwanted use of writable
  152.        areas. Some suggested modifications are:
  153.  
  154.        1. Implement a policy where any file dropped off cannot 
  155.           be accessed until the system manager examines the file 
  156.           and moves it to a public directory.
  157.        2. Limit the amount of data transferred in one session.
  158.        3. Limit the overall amount of data transferred based on 
  159.           available disk space.
  160.        4. Increase logging to enable earlier detection of abuses.
  161.  
  162.        For those interested in modifying the FTP daemon, source code is 
  163.        usually available from your vendor. Public domain sources are 
  164.        available from:
  165.  
  166.           wuarchive.wustl.edu   ~ftp/packages/wuarchive-ftpd
  167.           ftp.uu.net            ~ftp/systems/unix/bsd-sources/libexec/ftpd
  168.           gatekeeper.dec.com    ~ftp/pub/DEC/gwtools/ftpd.tar.Z
  169.  
  170.        The CERT Coordination Center has not formally reviewed, evaluated, 
  171.        or endorsed the FTP daemons described.  The decision to use the FTP 
  172.        daemons described is the responsibility of each user or organization, 
  173.        and we encourage each organization to thoroughly evaluate these 
  174.        programs before installation or use. 
  175.  
  176.     B. Using protected directories
  177.  
  178.        If your site is planning to offer a "drop off" service and is unable 
  179.        to modify the FTP daemon, it is possible to control access by using a 
  180.        maze of protected directories.  This method requires prior coordination
  181.        and cannot guarantee protection from unwanted use of the writable FTP 
  182.        area, but has been used effectively by many sites.
  183.  
  184.        Protect the top level directory (~ftp/incoming) giving only execute 
  185.        permission to the anonymous user (chmod 751 ~ftp/incoming).  This will 
  186.        permit the anonymous user to change directory (cd), but will not allow 
  187.        the user to view the contents of the directory.
  188.  
  189.        drwxr-x--x  4   root    system  512 Jun 11      13:29 incoming/
  190.  
  191.        Create subdirectories in the ~ftp/incoming using names known only 
  192.        between your local users and the anonymous users that you want to 
  193.        have "drop off" permission.  The same care used in selecting passwords
  194.        should be taken in selecting these subdirectory names because the 
  195.        object is to choose names that cannot be easily guessed.  Please do not
  196.        use our example directory names of jAjwUth2 and MhaLL-iF.
  197.  
  198.            drwxr-x-wx 10   root    system  512 Jun 11      13:54 jAjwUth2/
  199.            drwxr-x-wx 10   root    system  512 Jun 11      13:54 MhaLL-iF/
  200.  
  201.        This will prevent the casual anonymous FTP user from writing files in 
  202.        your anonymous FTP file system.  It is important to realize that this 
  203.        method does not protect a site against the result of intentional or 
  204.        accidental disclosure of the directory names.  Once a directory name 
  205.        becomes public knowledge, this method provides no protection at all 
  206.        from unwanted use of the area.  Should a name become public, a site 
  207.        may choose to either remove or rename the writable directory.
  208.  
  209.     C. Using a single disk drive
  210.  
  211.        If your site is planning to offer a "drop off" service and is
  212.        unable to modify the FTP daemon, it may be desirable to limit
  213.        the amount of data transferred to a single file system mounted
  214.        as ~ftp/incoming.
  215.  
  216.        If possible, dedicate a disk drive and mount it as ~ftp/incoming.
  217.        If this dedicated disk becomes full, it will not cause a denial
  218.        of service problem.
  219.  
  220.        The system administrator should monitor this directory (~ftp/incoming)
  221.        on a continuing basis to ensure that it is not being misused.
  222.  
  223.  
  224. III. Related CERT Advisories
  225.  
  226.     The following CERT Advisories directly relate to FTP daemons or impact
  227.     on providing FTP service:
  228.  
  229.         CA-93:06.wuarchive.ftpd.vulnerability
  230.         CA-92:09.AIX.anonymous.ftp.vulnerability
  231.         CA-88:01.ftpd.hole
  232.  
  233.     Past advisories are available for anonymous FTP from cert.org.
  234.  
  235.  
  236. Copyright (c) Carnegie Mellon University 1993
  237.  
  238.  
  239.  
  240. - ---------------------------------------------------------------------------
  241.  
  242.  
  243. If you believe that your system has been compromised, contact the CERT
  244. Coordination Center or your representative in FIRST (Forum of Incident
  245. Response and Security Teams).
  246.  
  247. Internet E-mail: cert@cert.org
  248. Telephone: 412-268-7090 (24-hour hotline)
  249.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  250.            and are on call for emergencies during other hours.
  251.  
  252. CERT Coordination Center
  253. Software Engineering Institute
  254. Carnegie Mellon University
  255. Pittsburgh, PA 15213-3890
  256.  
  257. Past advisories, information about FIRST representatives, and other information
  258. related to computer security are available for anonymous FTP from cert.org
  259. (192.88.209.5).
  260.  
  261.  
  262. -----BEGIN PGP SIGNATURE-----
  263. Version: 2.6.2
  264.  
  265. iQCVAwUBMaMxOXVP+x0t4w7BAQF1KQP/dLEQ4tblb4HXzm0wuiWDx91Dvp2X8y9I
  266. /JDcuofzoulclefMIN2cJKju9qAoIpVbnsxFjwetGOOyqIXEcNc5peQTzVPUnYcM
  267. 1XGY0fdwPm3bRvTG1P44Q/i4UUP5h51S6cvP1JNaw+IsDTgGjxU5VWWH2p7ryLuf
  268. 8IzRjT8jTo8=
  269. =MNst
  270. -----END PGP SIGNATURE-----
  271.  
  272.