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

How the ZeuS Trojan Info Stealer Changed Cybersecurity

4 min read - Information stealer malware is a type of malicious software designed to collect sensitive information from a victim’s computer. Also known as info stealers, data stealers or data-stealing malware, this software is true to its name: after infecting a computer or device, it’s highly adept at exfiltrating login credentials, financial information and personal data. Info stealers typically operate by monitoring keyboard input, capturing screenshots and intercepting network traffic. They may also search a hard drive for specific types of data. The…

4 min read

2022 Industry Threat Recap: Finance and Insurance

5 min read - The finance and insurance sector proved a top target for cybersecurity threats in 2022. The IBM Security X-Force Threat Intelligence Index 2023 found this sector ranked as the second most attacked, with 18.9% of X-Force incident response cases. If, as Shakespeare tells us, past is prologue, this sector will likely remain a target in 2023. Finance and insurance ranked as the most attacked sector from 2016 to 2020, with the manufacturing sector the most attacked in 2021 and 2022. What…

5 min read

How to Spot a Nefarious Cryptocurrency Platform

4 min read - Do you ever wonder if your cryptocurrency platform cashes in ransomware payments? Maybe not, but it might be worth investigating. Bitcoin-associated ransomware continues to plague companies, government agencies and individuals with no signs of letting up. And if your platform gets sanctioned, you may instantly lose access to all your funds. What exchanges or platforms do criminals use to cash out or launder ransomware payments? And what implications does this have for people who use exchanges legitimately? Blacklisted Exchanges and Mixers…

4 min read

Kronos Malware Reemerges with Increased Functionality

6 min read - The Evolution of Kronos Malware The Kronos malware is believed to have originated from the leaked source code of the Zeus malware, which was sold on the Russian underground in 2011. Kronos continued to evolve and a new variant of Kronos emerged in 2014 and was reportedly sold on the darknet for approximately $7,000. Kronos is typically used to download other malware and has historically been used by threat actors to deliver different types of malware to victims. After remaining…

6 min read