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

  1.  
  2.              __________________________________________________________
  3.  
  4.                        The U.S. Department of Energy
  5.                     Computer Incident Advisory Capability
  6.                            ___  __ __    _     ___
  7.                           /       |     /_\   /
  8.                           \___  __|__  /   \  \___
  9.              __________________________________________________________
  10.  
  11.                              INFORMATION BULLETIN
  12.  
  13.                           Unix sendmail vulnerability
  14.  
  15. January 31, 1996 15:00 GMT                                           Number G-09
  16. ________________________________________________________________________________
  17. PROBLEM:       Sendmail (prior to Sendmail 8.6.10) contains a vulnerability
  18.                which allows local and remote users to execute privileged
  19. commands
  20. PLATFORM:      All versions of "sendmail" prior to Version 8.6.10, including
  21.                Sendmail 5.67+IDA-1.5 and most vendor versions
  22. DAMAGE:        Local and remote users can gain privileged access
  23. SOLUTION:      Upgrade to a latest version of Sendmail (current version is
  24.                8.7.3)
  25. ________________________________________________________________________________
  26. VULNERABILITY  This vulnerability is being actively exploited on the Internet
  27. ASSESSMENT:
  28. ________________________________________________________________________________
  29.  
  30. The following information has been reprinted from the Automated
  31. Systems Security Incident Support Team (ASSIST) 96-603 Bulletin.
  32.  
  33. [START ASSIST BULLETIN]
  34.  
  35. SUMMARY: All versions of "sendmail" prior to Version 8.6.10,
  36. including Sendmail 5.67+IDA-1.5 and most vendor versions, contain
  37. a vulnerability that could allow unauthorized root access.  This
  38. vulnerability is being actively exploited on the Internet.
  39.  
  40. BACKGROUND: The vulnerability is exploited through the use of the SMTP
  41. "EXPN" and "VRFY" commands offered by all versions of "sendmail."  A
  42. buffer-overrun problem is present in the implementation of these
  43. commands that allows the executable code of the "sendmail" process to
  44. be overwritten.  This executable code can do anything the author
  45. wants, and is run with super-user permissions.
  46.  
  47. This vulnerability was fixed in Sendmail Version 8.6.10, which was
  48. released on 21 February 1995.  The current version of Sendmail is
  49. 8.7.3, which was released on 3 December 1995.  The versions of
  50. "sendmail" provided by most UNIX workstation vendors are based on
  51. Versions 5.64, 5.65, or 5.67.  Unless the vendor has taken
  52. considerable care to secure their version of "sendmail" (most vendors
  53. have not), these versions are vulnerable to this problem.  The only
  54. vendor version of "sendmail" that has been confirmed as not vulnerable
  55. to this problem is the one shipped with Solaris 2.5 (but not earlier
  56. versions of Solaris) from Sun Microsystems; this version is based on
  57. "sendmail" 8.6.12.  The "IDA" version of "sendmail," a popular public
  58. domain version that offers enhanced mail delivery and user database
  59. features, is based on Version 5.67, and is thus vulnerable to this
  60. problem.
  61.  
  62. IMPACT: Successful exploitation of this vulnerability allows an
  63. attacker to execute arbitrary commands on the local system with
  64. super-user ("root") permissions and gain unrestricted access to
  65. system resources.
  66.  
  67. RECOMMENDED SOLUTIONS:
  68. There are four possible solutions to this problem:
  69.  
  70. A. Install Sendmail Version 8.7.3.  This version of "sendmail" is
  71. under active development and offers major improvements, especially
  72. in the area of security.  Sendmail 8.7.3 is available via the
  73. Internet by anonymous FTP from ftp.cs.berkeley.edu (128.32.35.31)
  74. in /ucb/sendmail/sendmail.8.7.3.tar.Z.  Other information
  75. resources for sendmail are the "comp.mail.sendmail" USENET
  76. newsgroup and the book "Sendmail," by Bryan Costales, Eric
  77. Allman, and Neil Rickert, published by O'Reilly & Associates
  78. (http://www.ora.com).  Note: While compiling and installing a new
  79. version of sendmail is not difficult, , modifying the
  80. configuration file (the file that specifies how mail is to be
  81. delivered) to work with the new version of the program is often
  82. non-trivial.  A complete rewrite of the existing configuration
  83. file may be required, and this is a process that may require
  84. several days at a minimum to complete.  Option A is not
  85. recommended unless you have extensive UNIX system administration
  86. experience.
  87.  
  88. B. Install the "smap" and "smapd" programs on all UNIX systems
  89. connected to the Internet.  The "smap" program provides a minimal
  90. SMTP implementation that accepts mail messages from the network
  91. and stores them for later delivery.  The "smapd" program
  92. periodically runs "sendmail" on these stored messages, and thus
  93. "sendmail" is no longer reachable directly from the network and
  94. its security vulnerabilities can no longer be exploited.
  95.  
  96. The "smap" and "smapd" programs are part of the Trusted
  97. Information Systems (TIS) Firewall Toolkit, available from TIS,
  98. Inc.  The TIS is available on the Internet via anonymous FTP,
  99. you will need the files:
  100. /pub/firewalls/toolkit/fwtk.tar.Z and fwtk-doc-only.tar.Z
  101. NOTE: Installation of "smap" and "smapd" is relatively simple, but
  102. it does represent a significant change in the way electronic mail
  103. will be handled at your site.  Careful consideration should
  104. be given to requirements and installation options, and entensive
  105. testing performed prior to site-wide deployment.
  106.  
  107. C. Disable the "EXPN" and "VRFY" commands in your current version
  108. of the "sendmail" command.  This will prohibit an attacker from
  109. exploiting the vulnerability.
  110.  
  111.    1. Sendmail versions 8.6.x or 8.7.x:
  112.    Sendmail Version 8 provides the "p" configuration file option
  113.    that allows you to configure the privacy and security features
  114.    of your "sendmail" process.  The format of the option is:
  115.  
  116.       Opwhat,what,what
  117.  
  118.    where "what" is one of several keywords that enable the
  119.    various features.  By listing the "noexpn" and "novrfy"
  120.    keywords in this list, you can disable access to the "EXPN" and
  121.    "VRFY" commands.  After adding (or changing) this line in your
  122.    configuration file, you must kill and restart the "sendmail"
  123.    daemon.
  124.  
  125.    2. Sendmail versions other than 8.6.x or 8.7.x:
  126.    Prior to Version 8, there is no way to disable these commands
  127.    through the configuration file or the command line.  However,
  128.    the commands can be disabled by patching the "sendmail" binary
  129.    as follows.
  130.  
  131.       A. Make a backup copy of the sendmail binary, Patching binary
  132.       files is not always successful and you will need to be able
  133.       to recover.
  134.       # cp -p /usr/lib/sendmail /usr/lib/sendmail.save
  135.       # chmod 700 /usr/lib/sendmail.save
  136.  
  137.       B. Use the "strings" command to find the addresses of the
  138.       "vrfy" and "expn" command name strings:
  139.       # strings -o /usr/lib/sendmail | grep vrfy
  140.        240248 novrfy
  141.        240264 needvrfyhelo
  142.        276648 vrfy
  143.       # strings -o /usr/lib/sendmail | grep expn
  144.        240256 noexpn
  145.        240280 needexpnhelo
  146.        276640 expn
  147.        280328 expn
  148.       NOTE: The output you see may be different, the important
  149.       information to note are the numbers in front of the "expn"
  150.       and "vrfy" strings.
  151.  
  152.       C. Use "adb" to write a null byte on each of these commands.
  153.       Note: Use the addresses output by your run of the "strings"
  154.       command, not the numbers from the example above.
  155.       # adb -w - /usr/lib/sendmail
  156.        not core file = /usr/lib/sendmail
  157.        a$d                     <-- converts to decimal addresses
  158.        276648/w 0              <-- writes zero byte on "vrfy"
  159.        0x438a8:        30322   =       0
  160.        276640/w 0              <-- writes zero byte on first "expn"
  161.        0x438a0:        25976   =       0
  162.        280328/w 0              <-- writes zero byte on second "expn"
  163.        0x44708:        25976   =       0
  164.        ^D                      <-- CTRL-D exits adb
  165.  
  166.       D. Verify the strings were removed:
  167.       # strings -o /usr/lib/sendmail | grep vrfy
  168.        240248 novrfy
  169.        240264 needvrfyhelo
  170.       # strings -o /usr/lib/sendmail | grep expn
  171.        240256 noexpn
  172.        240280 needexpnhelo
  173.  
  174.       E. Kill and restart the "sendmail" daemon.  NOTE: Some mail
  175.       user agents (the programs that users use to read and send mail)
  176.       rely on the presence of the "VRFY" command which you just
  177.       disabled.  After performing the above steps, test all of the
  178.       mail programs in use at your site to insure that they still
  179.       operate correctly.
  180.  
  181. D. Install the appropriate "sendmail" patch from your vendor.  At the
  182. time this bulletin was issued, most major vendors were working this
  183. matter.  Some will ship fixes to customers, others will issue patches
  184. that will be available for download.  ASSIST will be sending out
  185. updates to this bulletin as additional information becomes available.
  186.  
  187. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  188.  
  189. ASSIST would like to thank the IBM-ERS for information contained in
  190. this bulletin.
  191.  
  192. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  193.  
  194. [END ASSIST BULLETIN]
  195. ________________________________________________________________________________
  196.  
  197. CIAC wishes to acknowledge ASSIST and IBM-ERS for providing the
  198. information contained in this bulletin.
  199. ________________________________________________________________________________
  200.  
  201. CIAC, the Computer Incident Advisory Capability, is the computer
  202. security incident response team for the U.S. Department of Energy (DOE) and the
  203. National Institute of Health (NIH). CIAC is located at the Lawrence Livermore
  204. National Laboratory in Livermore, California. CIAC is also a founding member of
  205. FIRST, the Forum of Incident Response and Security Teams, a global organization
  206. established to foster cooperation and coordination among computer security teams
  207.  
  208. worldwide.
  209.  
  210. CIAC services are available to DOE, DOE contractors, and the NIH. CIAC can be
  211. contacted at:
  212.     Voice:    +1 510-422-8193
  213.     FAX:      +1 510-423-8002
  214.     STU-III:  +1 510-423-2604
  215.     E-mail:   ciac@llnl.gov
  216.  
  217. For emergencies and off-hour assistance, DOE, DOE contractor sites, and the NIH
  218. may contact CIAC 24-hours a day. During off hours (5PM - 8AM PST), call the CIAC
  219.  
  220. voice number 510-422-8193 and leave a message, or call 800-759-7243
  221. (800-SKY-PAGE) to send a Sky Page. CIAC has two Sky Page PIN numbers, the
  222. primary PIN number, 8550070, is for the CIAC duty person, and the secondary
  223. PIN number, 8550074 is for the CIAC Project Leader.
  224.  
  225. Previous CIAC notices, anti-virus software, and other information are
  226. available from the CIAC Computer Security Archive.
  227.  
  228.    World Wide Web:      http://ciac.llnl.gov/
  229.    Anonymous FTP:       ciac.llnl.gov (128.115.19.53)
  230.    Modem access:        +1 (510) 423-4753 (14.4K baud)
  231.                         +1 (510) 423-3331 (14.4K baud)
  232.  
  233. CIAC has several self-subscribing mailing lists for electronic publications:
  234. 1. CIAC-BULLETIN for Advisories, highest priority - time critical information
  235.    and Bulletins, important computer security information;
  236. 2. CIAC-NOTES for Notes, a collection of computer security articles;
  237. 3. SPI-ANNOUNCE for official news about Security Profile Inspector (SPI)
  238.    software updates, new features, distribution and availability;
  239. 4. SPI-NOTES, for discussion of problems and solutions regarding the use of
  240.    SPI products.
  241.  
  242. Our mailing lists are managed by a public domain software package called
  243. ListProcessor, which ignores E-mail header subject lines. To subscribe (add
  244. yourself) to one of our mailing lists, send the following request as the
  245. E-mail message body, substituting CIAC-BULLETIN, CIAC-NOTES, SPI-ANNOUNCE or
  246. SPI-NOTES for list-name and valid information for LastName FirstName and
  247. PhoneNumber when sending
  248.  
  249. E-mail to       ciac-listproc@llnl.gov:
  250.         subscribe list-name LastName, FirstName PhoneNumber
  251.   e.g., subscribe ciac-notes OHara, Scarlett W. 404-555-1212 x36
  252.  
  253. You will receive an acknowledgment containing address, initial PIN, and
  254. information on how to change either of them, cancel your subscription, or
  255. get help.
  256.  
  257. PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing communities
  258. receive CIAC bulletins.  If you are not part of these communities, please
  259. contact your agency's response team to report incidents. Your agency's team
  260. will coordinate with CIAC. The Forum of Incident Response and Security Teams
  261. (FIRST) is a world-wide organization. A list of FIRST member organizations and
  262. their constituencies can be obtained by sending email to docserver@first.org
  263. with an empty subject line and a message body containing the line: send
  264. first-contacts.
  265.  
  266. This document was prepared as an account of work sponsored by an agency of the
  267. United States Government. Neither the United States Government nor the
  268. University of California nor any of their employees, makes any warranty,
  269. express or implied, or assumes any legal liability or responsibility for the
  270. accuracy, completeness, or usefulness of any information, apparatus, product,
  271. or process disclosed, or represents that its use would not infringe privately
  272. owned rights. Reference herein to any specific commercial products, process,
  273. or service by trade name, trademark, manufacturer, or otherwise, does not
  274. necessarily constitute or imply its endorsement, recommendation or favoring by
  275. the United States Government or the University of California. The views and
  276. opinions of authors expressed herein do not necessarily state or reflect those
  277. of the United States Government or the University of California, and shall not
  278. be used for advertising or product endorsement purposes.
  279.  
  280. LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC)
  281.  
  282. (F-27)  Incorrect Permissions on /tmp
  283. (F-28)  Vulnerability in SunOS 4.1.* Sendmail (-oR option)
  284. (G-1)   Telnetd Vulnerability
  285. (G-2)   SunOS 4.1.X Loadmodule Vulnerability
  286. (G-3)   AOLGOLD Trojan Program
  287. (G-4)   X Authentication Vulnerability
  288. (G-5)   HP-UX FTP Vulnerability Bulletin
  289. (G-06A) Win95 Vulnerabilities
  290. (G-07)  SGI Object Server Vulnerability
  291. (G-08)  splitvt(1) vulnerability
  292.  
  293. RECENT CIAC NOTES ISSUED (Previous Notes available from CIAC)
  294.  
  295. Notes 07 - 3/29/95   A comprehensive review of SATAN
  296.  
  297. Notes 08 - 4/4/95    A Courtney update
  298.  
  299. Notes 09 - 4/24/95   More on the "Good Times" virus urban legend
  300.  
  301. Notes 10 - 6/16/95   PKZ300B Trojan, Logdaemon/FreeBSD, vulnerability
  302.                      in S/Key, EBOLA Virus Hoax, and Caibua Virus
  303.  
  304. Notes 11 - 7/31/95   Virus Update, Hats Off to Administrators,
  305.                      America On-Line Virus Scare, SPI 3.2.2 Released,
  306.                      The Die_Hard Virus
  307.  
  308. Notes 12 - 9/12/95   Securely configuring Public Telnet Services, X Windows,
  309.                      beta release of Merlin, Microsoft Word Macro Viruses,
  310.                      Allegations of Inappropriate Data Collection in Win95
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317. -----BEGIN PGP SIGNATURE-----
  318. Version: 2.6.2
  319.  
  320. iQCVAwUBMQ/36LnzJzdsy3QZAQEJvQQAuytcMTTvjzaTpojcTaDFPGPz53mCFkwQ
  321. i46mv5LZU32w8tED3+NNgn65fzG4VAvBXSLKC7thUzs/hnnn0RwSpmWOM6HKUwdw
  322. LiDxNZftNBpMn3CldF4VjhwVOaVfHEwkIUWBDTwMKXDULTJS01UxXCBLRaUC3cPg
  323. jgsSwjiRFow=
  324. =rhvj
  325. -----END PGP SIGNATURE-----
  326.  
  327.  
  328.  
  329. ---
  330. "Some call him the coolest cybernetic sidewalk surfer ever to hang-ten
  331. on the shoulders of the Great Information Superhiway."
  332.  
  333. --- ifmail v.2.8.lwz
  334.  * Origin: Monolithic Diversified Enterprises (1:340/13@fidonet)
  335.  
  336.