Original issue date: August 1, 2002<br>
Last revised: August 2, 2002<br>
Source: CERT/CC<br>

<p>A complete revision history is at the end of this file.</p>

<h2>Overview</h2>

<p>The CERT/CC has received confirmation that some copies of the
source code for the OpenSSH package were modified by an intruder and
contain a Trojan horse.</p>

<p>We strongly encourage sites which employ, redistribute, or mirror
the OpenSSH package to immediately verify the integrity of their
distribution.</p>

<h2>I. Description</h2>

<p>The CERT/CC has received confirmation that some copies of the
source code for the OpenSSH package have been modified by an intruder
and contain a Trojan horse. The following advisory has been released
by the OpenSSH development team</p>

<dl><dd> <a href="http://www.openssh.com/txt/trojan.adv">http://www.openssh.com/txt/trojan.adv</a>
</dl>

<p>The following files were modified to include the malicious
code:</p>

<blockquote><font face="courier">
	openssh-3.4p1.tar.gz<br>

	openssh-3.4.tgz<br>

	openssh-3.2.2p1.tar.gz<br>

</font></blockquote>

<p>These files appear to have been placed on the FTP server which
hosts ftp.openssh.com and ftp.openbsd.org on the 30th or 31st of July,
2002.  The OpenSSH development team replaced the Trojan horse copies
with the original, uncompromised versions at 13:00 UTC, August 1st,
2002.  The Trojan horse copy of the source code was available long
enough for copies to propagate to sites that mirror the OpenSSH
site.</p>

<p>The Trojan horse versions of OpenSSH contain malicious code that is
run when the software is compiled. This code connects to a fixed
remote server on 6667/tcp.  It can then open a shell running as the
user who compiled OpenSSH.</p>

<h2>II. Impact</h2>

<p>An intruder operating from (or able to impersonate) the remote
address specified in the malicious code can gain unauthorized remote
access to any host which compiled a version of OpenSSH from this
Trojan horse version of the source code.  The level of access would be
that of the user who compiled the source code.</p>

<h2>III. Solution</h2>

<p>We encourage sites who downloaded a copy of the OpenSSH
distribution to verify the authenticity of their distribution,
regardless of where it was obtained. Furthermore, we encourage users
to inspect any and all software that may have been downloaded from the
compromised site.  Note that it is not sufficient to rely on the
timestamps or sizes of the file when trying to determine whether or
not you have a copy of the Trojan horse version.</p>

<h4>Where to get OpenSSH</H4>

<p>The primary distribution site for OpenSSH is </p>

<dl><dd>
<a href="http://www.openssh.com/">http://www.openssh.com/</a>
</dl>

<p>Sites that mirror the OpenSSH source code are encouraged to verify
the integrity of their sources.</p>

<h4>Verify MD5 checksums</h4>
<p>You can use the following MD5 checksums to verify the integrity of
your OpenSSH source code distribution:</p>

<font face="courier">
Correct versions:<br>
<blockquote>

	459c1d0262e939d6432f193c7a4ba8a8 openssh-3.4p1.tar.gz<br>

	d5a956263287e7fd261528bb1962f24c openssh-3.4p1.tar.gz.sig<br>

	39659226ff5b0d16d0290b21f67c46f2 openssh-3.4.tgz<br>

	9d3e1e31e8d6cdbfa3036cb183aa4a01 openssh-3.2.2p1.tar.gz<br>

	be4f9ed8da1735efd770dc8fa2bb808a openssh-3.2.2p1.tar.gz.sig<br>

	      </font>
	  </blockquote>
<p>At least one version of the modified Trojan horse distributions was
reported to have the following checksum:</p>
<font face="courier">
Trojan horse version:<br>
<blockquote>

        3ac9bc346d736b4a51d676faa2a08a57 openssh-3.4p1.tar.gz<br>
	      </font>
	  </blockquote>

<h4>Verify PGP signature</h4>

<p>Additionally, distributions of the portable release of OpenSSH are
distributed with detached PGP signatures.  Note that the Trojan horse
versions were not signed correctly, and attempts to verify the
signatures would have failed.</p>

<p>As a matter of good security practice, the CERT/CC encourages users
to verify, whenever possible, the integrity of downloaded software.
For more information, see
<dl><dd>
<a href="http://www.cert.org/incident_notes/IN-2001-06.html">http://www.cert.org/incident_notes/IN-2001-06.html</a>
</dl>

<a name="vendors"></a>
<h2>Appendix A. - Vendor Information</h2>

   <p>

     This appendix contains information provided by vendors for this
     advisory.  As vendors report new information to the CERT/CC, we
     will update this section and note the changes in our revision
     history.  If a particular vendor is not listed below, we have not
     received their comments.

   </p>

<a name="connectiva"></a>

<h4>Connectiva Linux</h4>

   <blockquote>

   <p>
	Conectiva Linux distributes openssh-3.4p1 as a security
	update.  The distributed copy is the original one and is not
	affected by this trojan. The detached digital signature is
	always checked before building third party packages.

   </p>

   </blockquote>

<!-- end vendor -->

<a name="debian"></a>

<h4>Debian</h4>

<blockquote>
	    <p>
	Like one of our members, Matt Zimmerman, wrote earlier today:<br>
<br>
	pool/main/o/openssh/openssh_3.4p1.orig.tar.gz<br>
	has md5sum 459c1d0262e939d6432f193c7a4ba8a8<br>
	this refers to Debian GNU/Linux 3.0 (woody)<br>
<br>
	dists/potato/updates/main/source/openssh_3.4p1.orig.tar.gz<br>
	has md5sum 459c1d0262e939d6432f193c7a4ba8a8<br>
	this refers to Debian GNU/Linux 2.2 (potato)<br>
<br>
	security.debian.org/pool/updates/main/o/openssh/openssh_3.4p1.orig.tar.gz<br>
	has md5sum 459c1d0262e939d6432f193c7a4ba8a8<br>
	this refers to our security updates<br>
<br>
	all of which match the FreeBSD one, not the trojaned version.<br>
	They also match this signature:<br>
<br>
		ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-3.4p1.tar.gz.sig<br>
<br>
	from this key:<br>
<br>
	pub  1024D/86FF9C48 2001-02-26 Damien Miller (Personal Key) &lt;djm@mindrot.org&gt;<br>
		Key fingerprint =3D 3981 992A 1523 ABA0 79DB  FC66 CE8E CB03 86FF 9C48<br>
	sub  2048g/AA2B1C41 2001-02-26<br>

	    </p>
	  </blockquote>
<!-- end vendor -->

<a name="netbsd"></a>

<h4>NetBSD</h4>

<blockquote>
	    <p>
	Both the OpenSSH in the base NetBSD system, and the OpenSSH
	distribution files available from ftp.netbsd.org have never
	been compromised with this trojan code.
	    </p>
	    <p>
	NetBSD mirror sites retrieve their copy from ftp.netbsd.org,
	and so they would also be unaffected.
	    </p>
	    <p>
	NetBSD pkgsrc compares downloaded distribution files against a
	known-good SHA1 hash to prevent the use of trojaned
	distribution files.
	    </p>
	  </blockquote>

<!-- end vendor -->

<a name="nortel"></a>

<h4>Nortel Networks</h4>

<blockquote>
	    <p>
	Nortel Networks products and solutions are not affected by the
	vulnerability identified in CERT Advisory CA-2002-24.
	    </p>
	  </blockquote>

<!-- end vendor -->

<a name="ibm"></a>

<h4>IBM Corporation</h4>

<blockquote>
<p>
	IBM's AIX operating system does not ship with OpenSSH;
	however, OpenSSH is available for installation on AIX via the
	Linux Affinity Toolkit. The packages currently available on
	the website do not contain the trojan code. We have verified
	that our OpenSSH packages were generated from clean source
	packages from the OpenSSH organization.
	    </p>

	  </blockquote>

<!-- end vendor -->

<a name="mandrakesoft"></a>

<h4>MandrakeSoft</h4>

   <blockquote>

   <p>
	MandrakeSoft has verified that the openssh-3.4p1 sources used
	to build it's latest updates (ref. MDKSA-2002:040-1) do not
	contain this trojan.
   </p>

   </blockquote>

<!-- end vendor -->


<hr noshade>
<p>
Feedback can be directed to the author: <a
href="mailto:cert@cert.org?subject=CA-2002-24%20Feedback%20CERT%2333474">Chad Dougherty</a>.
</p>


<!--#include virtual="/include/footer_nocopyright.html" -->

<p>Copyright 2002 Carnegie Mellon University.</p>

<p>Revision History
<pre>
August 1, 2002: Initial release
August 1, 2002: Added IBM vendor statement
August 2, 2002: Added Debian, NetBSD, and Nortel vendor statements
</pre>
</p>