While there is nothing surprising these days about finding a website that contains malicious code, it is educational to investigate them in order to determine how the bad guys are using the web to scam people and make money. A recent documents the increased use of javascript by attackers in their attempts to install malware on victim machines. Recently I came across a site with some malicious javascript that caught my attention. In this article I will detail how the javascript works in its attempt to download and install malware on unsuspecting visitors’ machines.
The site in question is hxxp://www.dompimps.com. Do not attempt to access this site unless you know how to protect your machine or else you may find yourself dealing with a nasty infection (and this one won’t be treatable with antibiotics). I attempted to notify the owners of the site to alert them to the malicious javascript, but I have not received any response. It is impossible to know if this malicious code was installed by the site owners themselves or if it was injected by a hacker who took advantage of a vulnerability in the site. In either case, the result is the same for visitors to this site.
The screen shot below shows the malicious javascript that exists on this site.
Interestingly, no attempt is made to obfuscate this code which frequently is the case with malicious javascript in order to make detection more difficult. The result when someone visits hxxp://www.dompimps.com is that the javascript will be executed by the browser which will then load hxxp://onlineisdudescars.com/js.php. This site has an IP address of and appears to be registered in Latvia. And this is where things get interesting. I submitted this URL to Anubis for analysis and used the provided network trace to determine exactly what this PHP script does. The below screen shot shows the pertinent part of this PHP script and how it attempts to install its malware.
As can be seen, the js.php script makes a call to hxxp://www3.netsurfingprotectionuc.rr.nu/?9247dcba5c=m%2Bzgl2uglqasm%2BLPzaualubj4KKbpZ%2Bk0KWbYKWklJI%3D” which has an IP address of and appears to be registered in Virginia. This site actually serves up the scareware that attempts to install rogue anti-virus software and infect your machine. It is particularly persistent and requires you to kill your browser via task manager in order to get away from the site.
Since I started working on this article last week, the js.php script on hxxp://onlineisdudescars.com has been updated and now refers to hxxp://www4.lawcps-safe.rr.nu/?944184a698=m%2BzgmGuekqmcluOW156Zi6Lm3mvUpnJpaGFvZpFrmlw%3D rather than hxxp://www3.netsurfingprotectionuc.rr.nu/?9247dcba5c=m%2Bzgl2uglqasm%2BLPzaualubj4KKbpZ%2Bk0KWbYKWklJI%3D. Hackers frequently change the source of their malware distribution points to make detection more difficult and help prevent their sites from being exposed and possibly taken offline.
The process described in this article is very typical of how hackers use javascript to install malware on unsuspecting users browsing the web. There are often two or three hosts involved with the first one being used to distribute the javascript that has either been placed on a web server without the knowledge of the owners (e.g. via SQL injection) or on purpose by the site owners. The javascript will redirect to another site that either actually attempts to install the malware or possibly uses redirection to yet another site that will actually host the malware. By using this series of redirections and changing the intermediate hosts/URLs occasionally, it is much more difficult to track down the people behind the scam. Understanding how the bad guys use web technology to conduct their attacks can help all of us defend our networks from them.
If you have used the web for any length of time at all, it is quite likely that you have seen a pop-up box similar to the one above on your computer when visiting a web site. In the security industry this type of malware is frequently referred to as scareware or rogue anti-virus. When confronted with this message, many people will unsuspectingly click the “OK” button which will usually install some type of malware that claims your machine is infected with a virus. It then offers to remove the virus if you purchase a product. The problem is, not only is this not going to protect your machine, but will likely lead to further system compromise and possibly the loss of personally identifiable information or credit card data.
A client of mine recently called to inform me that his system had been infected with malware after clicking the “OK” button on the above pop-up box. After removing the malware from his machine, I decided to dig further into this scareware campaign. The client reported that he performed a search for “tatiana banx” and one of the top 10 results took him to this site.
I started my analysis by performing the same search as my client. The results of my search are shown below. Notice the 10th result which I have highlighted with a red arrow.
The URL is hxxp://collin-county-real-estate.rmdfw.com/gsfyn/yuxfm.php?gu=500242. Also notice all the keywords listed for “tatiana”. This one caught my attention and sure enough, clicking on this link will take you to a rogue AV site. Moreover, your browser will become unusable except to click the “OK” button. In fact, if you click on any part of the pop-up box the malware will be installed, indicating that is part of this attack as well. The only way to prevent infection after clicking on the link in the search result is to kill the browser process. Clicking on any part of the pop-up box results in infection.
So, the first part of this scareware campaign is the use of SEO poisoning to generate high search results for the term “tatiana banx” among others. This is a common technique used by scammers to increase traffic to their sites and to increase infection rates. But how did they do this? I began by investigating the collin-county-real-estate.rmdfw.com site. This site is the Dallas-Fort Worth Re/Max Realtor web site. The A record for this server is 216.177.141.4 with a PTR of web17.websitesource.net. Thus, it appears that this site is hosted at WebSiteSource with a location somewhere in Kansas if the geoIP information is accurate. Next I examined the web server itself and found that directory listing was enabled which led to a treasure trove of interesting information.
This is only a partial list of over 330 files on this server that appear to be part of an SEO poisoning campaign. Examination of these files indicates that this server is being used to manipulate search results for many, many different search terms. For example, the search I performed for “tatiana banx” brought the result hxxp://collin-county-real-estate.rmdfw.com/gsfyn/yuxfm.php?gu=500242. A partial listing of the contents of the file 500242 is listed below:
Other files on this server show similar content for different search terms. It appears that this server is being used as part of an SEO poisoning campaign, likely without the knowledge of the web site’s owner. Furthermore, assuming that the owners of the rmdfw.com domain are not purposely redirecting traffic to malware distribution sites, it is likely that this server has been compromised.
The next step in my analysis involves an examination of the method that the site uses for redirecting traffic from hxxp://collin-county-real-estate.rmdfw.com to another site that attempts to install malware on the visitor’s machine. This turns out to be the most interesting part. There is a PHP script (yuxfm.php) that redirects to various other sites that host the scareware campaign. You will only be redirected if you click on the URL from a search result, indicating that the referer is being used to determine how traffic will be handled. Using a proxy to capture all of the communication between my system and the servers involved, I was able to reconstruct the sequence of events. After performing a search and clicking on the URL hxxp://collin-county-real-estate.rmdfw.com/gsfyn/yuxfm.php?gu=500242 which was the 10th result presented, the server responds with a 302 redirect to one of several different URLs. Below is the original request:
In this case I was redirected to hxxp://zeoro1.strangled.net/3/?c=947. This server then presents the scareware that attempts to trick the visitor into installing malware. Notice the javascript that gets executed on the client. No doubt this is the source of the malware. The site also includes images that resemble actual Windows warning messages in order to increase the likelihood that the visitor will be fooled into accepting the malware:
Online Protection
Initializing Virus Protection System…
The redirected URL changes frequently in an attempt to make detection and investigation more difficult. In fact, since I started my analysis a week ago, the collin-county-real-estate.rmdfw.com URL no longer shows up when searching for “tatiana banx” and no longer appears to be used in this malware campaign. However, other top 10 search results for “tatiana banx” result in the same scareware tactics. For example, today hxxp://tmsoftwaresolutions.co.uk/linmx/plol.php?gi=438195 shows up as the number 6 result. It is also important to keep in mind that this type of attack is not confined to only searches for “tatiana banx”. It is clear that whoever is behind this attack is targeting many different search terms and thus all search results should be viewed with care. Also, it appears that there are many compromised servers that are part of this campaign leading to the conclusion that this is not an isolated case.
To summarize, this scareware campaign makes use of a variety of techniques in order to spread its malware. First, it uses compromised hosts to manipulate search results and drive traffic to its servers, a technique called SEO poisoning. When a visitor clicks on one of these bogus search results, they are then redirected to a the malware delivery host which serves up content designed to make the visitor think their machine is infected with a virus. If the visitor clicks on the pop-up box to try and “remove” the virus, they will actually be installing malware on their machine. This malware pretends to be an anti-virus program, but in fact is malicious software. In the the near future I will be conducting further analysis on the hosts involved, how they may have been compromised and used as part of this malware distribution campaign, and the nature of the malware itself.
The conversation usually goes something like this:
Me: “Hey, have you heard about that new phishing attack targeting Bank of America customers?”
Mac User: “Oh, I’m not worried about that. I use a Mac.”
Me: “Well you know, just because you use a Mac doesn’t mean you are safe from an attack.”
Mac User: “Ha. Everyone knows that Macs are waaaay more secure than Windows systems.”
If I had a nickel for every time I have heard a Mac user make some type of statement to this effect, I would not have to buy any more lottery tickets. There is a widespread belief that Mac OS X is inherently more secure than Windows and that by using a Mac, one is protected from all threats. Unfortunately, not only is this not true, but it is dangerous as it leads people to not take appropriate precautions to protect their computers and information.
Let’s start with some basic facts. I performed a search of the and found the below data regarding Windows and OS X vulnerabilities:
Year
# of OS X Vulns
# of Vista Vulns
2007
152
61
2008
117
61
2009
101
106
These numbers represent the total number of vulnerabilities published for each of the last 3 years for Mac OS X (all versions) and Microsoft Windows Vista (all versions). It is clear that OS X has had more total vulnerabilities in the last 3 years than Vista has. These vulnerabilities provide potential avenues of attack for hackers which can lead to system compromise and data disclosure.
But that is only the tip of the iceberg. Phishing scams, trojans, drive by downloads and other threats don’t depend on any vulnerability in software in order to be successful. The weakness they exploit is in the user of the computer. It doesn’t matter whether you use a Mac, a PC, a Next, or a Cray. If you fall victim to one of these types of attacks that relies on social engineering to get users to divulge their credentials or install malware, using a Mac doesn’t offer you any protection at all.
Given the fact that Mac OS X has plenty of vulnerabilities, it might seem surprising that there is not more malware in the wild that exploits these weaknesses. I believe the answer to this riddle can be found in the relative percentage of Windows to Mac users. Most studies have found that Apple has between 7% – 12% market penetration, while Microsoft maintains nearly 85% market share. If you are a hacker hoping to exploit vulnerabilities, it clearly makes more sense to devote your time and resources to the Windows platform since your odds of success will be much higher. However, as the percentage of Mac OS X users grows, the number of exploits that target OS X will also grow. So Mac users take note. Do not be lulled into a false sense of security. Be sure to follow for protecting your computer and your data in order to minimize the risk of a successful attack.
I have always been a fan of Mozilla’s Firefox browser. To tell the truth, I have been using it since its original incarnation when it was known as Netscape Navigator (and Mosaic before that). I always thought it was more intuitive, faster, and had more and better features than Microsoft’s Internet Explorer. Of course, given that IE is included with the Windows operating system, and that Windows commands more than 90% of the desktop computer market, it is no surprise that IE remains the most popular browser in use today with 67% penetration.
However, there is another, even more important reason why Firefix is my prefered browser. Security. IBM’s ISS X-Force recently released its on Internet security which analyzed trends in threats and vulnerabilities for 2008. This is an excellent report that all information security practitioners should read carefully in order to understand the the types of threats that we all face. But it was the information on page 56 of this report that really caught my attention.
For many years I have argued that Firefox provides a more secure browsing experience than IE. And now, I have proof to support this opinion. According to the ISS report, nearly 68% of all exploits hosted on malicious websites target ActiveX and IE. Conversely, less than half of one percent of exploits target Firefox. Admittedly, this is likely as much a result of IE’s popularity as a browser as it is Firefox’s superior security. However, Firefox is the second most widely used browser with 21.5% penetration. All things being equal, one would expect more than .3% of the exploits to be targeted at a browser with this much penetration. Clearly there are other forces at work.
So why are criminals giving Firefix a pass? In order for a vulnerability to be exploited, it must be worth the time and effort that will be required to create the exploit. That means, there must be a high probability that the exploit will be successful and generate revenue for the criminal organization. The fact Firefox does such a great job of automating software updates makes it much more difficult to exploit vulnerabilities in the browser. A found that over 83% of Firefox users were running the most up-to-date and secure version of the browser. Conversely, only 47% of IE users were using the most up-to-date and secure version of the browser. This translates into hundreds of millions of people who are using vulnerable versions of IE, ripe for exploitation by criminal elements. When viewed from this perspective, it is easy to understand why Firefox is a more secure browser than Internet Explorer.