[Dshield] Digispid.B.Worm is a worm which spreads to computers that are running Microsoft SQL Server

Grant Thurman Grant at Netprecision.Net
Wed May 22 16:24:05 GMT 2002


>From Norton's site.

Digispid.B.Worm is a worm which spreads to computers that are running
Microsoft SQL Server and which have a blank SQL administrator password. It
copies files to the infected computer and changes the SQL administrator
password to a string of four random characters.

The worm is unlikely to propagate in a production environment using SQL
server because it relies upon the following assumptions to spread:


"sa" SQL server account has no password
SQL is running with Administrative access. By default, the SQL Server runs
in the security context of a domain user.

An infected computer can be identified by the presence following
characteristics:

The presence of some or all of these files:
%System32%\Drivers\Services.exe
%System32%\Sqlexec.js
%System32%\Clemail.exe
%System32%\Sqlprocess.js
%System32%\Sqlinstall.bat
%System32%\Sqldir.js
%System32%\Run.js
%System32%\Timer.dll
%System32%\Samdump.dll
%System32%\Pwdump2.exe
Many outgoing port 1433 requests

For a more detailed description, please see the Technical Description

Users can protect themselves by doing the following:

Firewall filtering of incoming/outgoing port 1433 requests.
Filter outgoing email messages to "ixltd at postone.com"
Filter outgoing email messages that have subjects beginning with
"SystemData-"
Verify that all SQL server "sa" accounts have passwords

For systems that have been infected, you will notice the following symptoms:

Increased internet traffic
Many outgoing port 1433 requests
Emails the Operating System user password and SQL server data information to
"ixltd at postone.com"
SQL server "sa" password will be changed

When systems have been infected, you should do the following:

Update Norton AntiVirus definitions and perform a full system scan.
Reset all operating system and SQL Server passwords.

Read the additional information section at the bottom of this document for
more general actions that you should perform to protect your systems from
unknown threats. Also, for general information regarding security best
practices, read the Recommendations section of this document.

Also Known As: JS_SQLSpida.B, Hacktool.IPStealer, JS.Spida.B,
JS/SQLSpida.b.worm, SQLSnake, SQLSpida, MS SQL Worm
Type: Trojan Horse, Worm
Infection Length: 1,140 bytes, 2,208 bytes, 4,249 bytes, 20,480 bytes,
368,640 bytes, 32,768 bytes, 243 bytes, 36,864 bytes, 13,312 bytes, 4,701
bytes
Systems Affected: Windows, Windows 95, Windows 98, Windows NT, Windows 2000,
Windows XP, Windows Me
CVE References: CAN-2002-0154


Virus Definitions (Intelligent Updater)*
 May 21, 2002


Virus Definitions (LiveUpdate™)**
 May 21, 2002


*
 Intelligent Updater virus definitions are released daily, but require
manual download and installation.
Click here to download manually.

**
 LiveUpdate virus definitions are usually released every Wednesday.
Click here for instructions on using LiveUpdate.








Wild:

Number of infections: 0 - 49
Number of sites: 0 - 2
Geographical distribution: Low
Threat containment: Easy
Removal: Easy
 Threat Metrics


Wild:
Low
 Damage:
Low
 Distribution:
Low




Damage:

Payload:
Deletes files: Deletes file "%SystemRoot%\system32\msver241.srq"
Releases confidential info: Sends compromised server IP address to hacker's
email account.
Compromises security settings: Changes the SQL administrator password to a
set of 4 random characters.
Distribution:

Ports: 1433
Target of infection: SQL servers with blank SQL administrator passwords


When Digispid.B.Worm is executed on a vulnerable computer, it does the
following:

It copies the following files to the hard disk:

\System32\Drivers\Services.exe
This is a port scanner that the worm uses to locate vulnerable computers.
\System32\Sqlexec.js
This is a JavaScript file that the worm uses to execute command-line
functions on the remote computer.
\System32\Clemail.exe
This is a command-line email utility. The worm uses this program to send the
IP address and SQL information in email to the virus writer.
\System32\Sqlprocess.js
This is a JavaScript file which performs the worm functionality. It does the
following:

It adds the values

ImagePath  %COMSPEC% /c start netdde && sqlprocess init
Start      2

to the registry key

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NetDDE"

It adds the value

dsquery      dbmssocn

to registry key

HKEY_LOCAL_MACHINE\software\microsoft\mssqlserver\client\connectto

It copies the file

%SystemRoot%\System32\Regedt32.exe

to

%SystemRoot%\Regedt32.exe

It deletes the file %SystemRoot%\System32\Msver241.srq

The JavaScript sends the IP address and SQL table and row information to the
virus writer. It also searches for vulnerable computers on networks whose IP
addresses do not begin with 10, 127, 172, or 192. When it finds a vulnerable
computer, it executes \System32\Sqlinstall.bat, which installs the worm onto
the remote computer.
\System32\Sqlinstall.bat
This .bat file activates the guest user account, sets the guest user account
password to a string of four random characters, and adds the guest account
to the Administrators and Domain Admins groups.

It then searches for the presence of \System32\Cscript.exe. If it finds the
file, it then checks whether the worm has already copied the
%SystemRoot%\System32\Regedt32.exe file to %SystemRoot%\Regedt32.exe. If so,
the .bat file exits. Otherwise it copies the following files to the default
system share of the remote computer:
\System32\Drivers\Services.exe
\System32\Sqlexec.js
\System32\Clemail.exe
\System32\Sqlprocess.js
\System32\Sqlinstall.bat
\System32\Sqldir.js
\System32\Run.js
\System32\Timer.dll
\System32\Samdump.dll
\System32\Pwdump2.exe

After it copies these files, it changes the remote SQL administrator
password to a string of four random characters. It then triggers the remote
computer to execute Sqlprocess.js.
\System32\Sqldir.js
This is a JavaScript file which the worm uses to collect table and row
information from the SQL Server.
\System32\Run.js
This is a JavaScript file which the worm uses to trigger the remote
computers to execute the worm.
\System32\Timer.dll
This is a .dll file which the worm registers on the infected system. It is a
simple timer program.
\System32\Samdump.dll
This is a .dll file that the worm copies to infected computers. It does not
appear to perform malicious actions.
\System32\Pwdump2.exe
This is a file that the worm uses to attempt to steal the infected
computer's password.

After the worm copies the preceding files, it changes the SQL administrator
password to a string of four random characters.




Symantec Security Response offers these suggestions on how to configure
Symantec products in order to minimize your exposure to this threat.


Symantec NetProwler

Symantec's network-based intrusion detection tool, has a signature that will
identify MSSQL installations that are susceptible to this worm. The new
Security Update will be available for download in Security Update 16.


Symantec Enterprise Firewall

Block traffic to port 1433 at the perimeter if open.





Symantec Security Response encourages all users and administrators to adhere
to the following basic security "best practices":

Turn off and remove unneeded services. By default, many operating systems
install auxiliary services that are not critical, such as an FTP server,
telnet, and a Web server. These services are avenues of attack. If they are
removed, blended threats have less avenues of attack and you have fewer
services to maintain through patch updates.
If a blended threat exploits one or more network services, disable, or block
access to, those services until a patch is applied.
Always keep your patch levels up-to-date, especially on computers that host
public services and are accessible through the firewall, such as HTTP, FTP,
mail, and DNS services.
Enforce a password policy. Complex passwords make it difficult to crack
password files on compromised computers. This helps to prevent or limit
damage when a computer is compromised.
Configure your email server to block or remove email that contains file
attachments that are commonly used to spread viruses, such as .vbs, .bat,
.exe, .pif and .scr files.
Isolate infected computers quickly to prevent further compromising your
organization. Perform a forensic analysis and restore the computers using
trusted media.
Train employees not to open attachments unless they are expecting them.
Also, do not execute software that is downloaded from the Internet unless it
has been scanned for viruses. Simply visiting a compromised Web site can
cause infection if certain browser vulnerabilities are not patched.



1. Obtain the most recent virus definitions. There are two ways to do this:
Run LiveUpdate. LiveUpdate is the easiest way to obtain virus definitions.
These virus definitions have undergone full quality assurance testing by
Symantec Security Response and are posted to the LiveUpdate servers one time
each week (usually Wednesdays) unless there is a major virus outbreak. To
determine whether definitions for this threat are available by LiveUpdate,
look at the Virus Definitions (LiveUpdate) line at the top of this write-up.
Download the definitions using the Intelligent Updater. Intelligent Updater
virus definitions have undergone full quality assurance testing by Symantec
Security Response. They are posted on U.S. business days (Monday through
Friday). They must be downloaded from the Symantec Security Response Web
site and installed manually. To determine whether definitions for this
threat are available by the Intelligent Updater, look at the Virus
Definitions (Intelligent Updater) line at the top of this write-up.

Intelligent Updater virus definitions are available here. For detailed
instructions on how to download and install the Intelligent Updater virus
definitions from the Symantec Security Response Web site, click here.

2. Start Norton AntiVirus (NAV), and make sure that NAV is configured to
scan all files. For instructions on how to do this, read the document How to
configure Norton AntiVirus to scan all files.
3. Run a full system scan.
4. Delete all files that are detected as Digispid.B.Worm.
5. Locate and delete the following files:
\System32\Drivers\Services.exe
\System32\Clemail.exe
\System32\Timer.dll
\System32\Samdump.dll
\System32\Pwdump2.exe





Additional information:

To protect your environment from future unknown threats similar to
Digispid.B.Worm, Symantec recommends the following:

Do not use default ports when installing applications, for example, do not
use the default 1433. Instead, use an unused high level port.
Create an alternate administrator account and disable any default
administrator accounts such as sa.
Log all access to the disabled default accounts.
Enforce strong passwords on all accounts.
Install and properly configure a firewall. Deny all inbound access except
for "business need" public services, such as a Web server.

The following Microsoft Knowledge Base article contains information about
the SA password in Microsoft SQL Server

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q313418


Revision History:


May 21, 2002:
In the Short Description section, the text that begins with "An infected
computer can be identified by the presence following characteristics:" is
new.
Added some recommendations to the Additional information section.





Write-up by: Douglas Knowles




More information about the list mailing list