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

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT(sm) Advisory CA-96.18
  6. Original issue date: August 14, 1996
  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: Vulnerability in fm_fls
  14. - -----------------------------------------------------------------------------
  15.  
  16. The CERT Coordination Center has received reports of a configuration problem
  17. in the floating license server for Adobe FrameMaker (fm_fls) that enables
  18. non-privileged users to make any file world-readable and world-writable.
  19. Exploitation scripts are publicly available.
  20.  
  21. Any system that includes a setuid version of fm_fls is vulnerable.
  22. Adobe Systems reports that the following Adobe products use fm_fls:
  23.  
  24.     Frame Products, version 4
  25.           FrameMaker
  26.           FrameViewer
  27.           FrameBuilder
  28.  
  29.     Frame Products, version 5
  30.           FrameMaker
  31.           FrameMaker+SGML
  32.  
  33. The CERT/CC team recommends installing a patch from your vendor. Until you
  34. can obtain a patch, we urge you to remove the setuid bit from all instances
  35. of fm_fls.
  36.  
  37. We will update this advisory as we receive additional information.
  38. Please check advisory files regularly for updates that relate to your site.
  39. - -----------------------------------------------------------------------------
  40.  
  41. I.   Description
  42.  
  43.      FrameMaker is a commercial text-processing software package
  44.      available from Adobe Systems, Inc. It is also available from other
  45.      vendors as part of their product line offering.
  46.  
  47.      When FrameMaker versions 4.X or 5.X are installed, the installation
  48.      script provided with FrameMaker installs a file named fm_fls that is
  49.      setuid to installing user, typically the root user. fm_fls is typically
  50.      found in the FrameMaker installation tree. Consult your documentation
  51.      for precise location of fm_fls.
  52.  
  53.      When fm_fls runs, it opens up a log file, which by default is
  54.      /tmp/fm_fls.log. In normal operation, fm_fls writes logging information
  55.      about license usage to the named log file. However, when given invalid
  56.      arguments, fm_fls writes these arguments to the log file, changes the
  57.      owner of the log file to root or whoever installed fm_fls, changes the
  58.      permissions to world-readable and world-writable, and then exits.
  59.      Therefore, by giving fm_fls invalid arguments and naming another file as
  60.      the log file, a user can make that file world-readable and world-writable.
  61.  
  62.      Adobe Systems reports that fm_fls is installed as setuid root because
  63.      it registers the license manager program with the the program number
  64.      mapper, also known as portmap or rpcbind. On some platforms, only the
  65.      original user (in this case root) or the root user has permission to
  66.      remove a registration. fm_fls will attempt to remove a previous
  67.      registration when it is restarted. With fm_fls setuid root, restarting
  68.      fm_fls ensures that all changes made in the program number mapper are
  69.      successful because they are done by the same user.
  70.  
  71.      The floating license servers shipped with and installed by FrameMaker
  72.      4.X and 5.X are vulnerable. Similarly, any other system that includes
  73.      a setuid version of fm_fls is vulnerable. Exploitation scripts are
  74.      publicly available.
  75.  
  76. II.  Impact
  77.  
  78.      Anyone with access to an account on an unpatched system can create
  79.      world-writable and world-readable files; this can lead to gaining
  80.      root access.
  81.  
  82. III. Solution
  83.  
  84.      A. Obtain and install a vendor patch when it becomes available.
  85.  
  86.         In the meantime, remove the setuid bit from all instances of fm_fls.
  87.         To determine if a system is vulnerable and to disable the programs that
  88.         are believed to be vulnerable, use the find command we provide below or
  89.         a variant. Consult your local system documentation to determine how to
  90.         tailor the find program on your system.
  91.  
  92.         You will need to run the find command on each system you maintain
  93.         because the command examines files on the local disk only. Substitute
  94.         the names of your local file systems for FILE_SYSTEM_NAMES in the
  95.         example. Example local file system names are /, /usr, and /var.
  96.  
  97.         To find all instances of fm_fls and then to remove the setuid bit from
  98.         them, do the following as root. Note that this is one long command,
  99.         though we have separated it onto two lines using a back-slash.
  100.  
  101.              find FILE_SYSTEM_NAMES -xdev -type f -name fm_fls -perm -04000 \
  102.                  -print -ok chmod u-s '{}' \;
  103.  
  104.         This command will find all files on a system that are
  105.             - only in the file system you name (FILE_SYSTEM_NAMES -xdev)
  106.             - regular files (-type f)
  107.             - named fm_fls
  108.             - setuid (-perm -04000)
  109.  
  110.         Once found, those files will
  111.             - have their names printed (-print)
  112.             - have the setuid mode removed, but only if you type `y'
  113.               in response to the prompt (-ok chmod u-s '{}' \;)
  114.  
  115.         With the setuid root bit removed, fm_fls must then be started each
  116.         time by the same user. That user should be root so that the previous
  117.         registration can be successfully removed no matter what platform
  118.         fm_fls is running on.
  119.  
  120.         In addition, the log file, license.log, should be stored in a
  121.         non-public directory; specify this new location with the -log command
  122.         line argument. Consult the documentation that comes with FrameMaker
  123.         versions 4.X and 5.X to learn how to do this on your system.
  124.  
  125.      B. Another possible solution is to create a new userid and group, say UID
  126.         frame and GID frame, with no one in group frame except for UID frame,
  127.         and make fm_fls mode 4110.  For example, on Solaris 2.4, 2.5, or 2.5.1:
  128.  
  129. - - ---s--x---   1 frame    frame     145736 Aug 24  1995 /usr/local/frame5.0/bin/sunxm.s5.sparc/fm_fls
  130.  
  131.         In this case the log file has to be created manually just once by root
  132.         (if you keep it permanently in /var/log instead of /tmp) and
  133.         chown'd/chgrp'd to frame/frame with mode 644 (though fm_fls resets
  134.         that to 666).
  135.  
  136.         At boot time root runs the frame5.0/bin/fm_fls wrapper which ends up
  137.         invoking the setuid-frame fm_fls binary.  That could be done instead
  138.         using 'su - frame -c frame_startup_command...' as an extra precaution
  139.         if UID frame has a real shell.  In that case you might as well remove
  140.         the setuid bit too.
  141.  
  142.         This has been working for about a year.
  143.  
  144. ..............................................................................
  145. Appendix A
  146.  
  147. The following is vendor-supplied information.  
  148. For the most up-to-date information, contact your vendor. 
  149.  
  150. BSDI
  151.         Does not ship Frame with BSD/OS.
  152.  
  153. Digital Equipment Corporation
  154.         Does not distribute this product with it's operating
  155.         systems.
  156.  
  157. Open Software Foundation (OSF)
  158.         Does not support the software with this problem.
  159.  
  160. Sun Microsystems, Inc.
  161.         Does not ship FrameMaker.
  162.  
  163.  
  164. - ---------------------------------------------------------------------------
  165. The CERT Coordination Center staff thanks Adobe Systems for their support
  166. in the development of this advisory.
  167. - ---------------------------------------------------------------------------
  168.  
  169. If you believe that your system has been compromised, contact the CERT
  170. Coordination Center or your representative in the Forum of Incident
  171. Response and Security Teams (FIRST).
  172.  
  173. We strongly urge you to encrypt any sensitive information you send by email.
  174. The CERT Coordination Center can support a shared DES key and PGP. Contact
  175. the CERT staff for more information.
  176.  
  177. Location of CERT PGP key
  178.          ftp://info.cert.org/pub/CERT_PGP.key
  179.  
  180. CERT Contact Information
  181. - ------------------------
  182. Email    cert@cert.org
  183.  
  184. Phone    +1 412-268-7090 (24-hour hotline)
  185.                 CERT personnel answer 8:30-5:00 p.m. EST
  186.                 (GMT-5)/EDT(GMT-4), and are on call for
  187.                 emergencies during other hours.
  188.  
  189. Fax      +1 412-268-6989
  190.  
  191. Postal address
  192.         CERT Coordination Center
  193.         Software Engineering Institute
  194.         Carnegie Mellon University
  195.         Pittsburgh PA 15213-3890
  196.         USA
  197.  
  198. CERT publications, information about FIRST representatives, and other
  199. security-related information are available for anonymous FTP from
  200.         http://www.cert.org/
  201.         ftp://info.cert.org/pub/
  202.  
  203. CERT advisories and bulletins are also posted on the USENET newsgroup
  204.         comp.security.announce
  205.  
  206. To be added to our mailing list for CERT advisories and bulletins, send your
  207. email address to
  208.         cert-advisory-request@cert.org
  209.  
  210.  
  211. Copyright 1996 Carnegie Mellon University
  212. This material may be reproduced and distributed without permission provided
  213. it is used for noncommercial purposes and the copyright statement is
  214. included.
  215.  
  216. CERT is a service mark of Carnegie Mellon University.
  217.  
  218. This file: ftp://info.cert.org/pub/cert_advisories/CA-96.18.fm_fls
  219.            http://www.cert.org
  220.                click on "CERT Advisories"
  221.  
  222.  
  223. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  224. Revision history
  225.  
  226. Aug. 30, 1996  Information previously in the README was inserted into the
  227.                advisory.
  228. Aug. 21, 1996  Added Section III.B (provides another possible solution).
  229. Aug. 15, 1996  Added Appendix A - vendor information.
  230.  
  231.  
  232.  
  233. -----BEGIN PGP SIGNATURE-----
  234. Version: 2.6.2
  235.  
  236. iQCVAwUBMiTF33VP+x0t4w7BAQHPmgP/RLeosEzy5WdXSW8AAGqWdHmzcXEmloct
  237. UCuHD58DjMeUkVvgqzQBncRjuBAbcrvR/VwBek1/uuE0D/o+zLjOiceAIs9/S+1b
  238. 3WWddYi3Zh/snSODn2kH+SzAnA/CqKWRHmTlUCiTh0hmixAe5oOyHVPmJCyJPVNJ
  239. hJI0VPJGVwE=
  240. =sb6e
  241. -----END PGP SIGNATURE-----
  242.  
  243.