February 15, 2012 By Amit Klein 2 min read

Last September, we blogged about a new polymorphic financial malware variant we had discovered. We code-named it “Shylock” because every new build bundles random excerpts from William Shakespeare’s “The Merchant of Venice” in its binary. These are designed to change the malware’s file signature to avoid detection by antivirus programs and security software.

In recent weeks, we have seen a significant increase in the number of end-user machines infected with Shylock. One of this malware’s distinguishing characteristics is its ability to almost completely avoid detection by antivirus scanners after installation. Shylock uses a unique three-step process to evade scanners:

Step 1: Financial Malware Hides in Memory

Shylock injects itself into all running processes (applications) in memory. Every time a new application is initialized, Shylock suspends the application from running in memory, injects itself into the application process and then allows the application to proceed with its normal execution. Once installed, Shylock code doesn’t run as a separate process; rather, it embeds itself within every genuine application running on a machine. This makes it very hard to detect. Moreover, even if Shylock is detected, the fact that it is embedded in multiple running applications makes it almost impossible to stop and remove from memory.

Step 2: Watchdog Senses Scans

Shylock looks for and intercepts operations related to directory browsing and enumeration of registry keys, which indicate an antivirus scanning operation is underway. Once it detects “scanning” activity, Shylock deletes its own files and registry entries, making it undetectable. It remains active only in memory.

Step 3: Hijacks Windows’ Shutdown

Entries in the operating system registry allow malware (like any application or process) to execute its files as part of the start-up processes. Once Shylock has removed its files and registry entries to avoid being detected by an antivirus scan, it cannot survive a system shutdown/reboot. Any of these actions would remove it from memory and eliminate the infection. To ensure its survival, Shylock hooks into the Windows shutdown procedure and reinstates the files and registry keys (previously removed in Step 2) just before the system is completely shut down and after all applications are closed, including antivirus applications.

We have found that physically unplugging the machine’s power source (assuming it does not have an internal battery) after Shylock has deleted its files and registry entries to evade detection will clean the memory and also the Shylock infection. Needless to say, we do not recommend this as a malware-removal practice.

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