Discovered: June 26, 2002
Updated: February 13, 2007 11:58:32 AM
Type: Worm
Systems Affected: Windows

W32.Gunsan is a worm that mass-mails itself and infects local drives and network shares. It opens a backdoor that allows a hacker to control the computer using IRC.

Antivirus Protection Dates

  • Initial Rapid Release version June 27, 2002
  • Latest Rapid Release version March 03, 2008 revision 035
  • Initial Daily Certified version June 27, 2002
  • Latest Daily Certified version March 03, 2008 revision 037
  • Initial Weekly Certified release date July 03, 2002

Click here for a more detailed description of Rapid Release and Daily Certified virus definitions.

Writeup By: Patrick Nolan

Discovered: June 26, 2002
Updated: February 13, 2007 11:58:32 AM
Type: Worm
Systems Affected: Windows

When W32.Gunsan runs, it does the following:

  1. It copies itself as \%System\Explorer16.exe.

    NOTE: %System% is a variable. The worm locates the \Windows\System folder (by default this is C:\Windows\System, C:\Windows\System32, or C:\Winnt\System32) and copies itself to that location.
  2. It adds the value

    Explorer \%System%\Explorer16.exe

    to the registry key


    This causes it to run when you start Windows.
  3. On Windows 95/98/Me-based computers, W32.Gunsan registers itself as a service so that it can run unnoticed.
  4. Next, W32.Gunsan looks for the presence of the \%Windows\Internet Logs folder to determine whether the ZoneAlarm personal firewall is installed on the computer.

    NOTE: %Windows% is a variable. The worm locates the \Windows folder. (By default this is C:\Windows or C:\Winnt).

    If this folder is present, the worm creates C:\Noalarm.bat, which contains instructions to unprotect and delete the following files:
    • \%System%\Vsdata95.vxd
    • \%System%\Vsdatant.sys
    • \%System%\Vsdata.dll
    • \%System%\Vsmonapi.dll
    • \%System%\Vspubapi.dll
    • \%System%\Vsmonapi.dll
    • \%Windows\Internet Logs\*.*
    • \Progra~1\ZoneLa~1\ZoneAl~1\*.* (In the same drive where Windows is installed.)
    • \%System%\ZoneLabs\\*.*
  5. The worm then adds a line to C:\Autoexec.bat so that the instructions are executed the next time that you reboot the computer.
  6. W32.Gunsan then alters the \%Windows\Hosts file, which contains DNS configuration information. It modifies the Hosts file so that the names of the following Web sites are resolved to the address of the local computer ( instead of their real Internet addresses:
  7. After this, W32.Gunsan picks a random TCP/IP port between 0 and 4999. It records this port number in the text file C:\Skyliner.dat and subsequently uses only that port. Then W32.Gunsan sets up a server that listens on this port for incoming network connections. The server replies with some standard answers in HTTP format, presumably used by the author to locate compromised computers by scanning the network.
  8. Next, W32.Gunsan tests the Internet connectivity of the computer by trying to open an HTTP connection with the Microsoft's Web site. It closes this connection immediately after recording the IP address of the Web server that it connected to.

    If the worm cannot connect to Microsoft's Web site because the computer is disconnected from the Internet, W32.Gunsan checks every 65 seconds until it can reach the Web site.
  9. After W32.Gunsan determines that an Internet connection is present, it examines the email configuration of the computer. It reads the value of

    Software\Microsoft\Internet Account Manager\Default Mail Account <account id>

    and then opens the registry key

    Software\Microsoft\Internet Account Manager\Accounts\<account id>


    Software\Microsoft\Internet Account Manager\Accounts\00000001 (If no default mail account exists.)
  10. It retrieves the value "SMTP Server" from this key.
  11. Next, it displays a message that shows the retrieved server name.
  12. W32.Gunsan then attempts to open connections with one of the following IRC servers:
    • (On port 6660, 6667 or 7000)
    • (On port 6667)
    • (On port 6667)
  13. Then, using a random identity based on the computer name and a hash of the current system time, it joins a channel on one of these servers and waits for instructions for it to perform on the local computer, thus acting as a backdoor. The IRC connection is also used to send private messages (presumably to the worm's author) reporting on the status of operations that the worm executed.

    The IRC backdoor handles a number of commands, allowing an attacker to modify some parameters on the local computer, provoke mass-mailing of the worm, perform Distributed Denial of Service attacks, and perform other network-related functions.
  14. Next, W32.Gunsan spawns threads that explore the content of all local drives from C through Z. Each thread recursively searches the directory structure of a drive, looking for files with certain extensions:
    • Files that have .dbx, .idx, or .mbx extensions, and whose full path does not contain the string "Folders" (all are case-insensitive comparisons), are parsed for email addresses.
    • Files that have the .htm extension are also parsed for email addresses that are contained in href tags and are modified to include extra HTML iframe tags pointing to the Microsoft Web site address that the worm retrieved earlier (perhaps in an attempt to cause a Denial Of Service attack).
    • Files that have the .kix extension (logon scripts) are modified to run a copy of W32.Gunsan. The virus copies itself under a random name that is based on the local computer name; it prepends the following line to the .kix file:

      run "<copy name>.exe"
    • Files that have the .mp3, .iso, .avi, or .mpg extensions cause the worm to copy itself to the same file name and append an .exe extension, thus producing files with the double extensions .mp3.exe, .iso.exe, .avi.exe, and .mpg.exe.
  15. If the worm finds the file Winrar.exe on the computer, it sends an IRC message to the hacker, reporting that it found this file. The path of this file is recorded so that later archive files with .rar and .zip extensions are modified to include a copy of the worm.
  16. The worm deletes all files whose full path contains one of the following strings:
    • mcafee
    • softice
    • numega
    • antivirus
    • anti-virus
    • win32dasm
    • sophos
    • catsclaw
    • claw95
    • lockdown
    • symantec
    • firewall
    • virusscan
    • virus-scan
    • fprot
    • f-prot
    • zone labs
    • atguard
  17. After all threads have finished infecting the local drives, W32.Gunsan mass-mails itself to the email addresses that it collected. It sends two email messages to each address. The first one contains a reference to the Microsoft Web site hidden in an iframe; the second message contains the worm in an attachment. The messages have the following characteristics:

    Subject: (A single space character).
    Attachment: Tast.exe

    W32.Gunsan uses the Content-Type encoding exploit to run automatically when the recipient opens the email message in an unpatched version of Microsoft Outlook or Outlook Express.
  18. After the mass-mailing routine has finished, W32.Gunsan infects shares on the local network in a manner that is similar to the local drive infection previously described.


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

  • Use a firewall to block all incoming connections from the Internet to services that should not be publicly available. By default, you should deny all incoming connections and only allow services you explicitly want to offer to the outside world.
  • 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.
  • Ensure that programs and users of the computer use the lowest level of privileges necessary to complete a task. When prompted for a root or UAC password, ensure that the program asking for administration-level access is a legitimate application.
  • Disable AutoPlay to prevent the automatic launching of executable files on network and removable drives, and disconnect the drives when not required. If write access is not required, enable read-only mode if the option is available.
  • Turn off file sharing if not needed. If file sharing is required, use ACLs and password protection to limit access. Disable anonymous access to shared folders. Grant access only to user accounts with strong passwords to folders that must be shared.
  • Turn off and remove unnecessary services. By default, many operating systems install auxiliary services that are not critical. These services are avenues of attack. If they are removed, threats have less avenues of attack.
  • If a 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.
  • Configure your email server to block or remove email that contains file attachments that are commonly used to spread threats, such as .vbs, .bat, .exe, .pif and .scr files.
  • Isolate compromised computers quickly to prevent threats from spreading further. 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.
  • If Bluetooth is not required for mobile devices, it should be turned off. If you require its use, ensure that the device's visibility is set to "Hidden" so that it cannot be scanned by other Bluetooth devices. If device pairing must be used, ensure that all devices are set to "Unauthorized", requiring authorization for each connection request. Do not accept applications that are unsigned or sent from unknown sources.
  • For further information on the terms used in this document, please refer to the Security Response glossary.

Writeup By: Patrick Nolan

Discovered: June 26, 2002
Updated: February 13, 2007 11:58:32 AM
Type: Worm
Systems Affected: Windows

Update the virus definitions, run a full system scan, and delete all files that Norton AntiVirus (NAV) detects as W32.Gunsan. Restore all modified files from clean backups or reinstall them.

  1. Delete the value

    explorer     \Windows\system\explorer16.exe

    from the registry key

For details on how to do this, read the following instructions.

To scan with Norton AntiVirus and delete the infected files:
  1. Obtain the most recent virus definitions. There are two ways to do this:
    • Run LiveUpdate, which 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 it is configured to scan all files.
  3. Run a full system scan.
  4. Delete all files that NAV detects as W32.Gunsan.

To remove the value from the registry:

CAUTION : Symantec strongly recommends that you back up the registry before you make any changes to it. Incorrect changes to the registry can result in permanent data loss or corrupted files. Modify only the keys that are specified. Read the document How to make a backup of the Windows registry for instructions.
  1. Click Start, and click Run. The Run dialog box appears.
  2. Type regedit and then click OK. The Registry Editor opens.
  3. Navigate to the following key:

  4. In the right pane, delete the following value:

    explorer     \Windows\system\explorer16.exe
  5. Click Registry, and click Exit.

Writeup By: Patrick Nolan