Microsoft SQL Slammer Worm Propagation

	Internet Security systems Security Alert
January 25, 2003

Microsoft SQL Slammer Worm Propagation

Synopsis:

ISS X-Force has learned of a worm that is spreading via Microsoft SQL
servers. The worm is responsible for large amounts of Internet traffic as
well as millions of UDP/IP probes at the time of this alert's publication.
This worm attempts to exploit MS/SQL servers vulnerable to the SQL Server
Resolution service buffer overflow (CVE CAN-2002-0649). Once a vulnerable
computer is compromised, the worm will infect that target, randomly select a
new target, and resend the exploit and propagation code to that host.

Impact:

Although the Slammer worm is not destructive to the infected host, it does
generate a damaging level of network traffic when it scans for additional
targets. A large amount of network traffic is created by the worm, which
scans random IP addresses for vulnerable servers. Billions of attacks have
been detected in the last 12 hours from various industry sources, including
ISS MSS (Managed Security Services). ISS has received reports that several
major national ISPs were either experiencing severe latency or were completely 
unreachable during the same time frame.

Affect Versions:

Microsoft SQL Server 2000
Microsoft Desktop Engine (MSDE) 2000

Note: Unpatched or base installations older than SP3 are vulnerable.

Description:

The Slammer worm propagates via Microsoft SQL installations without patches
from Microsoft Security Bulletin MS02-039 or higher. The main function of the
Slammer worm is to continue propagation. No DDOS or backdoor functionality is
incorporated into the worm.  Infection can be removed with a reboot, however
without protection in place, it is likely that vulnerable servers will be
quickly re-infected.

The Slammer worm loads Kernel32.dll and WS2_32.dll and then calls GetTickCount
which is used as a seed for a random IP address routine. This routine then
continuously sends 376 bytes of exploit and propagation code across port
1434/UDP until the SQL Server process is shut down. The Slammer worm does not
prefer to scan local subnet addresses like the Nimda worm. This will limit
the speed of propagation across local networks, but this scanning method
generates large amounts of traffic that can overwhelm networks.

The Slammer worm simply seeks to replicate itself and does not try to further
compromise servers or retain access to compromised hosts. The Slammer worm does
not infect or modify files, it only exists in memory.

Recommendations:

ISS X-Force recommends that system administrators immediately take steps to
protect their networks. To remove the infection, apply the necessary patches
listed below and restart the server. This action will remove the worm from
memory.

The following ISS updates address the issues described in this alert. These
updates are available from the ISS Download center (http://www.iss.net/download)
  
RealSecure Network Sensor XPU 20.4 and XPU 5.3 (available 9/17/02) or greater. 

SQL_SSRP_StackBo - (http://www.iss.net/security_center/static/10031.php)

Internet Scanner XPU 6.15 (available 7/25/02). 
MssqlMs02039Patch - (http://www.iss.net/security_center/static/9666.php)
MssqlMs02038Patch - (http://www.iss.net/security_center/static/9667.php)

Internet Scanner XPU 6.25 (available 1/28/02). 
MssqlResolutionServiceBo - (http://www.iss.net/security_center/static/9661.php)

Systems Scanner Service Release 3.10 (available 12/19/02).
MS02-039
MS02-038

ISS RealSecure Guard, RealSecure Desktop Protector, BlackIce Agent for Server,
BlackIce PC Protection and BlackIce Server Protection customers can configure
an agent from the local console or many agents through ICEcap Manager to block
UDP traffic on this port. For detailed instructions on configuring these
options, refer to the ISS Knowledgebase, Answer ID 1867
http://www.iss.net/support/knowledgebase  

Microsoft SQL Server customers should refer to the following address for
information on securing Microsoft SQL Server against this buffer overflow:
http://www.microsoft.com/technet/security/bulletin/MS02-039.asp  

Please remember that while your ISS security applications are not vulnerable
to this attack, the servers they operate on may be vulnerable. As part of your
patching effort related to SQL Slammer, remember to include critical servers
or local MSDE databases running ISS security applications.

Additional Information: 

ISS has produced a lightweight command-line SQL Slammer scanning tool.
This tool can locate and report vulnerable systems. Please visit the
following site for more information: 
http://www.iss.net/support/product_utilities/sqlslammer.php

The Common Vulnerabilities and Exposures (CVE) project has assigned the name
CAN-2002-0649 to this issue. This is a candidate for inclusion in the CVE
list http://cve.mitre.org), which standardizes names for security problems.

NGSSoftware Insight Security Research Advisory #NISR25072002, "Unauthenticated
Remote Compromise in MS SQL Server 2000" at:
http://www.ngssoftware.com/advisories/mssql-udp.txt

Microsoft Security Bulletin MS02-039, "Buffer Overruns in SQL Server 2000
Resolution Service Could Enable Code Execution (Q323875)" at 
http://www.microsoft.com/technet/security/bulletin/MS02-039.asp

CERT Advisory CA-2002-22, "Multiple Vulnerabilities in Microsoft SQL Server"
at: http://www.cert.org/advisories/CA-2002-22.html

CERT Vulnerability Note VU#484891, "Microsoft SQL Server 2000 contains stack
buffer overflow in SQL Server Resolution Service" at:
http://www.kb.cert.org/vuls/id/484891

NGSSoftware Insight Security Research Advisory #NISR03092002B, "Windows .NET
Server (RC1) and MSDE" at:
http://www.nextgenss.com/advisories/dotnet-msde.txt

Standards associated with this entry: 
BID-5311: Microsoft SQL Server 2000 Resolution Service Stack Overflow
Vulnerability

______

About Internet Security Systems (ISS)
Founded in 1994, Internet Security Systems (ISS) (Nasdaq: ISSX) is a
pioneer and world leader in software and services that protect critical
online resources from an ever-changing spectrum of threats and misuse.
Internet Security Systems is headquartered in Atlanta, GA, with
additional operations throughout the Americas, Asia, Australia, Europe
and the Middle East.

Copyright (c) 2003 Internet Security Systems, Inc. All rights reserved
worldwide.

Permission is hereby granted for the electronic redistribution of this
document. It is not to be edited or altered in any way without the
express written consent of the Internet Security Systems X-Force. If you
wish to reprint the whole or any part of this document in any other
medium excluding electronic media, please email  for
permission.

Disclaimer: The information within this paper may change without notice.
Use of this information constitutes acceptance for use in an AS IS
condition. There are NO warranties, implied or otherwise, with regard to
this information or its use. Any use of this information is at the
user's risk. In no event shall the author/distributor (Internet Security
Systems X-Force) be held liable for any damages whatsoever arising out
of or in connection with the use or spread of this information.
X-Force PGP Key available on MIT's PGP key server and PGP.com's key server,
as well as at 
Please send suggestions, updates, and comments to: X-Force
 of Internet Security Systems, Inc.