More fast or more dirty?

2014-04-02

Ke Zhang

Baidu (Shenzhen), China
Editor: Helen Martin

Abstract

It is not uncommon, nowadays, for businesses to outsource their marketing to third parties - but sometimes, such business links lead to malicious activities. Ke Zhang dissects a piece of malware that generates referrer spam for a ‘web search site’ without its own search capability.


Nowadays, it is not uncommon for websites and software vendors to outsource their marketing to third parties. Sometimes, such business links lead to malware activities. In this article we dissect a piece of malware that generates referrer spam for a ‘web search site’ that does not have its own search capability.

The VB packer

The 0x22000-byte payload is encrypted with a 0x45 byte key and located at file offset 0x12F5A. Both the payload and the key are enclosed with a string flag ‘//784UY554NYXSY84IOK/’ in the file. As always, the packer will decrypt and load the payload in memory. Figure 1 shows the decryption routine.

The decryption routine.

Figure 1. The decryption routine.

Payload

After searching for and terminating any running process named ‘mfssys.exe’, the malware copies itself to ‘%Application Data%\MSOCache\mfssys.exe’ and sets the following registry value to keep itself persistent:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]

‘moyeujdhasjkklsshah’=‘C:\\Documents and Settings\\agent\\Application Data\\MSOCache\\mfssys.exe’

Then it starts its click fraud and referrer spamming using the following steps:

  1. It retrieves the path of Internet Explorer.

  2. It combines the ‘www.’ prefix and the domain ‘morefastsearch.com’ with one of the built-in request parameters (see Figure 2) to form a full URL.

    Part of the request parameter list.

    Figure 2. Part of the request parameter list.

  3. It launches Internet Explorer (by invoking the CreateProcessW API with the parameter StartupInfo.wShowWindow set as SW_HIDE) with the URL generated in step 2.

  4. It enumerates windows to find the ‘IEFrame’ window. (When it finds a window with the class name ‘IEFrame’, it checks whether the window belongs to the process instance created by itself (see Figure 3) to avoid disrupting the normal use of Internet Explorer and attracting the user’s attention.)

    Check whether the target window belongs to the process created by itself.

    Figure 3. Check whether the target window belongs to the process created by itself.

  5. It enumerates the child windows of the window found in step 4 to find the ‘Internet Explorer_Server’ window, then simulates the pressing of the Tab key several times and the Enter key (to walk through and click on search result items), as shown in Figure 4.

    Simulates the Tab key (several times) and the Enter key.

    Figure 4. Simulates the Tab key (several times) and the Enter key.

  6. It repeats steps 4 and 5 three times.

  7. It terminates Internet Explorer.

  8. It repeats steps 2–7 until all the request parameters have been used.

Though we cannot view the source code of ‘feed.php’ in the request parameters, Wireshark demonstrates clearly what it does – it simply feeds the search keyword to www.bing.com and sets ‘morefastsearch.com’ as the referrer (see Figure 5).

‘feed.php’ forwards the request to bing.com.

Figure 5. ‘feed.php’ forwards the request to bing.com.

If we open www.morefastsearch.com manually in a browser and perform a search, we can see that it simply passes the search string to bing.com and loads the results from it (see Figure 6).

Result page on ‘morefastsearch.com’ – the search string has simply been passed to bing.com.

Figure 6. Result page on ‘morefastsearch.com’ – the search string has simply been passed to bing.com.

In order to guarantee its stealth, the malware empties the following registry values to silence Internet Explorer in different situations:

  • HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\.current\(Default)

  • HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\BlockedPopup\.current\(Default)

  • HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\SecurityBand\.current\(Default)

In our research, we have seen the same code as used in this piece of malware also being used for popularizing different domains, as detailed below:

MD5Domain
39412490E7221EA8A2C5125CC8CFC447morefastsearch.com
F6CEA38DF990A0DCF73167D4E359728Bbzmp3.com
D86DEEFD8AF29390F408E684BD64E5F1bzmp3.com
15ED9C1FF307A8E005FB6ABDDD58A0C3firstsearchnow.com
C1A1F9DC884C9B34F8BEF0F6EB937C8Fwebfindpage.com
F4A2705067AD1405D3354D1CAA0EC855zbeemp3.com

Conclusion

We are unable to confirm whether this particular piece of malware was built with the acknowledgement of the domain owner, but referrer spamming and click fraud do harm the real value of search engine ranking.

twitter.png
fb.png
linkedin.png
hackernews.png
reddit.png

 

Latest articles:

Nexus Android banking botnet – compromising C&C panels and dissecting mobile AppInjects

Aditya Sood & Rohit Bansal provide details of a security vulnerability in the Nexus Android botnet C&C panel that was exploited to compromise the C&C panel in order to gather threat intelligence, and present a model of mobile AppInjects.

Cryptojacking on the fly: TeamTNT using NVIDIA drivers to mine cryptocurrency

TeamTNT is known for attacking insecure and vulnerable Kubernetes deployments in order to infiltrate organizations’ dedicated environments and transform them into attack launchpads. In this article Aditya Sood presents a new module introduced by…

Collector-stealer: a Russian origin credential and information extractor

Collector-stealer, a piece of malware of Russian origin, is heavily used on the Internet to exfiltrate sensitive data from end-user systems and store it in its C&C panels. In this article, researchers Aditya K Sood and Rohit Chaturvedi present a 360…

Fighting Fire with Fire

In 1989, Joe Wells encountered his first virus: Jerusalem. He disassembled the virus, and from that moment onward, was intrigued by the properties of these small pieces of self-replicating code. Joe Wells was an expert on computer viruses, was partly…

Run your malicious VBA macros anywhere!

Kurt Natvig wanted to understand whether it’s possible to recompile VBA macros to another language, which could then easily be ‘run’ on any gateway, thus revealing a sample’s true nature in a safe manner. In this article he explains how he recompiled…


Bulletin Archive

We have placed cookies on your device in order to improve the functionality of this site, as outlined in our cookies policy. However, you may delete and block all cookies from this site and your use of the site will be unaffected. By continuing to browse this site, you are agreeing to Virus Bulletin's use of data as outlined in our privacy policy.