The CERT Coordination Center publishes incident notes to provide
information about incidents to the Internet community.

<h2>Exploitation of vulnerability in SSH1 CRC-32 compensation attack detector</h2>

Original release Date: November 5, 2001<br/>
Last revised: November 7, 2001<br/>
<a name="overview">
<h2>I. Overview</h2>
<p>
The CERT/CC has received multiple reports of systems being compromised
via the CRC-32 compensation attack detector vulnerability described in 
<a href="http://www.kb.cert.org/vuls/id/945216">VU#945216</a>.  We are
also receiving reports of increased scanning activity for the SSH
service (22/tcp).


<h2>II. Description</h2>
<p>In reports received by the CERT/CC, systems compromised via this
vulnerablity have exhibited the following pattern in system log messages:

<dl><dd>
<pre>
hostname sshd[xxx]: Disconnecting: Corrupted check bytes on input.
hostname sshd[xxx]: Disconnecting: crc32 compensation attack: network attack detected
hostname sshd[xxx]: Disconnecting: crc32 compensation attack: network attack detected
...
</pre>
</dd></dl>
<p>The exploit for this vulnerability appears to use a brute force
method, so many messages of this type may be logged before a system is successfully
compromised.

<p>The following artifacts have been discovered on systems that were
successfully compromised:

<ul>
<li>Installation of rootkits that modify standard system utilities to hide the intruder's actions
<li>Installation of Trojan horse versions of the SSH software, compiled from the latest OpenSSH source code plus intruder-supplied modifications
<li>Installation of tools to scan large network blocks for other systems that are vulnerable to compromise.  Log files left behind from these tools indicate that they operate by looking for the banner displayed upon connection to the sshd service.
</li></li></li></ul>
<h2>III. Impact</h2>

An intruder can execute arbitrary code with the privileges of the SSH
daemon, typically root.

<h2>IV. Solutions</h2>
<h4>Apply a patch</h4>

Please refer to the vendor information contained in <a href="http://www.kb.cert.org/vuls/id/945216">VU#945216</a> for
information on available patches.  In cases where patches are not
available, the CERT/CC recommends upgrading to the latest version of
the appropriate secure shell software package.
</p>
<h4>Disable SSHv1 fallback support</h4>

Because the vulnerability affects software handling the SSHv1
protocol, sites may wish to enable SSHv2 support only and disable
SSHv1 fallback support.  Refer to your secure shell server software
documentation for information about how to accomplish this.

<p>Disabling SSHv1 support is generally a good practice, since a
number of other vulnerabilities exist in the SSHv1 protocol itself and
software handling of this protocol.

<h4><b>Restrict access to the secure shell service</b></h4>
<p>Until a patch can be applied, you may wish to restrict access to
the secure shell service. This can be accomplished by applying packet
filters for port 22/tcp at your network perimeter.  While this measure
will limit your exposure to attacks, blocking port 22/tcp at a network
perimeter would still allow attackers within the perimeter of your
network to exploit the vulnerability. It is important to understand
your network's configuration and service requirements before deciding
what changes are appropriate.
</p>
<p>In cases where applying packet filters is not feasible, host-based
access control can be used.  Some secure shell implementations support
builtin access control by means of the <font face="Courier">AllowHosts</font> directive in the SSH server
configuration file.  If this support is not available, software such
as Wietse Venema's TCP Wrappers can be used to restrict access to the
secure shell daemon.
</p>
<p>If you believe a host under your control has been compromised, you
may wish to refer to
<dl><dd>
<a href="http://www.cert.org/tech_tips/win-UNIX-system_compromise.html">
Steps for Recovering from a UNIX or NT System Compromise</a>
</dd></dl>
<p>
<hr noshade="" width="100%"/>
<b>Author(s)</b>: <a href="mailto:cert@cert.org?subject=IN-2001-12%20Feedback">Roman Danyliw, Chad Dougherty, John Shaffer</a>
<hr noshade="" width="100%"/>
<h2>CERT/CC Contact Information</h2>
<dl>
<b>Email:</b> <a href="mailto:cert@cert.org">cert@cert.org</a><br/>
<b>Phone:</b> +1 412-268-7090 (24-hour hotline)<br/>
<b>Fax:</b> +1 412-268-6989<br/>
<b>Postal address:</b><br/>
<dd>
CERT Coordination Center<br/>
Software Engineering Institute<br/>
Carnegie Mellon University<br/>
Pittsburgh PA 15213-3890<br/>
U.S.A.<br/>
</dd></dl>

CERT personnel answer the hotline 08:00-17:00 EST(GMT-5) / EDT(GMT-4)
Monday through Friday; they are on call for emergencies during other
hours, on U.S. holidays, and on weekends.
<p>
<h4>Using encryption</h4>
<p>We strongly urge you to encrypt sensitive information sent by
email.  Our public PGP key is available from<p>
<ul>
<a href="http://www.cert.org/CERT_PGP.key">http://www.cert.org/CERT_PGP.key</a>
</ul>

If you prefer to use DES, please call the CERT hotline for more
information.<p>
<h4>Getting security information</h4>

CERT publications and other security information are available from
our web site<p>
<ul>
<a href="http://www.cert.org/">http://www.cert.org/</a>
</ul>

To subscribe to the CERT mailing list for advisories and bulletins, send email to
<a href="mailto:majordomo@cert.org">majordomo@cert.org</a>. Please include in the body of your
message<br/>
<p><tt>subscribe cert-advisory</tt>
<p>

* "CERT" and "CERT Coordination Center" are registered in the U.S. Patent and Trademark Office.<p>
<hr noshade="" width="100%"/>
<b><u>NO WARRANTY</u></b><br/>
<b>Any material furnished by Carnegie Mellon University and the
Software Engineering Institute is furnished on an "as is"
basis. Carnegie Mellon University makes no warranties of any kind,
either expressed or implied as to any matter including, but not
limited to, warranty of fitness for a particular purpose or
merchantability, exclusivity or results obtained from use of the
material. Carnegie Mellon University does not make any warranty of any
kind with respect to freedom from patent, trademark, or copyright
infringement.</b>
<hr/>
<a href="http://www.cert.org/legal_stuff.html">Conditions for use, disclaimers, and sponsorship information</a><p>
<p>Copyright 2001 Carnegie Mellon University.</p>
<p>Revision History
<pre>
November 5, 2001: Initial Release
November 7, 2001: Avoid confusion between commercial product and general terms
</pre>

<!--#include virtual="/cert/include/footer.html"--></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></a>