home *** CD-ROM | disk | FTP | other *** search
/ Hackers Handbook - Millenium Edition / Hackers Handbook.iso / library / hack / ssh-1.2.26.txt < prev    next >
Encoding:
Internet Message Format  |  1998-11-03  |  13.2 KB

  1. Date: 1 Nov 1998 20:43:19 -0000
  2. From: announce-outgoing@rootshell.com
  3.  
  4. 01. ssh 1.2.26 vulnerability
  5. ----------------------------
  6.  
  7. As most of you are aware, the Rootshell site was compromised on October
  8. 28th.  In order to keep the integrity of our investigation we have been
  9. fairly closed-lipped about this incident until now.  This has led to
  10. widespread rumors and speculation by netizens who have zero first hand
  11. knowledge about the break-in.
  12.  
  13. Some people now believe that we had no evidence of an ssh break-in.  SSH
  14. Communications Security Ltd. even went as far as saying they have analyzed
  15. the Rootshell logs, etc.  Unless they have broken into our network this is
  16. not possible.  We at Rootshell believe they are now simply in damage control
  17. mode and nothing else.
  18.  
  19. Since the very beginning, Rootshell has been working very closely with the
  20. folks at CERT, and the members of law enforcement to track down the
  21. individuals responsible for the Rootshell break-in.  As the ssh issue has
  22. been a very sensitive topic we have avoided making any statements until we
  23. were sure about anything one way or the other.  The *ONLY* thing Rootshell
  24. has ever said in public about SSH until now has been "The paranoid MAY want
  25. to disable ssh 1.2.26."
  26.  
  27. In order to show the type of evidence Rootshell has received at this point,
  28. below you will find a draft that IBM was intending to release on Monday
  29. about SSH.  They appear to have jumped the gun slightly and do not have
  30. working exploit code, but have found possible buffer overflows in the ssh
  31. 1.2.26 code.  Rootshell has also received further reports of exploit code
  32. going around in various circles.  SSH Communications Security Ltd. has
  33. evaluated this bulletin and now believes it is actually not a problem.
  34.  
  35. Rootshell will continue its investigation of this matter as well as other
  36. security issues and will make this information public as soon as possible. 
  37. I hope that this bulletin will at the very least put an end to the wild
  38. speculation that this was a hoax, or that we are just in the business of
  39. making wild accusations.
  40.  
  41. Please see http://www.ssh.fi/sshprotocols2/rootshell.html for their
  42. "analysis" of events.  It is sad that we had to learn of this URL from
  43. Slashdot.org instead of SSH directly.  They appear to have some serious
  44. communications dificuilties.  Both Rootshell and CERT were met with
  45. unanswered phones at SSH Communications Security Ltd. and Data Fellows when
  46. we attempted to research this matter.  Perhaps after this incident they can
  47. work on correcting these issues.
  48.  
  49. SSH is a trademark of SSH Communications Security Ltd.  All rights reserved.
  50.  
  51. [ end rant ]
  52.  
  53. --ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--
  54. ---EXTERNAL RELEASE---EXTERNAL RELEASE---EXTERNAL RELEASE---EXTERNAL RELEASE---
  55.                   =======  ============    ======       ======
  56.                   =======  ==============  =======     =======
  57.                     ===      ===     ====    ======   ======
  58.                     ===      ===========     ======= =======
  59.                     ===      ===========     === ======= ===
  60.                     ===      ===     ====    ===  =====  ===
  61.                   =======  ==============  =====   ===   =====
  62.                   =======  ============    =====    =    =====
  63.                            EMERGENCY RESPONSE SERVICE
  64.                           SECURITY VULNERABILITY ALERT
  65. 30 October 1998 18:00 GMT                        Number: ERS-SVA-E01-1998:005.1
  66. ===============================================================================
  67.                              VULNERABILITY  SUMMARY
  68. VULNERABILITY:  Buffer overflow condition in "sshd" logging facility
  69. PLATFORMS:      Versions of SSH up to and including SSH 1.2.26.  SSH 2.0.x
  70.                 is *not* believed to be vulnerable.
  71. SOLUTION:       Follow the procedures described in Section IV, below
  72. THREAT:         Local and remote users can obtain privileged access to the
  73.                 system.
  74. ===============================================================================
  75.                               DETAILED INFORMATION
  76. I. Description
  77. SSH (Secure Shell) is software that allows users to log into other computers
  78. over a network, execute commands on remote systems, and move files from one
  79. host to another.  It provides strong authentication and secure (encrypted)
  80. communications over insecure channels.
  81. SSH is produced by SSH Communications Security, Ltd., Finland (www.ssh.fi).
  82. SSH is distributed for non-commercial use from ftp://ftp.cs.hut.fi/pub/ssh;
  83. commercial licensing is handled by Data Fellows, Ltd. (www.datafellows.com).
  84. The IBM Global Security Analysis Laboratory has identified a buffer overflow
  85. vulnerability in the SSH server program, "sshd."
  86. The "log_msg" function, called by several parts of the server program to send
  87. information to the system log, copies user-supplied data into a local buffer
  88. without checking that the data will fit.  Several other similar logging, debug,
  89. and error functions perform this operation as well.  When a large amount of
  90. data is supplied, a buffer overrun condition will occur.  
  91. II. Impact
  92. If a user is able to exploit this vulnerability to create a buffer overrun, it
  93. may be possible for the user to supply machine-language program instructions
  94. that will then be executed with the privileges of the user running the "sshd"
  95. program, usually the super-user.
  96. This vulnerability can be exploited by local and remote users.
  97. The person exploiting the vulnerability does not need to have an account on
  98. the machine running "sshd" to succeed.
  99. III. Platform-Specific Threats
  100. This vulnerability affects recent (and perhaps older) 1.2.x versions of the
  101. "sshd" server.  The current 1.2.x version of the server is 1.2.26.
  102. It is believed that the 2.0.x versions of the "sshd" server do not contain
  103. this vulnerability.  The current 2.0.x version of the server is 2.0.9.
  104. IV. Solutions
  105. IBM-ERS has provided the information it has developed about this vulnerability
  106. to SSH Communications Security, Ltd, and anticipates that a new versions of
  107. SSH 1.2.x that fixes this vulnerability will be available soon.  When this new
  108. version becomes available, IBM-ERS urges all sites to upgrade their SSH
  109. servers to the new release as quickly as possible.
  110. In the meantime, however, IBM-ERS and the IBM GSAL have developed the three
  111. following specific actions that you can take to address this vulnerability.
  112. Option 1: Operate the "sshd" program with the "-q" option turned on.  Note
  113.           that this will disable the logging functions normally performed.
  114.           This may be undesirable in some situations.
  115. Option 2: If possible, upgrade to version 2.0.x of SSH.  This version supports
  116.           a newer, more capable version of the SSH protocol and offers
  117.           additional features.
  118. Option 3: Follow the procedure below to patch the SSH 1.2.26 source code to
  119.           address this vulnerability in a manner similar to the way the SSH
  120.           2.0.x source code addresses it.  NOTE: This procedure should only be
  121.           attempted by persons familiar with installing the SSH software from
  122.           source code.
  123.           1. Obtain the source code distributions for SSH 1.2.26 and SSH 2.0.9
  124.              from ftp://ftp.cs.hut.fi/pub/ssh or Data Fellows, Ltd.  Be sure
  125.              to observe all licensing requirements.
  126.           2. Copy the following files
  127.                 lib/sshutil/snprintf.h
  128.                 lib/sshutil/snprintf.c
  129.              from the SSH 2.0.9 directory to the SSH 1.2.26 directory (put
  130.              them at the top level, do not reproduce the subdirectories).
  131.           3. Edit "Makefile.in" in the SSH 1.2.26 directory and add the word
  132.              "snprintf.o" to the "COMMON_OBJS" and "SCP_OBJS" definitions.
  133.              Also add the word "snprintf.h" to the "HEADERS" definition.
  134.           4. Edit the files "log-server.c," "packet.c," and "scp.c" in the SSH
  135.              1.2.26 directory and do the following:
  136.                 a. Add the line
  137.                         #include "snprintf.h"
  138.                    near the top of each file with the rest of the "#include"
  139.                    lines.
  140.                 b. Locate all occurrences of
  141.                         vsprintf(buf, fmt, args);
  142.                    in each file and replace them with
  143.                         vsnprintf(buf, sizeof(buf), fmt, args);
  144.                    There are six (6) occurrences in "log-server.c," two (2) in
  145.                    "packet.c," and one (1) in "scp.c".
  146.           5. Edit "snprintf.h" and change the line
  147.                 #include "sshincludes.h"
  148.              to read
  149.                 #include "includes.h"
  150.              Also delete the two occurrences of the word "DLLEXPORT."
  151.           6. Edit "snprintf.c" and change the line
  152.                 #include "sshincludes.h"
  153.              to read
  154.                 #include "includes.h"
  155.              Also replace the one occurrence of "ssh_xmalloc" with "xmalloc",
  156.              and the two occurrences of "ssh_xfree" with "xfree".
  157.           7. Read the instructions in the "INSTALL" file in the SSH 1.2.26
  158.              directory to build and install the modifications made above.
  159. IBM-ERS and IBM GSAL have carefully examined the SSH 1.2.26 source code, and
  160. tested these steps on a production "sshd" server.  No ill effects have been
  161. observed.  However, because it is impossible to anticipate all possible
  162. environments in which SSH is used, the following disclaimer applies to the
  163. procedures above:
  164. THESE PROCEDURES ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, INCLUDING,
  165. WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR A
  166. PARTICULAR PURPOSE.  THIS ADVISORY DOES NOT CREATE OR IMPLY ANY SUPPORT
  167. OBLIGATIONS OR ANY OTHER LIABILITY ON THE PART OF IBM OR ITS SUBSIDIARIES.
  168. V. Acknowledgements
  169. IBM-ERS would like to thank Alan and Art at the IBM Global Security Analysis
  170. Laboratory for their work in identifying this problem.
  171. SSH and Secure Shell are trademarks or registered trademarks of SSH
  172. Communications Security Ltd.
  173. ===============================================================================
  174. IBM's Internet Emergency Response Service (IBM-ERS) is a subscription-based
  175. Internet security response service that includes computer security incident
  176. response and management, regular electronic verification of your Internet
  177. gateway(s), and security vulnerability alerts similar to this one that are
  178. tailored to your specific computing environment.  By acting as an extension
  179. of your own internal security staff, IBM-ERS's team of Internet security
  180. experts helps you quickly detect and respond to attacks and exposures across
  181. your Internet connection(s).
  182. As a part of IBM's Business Recovery Services organization, the IBM Internet
  183. Emergency Response Service is a component of IBM's SecureWay(tm) line of
  184. security products and services.  From hardware to software to consulting,
  185. SecureWay solutions can give you the assurance and expertise you need to
  186. protect your valuable business resources.  To find out more about the IBM
  187. Internet Emergency Response Service, send an electronic mail message to
  188. ers-sales@vnet.ibm.com, or call 1-800-742-2493 (Prompt 4).
  189. IBM-ERS maintains a site on the World Wide Web at http://www.ers.ibm.com/.
  190. Visit the site for information about the service, copies of security alerts,
  191. team contact information, and other items.
  192. IBM-ERS uses Pretty Good Privacy* (PGP*) as the digital signature mechanism for
  193. security vulnerability alerts and other distributed information.  The IBM-ERS
  194. PGP* public key is available from http://www.ers.ibm.com/team-info/pgpkey.html.
  195. "Pretty Good Privacy" and "PGP" are trademarks of Philip Zimmermann.
  196. IBM-ERS is a Member Team of the Forum of Incident Response and Security Teams
  197. (FIRST), a global organization established to foster cooperation and response
  198. coordination among computer security teams worldwide.
  199. Copyright 1998 International Business Machines Corporation.
  200. The information in this document is provided as a service to customers of
  201. the IBM Emergency Response Service.  Neither International Business Machines
  202. Corporation, nor any of its employees, makes any warranty, express or implied,
  203. or assumes any legal liability or responsibility for the accuracy, complete-
  204. ness, or usefulness of any information, apparatus, product, or process
  205. contained herein, or represents that its use would not infringe any privately
  206. owned rights.  Reference herein to any specific commercial products, process,
  207. or service by trade name, trademark, manufacturer, or otherwise, does not
  208. necessarily constitute or imply its endorsement, recommendation or favoring
  209. by IBM or its subsidiaries.  The views and opinions of authors expressed
  210. herein do not necessarily state or reflect those of IBM or its subsidiaries,
  211. and may not be used for advertising or product endorsement purposes.
  212. The material in this security alert may be reproduced and distributed,
  213. without permission, in whole or in part, by other security incident response
  214. teams (both commercial and non-commercial), provided the above copyright is
  215. kept intact and due credit is given to IBM-ERS.
  216. This security alert may be reproduced and distributed, without permission,
  217. in its entirety only, by any person provided such reproduction and/or
  218. distribution is performed for non-commercial purposes and with the intent of
  219. increasing the awareness of the Internet community.
  220. ---EXTERNAL RELEASE---EXTERNAL RELEASE---EXTERNAL RELEASE---EXTERNAL RELEASE---
  221. --ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--
  222.  
  223.