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

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT(sm) Advisory CA-95:12
  6. Original issue date: October 18, 1995
  7. Last revised: August 30, 1996
  8.               References to README files were removed.
  9.  
  10.               A complete revision history is at the end of this file.         
  11.  
  12. Topic: Sun 4.1.X Loadmodule Vulnerability 
  13. - -----------------------------------------------------------------------------
  14.  
  15. The CERT Coordination Center has received reports of problems with the
  16. loadmodule(8) program. An exploitation script is available and has been used
  17. by local users to gain root privileges.
  18.  
  19. The problem is present in SunOS 4.1.X only, and there is a patch available for
  20. sun4 architectures.
  21.  
  22. The CERT staff recommends that you install the appropriate patch as soon as
  23. possible and take the steps in Section III.B. to further protect your system.
  24.  
  25. We will update this advisory as we receive additional information.
  26. Please check advisory files regularly for updates that relate to your site.
  27.  
  28. - -----------------------------------------------------------------------------
  29.  
  30. I.   Description
  31.  
  32.      The loadmodule(8) program is used by the xnews(1) window system server to
  33.      load two dynamically loadable kernel drivers into the currently running
  34.      system and to create special devices in the /dev directory to use those
  35.      modules. These modules and special files are used to provide a SunView
  36.      binary compatibility mode while running the X11/NeWS windowing system.
  37.      Because of the way the loadmodule(8) program sanitizes its environment,
  38.      unauthorized users can gain root access on the local machine. A script is
  39.      publicly available and has been used to exploit this vulnerability.
  40.  
  41.      This problem is present in SunOS 4.1.X only.
  42.  
  43. II.  Impact
  44.  
  45.      Local users can gain root privileges.
  46.  
  47. III. Solution
  48.  
  49.      The CERT staff recommends that you take the steps described in both A and
  50.      B below. 
  51.  
  52.      A. Obtain and install the appropriate patches according to the
  53.         instructions included with the patches. Patches are available through
  54.         your local Sun Answer Center and by FTP from
  55.  
  56.              ftp://sunsolve1.sun.com/pub/patches/100448-03.tar.Z 
  57.  
  58.         Module           Patch ID        Filename
  59.         ----------       ---------       ---------------
  60.         loadmodule       100448-03       100448-03.tar.Z
  61.  
  62.         Checksum:
  63.             MD5 (100448-03.tar.Z) = 183a22f0a2f6020f1389b6aeea5ca6c6
  64.  
  65.      B. Because, in general, a set-user-id program can lead to security
  66.         exposures, you should also do at least step 1 below. We recommend
  67.         doing steps 2 and 3 as well.
  68.  
  69.         The intent of these directions is make the loadmodule(8) program
  70.         work only for the super-user (currently it works for all users because
  71.         it is set-user-id) and to execute it each time the system boots. By
  72.         following these directions, users who require SunView binary
  73.         compatibility will have it available to them.  
  74.  
  75.         1. If you do not need SunView binary compatibility, then as root,
  76.            turn off setuid root on the loadmodule(8) program with
  77.  
  78.                 # /bin/chmod u-s /usr/openwin/bin/loadmodule
  79.  
  80.         2. If your users need SunView binary compatibility, you can
  81.            enable it immediately--that is without having to reboot
  82.            your system--with the following script.
  83.  
  84.         ------------------------cut here--8<------------------------
  85.         ARCH=`/bin/arch -k`
  86.         OBJ=/sys/${ARCH}/OBJ
  87.         LM=/usr/openwin/bin/loadmodule
  88.         /bin/chmod u-s $LM
  89.         if [ -f $OBJ/evqmod-${ARCH}.o ]; then
  90.           if /usr/etc/modstat | /bin/egrep -s evqmod ; then
  91.             echo evq: already loaded
  92.           elif $LM evqmod-${ARCH}.o evqload; then
  93.             echo evq: loaded
  94.           else
  95.             echo evq: unable to load module
  96.           fi
  97.         fi
  98.         if [ -f $OBJ/winlock-${ARCH}.o ]; then
  99.           if /usr/etc/modstat | /bin/egrep -s winlock ; then
  100.             echo winlock: already loaded
  101.           elif $LM winlock-${ARCH}.o winlockload; then
  102.             echo winlock: loaded
  103.           else
  104.             echo winlock: unable to load module
  105.           fi
  106.         fi
  107.         ------------------------cut here--8<------------------------
  108.  
  109.         As a suggestion, store this script in /tmp/esbc and then
  110.         execute it as root with:
  111.  
  112.                 # sh /tmp/esbc
  113.  
  114.      3. If you've done step 2 above, the module loadings will disappear
  115.         the next time you reboot your system. To make them permanent--
  116.         that is to make these module loadings occur each time your system
  117.         is rebooted--add the script to the end of your /etc/rc.local file.
  118.         
  119. - ---------------------------------------------------------------------------
  120. The CERT Coordination Center staff thanks Wolfgang Ley and Sun Microsystems
  121. for their support in the development of this advisory.
  122. - ---------------------------------------------------------------------------
  123.  
  124. If you believe that your system has been compromised, contact the CERT
  125. Coordination Center or your representative in the Forum of Incident
  126. Response and Security Teams (FIRST).
  127.  
  128. If you wish to send sensitive incident or vulnerability information to
  129. CERT staff by electronic mail, we strongly advise that the email be
  130. encrypted.  The CERT Coordination Center can support a shared DES key, PGP
  131. (public key available via anonymous FTP on info.cert.org), or PEM (contact
  132. CERT staff for details).
  133.  
  134. Internet email: cert@cert.org
  135. Telephone: +1 412-268-7090 (24-hour hotline)
  136.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  137.            and are on call for emergencies during other hours.
  138. Fax: +1 412-268-6989
  139.  
  140. Postal address:  CERT Coordination Center
  141.                  Software Engineering Institute
  142.                  Carnegie Mellon University
  143.                  Pittsburgh, PA 15213-3890
  144.                  USA
  145.  
  146. CERT advisories and bulletins are posted on the USENET newsgroup
  147. comp.security.announce. If you would like to have future advisories and
  148. bulletins mailed to you or to a mail exploder at your site, please send mail
  149. to cert-advisory-request@cert.org.
  150.  
  151. Past CERT publications, information about FIRST representatives, and
  152. other information related to computer security are available for anonymous
  153. FTP from info.cert.org. 
  154.  
  155.  
  156. Copyright 1995, 1996 Carnegie Mellon University
  157. This material may be reproduced and distributed without permission provided it
  158. is used for non-commercial purposes and the copyright statement is included.
  159.  
  160. CERT is a service mark of Carnegie Mellon University.
  161.  
  162. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  163. Revision history
  164.  
  165. Aug. 30, 1996  References to README files were removed because updates are
  166.                added to the advisories themselves.
  167.  
  168.  
  169.  
  170.  
  171. -----BEGIN PGP SIGNATURE-----
  172. Version: 2.6.2
  173.  
  174. iQCVAwUBMiS6Y3VP+x0t4w7BAQG08AQAxkv/NSVeGn/jkvGs7gZNTPFE6bdpqXhM
  175. NN9dsYqRVnhRk7tsxnzSAx842zdJDlDTE5cRn/qYLR/rcVfr07vKqVNCq62CgvFH
  176. ViqKbuam0EBPBxu4moWXfFuZcbVhWwNlaQg5Y4mxx2OYPpj5Pvq66yp3lyaP1scU
  177. 6oco/Kivg98=
  178. =VwuA
  179. -----END PGP SIGNATURE-----
  180.  
  181.