November 28, 2012 By Dana Tamir 2 min read

Shylock is a financial malware platform discovered by IBM Security in 2011. Like most malware strains, it continues to evolve in order to bypass new defensive technologies put in place by financial institutions and enterprises. While analyzing a recent Shylock dropper, we noticed a new trick it uses to evade detection. Namely, it can identify and avoid remote desktop environments, a setup commonly used by researchers when analyzing malware.

Exploiting the Lab

Researchers collect suspected malware samples for analysis and often place them onto machines that are isolated in an operations center, also known as a lab. Rather than sit in front of a rack of physical machines in a cold basement lab, researchers use remote desktop connections to study malware from the convenience and coziness of their offices. It is this human weakness that Shylock exploits. We have discovered advanced malware that is now capable of detecting remote desktop environments to evade researchers.

The Shylock dropper we discovered detects a remote desktop environment by feeding invalid data into a certain routine and then observing the error code returned. It uses this return code to differentiate between normal desktops and other lab environments. In particular, when executed from a remote desktop session, the return code will be different and Shylock won’t install. It is possible to use this method to identify other known or proprietary virtual/sandbox environments, as well.

For those more technically oriented, here is a bit more detail. The dropper dynamically loads Winscard.dll and calls the function SCardForgetReaderGroupA(0, 0). The malware proceeds as expected only if the return value is either 0x80100011 (SCARD_E_INVALID_VALUE) or 0x2 (ERROR_FILE_NOT_FOUND).

We noticed that when the dropper is executed locally, the return value is 0x80100011, but when it is executed from a remote desktop session the return value is 0x80100004 (SCARD_E_INVALID_PARAMETER). The assembly language source code is shown below. We have found a number of malware strains that utilize different approaches to identify specific execution environments in order to take appropriate evasive actions. The assembly language source code is shown below.

IBM vs. Shylock

IBM Security solutions are not affected by anti-VM/anti-research techniques employed by malware. This is because we use real-time application protection to monitor for suspected malware behavior in the endpoint device’s memory. This approach prevents malware from compromising applications, including the browser, and stealing data like user credentials. It is also immune to malware evasion techniques designed to identify remote desktop and virtual machine environments.

More from Banking & Finance

PixPirate: The Brazilian financial malware you can’t see

10 min read - Malicious software always aims to stay hidden, making itself invisible so the victims can’t detect it. The constantly mutating PixPirate malware has taken that strategy to a new extreme. PixPirate is a sophisticated financial remote access trojan (RAT) malware that heavily utilizes anti-research techniques. This malware’s infection vector is based on two malicious apps: a downloader and a droppee. Operating together, these two apps communicate with each other to execute the fraud. So far, IBM Trusteer researchers have observed this…

New Fakext malware targets Latin American banks

6 min read - This article was made possible thanks to contributions from Itzhak Chimino, Michael Gal and Liran Tiebloom. Browser extensions have become integral to our online experience. From productivity tools to entertainment add-ons, these small software modules offer customized features to suit individual preferences. Unfortunately, extensions can prove useful to malicious actors as well. Capitalizing on the favorable characteristics of an add-on, an attacker can leverage attributes like persistence, seamless installation, elevated privileges and unencrypted data exposure to distribute and operate banking…

DORA and your quantum-safe cryptography migration

5 min read - Quantum computing is a new paradigm with the potential to tackle problems that classical computers cannot solve today. Unfortunately, this also introduces threats to the digital economy and particularly the financial sector.The Digital Operational Resilience Act (DORA) is a regulatory framework that introduces uniform requirements across the European Union (EU) to achieve a "high level of operational resilience" in the financial services sector. Entities covered by DORA — such as credit institutions, payment institutions, insurance undertakings, information and communication technology…

Topic updates

Get email updates and stay ahead of the latest threats to the security landscape, thought leadership and research.
Subscribe today