TrustDefender Labs

Technical Updates from the TrustDefender Labs

Browsing Posts published in January, 2009

I can’t believe that we haven’t blogged about Zeus/Wsnpoem, as it is one of the more common trojans that targets media and social networking websites especially financial institutions worldwide since more than 3 years now. However we are seeing the technology improving throughout this period. It steals user private and confidential information (form grabber), can inject arbitrary HTML code into any website (also encrypted websites), can steal certificates and will take screenshots to defeat virtual keyboards especially those virtual keyboards commonly used by financial institutions still today.

In addition to its business features, Zeus/Wsnpoem continues to be enhanced and is  one of the most advanced trojans from a technical point of view as well. The most important reasons are:

  • incredibly hard to detect once a system is infected (see below)
  • easy to use backend system provided
  • easy to configure by simple (but encrypted) configuration files.

So let’s have a detailed look what this trojan is doing.

Overview

Quite often, and simply a Zeus trojan is delivered via a Spam email (e.g. UPS Invoice) and once the dropper is executed, it will inject its self into key windows components. This means that the trojan will not be visible at all (e.g. in task manager), and all internet communication is performed by the “authentic” processes. This way the trojan can invade any firewall as well.

It will install its self (ntos.exe) into the Registry (HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit to make sure it will be started every time Windows starts. The initial ntos.exe process will inject its self into winlogon.exe (a core windows process) and will spread from there into every single process. The files on the harddrive are protected with rootkit features so they are not visible in the Windows Explorer. Altogether, it’s incredibly hard even for security professionals to detect whether the system is compromized!!!

A very detailed, very technical and very interesting study of one of the early variants of this trojan by Lance James and Michael Ligh can be found here: http://www.securescience.net/FILES/securescience/10378/pubMalwareCaseStudy.pdf. Even though this study is from 2006, most of the technical details are still valid and the paper is still current. As you would expect though, we have seen quite a bit of technical improvement.

Technical Details

The sample we looked at was MD5=8f5668c69fb4924ba15313dcf87f4d42 and according to Virustotal only 5 out of 38 detect this dropper. (http://www.virustotal.com/analisis/45625ba20a8d6e4c79cd10658efa9da8). Unfortunately we see this with almost all sophisticated trojans. The detection for new threats is way too low.

As discussed before, the trojan is neither visible as a user process nor as a system driver

all-good1

The only way to detect this trojan is to look at hooked system functions:

hooks

Our sample targeted 279 financial institutions, including 36 financial institutions in Australia (First, econd and third tier), including 3 of the four major Australian suppliers of banking backend services to mostly second and third tier financial institutions.

For a full list, please contact us at info@trustdefender.com

A normal user will not notice anything suspicious when he is doing an internet banking session. The trojan will do all its work in the background and our sample was very well written and we did not experience a single crash and could not notice any slowdown of the system at all! The Trojan would then send the captured information to the C&C server where this information is typically onsold. So the fraudsters who compromize the accounts are in most cases not identical with the fraudsters who steal your money! A fact that make life for Law Enforcement around the world very tricky.

How TrustDefender protects the user

TrustDefender will ‘detect’ and ‘successfully protect’ the user from any known Zeus/wsnpoem/zbot infection as TrustDefender will detect the system file hooking and with its secure lockdown it will isolate any potential malicious code (include the hooked code). If implemented by the financial institution, TrustDefender enables the financial institution to notify and provide feedback to the user within the login page based on the security health of the user’s computer and within a web2.0 environment…..most importantly before the customer puts in his or her confidential details i.e. ID, Password, 2nd factor security code.

yaludleboa-time-0_04_0306

If you opt to view the details, you can see that TrustDefender will detect the system hooks as part of its forensics engine

kernel-forensics1

However the most important part is not the details, the most important part is that ‘all TrustDefender users and those customers of financial institutions deploying TrustDefender are protected by default and by design’ – straight out of the box! No need to do anything. Let TrustDefender do the hard part.

However as always: Even though TrustDefender protects you from the attack, we believe in defence in depth and we recommend cleaning an infected system as soon as possible.

Are you infected? Removal

As the Trojan is almost impossible to detect from its files, the best way to see whether you are infected is to check the registry key HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit. Make sure that there is no ntos.exe in here. It it is, you are infected!!!

A complete removal is quite tricky as the files are rootkit-protected and cannot be easily deleted. However you can disable the trojan by removing the ntos.exe part (just that part!) in the above mentioned registry key. After a restart, the trojan will not be active. However the malicious files (protected by the rootkit) are still on the computer. In addition, the above mentioned study provides removal instructions in chapter 16.

Furthermore you can contact us at TrustDefender for more detailed information at info@trustdefender.com.

Just in time for Christmas 2008, we have been seeing a new wave of our old friend the MBR/Mebroot/Sinowal/Torpig rootkit. This is one of the nastiest rootkits the world has ever seen – with only one goal: To steal people’s money and their identity. The MBR rootkit has been covered heavily in our Kernel Forensics Whitepaper and as there have been so many improvements of this rootkit, we will revisit a few of them here in this blog.

First of all, it is quite heavily distributed through drive-by-downloads via Neosploit, which is a very advanced exploit framework to compromise website visitors. The whole distribution method is one of the most advanced and well-thought-through processes.

First of all, it employs geographic IP checking so that they control specifically who will be targeted. This way they can target special geographic locations, but could potentially also target home user making life harder for security professionals. In our case, we couldn’t get infected from Australia, but were easily infected from Germany!

Secondly, after infection, the loader will “sleep” for a random period of time before anything happens. In our case, we had to wait approx. 6 minutes before the Master-Boot-Record was changed. This was clearly done to fool security researchers and automatic malware testing tools (as they would execute the loader and not see any activity at all!!!)

Thirdly, as with all MBR/Mebroot infections, the malicious code will only run AFTER a reboot as the loader will just infect the Master-Boot-Record. It is not until the next reboot, the whole Mebroot boot sequence will begin.

The boot sequence is a complicated, seven step procedure and will ensure that the computer will be infected without any malicious process or component even running on the system. This is possible because Mebroot has full control over the boot sequence of Windows.

But how can Mebroot/Sinowal do their dirty work without a malicious component? Well, because Mebroot/Sinowal controls the boot sequence, it can inject the malicious code into existing/legitimate Windows Components. It will “hook” key functions that the Internet Explorer will use to do it’s day-to-day job like sending and receiving data and encrypting that data. Yes, you are right. Mebroot/Sinowal does have full control over the encrypted data stream as it has access to it before it will be encrypted and after it has been decrypted. The picture below shows the key parts where code was injected – mainly into explorer.exe and iexplore.exe (Internet Explorer)

hooked_functions1

 This is also the reason why the rootkit is so invisible – simply because there is no malicious component on its own running. An infected computer with Norton 2009 running will not detect anything even for a full computer scan.

nis2009_full_scan

But how does Mebroot/Sinowal actually work from a user’s perspective?

Well, as Mebroot/Sinowal have full control over the internet session; they will dynamically inject their own malicious HTML code into the banking website to either steal existing information or to steal additional information. This is typically done after the user is logged in to what is for all intense purposes the authenticated secure banking website and therefore almost all users will be deceived as they are sure that they are not at a phishing site.

Please note: The user is actually at the right site. The SSL certificate is correct and valid. You even see the green bar from your SSL EV certificate, however the content is injected locally by the Trojan. Below are two screenshots from Bank of America and Citibank where the Trojan injects its own HTML to get additional personal information from the user.

Technical Details

As per always on this blog, we will provide some technical background and how it looks like from a user’s point of view. A full technical description of Mebroot/Sinowal is available here: http://web17.webbpro.de/index.php/analysis-of-sinowal (thanks to Peter Kleissner)

We analyzed the following sample on Jan 5, 2009 and according to Virustotal, only 8 out of 38 Antivirus Engines detected this Mebroot/Sinowal sample (http://www.virustotal.com/analisis/fe95bd3e4e26a22c8be7b6f1ead6bcec). None of the big Antivirus Engines like F-Secure, McAfee, Sophos or Symantec detected it. At least Trend Micro’s heuristic engine came up with the name “Cryp_Xed-3″)

What are the Antivirus Engines doing?

This brings me to one of the main points of this post. “What on earth are the Antivirus Engines doing?” As always, we were doing our analysis on a clean machine without Antivirus Engine to see what the virus is doing.

However we couldn’t believe our eyes when we retested with Norton Internet Security 2009 running and it did just nothing. Norton Internet Security 2009 is one of the best Antivirus Engines with a fast scanner, a nice user interface and a good protection, however it did just nothing!!! The Mebroot/Sinowal installer successfully infected the Master-Boot-Record, after a restart, the machine was compromized and NIS 2009 was just silent. (Note: We really do not want to single out Norton 2009 here. As stated above we think it’s one of the best products and many people we know use it and for good reason. However you can imagine what the situation looks like for less advanced products like any of the free Antivirus products used by consumers today)

norton_2009_siteisapproved1

Side Note: This picture illustrates another problem of many “phishing” protection tools. I don’t think that the page as it is displayed belongs to the company represented…

Movie / TrustDefender

TrustDefender will successfully protect the user from this attack by default . TrustDefender will alert you that your Windows Kernel has been compromized and will automatically secure the internet banking transaction regardless.

We have put together a little screen capture movie that demonstrates how Mebroot/Sinowal successfully infects a customer’s PC even with Norton 2009 installed and how TrustDefender protects this use for a Bank of America session.

Please note: In this movie, TrustDefender does not run in quiet mode for this transaction with Bank of America as the TrustDefender Enterprise Server is not integrated with the BofA backend systems. Financial Institutions can integrate the Enterprise Server enabling the full functionality and run in a quiet mode protecting the consumer with little or no interaction required from the account holder. However TrustDefender Gold Customers will be protected regardless.

(click on the picture to start the movie)

movie

Outlook

We will leave this machine running and will update soon on how the Antivirus Engine will pick it up once they update their patterns. It will be quite interesting as there is no process running or anything… Let’s see.