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

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT(sm) Advisory CA-96.14
  6. Original issue date: July 24, 1996
  7. Last revised:  November 27, 1996
  8.            Updated Sun patch information. 
  9.  
  10.               Information previously in the README was inserted into the
  11.                advisory.
  12.  
  13.               A complete revision history is at the end of this file.
  14.  
  15. Topic: Vulnerability in rdist
  16. - -----------------------------------------------------------------------------
  17.  
  18.           *** This advisory supersedes CA-91:20 and CA-94:04. ***
  19.  
  20. The CERT Coordination Center has received reports that a new vulnerability
  21. in rdist has been found and an exploitation script is widely available.
  22. Current reports indicate that the script works on x86-based versions of the
  23. UNIX Operating System; however, we believe that it would not be difficult to
  24. write variants that work on other instruction sets and configurations.
  25.  
  26. The CERT/CC Staff recommends following the steps in Section III.A. to
  27. determine if your system is vulnerable and to disable vulnerable programs,
  28. then following your vendor's instructions (Section III.B and Appendix A).
  29. Until you can install a vendor patch, you may want to install a freely
  30. available version of rdist, noted in Section III.C.
  31.  
  32. We will update this advisory as we receive additional information.
  33. Please check advisory files regularly for updates that relate to your site.
  34.  
  35. - -----------------------------------------------------------------------------
  36.  
  37. I.   Description
  38.  
  39.      The rdist program is a UNIX Operating System utility used to distribute
  40.      files from one host to another. On most systems, rdist is installed as
  41.      set-user-id root, a necessity due to its design. Unfortunately, this
  42.      setting makes it a favorite target for vulnerability investigation.
  43.  
  44.      A new vulnerability in rdist has been discovered and reported. The
  45.      vulnerability lies in the lookup() subroutine where the value of a
  46.      command line argument is used to overflow the subroutine call stack.
  47.      If that argument is specially crafted with native machine code,
  48.      lookup() returns control to the code added to the call stack instead of
  49.      the subroutine that called lookup(). If, for example, this added code
  50.      uses a member of the exec system call family and names /bin/sh as the
  51.      program to be executed, that shell is then run with set-user-id root
  52.      privileges. No matter what code is added, the code runs with
  53.      set-user-id root privileges.
  54.  
  55.      An exploitation program, which is circulating on the Internet, takes
  56.      advantage of this vulnerability. While it purports to work only on
  57.      x86-based versions of the UNIX Operating System, variants tuned to other
  58.      instruction sets and configurations are straightforward to write.
  59.  
  60. II.  Impact
  61.  
  62.      On unpatched systems, anyone with access to a local account can gain root
  63.      access.
  64.  
  65. III. Solution
  66.  
  67.      We urge you to follow the steps in Section A to determine if your system
  68.      is potentially vulnerable and, if it is, to turn off rdist while you
  69.      decide how to proceed.
  70.  
  71.      If you need the functionality that rdist provides, install a vendor
  72.      patch (Sec. B). Until you can do so, you may want to install a freely
  73.      available version of rdist that does not need to be installed as
  74.      set-user-id root and is, therefore, not susceptible to the exploitation
  75.      described in this advisory (Sec. C).
  76.  
  77.      A. How to determine if your system is vulnerable
  78.  
  79.         To determine if a system is vulnerable and to disable the programs
  80.         that are believed to be vulnerable, use the following find command or
  81.         a variant. Consult your local system documentation to determine how to
  82.         tailor the find program on your system.
  83.  
  84.         You will need to run the find command on each system you maintain
  85.         because the command examines files on the local disk only. Substitute
  86.         the names of your local file systems for FILE_SYSTEM_NAMES in the
  87.         example. Example local file system names are /, /usr, and /var.
  88.         You must do this as root.
  89.  
  90.         Note that this is one long command, though we have separated
  91.         it onto two lines using a back-slash.
  92.  
  93.              find FILE_SYSTEM_NAMES -xdev -type f -user root \
  94.                     -name rdist -perm -04000 -print -ok chmod u-s '{}' \;
  95.  
  96.         This command will find all files on a system that are
  97.             - only in the file system you name (FILE_SYSTEM_NAMES -xdev)
  98.             - regular files (-type f)
  99.             - owned by root (-user root)
  100.             - named rdist
  101.             - setuid (-perm -04000)
  102.  
  103.         Once found, those files will
  104.             - have their names printed (-print)
  105.             - have the setuid mode removed, but only if you type `y'
  106.               in response to the prompt (-ok chmod u-s '{}' \;)
  107.  
  108.      B. Obtain and install the appropriate patch
  109.  
  110.         Below is a list of vendors who have provided information.
  111.         Details are in Appendix A of this advisory. We will update the
  112.         advisory as we receive more information.
  113.  
  114.              Berkeley Software Design, Inc.
  115.              Data General Corporation
  116.              Digital Equipment Corporation
  117.              FreeBSD, Inc.
  118.              Hewlett-Packard Company
  119.              IBM Corporation
  120.              Linux
  121.              NEC Corporation
  122.              The Santa Cruz Operation
  123.              Sequent Computer Systems
  124.              Silicon Graphics, Inc.
  125.              Sun Microsystems, Inc.
  126.  
  127.         If your vendor's name is not on this list, please contact the
  128.         vendor directly.
  129.  
  130.  
  131.      C.  If you need the functionality that rdist provides but a patched
  132.          version is not yet available from your vendor, consider installing
  133.          rdist-6.1.3, which is freely available from
  134.  
  135.               ftp://usc.edu/pub/rdist/rdist-6.1.3.tar.gz
  136.  
  137.               MD5 (rdist-6.1.3.tar.gz) = 8a76b880b023c5e648b7cb77b9608b9f
  138.  
  139.          The README file in the distribution explains how to configure
  140.          and install this version of rdist.
  141.  
  142.          We strongly recommend that you configure this version of rdist to use
  143.          rsh instead of rcmd. Here is the relevant text from the README:
  144.  
  145.             By default rdist uses rsh(1c) to make connections to remote
  146.             hosts. This has the advantage that rdist does not need to be
  147.             setuid to "root". This eliminates most potential security
  148.             holes. It has the disadvantage that it takes slightly more time
  149.             for rdist to connect to a remote host due to the added overhead
  150.             of doing a fork() and then running the rsh(1c) command.
  151.  
  152.          For versions of rdist V6 prior to 6.1.3: If you compile rdist with
  153.          -DDIRECT_RCMD *and* you run rdist setuid to root, you are vulnerable
  154.          to the problem described in this advisory. You need to update to
  155.          rdist version 6.1.3.
  156.  
  157.          Note that by default, rdist V6 is distributed to compile without
  158.          -DDIRECT_RCMD and not run setuid to root. If you have previously
  159.          built version 6.X of rdist with the -DDIRECT_RCMD directive added to
  160.          the $(DEFS_LOCAL) and set "RDIST_MODE = 4555" in "Makefile.local", we
  161.          recommend that you first disable this version with the find command
  162.          given in Section III.A above, then either rebuild rdist with its
  163.          default settings or upgrade to 6.1.3.
  164.  
  165.  
  166. .........................................................................
  167. Appendix A: Vendor Information
  168.  
  169. Below is information we have received from vendors concerning the
  170. vulnerability described in this advisory. If you do not see your vendor's
  171. name, please contact the vendor directly for information.
  172.  
  173.  
  174. Berkeley Software Design, Inc.
  175. ==============================
  176.  
  177.         BSD/OS is vulnerable to this problem.
  178.  
  179.         BSDI has released a patch for rdist in BSD/OS V2.1.
  180.  
  181.         Sites using the non-kerberized rdist should install patch
  182.         U210-018, which is available from the patches@bsdi.com
  183.         mailback server and also from:
  184.  
  185.             ftp://ftp.bsdi.com/bsdi/patches/patches-2.1/U210-018
  186.  
  187.         md5 checksum: 86005d8bbb67eb737120741bd254d26a U210-018
  188.  
  189.         Domestic licensees that are using the Kerberos package
  190.         should install patch D210-018 from the patches@bsdi.com
  191.         mailback server (this patch is available only to domestic
  192.         licensees because of US export restrictions on crypto
  193.         software). Be sure to install only the appropriate patch.
  194.  
  195.         md5 checksum: b2060ec4eb9b18ace4e76bcb9441353f D210-018
  196.  
  197. Data General Corporation
  198. ========================
  199.  
  200.         Data General does not provide a version of rdist as part of the
  201.         standard release of DG/UX. Rdist is available as contributed
  202.         software which is not supported by Data General. This problem will
  203.         be fixed in the next release of the contributed software package.
  204.  
  205.  
  206. Digital Equipment Corporation
  207. =============================
  208. #96.0329A
  209.  
  210. SOURCE:
  211.  
  212.    Digital Equipment Corporation
  213.    Software Security Response Team
  214.  
  215.    Copyright (c) Digital Equipment Corporation 1996. All rights reserved.
  216.  
  217.  
  218. SUMMARY PATCH-ID INFORMATION:
  219.          The  rdist patch-id's identified in this advisory will not be
  220.          applicable to versions previous to those identified in the
  221.          OP/SYS identified for each patch.
  222. *****
  223. NOTE*  (1) These patch's must be applied if an update or installation
  224. *****      is performed thru V3.2c of Digital UNIX
  225.        (2) The solutions have been included in releases of Digital UNIX
  226.            after V3.2c
  227.  
  228. TITLES:
  229.  
  230.         OSF_V2_0     (Patch ID: OSFV20-244-1>
  231.         OSF_V3_0     (Patch ID: OSF300-242)
  232.         OSF_V3_0B    (Patch ID: OSF305-300242)
  233.         OSF_V3_2     (Patch ID: OSF320-184)
  234.         OSF_V3_2B    (Patch ID: OSF325-320184)
  235.         OSF_V3_2C    (Patch ID: OSF350-061)
  236.  
  237.  
  238. PATCH AVAILABILITY:
  239.          Software service contract or warranty customers may obtain
  240.          the patched rdist through normal Digital support channels, via
  241.          AES (Advanced Electronic Services). These patch's are available
  242.          from the remedial patch stream for the versions identified
  243.          above and may be found in the applicable versions readme
  244.          files.
  245.  
  246.                 ftp://ftp.service.digital.com/public/osf
  247.  
  248.  
  249.          Please refer to applicable Release Note information prior
  250.          to upgrading your installation.
  251.  
  252.   Note:  Non-contract/non-warranty customers should contact
  253.          local Digital support channels for information
  254.          regarding these patch's.
  255.  
  256.  
  257.          As always, Digital urges you to periodically review your
  258.          system management and security procedures. Digital will
  259.          continue to review and enhance the security features of its
  260.          products and work with customers to maintain and improve the
  261.          security and integrity of their systems.
  262.  
  263. 7/23/96                                  - DIGITAL EQUIPMENT CORPORATION
  264.  
  265.  
  266. FreeBSD, Inc.
  267. =============
  268.  
  269.         Versions affected:
  270.                 FreeBSD 2.0, 2.0.5, 2.1, 2.1-stable, and 2.2-current
  271.         Versions corrected:
  272.                 2.1-stable and 2.2-current as of 1996-07-11
  273.         Workaround:
  274.                 As root, execute the commands:
  275.  
  276.                         # chflags noschg /usr/bin/rdist
  277.                         # chmod u-s,go-rx /usr/bin/rdist
  278.  
  279.         Patches:
  280.                 ftp://freebsd.org/pub/CERT/patches/SA-96:16/
  281.  
  282.         For more information:
  283.                 ftp://freebsd.org/pub/CERT/advisories/SA-96:16/
  284.  
  285.  
  286. Hewlett-Packard Company
  287. =======================
  288.  
  289.    The rdist vulnerability can be eliminated from releases 10.0,
  290.    10.01, 10.10, and 10.20 of HP-UX by applying the patches mentioned
  291.    below.  HP-UX releases prior to 10.X and after 10.20 (i.e., 10.30)
  292.    are not vulnerable.  HP/UX 9.X is not vulnerable.
  293.  
  294.    Apply patches PHNE_8107 (series 700/800, HP-UX 10.00 & 10.01)
  295.              and PHCO_7798 (series 700/800, HP_UX 10.00 & 10.01)
  296.         or patch PHNE_7919 (series 700/800, HP-UX 10.10)
  297.                  PHNE_7920 (series 700/800, HP-UX 10.20)
  298.  
  299.    All patches are available now, except PHNE_7920 which
  300.    will be available after 8 August.
  301.  
  302.    See HEWLETT-PACKARD SECURITY BULLETIN: HPSBUX9608-036, 08 Aug 96
  303.    for more details.
  304.  
  305.  
  306. IBM Corporation
  307. ===============
  308.  
  309.    AIX is vulnerable to this problem. Fixes are in process but are
  310.    not yet available. The APAR numbers for the fixes are given below.
  311.    In the meantime, we recommend removing the setuid bit from the
  312.    /usr/bin/rdist program.
  313.  
  314.   To remove the setuid bit, follow these instructions.
  315.  
  316.      As the root user, type:
  317.  
  318.         chmod u-s /usr/bin/rdist
  319.  
  320.   AIX 3.2
  321.   -------
  322.     Apply the following fix to your system:
  323.  
  324.         APAR - IX59741
  325.  
  326.   AIX 4.1
  327.   -------
  328.     Apply the following fix to your system:
  329.  
  330.         APAR - IX59742
  331.  
  332.     To determine if you have this APAR on your system, run the following
  333.     command:
  334.  
  335.        instfix -ik IX59742
  336.  
  337.   AIX 4.2
  338.   -------
  339.     Apply the following fix to your system:
  340.  
  341.         APAR - IX59743
  342.  
  343.     To determine if you have this APAR on your system, run the following
  344.     command:
  345.  
  346.        instfix -ik IX59743
  347.  
  348.   To Order
  349.   --------
  350.     APARs may be ordered using FixDist or from the IBM Support Center.
  351.     For more information on FixDist, reference URL:
  352.  
  353.       http://service.software.ibm.com/aixsupport/
  354.  
  355.     or send e-mail to aixserv@austin.ibm.com with a subject of "FixDist".
  356.  
  357.   IBM and AIX are registered trademarks of International Business Machines
  358.   Corporation.
  359.  
  360.  
  361. Linux
  362. =====
  363.  
  364.     Almost all Linux distributions ship with rdist non setuid.
  365.     If you have changed your rdist to run setuid you are probably
  366.     vulnerable.
  367.  
  368.  
  369. NEC Corporation
  370. ===============
  371.  
  372.     EWS-UX/V(Rel4.2)     not vulnerable
  373.  
  374.     EWS-UX/V(Rel4.2MP)   not vulnerable
  375.  
  376.     UP-UX/V(Rel4.2MP)    not vulnerable
  377.  
  378.     UX/4800              not vulnerable
  379.  
  380.  
  381. The Santa Cruz Operation
  382. ========================
  383.  
  384.     The following releases of SCO Software are known to contain a version of
  385.     rdist that is vulnerable:
  386.  
  387.     SCO OpenServer 5.0.2, 5.0.0
  388.     SCO Internet FastStart 1.0
  389.  
  390.     SCO Open Server Enterprise/Network System 2.0, 3.0
  391.     SCO Open Desktop 2.0, 3.0
  392.     SCO Open Desktop Lite 3.0
  393.  
  394.     SCO UnixWare 2.0, 2.1
  395.  
  396.     SCO TCP/IP 1.2.0, 1.2.1
  397.  
  398.     Patches are being developed for the following releases:
  399.  
  400.     SCO OpenServer 5.0.2, 5.0.0
  401.     SCO Internet FastStart 1.0
  402.     SCO UnixWare 2.1
  403.  
  404.  
  405. Sequent Computer Systems
  406. ========================
  407.  
  408.     Sequent systems do not ship with rdist.
  409.  
  410.  
  411. Silicon Graphics, Inc.
  412. ======================
  413.  
  414.     All SGI IRIX versions of rdist are not vulnerable.
  415.     No action is required.
  416.  
  417.     (When using the find command on SGI IRIX systems, use -mount
  418.     instead of - -xdev. The latter is not supported on SGI IRIX
  419.     systems.)
  420.  
  421.  
  422. Sun Microsystems, Inc.
  423. ======================
  424.  
  425. The following patches correct the rdist vulnerability (Sun bug id 1258139),
  426. described in this advisory, on systems running Solaris 1.x or 2.x.
  427.  
  428. Architecture   SunOS    Solaris   Patch     MD5 checksum for rdist binary
  429. - ---------------------------------------------------------------------------
  430. SPARC          4.1.3     1.1    100383-07  5F2C2B782881FE18D2737B5FA0AEC489
  431.                4.1.3_U1  1.1.1  103823-01  B330358F4E66CD544B9B60AF453C5F2B
  432.                4.1.4     1.1.2  103824-02  419369cc4b3514a9c12b4cdac207fde7
  433.                5.3       2.3    101494-02  1DD34E9E7C50B2C863E30D67DFD1A905
  434.                5.4       2.4    103813-01  90DD81A4C32F7D583737F171B821386B
  435.                5.5       2.5    103815-01  C3BBE3F6758B0BBA7D45CB05009ED80E
  436.                5.5.1     2.5.1  103817-01  89735351119896FEB7469DCA76788561
  437.  
  438. X86            5.4       2.4    103814-01  EE4509D9CF87DBD29ABB7A72C8330F89
  439.                5.5       2.5    103816-01  3363670F316A06803ECCDD9FFAE95126
  440.                5.5.1     2.5.1  103818-01  8C2E8CFDE7A2AE6D5EC89139D592E71C
  441.  
  442. PowerPC        5.5.1     2.5.1  103819-01  C3FC0E54B23E4209496A4735D09DFFEF
  443.  
  444. These patches will be available through your local SunService and SunSoft
  445. Support Services organizations by 9:00 PDT Wednesday, July 24. They will
  446. also be available at the same time from SunSolve Online, via the URL
  447. http://sunsolve1.sun.com.
  448.  
  449.  
  450.  
  451. - ---------------------------------------------------------------------------
  452. The CERT Coordination Center staff thanks Michael Cooper
  453. (Michael.Cooper@Sun.Com) for his work on resolving this problem. He is the
  454. maintainer of the publicly available version of rdist.
  455. - ---------------------------------------------------------------------------
  456.  
  457. If you believe that your system has been compromised, contact the CERT
  458. Coordination Center or your representative in the Forum of Incident
  459. Response and Security Teams (FIRST).
  460.  
  461. We strongly urge you to encrypt any sensitive information you send by email.
  462. The CERT Coordination Center can support a shared DES key and PGP. Contact
  463. the CERT staff for more information.
  464.  
  465. Location of CERT PGP key
  466.          ftp://info.cert.org/pub/CERT_PGP.key
  467.  
  468. CERT Contact Information
  469. - ------------------------
  470. Email    cert@cert.org
  471.  
  472. Phone    +1 412-268-7090 (24-hour hotline)
  473.                 CERT personnel answer 8:30-5:00 p.m. EST
  474.                 (GMT-5)/EDT(GMT-4), and are on call for
  475.                 emergencies during other hours.
  476.  
  477. Fax      +1 412-268-6989
  478.  
  479. Postal address
  480.         CERT Coordination Center
  481.         Software Engineering Institute
  482.         Carnegie Mellon University
  483.         Pittsburgh PA 15213-3890
  484.         USA
  485.  
  486. CERT publications, information about FIRST representatives, and other
  487. security-related information are available for anonymous FTP from
  488.         http://www.cert.org/
  489.         ftp://info.cert.org/pub/
  490.  
  491. CERT advisories and bulletins are also posted on the USENET newsgroup
  492.         comp.security.announce
  493.  
  494. To be added to our mailing list for CERT advisories and bulletins, send your
  495. email address to
  496.         cert-advisory-request@cert.org
  497.  
  498.  
  499. Copyright 1996 Carnegie Mellon University
  500. This material may be reproduced and distributed without permission provided
  501. it is used for noncommercial purposes and the copyright statement is
  502. included.
  503.  
  504. CERT is a service mark of Carnegie Mellon University.
  505.  
  506. This file: ftp://info.cert.org/pub/cert_advisories/CA-96.14.rdist_vul
  507.            http://www.cert.org
  508.                click on "CERT Advisories"
  509.  
  510.  
  511. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  512. Revision history
  513.  
  514. Nov. 27, 1996  Appendix A, Sun - updated patch information for
  515.                Solaris 1.1.2, SunOS 4.1.4.
  516. Aug. 30, 1996  Information previously in the README was inserted into the
  517.                advisory.
  518. Aug. 22, 1996  Appendix A, SGI - added note about using the find command.
  519. Aug. 12, 1996  Appendix A, Hewlett-Packard - modified the entry.
  520. July 30, 1996  Solution Section III.A - corrected two misprints in the
  521.            results of the find command.
  522. July 24, 1996  Appendix A, Digital - added information.
  523.                            IBM - put a new URL in the "To Order" section.
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535. -----BEGIN PGP SIGNATURE-----
  536. Version: 2.6.2
  537.  
  538. iQCVAwUBMpxYjXVP+x0t4w7BAQGFMAQAyAa73bweFpazYqaSoxSkkRKa20877TPc
  539. 9pvT8WKmdp9uEMt6GGQfcnRyWY4z0RaSwmkRFVcfDUMV/wfyQe9M819kPBkn1kLP
  540. y8XOPQTNi7Wmj976N4qtyDy3yXlEb0F+o2OdtM9rVf95iuOy2kGiamZzXCJXn9Hd
  541. 0kxARDdJudI=
  542. =t7nV
  543. -----END PGP SIGNATURE-----
  544.  
  545.