Follow:

 

Win32/Hamweq


Win32/Hamweq is a worm that spreads via removable drives, such as USB memory sticks. It contains an IRC-based backdoor, which may be used by a remote attacker to order the affected machine to participate in Distributed Denial of Service attacks, or to download and execute arbitrary files.
 
 


What to do now

To detect and remove this threat and other malicious software that may be installed on your computer, run a full-system scan with an appropriate, up-to-date, security solution. The following Microsoft products detect and remove this threat:
 
 
For more information on antivirus software, see http://www.microsoft.com/windows/antivirus-partners/.
Additional remediation instructions for Win32/Hamweq
Disable Autorun functionality
Win32/Hamweq attempts to spread via removable drives on computers that support Autorun functionality. This is a particularly common method of spreading for many current malware families. For information on disabling Autorun functionality, please see the following article:

Threat behavior

Win32/Hamweq is a worm that spreads via removable drives, such as USB memory sticks. It contains an IRC-based backdoor, which may be used by a remote attacker to order the affected machine to participate in Distributed Denial of Service attacks, or to download and execute arbitrary files.
Installation
When executed, Win32/Hamweq injects code into the 'explorer.exe' process, which then copies Hamweq’s executable as a hidden system file to a directory such as \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013. File names used at the time of publication have included the following:
 
  • isee.exe
  • ise.exe
  • ise32.exe
  • iuhx32.exe
  • hn.exe
  • reg32.exe
  • sndmgr.exe
  • system.exe
  • autorun.exe
  • hjec.exe
Other examples of directories used include:
  • \recycler\s-1-5-21-1254416572-1263425100-317347820-0350
  • \recycler\k-1-3542-4232123213-7676767-8888886
  • \recycler\s-1-5-21-5311846712-4121495154-682003330-5111
  • \recycler\h-6-1-53-0976546321-090909032-8763-1337
  • \restore\s-1-5-21-1482476501-1644491937-682003330-1013
  • \config\s-1-5-21-1482476501-1644491937-682003330-1013
  • \recycle\d-0-060-0000000000-1111111-2222222
  • \memory\s-v-6-2009
  • \release\debug
  • \driver\files
  • \setup\data
 
It also creates a text file named 'Desktop.ini'in the same directory, which makes the directory appear as a recycle bin in Windows Explorer.
 
If the executable is being copied from a removable drive, it opens a Windows Explorer window displaying the contents of that drive.
 
It may attempt to delete older versions of itself if these are present.
 
It also creates the following registry entry:
 
Under key: HKLM\Software\Microsoft\Active Setup\Installed Components\<class id>\
Adds Value: StubPath
With data: "<full pathname of malware>" 
 
For example, the entry created by one variant is as follows:
 
Under key: HKLM\Software\Microsoft\Active Setup\Installed Components\{08B0E5C0-4FCB-11CF-AAX5-81C01C608512}\
Adds Value: StubPath
With data: "c:\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\isee.exe
 
It uses a mutex such as  'asd-+094997' to ensure that no more than one copy of itself runs at a time.
Spreads via…
Removable drives
Win32/Hamweq periodically checks for the presence of removable drives (such as USB memory sticks). If one is found (other than the A: or B: drive), it copies itself to this drive as a hidden system file, using the same pathname as that used on the local hard disk (for example \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\ise32.exe). It also creates a file called 'Desktop.ini' in the same directory, and an 'autorun.inf' file in the root directory of the removable drive.
 
Once the infection of the drive has been completed, it sends a message to the backdoor’s controller (see below) advising that it has done so.
Payload
Allows backdoor access and control
Once installed, the worm attempts to connect to an IRC server. Servers observed to be used at the time of publication have included:
 
tassweq.com
lebanonbt.info
crank.dontexist.com
vistavirus.no-ip.biz
wedding.helldark.biz
www.topgameland.com
fud.ircdevilz.net
jpg.msnphotos.us
dark.rs-forum.org
u.sqlteam.info
oooooooo.dyndns.info
dci.sinip.es
 
The backdoor’s controller may request that it perform the following activities:
  • Download and execute arbitrary files
  • Launch (or halt) flooding attacks against a specified server
 
Variants of Win32/Hamweq have been observed being requested to download and execute variants of the Win32/Rimecud family, which were saved to the %userprofile% directory (for example, \documents and settings\<user name>).
 
Analysis by David Wood

Symptoms

System Changes
The following system changes may indicate the presence of Win32/Hamweq:
  • Presence of the following files (for example):
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\isee.exe
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\ise.exe
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\ise32.exe
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\iuhx32.exe
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\hn.exe
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\reg32.exe
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\sndmgr.exe
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\system.exe
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\autorun.exe
    \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\hjec.exe
  • Presence of the following directories (for example):
    \recycler\s-1-5-21-1254416572-1263425100-317347820-0350
    \recycler\k-1-3542-4232123213-7676767-8888886
    \recycler\s-1-5-21-5311846712-4121495154-682003330-5111
    \recycler\h-6-1-53-0976546321-090909032-8763-1337
    \restore\s-1-5-21-1482476501-1644491937-682003330-1013
    \config\s-1-5-21-1482476501-1644491937-682003330-1013
    \recycle\d-0-060-0000000000-1111111-2222222
    \memory\s-v-6-2009
    \release\debug
    \driver\files
    \setup\data
  • Presence of the following registry modification (for example):
    Under key: HKLM\Software\Microsoft\Active Setup\Installed Components\<class id>\
    Adds value: StubPath
    With data: "c:\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\<filename>" 

Prevention

Take the following steps to help prevent infection on your computer:
  • Enable a firewall on your computer.
  • Get the latest computer updates for all your installed software.
  • Use up-to-date antivirus software.
  • Limit user privileges on the computer.
  • Use caution when opening attachments and accepting file transfers.
  • Use caution when clicking on links to webpages.
  • Avoid downloading pirated software.
  • Protect yourself against social engineering attacks.
  • Use strong passwords.
Enable a firewall on your computer
Use a third-party firewall product or turn on the Microsoft Windows Internet Connection Firewall.
Get the latest computer updates
Updates help protect your computer from viruses, worms, and other threats as they are discovered. It is important to install updates for all the software that is installed in your computer. These are usually available from vendor websites.
 
You can use the Automatic Updates feature in Windows to automatically download future Microsoft security updates while your computer is on and connected to the Internet.
Use up-to-date antivirus software
Most antivirus software can detect and prevent infection by known malicious software. To help protect you from infection, you should always run antivirus software, such as Microsoft Security Essentials, that is updated with the latest signature files. For more information, see http://www.microsoft.com/windows/antivirus-partners/.
Limit user privileges on the computer
Starting with Windows Vista and Windows 7, Microsoft introduced User Account Control (UAC), which, when enabled, allowed users to run with least user privileges. This scenario limits the possibility of attacks by malware and other threats that require administrative privileges to run.
 
You can configure UAC in your computer to meet your preferences:
Use caution when opening attachments and accepting file transfers
Exercise caution with email and attachments received from unknown sources, or received unexpectedly from known sources. Use extreme caution when accepting file transfers from known or unknown sources.
Use caution when clicking on links to webpages
Exercise caution with links to webpages that you receive from unknown sources, especially if the links are to a webpage that you are not familiar with, unsure of the destination of, or suspicious of. Malicious software may be installed in your computer simply by visiting a webpage with harmful content.
Avoid downloading pirated software
Threats may also be bundled with software and files that are available for download on various torrent sites. Downloading "cracked" or "pirated" software from these sites carries not only the risk of being infected with malware, but is also illegal. For more information, see 'The risks of obtaining and using pirated software'.
Protect yourself from social engineering attacks
While attackers may attempt to exploit vulnerabilities in hardware or software to compromise a computer, they also attempt to exploit vulnerabilities in human behavior to do the same. When an attacker attempts to take advantage of human behavior to persuade the affected user to perform an action of the attacker's choice, it is known as 'social engineering'. Essentially, social engineering is an attack against the human interface of the targeted computer. For more information, see 'What is social engineering?'.
Use strong passwords
Attackers may try to gain access to your Windows account by guessing your password. It is therefore important that you use a strong password – one that cannot be easily guessed by an attacker. A strong password is one that has at least eight characters, and combines letters, numbers, and symbols. For more information, see http://www.microsoft.com/protect/yourself/password/create.mspx.

Alert level: Severe
This entry was first published on: Dec 04, 2009
This entry was updated on: Feb 10, 2011

This threat is also detected as:
  • BKDR_HAMWEQ (Trend Micro)