CERT® Incident Note IN-2002-04
The CERT Coordination Center publishes incident notes to provide information about incidents to the Internet community.
Exploitation of Vulnerabilities in Microsoft SQL Server
Release Date: May 22, 2002
Last Updated: May 23, 2002
A complete revision history can be found at the end of this file.
Systems running Microsoft SQL Server or Microsoft SQL Server 2000 installed with mixed mode security enabled
Systems running Microsoft Data Engine 1.0 (MSDE 1.0) or Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) installed with mixed mode security enabled
Systems running Tumbleweed’s Secure Mail (MMS) versions 4.3, 4.5, and 4.6
The CERT/CC has received reports of systems being compromised through the automated exploitation of null or weak default sa passwords in Microsoft SQL Server and Microsoft Data Engine. This activity is accompanied by high volumes of scanning, and appears to be related to recently discovered self-propagating malicious code, referred to by various sources as Spida, SQLsnake, and Digispid.
Reports received by the CERT/CC indicate that the Spida worm scans for systems listening on port 1433/tcp. Once connected, it attempts to use the xp_cmdshell utility to enable and set a password for the guest user.
If successful, the worm then
assigns the guest user to the local Administrator and Domain Admins groups
copies itself to the victim system
disables the guest account
sets the sa password to the same password as the guest account
executes the copy on the victim system
Once the local copy is executing on the victim system, the worm begins scanning for other systems to infect. It also attempts to send a copy of the local password (SAM) database, network configuration information, and other SQL server configuration information to a fixed email address (email@example.com) via email.
The attack used by the Spida worm is similar to that used by the Kaiten malicious code described in IN-2001-13. Additional information on null default sa passwords in Microsoft SQL Server can be found in VU#635463.
The scanning activity of the Spida worm may cause denial-of-service conditions on compromised systems, and it has been reported to cause high traffic volumes even on networks with no compromised hosts.
Information about the victim system’s configuration and accounts may be compromised by the email the worm attempts to send.
By leveraging a default null password, an attacker may execute arbitrary commands on the system in the security context in which the Microsoft SQL Server services are running. While site-specific configurations may vary, the SQL Server is typically run with system-level privileges.
During the course of the Spida worm’s execution, a number of files are created on the victim system. These include
The presence of any of these files on the system indicates compromise.
Scanning for other systems on port 1433/tcp or attempts to send email to firstname.lastname@example.org may also indicate a compromised system.
If you believe a system under your administrative control may have been compromised, please refer to
Steps for Recovering from a UNIX or NT System Compromise
Set a password on the sa account
Following best practices, passwords should never be left with a null or easily guessed value. Ensure that a password has been assigned to the sa account on Microsoft SQL Servers under your control.
Note that when installing Microsoft SQL 2000 Server, the application prompts for an sa password. If a null password is entered, a warning will be displayed, but the application will permit a null password to be used.
Instructions to change the SQL Server password are located at
Instructions to change the MSDE password can be found at
Additional information on securing Microsoft SQL Server can be found at
Limit access to the SQL Server port
Packet filtering should be performed at network borders to prohibit externally initiated inbound connections to non-authorized services. With regards to SQL Server, ingress filtering of port 1433/tcp could prevent attackers outside of your network from scanning or infecting vulnerable Microsoft SQL servers in the local network that are not explicitly authorized to provide public SQL services.
Filtering packets destined for other services that are not explicitly required can also prevent intruders from connecting to backdoors on compromised systems.
Egress filtering manages the flow of traffic as it leaves a network under your administrative control. There is typically limited need for machines providing public services to initiate outbound connections to the Internet. In the case of the Spida worm, employing egress filtering to disallow outbound connections to port 1433/tcp at your network border can help prevent systems on your network from attacking systems elsewhere. This is only effective against systems that are already infected with the Spida worm.
Block outgoing email to email@example.com
As mentioned in the Description section above, the worm attempts to send configuration information and the local password database to firstname.lastname@example.org. Blocking email to this address can reduce the risk of confidential information being exposed by the Spida worm. However, as with the egress filtering recommendation above, this only blocks systems that are already infected, so it is not sufficient to block the email without taking other precautionary steps as described above.
IV. Additional protection
Apply a patch from Microsoft
Microsoft Corporation has released Microsoft Security Bulletin MS02-020, which announces the availability of a cumulative patch to address a variety of problems. While this patch does not address null sa passwords, it does fix a number of serious security issues. We strongly encourage you to read this bulletin and take the appropriate corrective measures. MS02-020 is available at
The CERT/CC is interested in receiving reports of this activity. If machines under your administrative control are compromised, please send mail to email@example.com with the following text included in the subject line: “[CERT#38873]”.
Author(s): Chad Dougherty and Allen Householder
This document is available from: http://www.cert.org/incident_notes/IN-2002-04.html
CERT/CC Contact Information
Phone: +1 412-268-7090 (24-hour hotline)
Fax: +1 412-268-6989
CERT Coordination Center
Software Engineering Institute
Carnegie Mellon University
Pittsburgh PA 15213-3890
CERT/CC 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.
We strongly urge you to encrypt sensitive information sent by email. Our public PGP key is available from
If you prefer to use DES, please call the CERT hotline for more information.
Getting security information
CERT publications and other security information are available from our web site
* “CERT” and “CERT Coordination Center” are registered in the U.S. Patent and Trademark Office.
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.
Conditions for use, disclaimers, and sponsorship information
Copyright 2002 Carnegie Mellon University.
May 22, 2002: Initial release
May 23, 2002: Updated systems affected, added link for MSDE password change to Solutions
rianto utomo boleh ngopi punya orang🙂