************************************************************************** Security Bulletin 9603 DISA Defense Communications System January 24, 1996 Published by: DISN Security Coordination Center (SCC@NIC.DDN.MIL) 1-(800) 365-3642 DEFENSE INFORMATION SYSTEM NETWORK SECURITY BULLETIN The DISN SECURITY BULLETIN is distributed by the DISN SCC (Security Coordination Center) under DISA contract as a means of communicating information on network and host security exposures, fixes, and concerns to security and management personnel at DISN facilities. Back issues may be obtained via FTP (or Kermit) from NIC.DDN.MIL [192.112.36.5] using login="anonymous" and password="guest". The bulletin pathname is scc/sec-yynn (where "yy" is the year the bulletin is issued and "nn" is a bulletin number, e.g. scc/sec-9544.txt). These are also available at our WWW site, http://nic.ddn.mil. ************************************************************************** + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ! ! ! The following important advisory was issued by the Automated ! ! Systems Security Incident Support Team (ASSIST) and is being ! ! relayed unedited via the Defense Information Systems Agency's ! ! Security Coordination Center distribution system as a means ! ! of providing DISN subscribers with useful security information. ! ! ! + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + -----BEGIN PGP SIGNED MESSAGE----- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Automated Systems Security Incident Support Team _____ ___ ___ _____ ___ _____ | / /\ / \ / \ | / \ | | / Integritas / \ \___ \___ | \___ | | < et /____\ \ \ | \ | | \ Celeritas / \ \___/ \___/ __|__ \___/ | |_____\ <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Bulletin 96-603 Release date: January 23, 1996, 4:00 PM EST (GMT -5) SUBJECT: Unix sendmail vulnerability. SUMMARY: All versions of "sendmail" prior to Version 8.6.10, including Sendmail 5.67+IDA-1.5 and most vendor versions, contain a vulnerability that could allow unauthorized root access. This vulnerability is being actively exploited on the Internet. BACKGROUND: The vulnerability is exploited through the use of the SMTP "EXPN" and "VRFY" commands offered by all versions of "sendmail." A buffer-overrun problem is present in the implementation of these commands that allows the executable code of the "sendmail" process to be overwritten. This executable code can do anything the author wants, and is run with super-user permissions. This vulnerability was fixed in Sendmail Version 8.6.10, which was released on 21 February 1995. The current version of Sendmail is 8.7.3, which was released on 3 December 1995. The versions of "sendmail" provided by most UNIX workstation vendors are based on Versions 5.64, 5.65, or 5.67. Unless the vendor has taken considerable care to secure their version of "sendmail" (most vendors have not), these versions are vulnerable to this problem. The only vendor version of "sendmail" that has been confirmed as not vulnerable to this problem is the one shipped with Solaris 2.5 (but not earlier versions of Solaris) from Sun Micros- ystems; this version is based on "sendmail" 8.6.12. The "IDA" version of "sendmail," a popular public domain version that offers enhanced mail delivery and user database features, is based on Version 5.67, and is thus vulnerable to this problem. IMPACT: Successful exploitation of this vulnerability allows an attacker to execute arbitrary commands on the local system with super-user ("root") permissions and gain unrestricted access to system resources. RECOMMENDED SOLUTIONS: There are four possible solutions to this problem: A. Install Sendmail Version 8.7.3. This version of "sendmail" is under active development and offers major improvements, especially in the area of security. Sendmail 8.7.3 is available via the Internet by anonymous FTP from ftp.cs.berkeley.edu (128.32.35.31) in /ucb/sendmail/sendmail.8.7.3.tar.Z. Other information resources for sendmail are the "comp.mail.sendmail" USENET newsgroup and the book "Sendmail," by Bryan Costales, Eric Allman, and Neil Rickert, published by O'Reilly & Associates (http://www.ora.com). Note: While compiling and installing a new version of sendmail is not difficult, , modifying the configuration file (the file that specifies how mail is to be delivered) to work with the new version of the program is often non-trivial. A complete rewrite of the existing configuration file may be required, and this is a process that may require several days at a minimum to complete. Option A is not recommended unless you have extensive UNIX system administration experience. B. Install the "smap" and "smapd" programs on all UNIX systems connected to the Internet. The "smap" program provides a minimal SMTP implementation that accepts mail messages from the network and stores them for later delivery. The "smapd" program periodically runs "sendmail" on these stored messages, and thus "sendmail" is no longer reachable directly from the network and its security vulnerabilities can no longer be exploited. The "smap" and "smapd" programs are part of the Trusted Information Systems (TIS) Firewall Toolkit, available from TIS, Inc. The TIS is available on the Internet via anonymous FTP, you will need the files: /pub/firewalls/toolkit/fwtk.tar.Z and fwtk-doc-only.tar.Z NOTE: Installation of "smap" and "smapd" is relatively simple, but it does represent a significant change in the way electronic mail will be handled at your site. Careful consideration should be given to requirements and installation options, and entensive testing performed prior to site-wide deployment. C. Disable the "EXPN" and "VRFY" commands in your current version of the "sendmail" command. This will prohibit an attacker from exploiting the vulnerability. 1. Sendmail versions 8.6.x or 8.7.x: Sendmail Version 8 provides the "p" configuration file option that allows you to configure the privacy and security features of your "sendmail" process. The format of the option is: Opwhat,what,what where "what" is one of several keywords that enable the various features. By listing the "noexpn" and "novrfy" keywords in this list, you can disable access to the "EXPN" and "VRFY" commands. After adding (or changing) this line in your configuration file, you must kill and restart the "sendmail" daemon. 2. Sendmail versions other than 8.6.x or 8.7.x: Prior to Version 8, there is no way to disable these commands through the configuration file or the command line. However, the commands can be disabled by patching the "sendmail" binary as follows. A. Make a backup copy of the sendmail binary, Patching binary files is not always successful and you will need to be able to recover. # cp -p /usr/lib/sendmail /usr/lib/sendmail.save # chmod 700 /usr/lib/sendmail.save B. Use the "strings" command to find the addresses of the "vrfy" and "expn" command name strings: # strings -o /usr/lib/sendmail | grep vrfy 240248 novrfy 240264 needvrfyhelo 276648 vrfy # strings -o /usr/lib/sendmail | grep expn 240256 noexpn 240280 needexpnhelo 276640 expn 280328 expn NOTE: The output you see may be different, the important information to note are the numbers in front of the "expn" and "vrfy" strings. C. Use "adb" to write a null byte on each of these commands. Note: Use the addresses output by your run of the "strings" command, not the numbers from the example above. # adb -w - /usr/lib/sendmail not core file = /usr/lib/sendmail a$d <-- converts to decimal addresses 276648/w 0 <-- writes zero byte on "vrfy" 0x438a8: 30322 = 0 276640/w 0 <-- writes zero byte on first "expn" 0x438a0: 25976 = 0 280328/w 0 <-- writes zero byte on second "expn" 0x44708: 25976 = 0 ^D <-- CTRL-D exits adb D. Verify the strings were removed: # strings -o /usr/lib/sendmail | grep vrfy 240248 novrfy 240264 needvrfyhelo # strings -o /usr/lib/sendmail | grep expn 240256 noexpn 240280 needexpnhelo E. Kill and restart the "sendmail" daemon. NOTE: Some mail user agents (the programs that users use to read and send mail) rely on the presence of the "VRFY" command which you just disabled. After performing the above steps, test all of the mail programs in use at your site to insure that they still operate correctly. D. Install the appropriate "sendmail" patch from your vendor. At the time this bulletin was issued, most major vendors were working this matter. Some will ship fixes to customers, others will issue patches that will be available for download. ASSIST will be sending out updates to this bulletin as additional information becomes available. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ASSIST would like to thank the IBM-ERS for information contained in this bulletin. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ASSIST is an element of the Defense Information Systems Agency (DISA), and provides service to the entire DoD community. Constituents of the DoD with questions about ASSIST or computer security issues, can contact ASSIST using one of the methods listed below. Non-DoD organizations/institutions, contact the Forum of Incident Response and Security Teams (FIRST) representative. To obtain a list of FIRST member organizations and their constituencies send an email to docserver@first.org with an empty "subject" line and a message body containing the line "send first-contacts". ASSIST Information Resources: To be included in the distribution list for the ASSIST bulletins, send your Milnet (Internet) e-mail address to assist-request@assist.mil. Back issues of ASSIST bulletins, and other security related information, are available from the ASSIST BBS at 703-607-4710, 327-4710, and through anonymous FTP from assist.mil (IP address 199.211.123.11). Note: assist.mil will only accept anonymous FTP connections from Milnet addresses that are registered with the NIC or DNS. If your system is not registered, you must provide your MILNET IP address to ASSIST before access can be provided. ASSIST Contact Information: PHONE: 800-357-4231, COMM 703-607-4700, DSN 327-4700. ELECTRONIC MAIL: assist@assist.mil. ASSIST BBS: COMM 703-607-4710, DSN 327-4710, leave a message for the "sysop". FAX: COMM 703-607-4735, DSN 607-4735 ASSIST uses Pretty Good Privacy (PGP) 2.6.2 as the digital signature mechanism for bulletins. PGP 2.6.2 incorporates the RSAREF(tm) Cryptographic Toolkit under license from RSA Data Security, Inc. A copy of that license is available via anonymous FTP from net-dist.mit.edu (IP 18.72.0.3) in the file /pub/PGP/rsalicen.txt, and through the world wide web from http://net-dist.mit.edu/pgp.html. In accordance with the terms of that license, PGP 2.6.2 may be used for non-commercial purposes only. Instructions for downloading the PGP 2.6.2 software can also be obtained from net-dist.mit.edu in the pub/PGP/README file. PGP 2.6.2 and RSAREF may be subject to the export control laws of the United States of America as implemented by the United States Department of State Office of Defense Trade Controls. The PGP signature information will be attached to the end of ASSIST bulletins. Reference herein to any specific commercial product, process, or service by trade name, trademark manufacturer, or otherwise, does not constitute or imply its endorsement, recommendation, or favoring by ASSIST. The views and opinions of authors expressed herein shall not be used for advertising or product endorsement purposes. - -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6 mQCNAi4uZ40AAAEEAM1uraimCNeh5PtzX7KoGxC2u8uMTdl8V5sujk3MHbWvCuOM W0FqDy5s9iwfQLZWzJ7cbM6L0mNOj8eJGoz7TqGKZDDRFlKAwg0x8joleZLC2gXw FVdF/g6Mdv7ok7heoa+Y//YMeADnsSrmzqLCnhFbKYffww3EbdH6sbnW3Io9AAUR tB9BU1NJU1QgVGVhbSA8YXNzaXN0QGFzc2lzdC5taWw+iQCVAwUQMJVF1JtBJ/Qs yeedAQFnqgQAp1rw7ONT41Mr3gHGs2aVpEwgOH6SeJ9sHZxUp4dJu+ogRMFrqdC+ +NBfzitzj9m1udFVDHpwsGawbv6wg43DDAKaTgIETCHYXa/OM5/9FCS3xJwC99Gb V1iOm8S/Q9FcJruKID9DG2WUJp2yPj+CjTuBQeLjGkqGjuSOR1TNXQiJAJUDBRAw lUPuYKf6jFkmJQkBAWg5A/9ykgo2ULWUsSzZjRkO9yPZUPAlpfH7ReaHwkapK69F fBzqwwQ8Gig1mL+qgmOHS8Zv+OAT491sWWsECN+dfpopFdsgS4Sec19ZjcMyhL1c BVIS9Cmbjetb6Kvfc39AMr0MRCrUlOkUd4qScjHysHFYRAwCl3STRjprNnUPKQbn f4kAlQMFEDB482bk8movIjSrbQEB/VgD/iap/CAb1jq8wMA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0HeKzxsQ E/nBFwJbgP6SQaYF4wy7TPuXw+IVVddp0p1riQCVAgUQLi5x6IdGPdIwvm+pAQFN EwP+Ml0i+yurXH1ZvQApz+HKwqLrRTNsNdHu2CsQ/OdGo4Vq4eqyPTvrI1OVjm6o jye7GR3RMPygEcz0oox/+YfB5cmGugpZLFsWLspswrFGGCXLXY3Bq7mpH14GENU5 JMlHzazeRvdDbkSv700Xu25JshjWIzfTY2nNUNfFlRefQoY= =8gi/ - -----END PGP PUBLIC KEY BLOCK----- -----BEGIN PGP SIGNATURE----- Version: 2.6 iQCVAwUBMQU2O9H6sbnW3Io9AQFefQP/ebEkQtGgaJlYN9xb9SP8MOgvARR6GmN+ METaQJMjuu7NDGYCsRe6aZlEYeNrd2HXXAUikmHP+b7DgT4Vrq5J8tjW2pCZc/kn OeyBf2jsabRnSdi3wGtQI70nJ4DP9rYZsXp+i7aB6mkHrfZK439o/ZWuDxyvfPPx cjgiVCsf1go= =P2Nl -----END PGP SIGNATURE----- -- _______ A S S I S T | / Automated Systems Security Incident Support Team | / Duty phone: +1 800 357 4231 (DSN 327 4700) 24hr | / Integritas Commercial +1 703 607 4700 24hr | < et 24hr pager: +1 800 791 4857 | \ Celeritas BBS: +1 703 607 4710 (DSN 327 4710) | \ Unclass FAX: +1 703 607 4735 (DSN 327 4735) | \ e-mail: ASSIST@ASSIST.MIL ------- Anonymous FTP: ASSIST.MIL (IP 199.211.123.11) **************************************************************************** * * * The point of contact for NIPRNET security-related incidents is the * * Security Coordination Center (SCC). * * * * E-mail address: SCC@NIC.DDN.MIL * * * * Telephone: 1-(800)-365-3642 * * * * NIC Help Desk personnel are available from 7:00 a.m.-7:00 p.m. EST, * * Monday through Friday except on federal holidays. * * * **************************************************************************** PLEASE NOTE: Some users outside of the DOD computing communities may receive DISN Security Bulletins. If you are not part of the DOD community, please contact your agency's incident response team to report incidents. Your agency's team will coordinate with DOD. The Forum of Incident Response and Security Teams (FIRST) is a world-wide organization. A list of FIRST member organizations and their constituencies can be obtained by sending email to docserver@first.org with an empty subject line and a message body containing the line: send first-contacts. This document was prepared as an service to the DOD community. Neither the United States Government nor any of their employees, makes any warranty, expressed or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government. The opinions of the authors expressed herein do not necessarily state or reflect those of the United States Government, and shall not be used for advertising or product endorsement purposes.