MCI Telecommunications internetMCI Security Group Report Name: iMCI MIIGS Security Alert Report Number: iMCISE:IMCIAUSCERT:120296:01:P1R1 Report Date: 12/03/96 Report Format: Formal Report Classification: MCI Informational Report Reference: http://www.security.mci.net Report Distribution: iMCI Security, MCI Internal Internet Gateway Security (MIIGS), MCI Emergency Alert LiSt (MEALS) (names on file) ---------------------------------------------------------------------------- --- =========================================================================== AA-96.14 AUSCERT Advisory HP-UX fpkg2swpkg Vulnerability 29 November 1996 Last Revised: -- - --------------------------------------------------------------------------- AUSCERT has received information that a vulnerability exists in the HP-UX 10.x program fpkg2swpkg. This vulnerability may allow local users to gain root privileges. Exploit information involving this vulnerability has been made publicly available. At this stage, AUSCERT is unaware of any official vendor patches. AUSCERT recommends that sites apply the workaround given in Section 3 until vendor patches are made available. This advisory will be updated as more information becomes available. - --------------------------------------------------------------------------- 1. Description The HP-UX 10.x fpkg2swpkg(1m) program is used to translate fpkg (HP-UX 9.x) network media or Product Specification Files (PSFs) to SD swpackage (HP-UX 10.x) PSFs. The fpkg2swpkg program creates files in an insecure manner. As this program executes with root privileges, it is possible for local users to create or append to arbitrary files on the system. Exploit information involving this vulnerability has been made publicly available. The default location for fpkg2swpkg is /usr/sbin/fpkg2swpkg. 2. Impact Local users may be able to create or append to arbitrary files on the system. This can be leveraged to gain root privileges. 3. Workarounds/Solution AUSCERT recommends that sites prevent the exploitation of the vulnerability in fpkg2swpkg by immediately applying the workaround given in Section 3.1. Currently there are no vendor patches available that address this vulnerability. AUSCERT recommends that official vendor patches be installed when they are made available. 3.1 Remove setuid and execute permissions Until official vendor patches are made available, sites should remove the setuid root and execute permissions from fpkg2swpkg. To do this, the following command should be run as root: # chmod 400 /usr/sbin/fpkg2swpkg # ls -l /usr/sbin/fpkg2swpkg -r-------- 1 root bin 57344 May 30 1996 /usr/sbin/fpkg2swpkg Note that this will remove the ability for any user to run this program. If only the setuid permissions are removed, it is still possible for users to gain privileges when fpkg2swpkg is executed by the root user. 4. Additional measures Most Unix systems ship with numerous programs which have setuid or setgid privileges. Often the functionality supplied by these privileged programs is not required by many sites. The large number of privileged programs that are shipped by default are to cater for all possible uses of the system. AUSCERT encourages sites to examine all the setuid/setgid programs and determine the necessity of each program. If a program does not absolutely require the setuid/setgid privileges to operate (for example, it is only run by the root user), the setuid/setgid privileges should be removed. Furthermore, if a program is not required at your site, then all execute permissions should be removed. A sample command to find all setuid/setgid programs is (run as root): # find / \( -perm -4000 -o -perm -2000 \) -exec ls -ld {} \; It is AUSCERT's experience that many vulnerabilities are being discovered in setuid/setgid programs which are not necessary for the correct operation of most systems. Sites can increase their security by removing unnecessary setuid/setgid programs. For example, the functionality provided by the fpkg2swpkg program is not needed by most sites. If sites had previously disabled the fpkg2swpkg program, they would not have been vulnerable to this latest exploit. - --------------------------------------------------------------------------- AUSCERT thanks Hewlett-Packard for their continued assistance and technical expertise essential for the production of this advisory. AUSCERT also thanks Information Technology Services of the University of Southern Queensland for their assistance. - --------------------------------------------------------------------------- The AUSCERT team have made every effort to ensure that the information contained in this document is accurate. However, the decision to use the information described is the responsibility of each user or organisation. The appropriateness of this document for an organisation or individual system should be considered before application in conjunction with local policies and procedures. AUSCERT takes no responsibility for the consequences of applying the contents of this document. If you believe that your system has been compromised, contact AUSCERT or your representative in FIRST (Forum of Incident Response and Security Teams). AUSCERT is located at The University of Queensland within the Prentice Centre. AUSCERT is a full member of the Forum of Incident Response and Security Teams (FIRST). AUSCERT maintains an anonymous FTP service which is found on: ftp://ftp.auscert.org.au/pub/. This archive contains past SERT and AUSCERT Advisories, and other computer security information. AUSCERT also maintains a World Wide Web service which is found on: http://www.auscert.org.au/. Internet Email: auscert@auscert.org.au Facsimile: (07) 3365 4477 Telephone: (07) 3365 4417 (International: +61 7 3365 4417) AUSCERT personnel answer during Queensland business hours which are GMT+10:00 (AEST). On call after hours for emergencies. Postal: Australian Computer Emergency Response Team c/- Prentice Centre The University of Queensland Brisbane Qld. 4072. AUSTRALIA ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Revision History ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *********************** FORWARDED INFORMATION ENDS HERE *********************** ===============================================================