Symantec Security Response - W32.Welchia.Worm © 1995-2003 Symantec Corporation. All rights reserved. Legal Notices Privacy Policy W32.Welchia.Worm Discovered on: August 18, 2003 Last Updated on: September 24, 2003 10:48:40 AM Due to an increase in submissions, Symantec Security Response has upgraded W32.Welchia.Worm to Category 4, as of 6:00 PM Monday, August 18, 2003. W32.Welchia.Worm is a worm that exploits multiple vulnerabilities, including: The DCOM RPC vulnerability (described in Microsoft Security Bulletin MS03-026) using TCP port 135. The worm specifically targets Windows XP machines using this exploit. The WebDav vulnerability (described in Microsoft Security Bulletin MS03-007) using TCP port 80. The worm specifically targets machines running Microsoft IIS 5.0 using this exploit. As coded in this worm, this exploit will impact Windows 2000 systems and may impact Windows NT/XP systems. W32.Welchia.Worm does the following: Attempts to download the DCOM RPC patch from Microsoft's Windows Update Web site, install it, and then reboot the computer. Checks for active machines to infect by sending an ICMP echo request, or PING, which will result in increased ICMP traffic. Attempts to remove W32.Blaster.Worm. Symantec Security Response has developed a removal tool to clean the infections of W32.Welchia.Worm. Security Response has provided some information to aid network administrators in ongoing efforts to track down the machines that W32.Welchia.Worm has infected on their respective network. Read the document, "Detecting traffic due to RPC worms," for additional information. Also Known As: W32/Welchia.worm10240 [AhnLab], W32/Nachi.worm [McAfee], WORM_MSBLAST.D [Trend], Lovsan.D [F-Secure], W32/Nachi-A [Sophos], Win32.Nachi.A [CA], Worm.Win32.Welchia [KAV] Type: Worm Infection Length: 10,240 bytes Systems Affected: Microsoft IIS, Windows 2000, Windows NT, Windows XP Systems Not Affected: Linux, Macintosh, OS/2, UNIX, Windows 3.x, Windows 95, Windows 98, Windows Me CVE References: CAN-2003-0109, CAN-2003-0352 Virus Definitions (Intelligent Updater) * August 18, 2003 Virus Definitions (LiveUpdate™) ** August 18, 2003 *Intelligent Updater 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: More than 1000 Number of sites: More than 10 Geographical distribution: High Threat containment: Moderate Removal: Moderate Threat Metrics Wild: HighDamage: MediumDistribution: High Damage Payload: Deletes files: Deletes msblast.exe. Causes system instability: Vulnerable Windows 2000 machines will experience system instability due to the RPC service crash. Compromises security settings: Installs a TFTP server on all the infected machines. Distribution Ports: TCP 135(RPC DCOM), TCP 80(WebDav) When W32.Welchia.Worm is executed, it performs the following actions: Copies itself to: %System%\Wins\Dllhost.exe NOTE: %System% is a variable. The worm locates the System folder and copies itself to that location. By default, this is C:\Winnt\System32 (Windows 2000) or C:\Windows\System32 (Windows XP). Makes a copy of %System%\Dllcache\Tftpd.exe as %System%\Wins\svchost.exe. NOTE: Tftpd is a legitimate program, which is not malicious, and therefore Symantec antivirus products will not detect it. Adds the subkeys: RpcPatch and: RpcTftpd to the registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services Creates the following services: Service Name: RpcTftpd Service Display Name: Network Connections Sharing Service Binary: %System%\wins\svchost.exe This service will be set to start manually. Service Name: RpcPatch Service Display Name: WINS Client Service Binary: %System%\wins\dllhost.exe This service will be set to start automatically. Ends the process, Msblast, and deletes the %System%\msblast.exe file, which W32.Blaster.Worm drops. Selects the victim IP address in two different ways: The worm uses either A.B.0.0 from the infected machine's IP of A.B.C.D and counts up, or it will construct a random IP address based on some hard-coded addresses. After selecting the start address, the worm counts up through a range of Class B-sized networks; for example, if the worm starts at A.B.0.0, it will count up to at least A.B.255.255. Sends an ICMP echo request, or PING, to check whether the constructed IP address is an active machine on the network. Once the worm identifies a machine as being active on the network, it will either send data to TCP port 135, which exploits the DCOM RPC vulnerability, or it will send data to TCP port 80 to exploit the WebDav vulnerability. Creates a remote shell on the vulnerable host that will reconnect to the attacking computer on a random TCP port, between 666 and 765, to receive instructions. Note: In the vast majority of the cases, the port is 707, because of the way the worm threading model interacts with the implementation of the Windows C runtime .dll. Launches the TFTP server on the attacking machine and instructs the victim machine to connect and download Dllhost.exe and Svchost.exe from the attacking machine. If the file, %System%\dllcache\tftpd.exe, exists the worm may not download svchost.exe. Checks the computer's operating system version, Service Pack number, and System Locale. It also attempts to connect to Microsoft's Windows Update and download the appropriate DCOM RPC vulnerability patch. Once the update has been downloaded and executed, the worm will restart the computer so that the patch is installed. Checks the computer's system date. If the year is 2004, the worm will disable and remove itself. Intruder Alert On August 19, 2003, Symantec released Intruder Alert 3.6 W32_Welchia_Worm Policy. Norton Internet Security/Norton Internet Security Professional On August 20, 2003, Symantec released IDS signatures via LiveUpdate to detect W32.Welchia.Worm activity. Symantec Client Security On August 20, 2003, Symantec released IDS signatures via LiveUpdate to detect W32.Welchia.Worm activity. Symantec ManHunt Symantec ManHunt Protocol Anomaly Detection technology detects the activity associated with this exploit as "Portsweep." Although ManHunt can detect activity associated with this exploit with the Protocol Anomaly Detection technology, you can use the "Microsoft DCOM RPC Buffer Overflow" custom signature, released in Security Update 4, to precisely identify the exploit being sent. Security Update 7 has been released to provide signatures specific to W32.Welchia.Worm to include the detection of more W32.Welchia.Worm attributes. Symantec Gateway Security On August 18, 2003, Symantec released an update for Symantec Gateway Security 1.0. Symantec's full application inspection firewall technology protects against this Microsoft vulnerability, blocking all the above listed TCP ports by default. For maximum security, third generation full application inspection technology intelligently blocks the tunneling of DCOM traffic over HTTP channels; thus, providing an extra layer of protection not readily available on most common network filtering firewalls. Symantec Host IDS On August 19, 2003, Symantec released an update for Symantec Host IDS 4.1. 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. Removal using the W32.Welchia.Worm Removal Tool Symantec Security Response has developed a removal tool to clean the infections of W32.Welchia.Worm. This is the easiest way to remove this threat and should be tried first. To obtain the W32.Welchia.Worm removal tool, read the document, "W32.Welchia.Worm Removal Tool." Manual Removal As an alternative to using the removal tool, you can manually remove this threat. The following instructions pertain to all current and recent Symantec antivirus products, including the Symantec AntiVirus and Norton AntiVirus product lines. Disable System Restore (Windows XP). Update the virus definitions. Restart the computer or stop the Worm. Run a full system scan and delete all the files detected as W32.Welchia.Worm. Delete the values from the registry. Delete the Svchost.exe file. For details on each of these steps, read the following instructions. 1. Disabling System Restore (Windows Me/XP) If you are running Windows Me or Windows XP, we recommend that you temporarily turn off System Restore. Windows Me/XP uses this feature, which is enabled by default, to restore the files on your computer in case they become damaged. If a virus, worm, or Trojan infects a computer, System Restore may back up the virus, worm, or Trojan on the computer. Windows prevents outside programs, including antivirus programs, from modifying System Restore. Therefore, antivirus programs or tools cannot remove threats in the System Restore folder. As a result, System Restore has the potential of restoring an infected file on your computer, even after you have cleaned the infected files from all the other locations. Also, a virus scan may detect a threat in the System Restore folder even though you have removed the threat. For instructions on how to turn off System Restore, read your Windows documentation, or one of the following articles: "How to disable or enable Windows Me System Restore" "How to turn off or turn on Windows XP System Restore" For additional information, and an alternative to disabling Windows Me System Restore, see the Microsoft Knowledge Base article, "Antivirus Tools Cannot Clean Infected Files in the _Restore Folder," Article ID: Q263455. 2. Updating the virus definitions Symantec Security Response fully tests all the virus definitions for quality assurance before they are posted to our servers. There are two ways to obtain the most recent virus definitions: Running LiveUpdate, which is the easiest way to obtain virus definitions: These virus definitions are posted to the LiveUpdate servers once each week (usually on Wednesdays), unless there is a major virus outbreak. To determine whether definitions for this threat are available by LiveUpdate, refer to the Virus Definitions (LiveUpdate). Downloading the definitions using the Intelligent Updater: The Intelligent Updater virus definitions are posted on U.S. business days (Monday through Friday). You should download the definitions from the Symantec Security Response Web site and manually install them. To determine whether definitions for this threat are available by the Intelligent Updater, refer to the Virus Definitions (Intelligent Updater). The Intelligent Updater virus definitions are available: Read "How to update virus definition files using the Intelligent Updater" for detailed instructions. 3. Restarting the computer in Safe mode or stopping the services of the worm Windows 95/98/Me Restart the computer in Safe mode. All the Windows 32-bit operating systems, except for Windows NT, can be restarted in Safe mode. For instructions, read the document, "How to start the computer in Safe Mode." Windows NT/2000/XP To stop the Worm services: Open Services in the Administrative Tools located in the Control Panel. Scroll through the list in the right pane and look for the following names: Network Connections Sharing WINS Client If you find the services, right-click them, and then click Stop. Exit the Services. 4. Scanning for and deleting the infected files Start your Symantec antivirus program and make sure that it is configured to scan all the files. For Norton AntiVirus consumer products: Read the document, "How to configure Norton AntiVirus to scan all files." For Symantec AntiVirus Enterprise products: Read the document, "How to verify that a Symantec Corporate antivirus product is set to scan all files." Run a full system scan If any files are detected as infected with W32.Welchia.Worm, click Delete. 5. Deleting the values from the registry WARNING: Symantec strongly recommends that you back up the registry before making any changes to it. Incorrect changes to the registry can result in permanent data loss or corrupted files. Modify the specified keys only. Read the document, "How to make a backup of the Windows registry," for instructions. Click Start, and then click Run. (The Run dialog box appears.) Type regedit Then click OK. (The Registry Editor opens.) Navigate to the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services Delete the subkeys: RpcPatch and: RpcTftpd Exit the Registry Editor. 6. Deleting the Svchost.exe file Navigate to the %System%\Wins folder and delete the Svchost.exe file. Revision History: September 3, 2003: Added information regarding the MS03-007 exploit. August 28, 2003: Added link to document with information about Welchia-related network traffic. August 26, 2003: Updated information on manual removal instructions. August 20, 2003: Added information about SCS IDS signature availability. Added information about NIS/NIS Pro IDS signature availability. Updated alias information. August 19, 2003: Added information on Symantec ManHunt and Symantec Intruder Alert updates. Write-up by: Benjamin Nahorney and Douglas Knowles, Frederic Perriot