home *** CD-ROM | disk | FTP | other *** search
/ Internet Standards / CD1.mdf / INET / SCC / 9525 < prev    next >
Encoding:
Text File  |  1995-06-07  |  14.5 KB  |  294 lines

  1. **************************************************************************
  2. Security Bulletin 9525                 DISA Defense Communications System
  3. June 7, 1995             Published by: DDN Security Coordination Center
  4.                                       (SCC@NIC.DDN.MIL)   1-(800) 365-3642
  5.  
  6.                         DEFENSE  DATA  NETWORK
  7.                           SECURITY  BULLETIN
  8.  
  9.   The DDN SECURITY BULLETIN is distributed by the DDN SCC (Security
  10.   Coordination Center) under DISA contract as a means of communicating
  11.   information on network and host security exposures, fixes, and concerns
  12.   to security and management personnel at DDN facilities.  Back issues may
  13.   be obtained via FTP (or Kermit) from NIC.DDN.MIL [192.112.36.5]
  14.   using login="anonymous" and password="guest".  The bulletin pathname is
  15.   scc/ddn-security-yynn (where "yy" is the year the bulletin is issued
  16.   and "nn" is a bulletin number, e.g. scc/ddn-security-9428).
  17. **************************************************************************
  18.  
  19. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
  20. !                                                                       !
  21. !     The following important  advisory was  issued by the Automated    !
  22. !     Systems Security Incident Support Team (ASSIST) and is being      !
  23. !     relayed unedited via the Defense Information Systems Agency's     !
  24. !     Security Coordination Center  distribution  system  as a  means   !
  25. !     of providing  DDN subscribers with useful security information.   !
  26. !                                                                       !
  27. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
  28.  
  29. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  30.     
  31.           Automated Systems Security Incident Support Team
  32.                                                 _____
  33.              ___   ___  _____   ___  _____     |     /
  34.       /\    /   \ /   \   |    /   \   |       |    / Integritas
  35.      /  \   \___  \___    |    \___    |       |   <      et
  36.     /____\      \     \   |        \   |       |    \ Celeritas
  37.    /      \ \___/ \___/ __|__  \___/   |       |_____\
  38. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
  39.     
  40.                        Bulletin  95-23
  41.  
  42.        Release date: 6 June, 1995, 11:30 AM EDT (GMT -4)
  43.  
  44. SUBJECT: wu-ftpd Mis-configuration Vulnerability.
  45.  
  46. SUMMARY: A problem exists with certain configurations of the
  47. Washington University ftpd which may allow root access from any 
  48. account on the system.  This bulletin provides updated information
  49. to ASSIST bulletin 94-12, which can be referenced for additional
  50. background information on this problem.
  51.  
  52. BACKGROUND: Some pre-compiled wu-ftpd-2.4 binaries distributed with
  53. Linux have a vulnerable configuration.  Other users of wu-ftpd 
  54. should take this opportunity to verify the configuration of their 
  55. daemons are not vulnerable.  NOTE: Versions of wu-ftpd prior to 2.4 
  56. contain serious security vulnerabilities and should be updated 
  57. immediately.
  58.  
  59. In its original form, the vulnerability was not enabled by default. 
  60. However, certain distributions of Linux contain a wu.ftpd that has 
  61. been compiled with a vulnerable configuration.  This vulnerability 
  62. has been confirmed for Linux Slackware-2.1 and 2.2.  Other versions
  63. may also be affected.  Instructions for testing systems for the
  64. vulnerability (including non-Linux) are included in this bulletin.
  65.  
  66. The pre-compiled binaries shipped with Linux Slackware distributions
  67. are vulnerable.  The variable _PATH_EXECPATH was set to "/bin" in 
  68. the configuration file src/pathnames.h when the distribution binary 
  69. was built.  _PATH_EXECPATH should be set to "/bin/ftp-exec" or a 
  70. similar directory that does not contain a shell or command 
  71. interpreter.  The source code shipped with the Linux distributions 
  72. contains the correct value ("/bin/ftp-exec") (which should be 
  73. verified before recompiling) despite the incorrect distribution 
  74. binary.  Floppy-only distributions of Linux do not contain source
  75. code.  The latest version of the wu-ftpd source code can be 
  76. obtained from: 
  77.  
  78. ftp://wuarchive.wustl.edu/packages/wuarchive-ftpd/wu-ftpd-2.4.tar.Z 
  79.  
  80. The patch file wu-ftpd-2.4.diff.gz for Linux contains incorrect
  81. information.  This should be corrected and verified before 
  82. recompiling.  The diff(1) file exists to modify the wu-ftpd source 
  83. code to allow it to compile on Linux.  The application of this 
  84. diff(1) file patch will configure wu-ftpd with the vulnerability in
  85. place.
  86.  
  87. IMPACT: Anyone who has a local account on the system offering ftp
  88. services with the vulnerable configuration may gain root access.  
  89. Support for anonymous ftp access is not required to exploit this
  90. vulnerability.
  91.  
  92. RECOMMENDED SOLUTIONS: wu-ftpd configurations should be checked for
  93. existence of the vulnerability, and corrective action taken to
  94. immediately remove the problem if found.
  95.  
  96. Detection
  97. Vulnerable wu-ftpd configurations can be detected by executing (as 
  98. a user) the commands below or by running strings(1) against the 
  99. wu-ftpd daemon. 
  100.  
  101. A. Detection with user commands.
  102.    To test your configuration to see if you are vulnerable, you can
  103.    execute the following commands:
  104.    srchost> ftp ftphost
  105.    Connected to ftphost
  106.    220 ftphost FTP server (Version wu-2.4(2) Mon Apr 18 09:12:35
  107.       GMT+1000 1994) ready.
  108.    Name (srchost:user):
  109.    331 Password required for user.
  110.    Password:
  111.    230 User user logged in.
  112.    ftp> quote site exec echo problem
  113.    200-echo problem
  114.    200-problem
  115.    200  (end of 'echo problem')
  116.    ftp> quit
  117.    221 Goodbye.
  118.    srchost>
  119.  
  120.    If you receive the line "200-problem", then your site is
  121.    vulnerable.  Note that this does not work for anonymous ftp 
  122.    access, or for all vulnerable configurations.
  123.  
  124. B. Detection using strings(1)
  125.    Determine the location of the SITE EXEC path by executing the
  126.    following command on the src/pathnames.h file:
  127.    $ grep _PATH_EXECPATH pathnames.h
  128.    #define _PATH_EXECPATH  "/bin/ftp-exec"
  129.    $
  130.  
  131.    Use the output of this command to verify that the currently
  132.    running binary is configured the same as the source code.  Note,
  133.    you should consult your documentation for strings(1) to determine 
  134.    the correct switch for examining the entire binary:
  135.    $ strings -a wu.ftpd | grep "/bin/ftp-exec"
  136.    /bin/ftp-exec
  137.    $
  138.    If the binary contains the same pathname for _PATH_EXECPATH, then
  139.    you have determined the correct location for the SITE EXEC 
  140.    commands.  The directory defined by _PATH_EXECPATH should not 
  141.    contain a shell or command interpreter (such as perl) and should 
  142.    not be world or group writeable, nor should any directory back to 
  143.    the root directory (/) be group or world writeable.  Permissions 
  144.    511 are acceptable.
  145.  
  146. Recovery
  147.    If you have the vulnerability and you are unsure how to eliminate
  148.    it you should mmediately disable your ftp daemon until the 
  149.    configuration can be corrected.
  150.  
  151. A. Temporary workaround
  152.    If you are unsure how to rebuild a new ftpd daemon, then an
  153.    interim workaround is to disable the existing service.  Note: This 
  154.    will cause all incoming ftp requests to fail.
  155.    1.  become root
  156.    2.  comment out ftp in /etc/inetd.conf by inserting a "#" at the
  157.    beginning of the ftp line,  ie: 
  158.    #ftp     stream  tcp     <rest of normal ftp line here>
  159.    3.  Restart the inetd process.  On most systems, this is done by
  160.    sending a HUP signal to the inetd process.  For example:
  161.    On System V systems
  162.    # /bin/ps -ef | grep inetd | grep -v grep
  163.                         or
  164.    On BSD systems
  165.    # /bin/ps -aux | grep inetd | grep -v grep
  166.    followed by:
  167.    # kill -HUP  <pid gained by above line>
  168.    You should verify that the ftp service has been disabled by
  169.    attempting to connect to it.  You should see a "connection 
  170.    refused" message.
  171.  
  172. B. Correcting the vulnerable configuration.
  173.    Ensure that the _PATH_EXECPATH definition in src/pathnames.h is
  174.    "/bin/ftp-exec" and not "/bin" or any other system directory
  175.    containing a shell or interpreter, and then recompile.  If the 
  176.    wu-ftpd-2.4.diff.gz patch has been applied on Linux systems, the
  177.    patched version of pathnames.h will be vulnerable.  This file
  178.    should be edited manually before the rebuild to correct the 
  179.    _PATH_EXECPATH definition to "/bin/ftp-exec".  Replace the 
  180.    existing ftpd binary with the newly built version.
  181.  
  182. C. Instructions to enable SITE EXEC
  183.    Once the running binary has been confirmed as not containing the
  184.    vulnerable configuration, the SITE EXEC commands can be enabled
  185.    through the following procedure.
  186.    1.  Ensure that the _PATH_EXECPATH definition in pathnames.h is
  187.    "/bin/ftp-exec" and not "/bin" or any other system directory
  188.    containing a shell.  This should also be checked in the binary
  189.    version (see "Detection B" section above).
  190.    2.  Create ~ftp/bin/ftp-exec.  This should be owned by root,
  191.    permissions set to 555.
  192.    3.  Copy the statically linked binaries that you want available
  193.    for execution by SITE EXEC into the ~ftp/bin/ftp-exec directory.
  194.    These should be owned by root with  permissions set as 111.  The 
  195.    binaries should never be a shell or command interpreter that 
  196.    allows arbitrary programs to be run.
  197.    4.  If you want the DIR ftp command, you will need a hard link
  198.    from ~ftp/bin/ls to ~ftp/bin/ftp-exec/ls or a copy of ls in
  199.    ~ftp/bin.
  200.  
  201.    The instructions above enable SITE EXEC commands for anonymous
  202.    users only.  To enable SITE EXEC commands for normal ftp users:
  203.    5.  Create a symbolic link from /bin/ftp-exec to 
  204.    ~ftp/bin/ftp-exec.
  205.  
  206.    You should follow file ownership, group membership and 
  207.    permissions strictly according to your documentation.  Note that 
  208.    some versions of ftp contain incorrect information for setting 
  209.    file permissions and ownership.  Further information can be 
  210.    found in:
  211.     
  212.    ftp://assist.mil/pub/general.info/securing.info.servers
  213.  
  214. ASSIST would like to thank the AUSCERT for information contained in
  215. this bulletin.   
  216.  
  217. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  218.  
  219. ASSIST is an element of the Defense Information Systems Agency 
  220. (DISA), Center for Information Systems Security (CISS), that 
  221. provides service to the entire DoD community. Constituents 
  222. of the DoD with questions about ASSIST or computer security 
  223. security issues, can contact ASSIST using one of the methods
  224. listed below.  Non-DoD organizations/institutions, contact
  225. the Forum of Incident Response and Security Teams (FIRST)
  226. (FIRST) representative.  To obtain a list of FIRST member
  227. organizations and their constituencies send an email to
  228. docserver@first.org with an empty "subject" line and a message body
  229. containing the line "send first-contacts".
  230.  
  231. ASSIST Information Resources: To be included in the distribution
  232. list for the ASSIST bulletins, send your Milnet (Internet) e-mail
  233. address to assist-request@assist.mil.  Back issues of ASSIST 
  234. bulletins, and other security related information, are available
  235. from the ASSIST BBS at 703-607-4710, DSN 327-4710, and through 
  236. anonymous FTP from assist.mil (IP address 199.211.123.11).  Note: 
  237. assist.mil will only accept anonymous FTP connections from Milnet 
  238. addresses that are registered with the NIC or DNS.  If your system 
  239. is not registered, you must provide your MILNET IP address to ASSIST 
  240. before access can be provided.
  241.  
  242. ASSIST Contact Information: 
  243. PHONE: 800-357-4231 (or 703-756-7974 DSN 289), duty hours are 06:00
  244. to 22:30 EDT (GMT -4) Monday through Friday.  During off duty hours, 
  245. weekends and holidays, ASSIST can be reached via pager at 800-791-
  246. 4857.  The page will be answered within 30 minutes, however if a 
  247. quicker response is required, prefix the phone number with "999".
  248. ELECTRONIC MAIL: Send to assist@assist.mil. 
  249. ASSIST BBS: Leave a message for the "sysop". 
  250.  
  251. Reference herein to any specific commercial product, process, or
  252. service by trade name, trademark manufacturer, or otherwise, does
  253. not constitute or imply its endorsement, recommendation, or
  254. favoring by ASSIST.  The views and opinions of authors expressed
  255. herein shall not be used for advertising or product endorsement
  256. purposes. 
  257.  
  258. ****************************************************************************
  259. *                                                                          *
  260. *    The point of contact for MILNET security-related incidents is the     *
  261. *    Security Coordination Center (SCC).                                   *
  262. *                                                                          *
  263. *               E-mail address: SCC@NIC.DDN.MIL                            *
  264. *                                                                          *
  265. *               Telephone: 1-(800)-365-3642                                *
  266. *                                                                          *
  267. *    NIC Help Desk personnel are available from 7:00 a.m.-7:00 p.m. EST,   *
  268. *    Monday through Friday except on federal holidays.                     *
  269. *                                                                          *
  270. ****************************************************************************
  271.  
  272. PLEASE NOTE: Some users outside of the DOD computing communities may receive
  273. DDN Security bulletins.  If you are not part of  the DOD community, please
  274. contact your agency's incident response team to report incidents.  Your 
  275. agency's team will coordinate with DOD.  The Forum of Incident Response and
  276. Security Teams (FIRST) is a world-wide organization.  A list of FIRST member
  277. organizations and their constituencies can be obtained by sending email to
  278. docserver@first.org with an empty subject line and a message body containing
  279. the line: send first-contacts.
  280.  
  281. This document was prepared as an service to the DOD community.  Neither the 
  282. United States Government nor any of their employees, makes any warranty, 
  283. expressed or implied, or assumes any legal liability or responsibility for 
  284. the accuracy, completeness, or usefulness of any information, product, or 
  285. process disclosed, or represents that its use would not infringe privately 
  286. owned rights.  Reference herein to any specific commercial products, process,
  287. or service by trade name, trademark manufacturer, or otherwise, does not 
  288. necessarily constitute or imply its endorsement, recommendation, or favoring
  289. by the United States Government.  The opinions of the authors expressed herein
  290. do not necessarily state or reflect those of the United States Government,
  291. and shall not be used for advertising or product endorsement purposes.
  292.  
  293.  
  294.