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

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT(sm) Advisory CA-96.27
  6. Original issue date: December 19, 1996
  7. Last revised: ---
  8.  
  9. Topic: Vulnerability in HP Software Installation Programs
  10.  
  11. - -----------------------------------------------------------------------------
  12.  
  13.    The text of this advisory was originally released on October 11, 1996, as
  14.    AA-96.04.Vulnerability.in.HP.Software.Installation.Programs, developed by
  15.    AUSCERT. Because of the seriousness of the problem, we are reprinting the
  16.    AUSCERT advisory here with their permission. Only the contact information
  17.    at the end has changed: AUSCERT contact information has been replaced with
  18.    CERT/CC contact information.
  19.  
  20.    We will update this advisory as we receive additional information.
  21.    Look for it in an "Updates" section at the end of the advisory.
  22.  
  23. ===========================================================================
  24. AA-96.04                        AUSCERT Advisory
  25.                Vulnerability in HP Software Installation Programs
  26.                                  11 October 1996
  27.  
  28. Last Revised:
  29.  
  30. - ----------------------------------------------------------------------------
  31.  
  32. AUSCERT has received information that there is a vulnerability in the
  33. Hewlett Packard Software Distributor product, SD-UX, used to install,
  34. update, remove and package HP-UX software and patches.  This software is
  35. installed by default under HP-UX 10.x and may have been specifically
  36. installed as additional software under HP-UX 9.x.  Any system with the
  37. SD-UX package installed is vulnerable.
  38.  
  39. This vulnerability may allow local users to gain root privileges.
  40.  
  41. Exploit details involving this vulnerability have been made publicly
  42. available.
  43.  
  44. Vendor patches are being developed, but until they are made available,
  45. AUSCERT recommends that sites take the actions suggested in Section 3.
  46.  
  47. - ----------------------------------------------------------------------------
  48.  
  49. 1.  Description
  50.  
  51.     The HP Software Distributor (SD-UX) is a package that provides a user
  52.     interface which can be used to install, update, remove, and package HP-UX
  53.     software and patches.
  54.  
  55.     The programs supplied with this package create files in an insecure
  56.     manner.  As these programs execute with root privileges, it is possible
  57.     to create or over-write arbitrary files on the system.  The default
  58.     location of the programs supplied by the package is /usr/sbin.
  59.  
  60.     To determine if you have SD-UX installed on your system, check for
  61.     the presence of the swinstall (and related) files using the
  62.     following command:
  63.  
  64.         % ls -l /usr/sbin/sw*
  65.  
  66.     Individual sites are encouraged to check their systems for the SD-UX
  67.     package, and if installed, take the actions recommended in Section 3.
  68.  
  69.  
  70. 2.  Impact
  71.  
  72.     Local users may be able to create or over-write arbitrary files on
  73.     the system.  This can be leveraged to gain root privileges.
  74.  
  75.  
  76. 3.  Workarounds/Solution
  77.  
  78.     AUSCERT recommends that sites prevent possible exploitation of this
  79.     vulnerability by taking the measures stated in Section 3.1 immediately.
  80.  
  81.     If software maintenance is required, AUSCERT advises that sites
  82.     use one of the workarounds given in 3.2, preferably that described in
  83.     Section 3.2.1.
  84.  
  85.     Vendor patches may also address this vulnerability in the
  86.     future (Section 3.3).
  87.  
  88. 3.1 Remove permissions
  89.  
  90.     Until official patches are available sites are encouraged to completely
  91.     prevent the execution of all vulnerable SD-UX programs by any user
  92.     (including root).
  93.  
  94.         # chmod 400 /usr/sbin/swinstall
  95.         # chmod 400 /usr/sbin/swmodify
  96.  
  97.     Note that if only the setuid permissions are removed, it is still
  98.     possible for users to gain the privileges of any user executing
  99.     the SD-UX programs (including root).
  100.  
  101.  
  102. 3.2 Workarounds
  103.  
  104.     AUSCERT recommends that if software maintenance is required, sites
  105.     implement one of the following workarounds until official vendor
  106.     patches are made available.
  107.  
  108.     The workaround described in 3.2.1 is the preferred method of doing
  109.     software maintenance.  If sites are unable to bring their machines
  110.     into single user mode, the workaround given in Section 3.2.2 may be
  111.     more applicable.
  112.  
  113. 3.2.1  Run in single user mode
  114.  
  115.     If packages must be installed, the machine should be brought into
  116.     single-user mode, execute permissions re-enabled on
  117.     /usr/sbin/swinstall,
  118.         
  119.         # chmod 700 /usr/sbin/swinstall
  120.         # chmod 700 /usr/sbin/swmodify
  121.  
  122.     and all symbolic links in /var/tmp and /tmp removed.  The following
  123.     command can be used to remove the symbolic links:
  124.         
  125.         # find /tmp /var/tmp -type l -ok rm {} \;
  126.  
  127.     Once this has been completed, any software package maintenance may be
  128.     safely performed.
  129.  
  130.     The execute permissions on the vulnerable programs must be removed
  131.     before the machine is brought back into multi-user mode.
  132.  
  133.         # chmod 400 /usr/sbin/swinstall
  134.         # chmod 400 /usr/sbin/swmodify
  135.  
  136. 3.2.2 Change temporary file environment variable
  137.  
  138.     This workaround should only be used if the SD-UX programs must be used
  139.     while the machine is in multi-user mode.
  140.  
  141.     The SD-UX programs use a number of temporary files.  The location of
  142.     these files can be configured using the environment variable TMPDIR.
  143.     It is possible to set the environment variable TMPDIR to a non-world
  144.     writable directory.  Having the temporary files created in a non-world
  145.     writable directory prevents the exploitation of the vulnerability
  146.     described in this advisory.
  147.  
  148.     NOTE:  The environment variable must be set in each login
  149.            session BEFORE any SD-UX programs are used.
  150.  
  151.     To use this method, the following steps must be taken:
  152.  
  153.     1) As root, create a non-world writable temporary directory for the
  154.     temporary files used by the SD-UX programs.  The location of these
  155.     temporary files can be configured with the TMPDIR environment variable.
  156.     In this workaround, we have chosen to use the directory
  157.     /var/tmp/SD_tmp.
  158.         
  159.         # mkdir /var/tmp/SD_tmp
  160.         # chmod 700 /var/tmp/SD_tmp
  161.  
  162.     For this workaround to be effective, sites should ensure that the
  163.     parent directory of $TMPDIR has the sticky bit set if the parent
  164.     directory is world writable.  In this workaround, /var/tmp is the
  165.     directory concerned.  The sticky bit on /var/tmp can be set with the
  166.     command:
  167.         
  168.         # chmod 1777 /var/tmp
  169.  
  170.  
  171.     In all sessions where software maintenance is performed:
  172.  
  173.     2) Change permissions on the vulnerable programs:
  174.  
  175.         # chmod 700 /usr/sbin/swinstall
  176.         # chmod 700 /usr/sbin/swmodify
  177.  
  178.     3) Set the environment variable TMPDIR:
  179.  
  180.         (under csh)
  181.         # setenv TMPDIR /var/tmp/SD_tmp
  182.  
  183.         (under sh)
  184.         # TMPDIR=/var/tmp/SD_tmp; export TMPDIR
  185.  
  186.        and verify that the directory exists and is writable by root.
  187.  
  188.         # ls -ld $TMPDIR
  189.  
  190.      4) Perform any software package maintenance.
  191.  
  192.      5) Remove the execute permissions on the vulnerable programs:
  193.  
  194.         # chmod 400 /usr/sbin/swinstall
  195.         # chmod 400 /usr/sbin/swmodify
  196.  
  197.      6) The environment variable TMPDIR is used by many other programs.
  198.      You should either exit this interactive session, or reset the
  199.      TMPDIR environment variables before continuing.
  200.  
  201.      NOTE:  Steps 2) through 6) must be repeated each time software
  202.             maintenance is performed.
  203.  
  204. 3.3 Install vendor patches
  205.  
  206.     Official vendor patches are currently being developed to address the
  207.     vulnerability described in this advisory.  When vendor patches are
  208.     made available, AUSCERT suggests that they be installed.
  209.  
  210.  
  211. - ----------------------------------------------------------------------------
  212. AUSCERT thanks Information Technology Services of the University of Southern
  213. Queensland, Viviani Paz (The University of Queensland) and Hewlett Packard
  214. for their assistance in this matter.
  215. - ----------------------------------------------------------------------------
  216.  
  217. If you believe that your system has been compromised, contact the CERT
  218. Coordination Center or your representative in the Forum of Incident
  219. Response and Security Teams (FIRST).
  220.  
  221. We strongly urge you to encrypt any sensitive information you send by email.
  222. The CERT Coordination Center can support a shared DES key and PGP. Contact
  223. the CERT staff for more information.
  224.  
  225. Location of CERT PGP key
  226.          ftp://info.cert.org/pub/CERT_PGP.key
  227.  
  228. CERT Contact Information
  229. - ------------------------
  230. Email    cert@cert.org
  231.  
  232. Phone    +1 412-268-7090 (24-hour hotline)
  233.                 CERT personnel answer 8:30-5:00 p.m. EST
  234.                 (GMT-5)/EDT(GMT-4), and are on call for
  235.                 emergencies during other hours.
  236.  
  237. Fax      +1 412-268-6989
  238.  
  239. Postal address
  240.         CERT Coordination Center
  241.         Software Engineering Institute
  242.         Carnegie Mellon University
  243.         Pittsburgh PA 15213-3890
  244.         USA
  245.  
  246. CERT publications, information about FIRST representatives, and other
  247. security-related information are available for anonymous FTP from
  248.         http://www.cert.org/
  249.         ftp://info.cert.org/pub/
  250.  
  251. CERT advisories and bulletins are also posted on the USENET newsgroup
  252.         comp.security.announce
  253.  
  254. To be added to our mailing list for CERT advisories and bulletins, send your
  255. email address to
  256.         cert-advisory-request@cert.org
  257.  
  258.  
  259. CERT is a service mark of Carnegie Mellon University.
  260.  
  261. This file:
  262. ftp://info.cert.org/pub/cert_advisories/CA-96.27.hp_sw_install
  263.  
  264.            http://www.cert.org
  265.                click on "CERT Advisories"
  266.  
  267. =============================================================================
  268. UPDATES
  269.  
  270. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  271. Revision history
  272.  
  273.  
  274. -----BEGIN PGP SIGNATURE-----
  275. Version: 2.6.2
  276.  
  277. iQCVAwUBMrlxM3VP+x0t4w7BAQENaAP9FJc1yZVCB/XkEDKNVA7YCT/2jjt0zpUm
  278. 2/fyP1x66HJZOS84mLp2cZkxjbdLGost68V8sykhDb3HEfXm8kabddNR5+pGbxNG
  279. TQPDrj1wjeEx1rxjWyUI2aBlqY7avzneExM7RncrUuwlQmot4wMYJy5VFbi1eqw7
  280. fI9a/C7vBXE=
  281. =DJR0
  282. -----END PGP SIGNATURE-----
  283.  
  284.