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

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT(sm) Advisory CA-95:17
  6. Original issue date: December 12, 1995
  7. Last revised: August 30, 1996
  8.               Information previously in the README was inserted
  9.               into the advisory.
  10.  
  11.               A complete revision history is at the end of this file.
  12.                     
  13. Topic: rpc.ypupdated Vulnerability
  14. - -----------------------------------------------------------------------------
  15.  
  16. The CERT Coordination Center has received reports of a vulnerability in
  17. the rpc.ypupdated program. An exploitation program has also been posted
  18. to several newsgroups.
  19.  
  20. This vulnerability allows remote users to execute arbitrary programs on
  21. machines that provide Network Information Service (NIS) master and slave
  22. services. Client machines of an NIS master or slave server are not affected.
  23.  
  24. See Section III for a test to help you determine if you are vulnerable, along
  25. with a workaround. In addition, Appendix A contains a list of vendors who have
  26. reported their status regarding this vulnerability.
  27.  
  28. We will update this advisory as we receive additional information.
  29. Please check advisory files regularly for updates that relate to your site.
  30. - -----------------------------------------------------------------------------
  31.  
  32. I.   Description
  33.  
  34.      The rpc.ypupdated program is a server used to change NIS information from
  35.      a network-based client using various methods of authentication.
  36.  
  37.      Note:
  38.         The Network Information Service (NIS) was formerly known as Sun
  39.         Yellow Pages (YP). The functionality of the two remains the same;
  40.         only the name has changed. The name Yellow Pages is a registered
  41.         trademark in the United Kingdom of British Telecommunications plc,
  42.         and may not be used without permission.
  43.  
  44.      Clients connect to rpc.ypupdated and provide authentication information
  45.      and proposed changes to an NIS database. If authenticated, the
  46.      information provided is used to update the selected NIS database.
  47.  
  48.      The protocol used when clients communicate with a server only checks
  49.      to see if the connection is authentic using secure RPC. The protocol
  50.      does not check to see if the client is authorized to modify the NIS
  51.      data or if the given NIS map exists. Even after an unsuccessful
  52.      attempt to update the NIS information, the rpc.ypupdated server invokes
  53.      the make(1) program to propagate possible changes. The invocation of
  54.      make is implemented in an insecure fashion which allows the requesting
  55.      client to pass malicious arguments to the call resulting in the execution
  56.      of arbitrary commands on NIS master and slave servers.
  57.  
  58. II.  Impact
  59.  
  60.      Remote users can execute commands on vulnerable NIS master and slave
  61.      machines.
  62.  
  63. III. Solution
  64.  
  65.      First determine if you are vulnerable (see Sec. A below). If you are
  66.      vulnerable, either follow the instructions vendors have provided in
  67.      Appendix A or apply the workaround in Sec. B below.
  68.  
  69.      A.  Consult the vendor information in Appendix A. If your vendor is not
  70.          listed, then check to see if your system has an rpc.ypupdated server.
  71.          To do this check, consult your system documentation or look in your
  72.          system initialization files (e.g., /etc/rc*, /etc/init.d/*, and
  73.          inetd.conf) for rpc.ypupdated or ypupdated. If you find a reference
  74.          to this program on your system, then it is likely that you are
  75.          vulnerable. 
  76.  
  77.      B.  Until patches are available for vulnerable systems, we
  78.          recommend that you disable rpc.ypupdated as soon as possible. 
  79.          Below are some examples given for reference only. Consult your 
  80.          system documentation for the exact details.
  81.  
  82.          In these examples, the rpc.ypupdated program is killed if it is
  83.          running, and the system is reconfigured so that the daemon does
  84.          not automatically start again when the system is rebooted.
  85.  
  86.          Example 1 - SunOS 4.1.X
  87.             For SunOS 4.1.X master and slave NIS servers, the
  88.             rpc.ypupdated program is started by the /etc/rc.local script.
  89.             First, determine if the server is running, and kill it if it
  90.             is. Then, rename rpc.ypupdated so that the /etc/rc.local
  91.             script will not find and therefore start it when the system
  92.             reboots.
  93.  
  94. # /bin/uname -a
  95. SunOS test-sun 4.1.4 1 sun4m
  96. # /bin/ps axc | /bin/grep rpc.ypupdated
  97.   108 ?  IW    0:00 rpc.ypupdated
  98. # /bin/kill 108
  99. # /bin/ps axc | /bin/grep rpc.ypupdated
  100. # /bin/grep ypupdated /etc/rc /etc/rc.local
  101. /etc/rc.local:  if [ -f /usr/etc/rpc.ypupdated -a -d /var/yp/$dname ]; then
  102. /etc/rc.local:          rpc.ypupdated;  echo -n ' ypupdated'
  103. # /bin/mv /usr/etc/rpc.ypupdated /usr/etc/rpc.ypupdated.CA-95:17
  104. # /bin/chmod 0 /usr/etc/rpc.ypupdated.CA-95:17
  105.  
  106.  
  107.          Example 2 - IRIX
  108.             On IRIX systems, ypupdated is started by the inetd daemon. For 
  109.             versions 3.X, 4.X, 5.0.X, 5.1.X, and 5.2, the ypupdated is 
  110.             enabled; but for versions 5.3, 6.0.X, and 6.1, it is disabled. 
  111.             Note that the byte counts given for /bin/ed may vary from system
  112.             to system. Note also that the inetd.conf file is found in
  113.             different locations for different releases of IRIX. For 3.X and
  114.             4.X, it is located in /usr/etc/inetd.conf. For all other releases
  115.             (5.0.X, 5.1.X, 5.2, 5.3, 6.0.X, and 6.1) it is in /etc/inetd.conf.
  116.             
  117. # /bin/uname -a
  118. IRIX test-iris 5.2 02282015 IP20 mips
  119. # /bin/grep ypupdated /etc/inetd.conf
  120. ypupdated/1 stream rpc/tcp wait root /usr/etc/rpc.ypupdated ypupdated
  121. # /bin/ps -eaf | /bin/grep rpc.ypupdated
  122.     root   184     1  0   Nov 20 ?        0:00 /usr/etc/rpc.ypupdated 
  123.     root 14694 14610  2 11:30:07 pts/3    0:00 grep -i rpc.ypupdated
  124. # /bin/kill 184
  125. # /bin/ed /etc/inetd.conf
  126. 3344
  127. /^ypupdated/s/^/#DISABLED# /p
  128. #DISABLED# ypupdated/1 stream rpc/tcp wait root /usr/etc/rpc.ypupdated ypupdated
  129. w
  130. 3355
  131. q
  132. # /bin/ps -eac | /bin/grep inetd
  133.    193   TS  26 ?        0:04 inetd
  134. # /bin/kill -HUP 193
  135.  
  136. .............................................................................
  137.  
  138. Appendix A: Vendor Information 
  139.  
  140. Below is information we have received from vendors. If you do not see your
  141. vendor's name below, please contact the vendor directly for information.
  142.  
  143. Apple Computer, Inc.
  144. - -------------------
  145.         A/UX does not include this functionality and is
  146.         therefore not vulnerable.
  147.  
  148. Berkeley Software Design, Inc. (BSDI)
  149. - -------------------------------------
  150.         BSD/OS by Berkeley Software Design, Inc. (BSDI) is not vulnerable.
  151.  
  152. Data General Corporation
  153. - ------------------------
  154.         Data General believes the DG/UX operating system to be NOT
  155.         vulnerable. This includes all supported release, DG/UX 5.4
  156.         Release 3.10, DG/UX Release 4.10 and all related Trusted DG/UX
  157.         releases.
  158.  
  159. Digital Equipment Corporation
  160. - -----------------------------
  161.        OSF/1 on all Digital platforms is not vulnerable.
  162.       
  163.        Digital ULTRIX platforms are not vulnerable to this problem.
  164.  
  165. Hewlett-Packard Company
  166. - -----------------------
  167.         HP-UX versions 10.01, 10.10, and 10.20 are vulnerable (versions
  168.         prior to HP-UX 10.01 are not vulnerable).
  169.  
  170.         Solution: Do not run rpc.ypupdated. rpc.ypupdated is used
  171.         when adding or modifying the public:private key pair in the NIS
  172.         map public key.byname via the chkey command interface.
  173.         rpc.ypupdated should ONLY be run while changes are being made,
  174.         then terminated when the changes are complete.
  175.         Make sure you re-kill rpc.ypupdated after each reboot.
  176.  
  177. IBM Corporation
  178. - ---------------
  179.   AIX 3.2
  180.   -------
  181.     APAR - IX55360
  182.     PTF  - U440666
  183.  
  184.     To determine if you have this PTF on your system, run the following
  185.     command:
  186.  
  187.        lslpp -lB U440666
  188.  
  189.  
  190.   AIX 4.1
  191.   -------
  192.     APAR - IX55363
  193.  
  194.     To determine if you have this fix on your system, run the following
  195.     command:
  196.  
  197.        lslpp -h | grep -p bos.net.nis.server
  198.  
  199.     Your version of bos.net.nis.server should be 4.1.4.1 or later.
  200.  
  201.  
  202.   To Order
  203.   --------
  204.     APARs may be ordered using FixDist or from the IBM Support Center.
  205.     For more information on FixDist reference URL:
  206.  
  207.        http://aix.boulder.ibm.com/pbin-usa/fixdist.pl/
  208.  
  209.     or send e-mail to aixserv@austin.ibm.com with a subject of "FixDist".
  210.  
  211.  
  212. NEC Corporation
  213. - ---------------
  214.                OS               Version        Status
  215.         ------------------   ------------   --------------------------
  216.         EWS-UX/V(Rel4.0)     R1.x - R2.x    not vulnerable
  217.                              R3.x - R6.x    vulnerable
  218.  
  219.         EWS-UX/V(Rel4.2)     R7.x - R10.x   vulnerable
  220.  
  221.         EWS-UX/V(Rel4.2MP)   R10.x          vulnerable
  222.  
  223.         UP-UX/V              R2.x           not vulnerable
  224.                              R3.x - R4.x    vulnerable
  225.  
  226.         UP-UX/V(Rel4.2MP)    R5.x - R7.x    vulnerable
  227.  
  228.         UX/4800              R11.x          vulnerable
  229.         ---------------------------------------------------------------
  230.  
  231.         The following is a workaround for 48 series.
  232.  
  233.            ypupdated program is started by the /etc/rc2.d/S75rpc script.
  234.            First, determine if the server is running, killing it if it
  235.            is. Then, rename ypupdated so that the /etc/rc2.d/S75rpc
  236.            script will not find and therefore start it when the system
  237.            reboots.
  238.  
  239. # uname -a
  240. UNIX_System_V testux 4.2 1 R4000 r4000
  241. # /sbin/ps -ef | /usr/bin/grep ypupdated
  242.     root   359     1  0 08:20:05 ?        0:00 /usr/lib/netsvc/yp/ypupdated
  243.     root 19938   836  0 23:13:20 pts/1    0:00 /usr/bin/grep ypupdated
  244. # /usr/bin/kill 359
  245. # /sbin/mv /usr/lib/netsvc/yp/ypupdated /usr/lib/netsvc/yp/ypupdated.CA-95:17
  246. # /usr/bin/chmod 0 /usr/lib/netsvc/yp/ypupdated.CA-95:17
  247.  
  248.         --------------------------
  249.         Contacts for further information:
  250.         E-mail:UX48-security-support@nec.co.jp
  251.  
  252.  
  253. Open Software Foundation 
  254. - ------------------------
  255.         YP/NIS is not part of the OSF/1 Version 1.3 offering.
  256.         Hence, OSF/1 Version 1.3 is not vulnerable.
  257.  
  258. Sequent Computer Systems
  259. - ------------------------
  260.         Sequent does not support the product referred to in this advisory, and
  261.         as such is not vulnerable.
  262.  
  263. Silicon Graphics Inc. (SGI)
  264. - ---------------------------
  265.         IRIX 3.x, 4.x, 5.0.x, 5.1.x, 5.2: vulnerable.
  266.                 Turn off rpc.ypudated in inetd.conf; it is shipped with
  267.                 this turned on.
  268.         IRIX 5.3, 6.0, 6.0.1: rpc.ypupdated was off as distributed.
  269.                 Turn off if you have turned it on.
  270.  
  271. Solbourne
  272. - ---------
  273.         Not vulnerable.
  274.  
  275. Sun Microsystems, Inc.
  276. - ----------------------
  277.  
  278.         SunOS 4.1.X is vulnerable.
  279.  
  280. [Note from CERT Coordination Center: We have examined Solaris and found that
  281. Solaris 2.x is not shipped with NIS support and the vulnerability is not
  282. present. There is an extra software package named the "Solaris Name Service
  283. Transition Kit" which in version 1.2, the current version, does not contain
  284. the rpc.ypupdated program and is therefore not vulnerable. However, version
  285. 1.0 of the Solaris Name Service Transition Kit does contain rpc.ypupdated and
  286. is therefore presumed to be vulnerable.]
  287.  
  288.  
  289. - -----------------------------------------------------------------------------
  290.  
  291. If you believe that your system has been compromised, contact the CERT
  292. Coordination Center or your representative in the Forum of Incident
  293. Response and Security Teams (FIRST).
  294.  
  295. If you wish to send sensitive incident or vulnerability information to
  296. CERT staff by electronic mail, we strongly advise that the email be
  297. encrypted. The CERT Coordination Center can support a shared DES key, PGP
  298. (public key available via anonymous FTP on info.cert.org), or PEM (contact
  299. CERT staff for details).
  300.  
  301. Internet email: cert@cert.org
  302. Telephone: +1 412-268-7090 (24-hour hotline)
  303.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  304.            and are on call for emergencies during other hours.
  305. Fax: +1 412-268-6989
  306.  
  307. Postal address:  CERT Coordination Center
  308.                  Software Engineering Institute
  309.                  Carnegie Mellon University
  310.                  Pittsburgh, PA 15213-3890
  311.                  USA
  312.  
  313. CERT advisories and bulletins are posted on the USENET newsgroup
  314. comp.security.announce. If you would like to have future advisories and
  315. bulletins mailed to you or to a mail exploder at your site, please send mail
  316. to cert-advisory-request@cert.org.
  317.  
  318. Past CERT publications, information about FIRST representatives, and
  319. other information related to computer security are available for anonymous
  320. FTP from info.cert.org. 
  321.  
  322.  
  323. Copyright 1995, 1996 Carnegie Mellon University
  324. This material may be reproduced and distributed without permission provided it
  325. is used for non-commercial purposes and the copyright statement is included.
  326.  
  327. CERT is a service mark of Carnegie Mellon University.
  328.  
  329. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  330. Revision history
  331.  
  332. Aug. 30, 1996  Information previously in the README was inserted
  333.                into the advisory.
  334. Feb. 21, 1996  Appendix, IBM - added an entry for IBM
  335. Dec. 18, 1995  Appendix, Digital & Hewlett-Packard - modified information
  336.  
  337.  
  338.  
  339.  
  340.  
  341. -----BEGIN PGP SIGNATURE-----
  342. Version: 2.6.2
  343.  
  344. iQCVAwUBMiS7eHVP+x0t4w7BAQE/rAP8DdKeufRKnU2+gTXPcnBPDcE65WknI9DM
  345. jhcRnMps00GHvWJX5eqTZaH5ZV351p1PjXqxIfDgbLk33MXMUp4MbwJ5bEKac1bF
  346. zZosxnX7AXLd1xz5Ul8Wi/jxCRAOw+NKZWH8JwOx72AUyHqc6R45j7ILUtg9T+Vv
  347. MvU4fMX0Okg=
  348. =wyqC
  349. -----END PGP SIGNATURE-----
  350.  
  351.