Alert level

Win32/Medfos

(?)

Encyclopedia entry
Updated: Mar 21, 2013  |  Published: Sep 07, 2012

Aliases
  • TR/Midhos (Avira)
  • Trojan.Win32.Midhos (Kaspersky)
  • Win32/Medfos (ESET)
  • Medfos (McAfee)
  • Trojan/Win32.Midhos (AhnLab)
  • Trojan.Win32.Medfos (Ikarus)

Alert Level (?)
Severe

Antimalware protection details
Microsoft recommends that you download the latest definitions to get protected.


 

Summary

Win32/Medfos is a family of trojans that install malicious extensions for Internet browsers and redirect search engine results. It also allows for click-fraud, generating profit for a website through unethical means.

Variants of Win32/Medfos may be dropped or installed by other malware, including variants of the Trojan:Win32/Necurs family.

It may install a Firefox extension named either Mozilla Safe Browsing 2.0.14 or Traqnslate This! 2.0. It also installs an extension for Google Chrome named ChromeUpdateManager. These are detected as either Trojan:JS/Medfos.A or Trojan:JS/Medfos.B.

If your computer has Win32/Medfos installed, your Internet searches may be redirected to a predefined website. That means that if you search using Google, Bing, or Yahoo, for example, the site returns normal search results. However, if you click on any of the results, instead of going to the correct website, you may instead be redirected to an unexpected, different website.



 

Symptoms

System changes

The following system changes may indicate the presence of this malware:

  • Internet search results may redirect you to websites you did not intend to visit
  • The presence of the following files:
     
    %APPDATA%\pcpat.dll
    %APPDATA%\tpleto.dll
    %LOCALAPPDATA%\{535C840F-E52A-11E1-8270-B8AC6F996F26}\chrome\content\browser.xul
    %TEMP%\bdylut.dll
     
  • The presence of the following registry modifications:

    In subkey: HKLM\Software\Microsoft\Windows\Currentversion\Run
    Sets value: "<name of DLL file, without the extension>", for example "pcpat"
    With data: "rundll32.exe <name of DLL file>,<random export name>", for example "rundll32.exe pcpat.dll,AInputStream"

    In subkey: HKCU\Software\Microsoft\Windows\Currentversion\Run
    Sets value: "<name of DLL file, without the extension>", for example "pcpat"
    With data: "rundll32.exe <name of DLL file>,<random export name>", for example "rundll32.exe pcpat.dll,AInputStream"

    In subkey: HKLM\Software\Microsoft\Windows\Currentversion\Run
    Sets value: "<name of DLL file, without the extension>", for example "bdylut"
    With data: "rundll32.exe %TEMP%\<downloaded file>,<random export name>", for example "rundll32.exe C:Windows\TempXXXXX\bdylut.dll,ExceptionMatches"

    In subkey: HKCU\Software\Microsoft\Windows\Currentversion\Run
    Sets value: "<name of DLL file, without the extension>", for example "bdylut"
    With data: "rundll32.exe %TEMP%\<downloaded file>,<random export name>", for example "rundll32.exe C:Windows\TempXXXXX\bdylut.dll,ExceptionMatches"
 


 

Technical Information (Analysis)

Installation

The main component (DLL file)

When run, variants of Win32/Medfos copy themselves as a DLL file with a random name to the %APPDATA% folder. In the wild we have observed variants using the following file names:

  • %APPDATA%\pcpat.dll
  • %APPDATA%\tpleto.dll

Note: %APPDATA% refers to a variable location that is determined by the malware by querying the operating system. The default location for the Application Data folder for Windows 2000, XP, and 2003 is "C:\Documents and Settings\<user>\Application Data". For Windows Vista and 7, the default location is "C:\Users\<user>\AppData\Roaming".

If you are logged on as an administrator, Win32/Medfos modifies the following registry entry to ensure that its copy runs at each Windows start:

In subkey: HKLM\Software\Microsoft\Windows\Currentversion\Run
Sets value: "<name of DLL file, without the extension>", for example "pcpat"
With data: "rundll32.exe <name of DLL file>,<random export name>", for example "rundll32.exe pcpat.dll,AInputStream"

If you are not logged on as an administrator, the malware modifies the following registry entry to ensure that its copy runs at each Windows start:

In subkey: HKCU\Software\Microsoft\Windows\Currentversion\Run
Sets value: "<name of DLL file, without the extension>", for example "pcpat"
With data: "rundll32.exe <name of DLL file>,<random export name>", for example "rundll32.exe pcpat.dll,AInputStream"

Once it has installed itself in your computer, it connects to "78.140.131.158" to report that your computer has been infected.

The payload files (search redirection components)

The malware may download and run a DLL file from "78.140.131.158" with a random name to the %TEMP% folder, for example:

%TEMP%\bdylut.dll

Note: %TEMP% refers to a variable location that is determined by the malware by querying the operating system. The default location for the Temporary files folder for Windows 2000, XP, and 2003 is "C:\Documents and Settings\<user>\Local settings\Temp". For Windows Vista and 7, the default location is "C:\Users\<user name>\AppData\Local\Temp".

This file is detected as Trojan:Win32/Medfos.B, which is the search-engine redirection component of the Win32/Medfos family.

If you are logged on as an administrator, Win32/Medfos modifies the following registry entry to ensure that the downloaded file runs at each Windows start:

In subkey: HKLM\Software\Microsoft\Windows\Currentversion\Run
Sets value: "<name of DLL file>", for example "bdylut"
With data: "rundll32.exe %TEMP%\<downloaded file>,<random export name>", for example "rundll32.exe C:\Users\<user name>\AppData\Local\Temp\bdylut.dll,ExceptionMatches"

If you are not logged on as an administrator, the malware modifies the following registry entry to ensure that the downloaded file runs at each Windows start:

In subkey: HKCU\Software\Microsoft\Windows\Currentversion\Run
Sets value: "<name of DLL file>", for example "bdylut"
With data: "rundll32.exe %TEMP%\<downloaded file>,<random export name>", for example "rundll32.exe C:\Users\<user name>\AppData\Local\Temp\bdylut.dll,ExceptionMatches

The malware injects the downloaded file into Internet Explorer processes to enable its Internet search-redirection payload.

Win32/Medfos may install a search-engine hijack extension for Mozilla Firefox. This extension is also part of Trojan:Win32/Medfos.B, and may be detected as Trojan:JS/Medfos.A.

The extension is installed as %LOCALAPPDATA%\{<random unique identifier>}\chrome\content\browser.xul, for example %LOCALAPPDATA%\{535C840F-E52A-11E1-8270-B8AC6F996F26}\chrome\content\browser.xul.

Note: %LOCALAPPDATA% refers to a variable location that is determined by the malware by querying the operating system. The default location for the Local Application Data folder for Windows 2000, XP, and 2003 is "C:\Documents and Settings\<user>\Application Data". For Windows Vista and 7, the default location is "C:\Users\<user>\AppData\Local".

In the wild we have observed the Firefox extension with the following names:

  • Mozilla Safe Browsing 2.0.14
  • Traqnslate This! 2.0

It also installs an extension for Google Chrome as:

%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\cdjbnddbclciabnckgeahmneohjlahdm

This file is detected as Trojan:JS/Medfos.B and may have the name ChromeUpdateManager:

Payload

Redirects Internet search results

Win32/Medfos monitors the searches you make with the following search engines:

  • AOL
  • Ask
  • Bing
  • Google
  • Yahoo

The malware sends your search queries and their results to a remote server.

We have observed variants of Win32/Medfos connecting to the following remote servers:

  • 85.17.132.53
  • 4.clickfeedbestppc.com

When you click the search result, the malware redirects you to a URL that it has retrieved from the remote server.

You could be redirected to advertisements or to the actual search result. In the wild, we observed that search results were redirected to "googleads.l.doubleeclick.net".

Generates click fraud

Win32/Medfos , specifically, Trojan:Win32/Medfos.X, creates a hidden iexplore.exe process to connect to the server at "46.165.221.199".

Once connected, it gets HTML data that generates hidden clicks to a specified website. This is to generate clicks for the website, which may result in profit for the site owner.

Related encyclopedia entries

Blacole exploit kit

TrojanDownloader:Win32/Beebone

Win32/Sirefef

Trojan:Win32/Medfos.B

Trojan:JS/Medfos.A

Trojan:JS/Medfos.B

Analysis by Shawn Wang



 

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. Instructions on how to download the latest versions of some common software is available from the following:

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 'Consumer security software providers'.

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.

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 'Create strong passwords'.



 

Recovery

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:

 

Provide feedback