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

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT* Advisory CA-96.08
  6. Original issue date: April 18, 1996
  7. Last revised: April 3, 1997
  8.                Minor changes: corrected a name in the acknowledgments;
  9.                indicated that CERT is now a registered service mark
  10.  
  11.               A complete revision history is at the end of this file.
  12.  
  13. Topic: Vulnerabilities in PCNFSD
  14. - -----------------------------------------------------------------------------
  15.  
  16. The CERT Coordination Center has received reports of two
  17. vulnerabilities in the pcnfsd program (pcnfsd is also known as
  18. rpc.pcnfsd); we have also received reports that these problems are
  19. being exploited. These vulnerabilities are present in some
  20. vendor-provided versions of pcnfsd and in some publicly available
  21. versions.
  22.  
  23. These two vulnerabilities were reported by Avalon Security Research in
  24. reports entitled "pcnfsd."
  25.  
  26. If you are using a vendor-supplied version of pcnfsd, please see the
  27. vendor information in Section III.A and Appendix A. Until you can install
  28. a patch from your vendor for these vulnerabilities, consider using the
  29. publicly available version described in Section III.B.
  30.  
  31. If you already use or plan to switch to a public version, we urge you
  32. to use the version cited in Section III.B or install the patch
  33. described in Section III.C. This patch has already been incorporated
  34. into the pcnfsd version described in III.B. There are many different
  35. public domain versions of pcnfsd, and we have not analyzed the
  36. vulnerability of those versions. We have analyzed and fixed the
  37. problems noted in this advisory only in the version described in III.B.
  38.  
  39. We will update this advisory as we receive additional information.
  40. Please check advisory files regularly for updates that relate to your site.
  41.  
  42. - -----------------------------------------------------------------------------
  43.  
  44. I.   Description
  45.  
  46.      The pcnfsd program (also called rpc.pcnfsd) is an authentication and
  47.      printing program that runs on a UNIX server. There are many publicly
  48.      available versions, and several vendors supply their own version.
  49.  
  50.      pcnfsd supports a printing model that uses NFS to transfer files from
  51.      a client to the pcnfsd server. (Note: pcnfsd does *not* provide NFS
  52.      services.)  When a client wants to print a file, it requests the path
  53.      to a spool directory from the server. The client then writes the necessary
  54.      files for printing using NFS, and informs the pcnfsd server that the
  55.      files are ready for printing.
  56.  
  57.      pcnfsd creates a subdirectory for each of its clients using the client's
  58.      hostname, then returns this path name to the client. The returned path
  59.      name must be exported via to its clients by the NFS server. The
  60.      NFS server and the pcnfsd server may be two separate machines.
  61.  
  62.      The first vulnerability is that pcnfsd, which runs as root, creates the
  63.      aforementioned directories with mkdir(2) and then changes their mode
  64.      with chmod(2) to mode 777. If the target directory is replaced with a
  65.      symbolic link pointing to a restricted file or directory, the mkdir(2)
  66.      will fail but the chmod(2) will succeed. This means that the target of
  67.      the symbolic link will be mode 777.
  68.  
  69.      Note that pcnfsd must run as root when servicing print requests so that
  70.      it can assume the identity of the PC user when interacting with UNIX
  71.      print commands. On some systems, pcnfsd may also have to run as root so
  72.      it can read restricted files when carrying out authentication tasks.
  73.  
  74.      The second vulnerability is that pcnfsd calls the system(3) subroutine
  75.      as root, and the string passed to system(3) can be influenced by the
  76.      arguments given in the remote procedure call. Remote users can execute
  77.      arbitrary commands on the machine where pcnfsd runs.
  78.  
  79.  
  80. II.  Impact
  81.  
  82.      For the first vulnerability, local users can change the permissions on
  83.      any file accessible to the local system that the root user can change.
  84.      For the second vulnerability, remote users can execute arbitrary commands
  85.      as root on the machine where pcnfsd runs.
  86.  
  87.      The impact is that directories can become world writable (mode 777). What
  88.      this can lead to is bounded by the creativity of the intruder. For
  89.      example, once the mode of /etc were changed to mode 777, one could then
  90.      replace the password file, and then go on from there.
  91.  
  92.      Exploitation of these vulnerabilities is only part of a larger attack
  93.      scenario. Once exploited, there are many pathologies that could follow.
  94.  
  95.  
  96. III. Solution
  97.  
  98.      If you are using pcnfsd from a vendor, consult the vendor list in
  99.      Section A. If your vendor is not listed, we recommend that you
  100.      contact your vendor directly.
  101.  
  102.      Until a vendor patch is available, we recommend that you obtain the
  103.      publicly available version of pcnfsd as described in Section B. This
  104.      version already has the patch described in Section C.
  105.  
  106.      If you are presently using a public version of pcnfsd, we recommend
  107.      that you either change to the version listed in Section B or apply the
  108.      patch described in Section C. (The version in Section B already contains
  109.      this patch.)
  110.  
  111.      A.  Obtain and install the appropriate patch according to the
  112.          instructions included with the patch.
  113.  
  114.          Below is a list of the vendors who have reported to us as of the date
  115.          of this advisory. More complete information, is provided in the
  116.          appendix. We will update the appendix as we receive more information.
  117.  
  118.          If your vendor's name is not on this list, please contact the vendor
  119.          directly.
  120.  
  121.          Vendor or Source          Status
  122.          ----------------          ------------
  123.          BSDI BSD/OS               Vulnerable. Patch available.
  124.          Hewlett Packard           Vulnerable. Patch under development.
  125.          IBM AIX 3.2               Vulnerable. Patches available.
  126.          IBM AIX 4.1               Vulnerable. Patches available.
  127.          NEXTSTEP                  Vulnerable. Will be fixed in version 4.0.
  128.          SCO OpenServer 5          Vulnerable. Patch under development.
  129.          SCO UnixWare 2.1          Vulnerable. Patch under development.
  130.          SGI IRIX 5.3              Vulnerable. Patch under development.
  131.          SGI IRIX 6.2              Not vulnerable.
  132.  
  133.  
  134.      B.  Until you are able to install the appropriate patch, we recommend
  135.          that you obtain a version of pcnfsd from one of the following
  136.          locations. This version already has the patch mentioned in
  137.          Section III.C.
  138.  
  139.      ftp://ftp.cert.org/pub/tools/pcnfsd/pcnfsd.93.02.16-cert-dist.tar.Z
  140.      ftp://ftp.cert.dfn.de/pub/tools/net/pcnfsd/pcnfsd.93.02.16-cert-dist.tar.Z
  141.  
  142.      MD5 (pcnfsd.93.02.16-cert-dist.tar.Z) = b7af99a07dfcf24b3da3446d073f8649
  143.  
  144.          Build, install, and restart rpc.pcnfsd.
  145.  
  146.          Ensure that the mode of the top-level pcnfsd spool directory is 755.
  147.          In this version of pcnfsd, the top level spool directory is
  148.          /usr/spool/pcnfs. To change this to mode 755, do the following as
  149.          root:
  150.  
  151.                 chmod 755 /usr/spool/pcnfs
  152.  
  153.  
  154.      C.  A patch is available for the two vulnerabilities described
  155.          in this advisory. Apply the patch using the GNU patch utility or
  156.          by hand as necessary. Rebuild, reinstall, and restart rpc.pcnfsd.
  157.          Set the mode of the top-level pcnfsd spool directory to 755.
  158.  
  159.          For example, in the version of pcnfsd cited in Section B, the top
  160.          level spool directory is /usr/spool/pcnfs. To change this to mode
  161.          755, do the following as root:
  162.  
  163.                 chmod 755 /usr/spool/pcnfs
  164.  
  165.          Below is the location of a version of the patch that is an
  166.          improvement over the patch originally cited in the advisory. The
  167.          modifications are in the suspicious() function in pcnfsd_misc.c.,
  168.          courtesy of Sun Microsystems, Inc.
  169.  
  170.          To prevent any confusion concerning the checksums, please see the file
  171.          README.pcnfsd.93.02.16-cert.  Checksums are also included below:
  172.  
  173.       ftp://info.cert.org/pub/tools/pcnfsd/README.pcnfsd.93.02.16-cert
  174.       MD5 (README.pcnfsd.93.02.16-cert) = 07c64cd714bfaab3eb3849439a615b79
  175.  
  176.       ftp://info.cert.org/pub/tools/pcnfsd/pcnfsd.93.02.16-cert-dist.tar.Z
  177.       MD5 (pcnfsd.93.02.16-cert-dist.tar.Z) = dc9b50172dfba8e6f9ad0c83f0e087e8
  178.  
  179.       Note: When the above file is unpacked, the md5 checksum referenced
  180.           in the README.pcnfsd.93.02.16-cert matches the following:
  181.  
  182.           MD5 (pcnfsd.93.02.16-cert.tar) = 3a33f392d66b166cbc630275d8aba6f7
  183.  
  184.           ftp://info.cert.org/pub/tools/pcnfsd/pcnfsd_misc.c-diffs
  185.           MD5 (pcnfsd_misc.c-diffs) = e9a83e6d540ab4683767ecf6d66dda9d
  186.  
  187.           ftp://info.cert.org/pub/tools/pcnfsd/pcnfsd_print.c-diffs
  188.           MD5 (pcnfsd_print.c-diffs) = 7d9dac3c14b258e855517894e2934b14
  189.  
  190. .........................................................................
  191. Appendix A: Vendor Information
  192.  
  193. Below is information we have received from vendors concerning the
  194. vulnerability described in this advisory. If you do not see your vendor's
  195. name, please contact the vendor directly for information.
  196.  
  197. Berkeley Software Design, Inc. (BSDI)
  198. =====================================
  199. The problem described in these vulnerabilities is present in all versions
  200. of BSD/OS.  There is a patch (our patch number U210-007) for our 2.1 version
  201. of BSD/OS and associated products available from our patch and ftp servers
  202. <patches@BSDI.> or ftp://ftp.BSDI.COM/bsdi/patches/patches-2.1/U210-007
  203.  
  204.  
  205. Data Design Systems, Inc.
  206. =========================
  207. The Tandem NonStop Kernel (NSK) system, does NOT contain either of the
  208. vulnerabilities cited in the advisory.
  209.  
  210.  
  211. Digital Equipment Corporation
  212. =============================
  213.  
  214. For updated information, please refer to the Digital Equipment
  215. Corporation Vendor Bulletin #96.0383, available in
  216.  
  217.          ftp://info.cert.org/pub/vendors/dec/dec_96.0383
  218.  
  219. Note:  Non-contract/non-warranty customers should contact
  220.        local Digital support channels for information
  221.        regarding these kits.
  222.  
  223. As always, Digital urges you to periodically review your system
  224. management and security procedures. Digital will continue to review
  225. and enhance the security features of its products and work with
  226. customers to maintain and improve the security and integrity of their
  227. systems.
  228.  
  229.  
  230. FreeBSD Inc.
  231. ===========
  232.  
  233. There are two seperate ways of upgrading. The patch listed below
  234. is a source code patch, and is available from:
  235.  
  236.     ftp://ftp.FreeBSD.ORG/pub/FreeBSD/FreeBSD-current/ports/net/pcnfsd/patches/patch-ad
  237.  
  238.     MD5 (patch-ad) = 6dfdf6229632e53cb060961ac09bbd1a
  239.  
  240.  
  241. This is part of the ports collection and anyone using current
  242. revisions of the ports system will automatically have this patch
  243. applied.
  244.  
  245. You can also get a FreeBSD "package" (pre-compiled binary) from:
  246.  
  247.    ftp://ftp.FreeBSD.ORG/pub/FreeBSD/packages-current/net/pcnfsd-93.02.16.tgz
  248.  
  249.    MD5 (pcnfsd-93.02.16.tgz) = 59c54dae46d1b4fd41887877b0a7097a
  250.  
  251.  
  252. Hewlett-Packard Company
  253. =======================
  254.  
  255.    1. The rpc.pcnfsd binary that ships with HP systems contains a
  256.       vulnerability that could allow a user to change permissions on a
  257.       restricted file or directory.
  258.  
  259.       Hewlett Packard is delivering a set of operating system dependent
  260.       patches which contain a new version of rpc.pcnfsd.  Accompanying
  261.       each patch is a README file which discusses the general purpose
  262.       of the patch and describes how to apply it to your system.
  263.  
  264.       Recommended solution:
  265.  
  266.       Apply one of the following patches based on your system hardware
  267.       and operating system revision:
  268.  
  269.       s300/s400 9.X  - PHNE_7371 (rpc.pcnfsd)
  270.       s700/s800 9.X  - PHNE_7072 (NFS Megapatch)
  271.       s700/s800 10.X - PHNE_7073 (NFS Megapatch)
  272.  
  273.       The patches described above provide a new version of the
  274.       rpc.pcnfsd executable which fixes the vulnerability.
  275.  
  276.  
  277.    2. The rpc.pcnfsd binary that ships with most Unix systems contains
  278.       a vulnerability that could allow users to execute arbitrary
  279.       commands on the machine where pcnfsd runs.
  280.  
  281.       The rpc.pcnfsd daemon that ships with Hewlett Packard systems
  282.       does not make the system call that allows this vulnerability.
  283.       Since HP systems are not vulnerable - there is no fix!
  284.  
  285. To subscribe to automatically receive future NEW HP Security Bulletins
  286. please refer to information in
  287.  
  288.          ftp://info.cert.org/pub/vendors/hp/HP.contact_info
  289.  
  290.  
  291. IBM Corporation
  292. ===============
  293.   See the appropriate release below to determine your action.
  294.  
  295.  
  296.   AIX 3.2
  297.   -------
  298.     Apply the following fixes to your system:
  299.  
  300.        APAR - IX57623 (PTF - U442633)
  301.        APAR - IX56965 (PTF - U442638)
  302.  
  303.     To determine if you have these PTFs on your system, run the following
  304.     commands:
  305.  
  306.        lslpp -lB U442633
  307.        lslpp -lB U442638
  308.  
  309.  
  310.   AIX 4.1
  311.   -------
  312.     Apply the following fixes to your system:
  313.  
  314.         APAR - IX57616
  315.         APAR - IX56730
  316.  
  317.     To determine if you have these APARs on your system, run the following
  318.     commands:
  319.  
  320.        instfix -ik IX57616
  321.        instfix -ik IX56730
  322.  
  323.  
  324.   To Order
  325.   --------
  326.     APARs may be ordered using FixDist or from the IBM Support Center.
  327.     For more information on FixDist, reference URL:
  328.  
  329.        http://service.software.ibm.com/aixsupport/
  330.  
  331.     or send e-mail to aixserv@austin.ibm.com with a subject of "FixDist".
  332.  
  333.  
  334.   IBM and AIX are registered trademarks of International Business Machines
  335.   Corporation.
  336.  
  337.  
  338. NEC Corporation
  339. ===============
  340.  
  341. Some systems are vulnerable and patches are available through
  342. anonymous FTP from ftp://ftp.meshnet.or.jp in the /pub/48pub/security
  343. directory.
  344.  
  345. UP-UX/V (Rel4.2MP) R5.x   NECu5s003.COM.pkg
  346.                             /pub/48pub/security/up/r5/pkg
  347.                             Results of sum = 3060 266
  348.                                        md5 = 79E626B99A55FB0DBCE6EE642874570A
  349.                     R6.x   NECu6s003.COM.pkg
  350.                             /pub/48pub/security/up/r6/pkg
  351.                             Results of sum = 47304 272
  352.                                        md5 = 9FC9E993A5AB51291BF4817D3D70FBFD
  353.                     R7.x   NECu7s003.COM.pkg
  354.                             /pub/48pub/security/up/r7/pkg
  355.                             Results of sum = 46470 291
  356.                                        md5 = 59CA6887078AF88EA165AFD3BF5A1374
  357.  
  358.  EWS-UX/V(Rel4.2)   R7.x   NECe7s004.COM.pkg
  359.                             /pub/48pub/security/ews/r7/pkg
  360.                             Results of sum = 3827 194
  361.                                        md5 = 4D40D9258DAB7EA41C30789609818330
  362.  
  363.                     R8.x   NECe8s004.COM.pkg
  364.                             /pub/48pub/security/ews/r8/pkg
  365.                             Results of sum = 24399 199
  366.                                        md5 = 40B4CB1140791C14D1B604B6E8CB5FCB
  367.  
  368.                     R9.x(except EWS4800/110N)
  369.                             NECe9s008.COM.pkg
  370.                             /pub/48pub/security/ews/r9/pkg
  371.                             Results of sum = 23250 203
  372.                                        md5 = 5AD8BED137AAE7D0067EF3120574786C
  373.  
  374.                     R9.x(EWS4800/110N)
  375.                            NECe9s007.COM.pkg
  376.                             /pub/48pub/security/ews/r9n/pkg
  377.                             Results of sum = 3972 201
  378.                                        md5 = 28B2FA99F5200F81C5465571EF27E08B
  379.  
  380.                     R10.x  NECeas004.COM.pkg
  381.                             /pub/48pub/security/ews/ran/pkg
  382.                             Results of sum = 51969 205
  383.                                        md5 = B6E12017E66DC8DC38FBE78CA1F0B0F0
  384.  
  385.  EWS-UX/V (Rel4.2MP) R10.x  NECmas007.COM.pkg
  386.                             /pub/48pub/security/ews/ra/pkg
  387.                             Results of sum = 48060 291
  388.                                        md5 = 42F8AE832071F033E21D8718A3670D76
  389.  
  390.  UX/4800             R11.x  NECmbs010.COM.pkg
  391.                             /pub/48pub/security/ews/rb/pkg
  392.                            Results of sum = 24885 335
  393.                                        md5 = 7A14CBE4EA9B2470E340B5EEFD523F95
  394.  
  395. For further information contact:  UX48-security-support@nec.co.jp.
  396. We encourage you contact the vendor directly if you have any questions.
  397.  
  398.  
  399. NeXT Software, Inc.
  400. ===================
  401. NEXTSTEP is vulnerable.  This will be fixed in the 4.0 release of
  402. OpenStep for Mach (aka NEXTSTEP 4.0, due out 2Q96).
  403.  
  404.  
  405. Novell
  406. ======
  407.  
  408. CERT staff do not know whether Novell's enhanced version of PCNFSD
  409. (LWPNFSD) is vulnerable to this problem.  We encourage you contact the
  410. vendor directly if you have any questions.
  411.  
  412.  
  413. The Santa Cruz Operation, Inc.
  414. ==============================
  415. Patches for pcnfsd are currently being developed for the
  416. following releases:
  417.  
  418. SCO OpenServer 5
  419. SCO UnixWare 2.1.
  420.  
  421. These releases, as well as all prior releases, are vulnerable to
  422. both issues mentioned in the advisory. Should you not need to use
  423. pcnfs, SCO recommends that you not run pcnfsd. This can be done
  424. by commenting out pcnfsd in the appropriate script that starts
  425. pcnfsd, located in /etc/rc2.d.
  426.  
  427. This CERT advisory will be updated when further patch
  428. information is available.
  429.  
  430.  
  431. Silicon Graphics Corporation
  432. ============================
  433.  
  434. pcnfsd was only released for IRIX 5.3 and IRIX 6.2.
  435. SGI is producing patch1179 for IRIX 5.3.
  436. IRIX 6.2 is not vulnerable.
  437.  
  438.  
  439. Sun Microsystems, Inc.
  440. ======================
  441. Sun has made patches available:
  442.  
  443.                 Solaris 2.4, 2.5 (Sparc)        103095-02
  444.                 Solaris 2.4, 2.5 (X86)          103457-01
  445.                 SunOS 4.1.X                     103096-02
  446.  
  447.  
  448. TGV Software, Inc./Cisco Systems, Inc.
  449. ======================================
  450.  
  451. These vulnerabilities are UNIX-specific and are not present in any version
  452. of MultiNet for OpenVMS.
  453.  
  454.  
  455. - ---------------------------------------------------------------------------
  456. The CERT Coordination Center thanks Josh Daymont, Ben G., and Alfred H. of
  457. Avalon Security Research for providing information for this advisory.
  458. We thank Wolfgang Ley of DFN-CERT for his help in understanding these
  459. problems.
  460. - ---------------------------------------------------------------------------
  461.  
  462. If you believe that your system has been compromised, contact the CERT
  463. Coordination Center or your representative in the Forum of Incident
  464. Response and Security Teams (FIRST).
  465.  
  466. We strongly urge you to encrypt any sensitive information you send by email.
  467. The CERT Coordination Center can support a shared DES key and PGP. Contact the
  468. CERT staff for more information.
  469.  
  470. Location of CERT PGP key
  471.          ftp://info.cert.org/pub/CERT_PGP.key
  472.  
  473. CERT Contact Information
  474. - ------------------------
  475. Email    cert@cert.org
  476.  
  477. Phone    +1 412-268-7090 (24-hour hotline)
  478.         CERT personnel answer 8:30-5:00 p.m. EST
  479.         (GMT-5)/EDT(GMT-4), and are on call for
  480.                 emergencies during other hours.
  481.  
  482. Fax      +1 412-268-6989
  483.  
  484. Postal address
  485.         CERT Coordination Center
  486.         Software Engineering Institute
  487.         Carnegie Mellon University
  488.         Pittsburgh PA 15213-3890
  489.         USA
  490.  
  491. CERT publications, information about FIRST representatives, and other
  492. security-related information are available for anonymous FTP from
  493.         http://www.cert.org/
  494.         ftp://info.cert.org/pub/
  495.  
  496. CERT advisories and bulletins are also posted on the USENET newsgroup
  497.         comp.security.announce
  498.  
  499. To be added to our mailing list for CERT advisories and bulletins, send your
  500. email address to
  501.         cert-advisory-request@cert.org
  502.  
  503.  
  504. Copyright 1996 Carnegie Mellon University
  505. This material may be reproduced and distributed without permission provided it
  506. is used for noncommercial purposes and the copyright statement is included.
  507.  
  508. * Registered U. S. Trademark and Patent Office.
  509.  
  510.  
  511. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  512. Revision history
  513.  
  514. Apr. 03, 1997  Minor changes: corrected a name in the acknowledgments;
  515.                indicated that CERT is now a registered service mark
  516. Aug. 30, 1996  Information previously in the README was inserted into the
  517.                advisory. Appendix B was moved to Sec. III.C.
  518.                Appendix A - updated IBM URL in "To Order" section.
  519. Aug. 01, 1996  Appendix A - updated Hewlett-Packard patch information.
  520. July 26, 1996  Appendix A - modified NEC patch information.
  521. July 5, 1996   Appendix A - added pointer to updated vendor information for
  522.                Digital Equipment Corporation.
  523. June 26, 1996  Appendix A - updated vendor information for NEC.
  524.                Appendix A - added vendor information for Data Design
  525.                Systems, Inc.
  526. May 8, 1996    Appendix A - added patch information for FreeBSD.
  527. May 6, 1996    Section II -added additional clarification about the
  528.                impact of the vulnerability described.
  529.                Appendix B - replaced the patch information originally
  530.                contained in Appendix B with updated information.
  531.                Appendix A - added updates for Digital Equipment
  532.                Corporation, Novell, Sun Microsystems, Inc,
  533.                and TGV Software, Inc./Cisco Systems, Inc.
  534. Apr. 23, 1996  Appendix A - added information from NEC Corporation.
  535. Apr. 19, 1996  Appendix B - new information on the fix referred to
  536.                in Appendix B of the advisory.
  537.  
  538.  
  539. -----BEGIN PGP SIGNATURE-----
  540. Version: 2.6.2
  541.  
  542. iQCVAwUBM0PT7HVP+x0t4w7BAQHq5AP/Yu2kYH1YEe3+mH41JpHR4qGAm9PpWFH3
  543. jc7Mwgr2ablylKgcglIXQKI04MfPjLM1jXggjR1kHvKC4vg7UVhm9D5QlpKwduO1
  544. r9mQbXSZJPRhUYlIjMGc3HB/raH6e7SbGdh9q/aRquJxwuqqA1AY+S0SSPza8YZw
  545. AoS2huUKXTo=
  546. =1nrN
  547. -----END PGP SIGNATURE-----
  548.  
  549.