W32/Mydoom@MM

This page shows details and results of our analysis on the malware W32/Mydoom@MM

Overview

This is a virus detection. Viruses are programs that self-replicate recursively, meaning that infected systems spread the virus to other systems, which then propagate the virus further. While many viruses contain a destructive payload, it's quite common for viruses to do nothing more than spread from one system to another.


Minimum Engine

5600.1067

File Length

22,528 bytes (UPX packed)

Description Added

2004-01-26

Description Modified

2005-11-08

Malware Proliferation

Characteristics

-- Update March 11, 2004 --
The risk assessment of this threat was lowered to Low-Profiled due to a decrease in prevalence.

--Update 17th Febuary, 2004 --
The risk assessment was lowered to Medium due to a decrease in prevalence.

--Update 12th Febuary, 2004 --
A new variant of this virus has been discovered. The file size is 24,048 bytes (petite packed). It is proactively detected as W32/Mydoom.a@MM using the above specified DATs. The functionality of this new variant is similar to the .a variant, except that the body of the email it sends out may contain the following: 

  • ROFL HELLO SAM HOWS UPZ. Partial message is available

This is a mass-mailing and peer-to-peer file-sharing worm that bears the following characteristics:

  • contains its own SMTP engine to construct outgoing messages
  • contains a backdoor component (see below)
  • contains a Denial of Service payload

Mydoom only infects systems running Microsoft Windows.

If you think that you may be infected with Mydoom, and are unsure how to check your system, you may download the Stinger tool to scan your system and remove the virus if present.  This is not required for McAfee users as McAfee products are capable of detecting and removing the virus with the latest update. (see the removal instructions below for more information).
Note: Receiving an email alert stating that the virus came from your email address is not an indication that you are infected as the virus often forges the from address.

The virus arrives in an email message as follows:

From: (Spoofed email sender)
Do not assume that the sender address is an indication that the sender is infected.  Additionally you may receive alert messages from a mail server that you are infected, which may not be the case.

Subject: (Varies, such as)

  • Error
  • Status
  • Server Report
  • Mail Transaction Failed
  • Mail Delivery System
  • hello
  • hi

Body:  (Varies, such as) 

  • The message cannot be represented in 7-bit ASCII encoding and has been sent as a binary attachment.
  • The message contains Unicode characters and has been sent as a binary attachment.
  • Mail transaction failed. Partial message is available.

Attachment: (varies [.bat, .exe, .pif, .cmd, .scr] - often arrives in a ZIP archive) (22,528 bytes)

  • examples (common names, but can be random)
  • doc.bat
  • document.zip
  • message.zip
  • readme.zip
  • text.pif
  • hello.cmd
  • body.scr
  • test.htm.pif
  • data.txt.exe
  • file.scr

In the case of two file extensions, multiple spaces may be inserted as well, for example:

  • document.htm  (many spaces)  .pif

The icon used by the file tries to make it appear as if the attachment is a text file:

When this file is run (manually), it copies itself to the WINDOWS SYSTEM directory as taskmon.exe

  •  %SysDir%\taskmon.exe

(Where %Sysdir% is the Windows System directory, for example C:\WINDOWS\SYSTEM)

It creates the following registry entry to hook Windows startup:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\
    CurrentVersion\Run "TaskMon" = %SysDir%\taskmon.exe

The virus uses a DLL that it creates in the Windows System directory:

  •  %SysDir%\shimgapi.dll (4,096 bytes)

This DLL is injected into the EXPLORER.EXE upon reboot via this registry key:

  • HKEY_CLASSES_ROOT\CLSID\{E6FB5E20-DE35-11CF-9C87-00AA005127ED}
    \InProcServer32 "(Default)" = %SysDir%\shimgapi.dll

The virus will not replicate on the 12th February or later (although the DLL will still be installed).

Peer To Peer Propagation
The worm copies itself to the KaZaa Shared Directory with the following filenames:

  • nuke2004
  • office_crack
  • rootkitXP
  • strip-girl-2.0bdcom_patches
  • activation_crack
  • icq2004-final
  • winamp

Remote Access Component
The worm (this functionality is in the dropped DLL) opens a connection on TCP port 3127 (if that fails it opens next available port up to port 3198). The worm can accept specially crafted TCP transmissions.

  • On receipt of one kind of such a transmission it will save the embedded binary into a temporary file and execute it. Then the temporary file is deleted.
  • On receipt of another kind it can relay TCP packets thus providing IP spoofing capabilities (possibly to facilitate SPAM distribution)

Denial of Service Payload
If the worm is run after February 1st 16:09:18 (UTC), it changes its behavior from mass mailing to initiating a denial of service attack against www.sco.com. This denial of service attack will stop on the first system startup after February 12th 02:28:57 (UTC) , and thereafter the worm's only behavior is to continue listening on TCP port 3127 (or up to 3198).  Due to a bug in the code, the DoS attack will fail to start 75% of the time.

The denial of service executes by creating 64 threads each of which makes a HTTP GET request from random ports on the infected machines to port 80 of www.sco.com.

Symptoms

  • Upon executing the virus, Notepad is opened, filled with nonsense characters.

  • Existence of the files and registry entry listed above

Method of Infection

This worm tries to spread via email and by copying itself to the shared directory for Kazaa clients if they are present.

The mailing component harvests address from the local system.  Files with the following extensions are targeted:

  • wab
  • adb
  • tbb
  • dbx
  • asp
  • php
  • sht
  • htm
  • txt
  • pl

The worm avoids certain address, those using the following strings:

  • .gov
  • .mil
  • abuse
  • acketst
  • arin.
  • avp
  • berkeley
  • borlan
  • bsd
  • example
  • fido
  • foo.
  • fsf.
  • gnu
  • google
  • gov.
  • hotmail
  • iana
  • ibm.com
  • icrosof
  • ietf
  • inpris
  • isc.o
  • isi.e
  • kernel
  • linux
  • math
  • mit.e
  • mozilla
  • msn.
  • mydomai
  • nodomai
  • panda
  • pgp
  • rfc-ed
  • ripe.
  • ruslis
  • secur
  • sendmail
  • sopho
  • syma
  • tanford.e
  • unix
  • usenet
  • utgers.ed

Additionally, the worm contains strings, which it uses to randomly generate, or guess, email addresses. These are prepended as user names to harvested domain names:

  • sandra
  • linda
  • julie
  • jimmy
  • jerry
  • helen
  • debby
  • claudia
  • brenda
  • anna
  • alice
  • brent
  • adam
  • ted
  • fred
  • jack
  • bill
  • stan
  • smith
  • steve
  • matt
  • dave
  • dan
  • joe
  • jane
  • bob
  • robert
  • peter
  • tom
  • ray
  • mary
  • serg
  • brian
  • jim
  • maria
  • leo
  • jose
  • andrew
  • sam
  • george
  • david
  • kevin
  • mike
  • james
  • michael
  • john
  • alex

Finally the virus sends itself via SMTP - constructing messages using its own SMTP engine.  The worm guesses the recipient email server, prepending the target domain name with the following strings:

  • mx.
  • mail.
  • smtp.
  • mx1.
  • mxs.
  • mail1.
  • relay.
  • ns.

Removal

All Users :
Use specified engine and DAT files for detection and removal.

The shimgapi.dll file is injected into the EXPLORER.EXE process if the system has been rebooted after the infection has occured.  In this situation, a reboot and rescan is required to remove this DLL from the system with the 4319 DAT files.  The 4320 DAT files, and later, do not require a reboot.

Modifications made to the system Registry and/or INI files for the purposes of hooking system startup will be successfully removed if cleaning with the recommended engine and DAT combination (or higher).

Additional Windows ME/XP removal considerations

Stinger
Stinger  has been updated to assist in detecting and repairing this threat.

Manual Removal Instructions
To remove this virus "by hand", follow these steps (WinNT/2K/XP):

  1. Terminate the process TASKMON.EXE
  2. Delete the file TASKMON.EXE from your WINDOWS SYSTEM directory (typically c:\windows\system32 or c:\winnt\system32)
  3. Edit the registry
    • Delete the "TaskMon" value from
      • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
        Windows\CurrentVersion\Run
    • Change the (Default) value to webcheck.dll here
      • HKEY_CLASSES_ROOT\CLSID\{E6FB5E20-DE35-11CF-9C87-
        00AA005127ED}\InProcServer32
    • Delete the "Version" key from
      • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\
        CurrentVersion\Explorer\ComDlg32
      • HKEY_CURRENT_USER\Software\Microsoft\Windows\
        CurrentVersion\Explorer\ComDlg32
  4. Terminate the process EXPLORER.EXE
  5. From the WINDOWS TASK MANAGER, click FILE - RUN, type EXPLORER.EXE and hit ENTER.
  6. Delete the file SHIMGAPI.DLL your WINDOWS SYSTEM directory (typically c:\windows\system32 or c:\winnt\system32)
  7. Reboot the system

McAfee Security Desktop Firewall
To prevent possible remote access McAfee Desktop Firewall users can block incoming TCP port 3127.

Sniffer Customers: Filters have been developed that will look for MyDoom traffic [Sniffer Distributed 4.1/4.2/4.3, Sniffer Portable 4.7/4.7.5, and Netasyst].

ThreatScan users
The latest ThreatScan signature (2004-01-27) includes detection of the Mydoom virus. This signature is available for ThreatScan v2.0, v2.1, and v2.5.

ThreatScan users can also detect the backdoor portion of the virus by running a "Resource Discovery" task utilizing the port scanning options.

To update your ThreatScan installations with the latest signatures perform the following tasks:

  • From within ePO open the "Policies" tab.
  • Select "McAfee ThreatScan" and then select "Scan Options"
  • In the pane below click the "Launch AutoUpdater" button.
  • Using the default settings proceed through the dialogs that appear. Upon successful completion of the update a message will appear stating that; update 2004-01-27 has completed successfully.
  • From within ePO create a new "AutoUpdate on Agent(s)" task.
  • Go into the settings for this task and ensure that the host field is set to ftp.nai.com , the path is set to /pub/security/tsc20/updates/winnt/ and that the user and password fields are both set to ftp. Note that "tsc20" in the above path is used for ThreatScan 2.0 and 2.1. The correct path for ThreatScan 2.5 is "tsc25".
  • Launch this task against all agent machines.
  • When the task(s) complete information will be available in the "Task Status Details" report.

    To create and execute a new task containing the new update functionality, do the following:

    • - Create a new ThreatScan task.
    • - Edit the settings of this task.
    • - Edit the "Task option", "Host IP Range" to include all desired machines to scan.

    To scan for the virus:

    • Select the "Remote Infection Detection" category and "Windows Virus Checks" template. -or-
    • Select the "Other" category and "Scan All Vulnerabilities" template.

    To create and execute a new task to perform a port scan, do the following:

  • Create a new Resource Discovery task.
  • Edit the settings of this task.
  • Edit the "Task option", "Host IP Range" to include all desired machines to scan.
  • To scan for the virus:

    • Select the "Port Scan" option.
    • Select the "TCP Port Scan" option.
    • Enter 3127 in the "TCP Port Ranges" field.
    • Launch the scan.

    For additional information:

    • Run the "ThreatScan Template Report"
    • Look for module number #4061

Variants