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

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