# Shylock's New Trick: Evading Malware Researchers **[securityintelligence.com/shylocks-new-trick-evading-malware-researchers/](https://securityintelligence.com/shylocks-new-trick-evading-malware-researchers/)** November 28, 2012 [Home /](https://securityintelligence.com/) [Banking & Finance](https://securityintelligence.com/category/topics/banking-financial-services-industry/) Shylock’s New Trick: Evading Malware Researchers ----- [Banking & Finance November 28, 2012](https://securityintelligence.com/category/topics/banking-financial-services-industry/) By [Dana Tamir 2 min read](https://securityintelligence.com/author/dana-tamir/) 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](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379486%28v=vs.85%29.aspx) 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](https://www-03.ibm.com/security/xforce/) [also immune to malware evasion techniques designed to identify remote desktop and virtual](https://securityintelligence.com/underestimating-your-security-tactics-attackers-wont/#.U9J1ao1dXgI) machine environments. [Financial Malware |](https://securityintelligence.com/tag/financial-malware/) [Malware |](https://securityintelligence.com/tag/malware/) [Sandbox |](https://securityintelligence.com/tag/sandbox/) [Shylock](https://securityintelligence.com/tag/shylock/) ----- [Dana Tamir](https://securityintelligence.com/author/dana-tamir/) Director of Enterprise Security at Trusteer, an IBM Company Dana Tamir is Director of Enterprise Security at Trusteer, an IBM Company. In her role she leads activities related to enterprise advanced threat protection ... ----- ### more from Banking & Finance [Banking & Finance May 10, 2022](https://securityintelligence.com/category/topics/banking-financial-services-industry/) ## What Do Financial Institutions Need to Know About the SEC’s Proposed Cybersecurity Rules? ----- On March 9, the U.S. Securities and Exchange Commission (SEC) announced a new set of proposed rules for cybersecurity risk management, strategy and incident disclosure for public [companies. One intent of the rule changes is to provide “consistent, comparable and](https://securityintelligence.com/articles/financial-institutions-know-sec-proposed-cybersecurity-rules/) decision-useful” information to investors. Not yet adopted, these new rules – published in the Federal […] [Advanced Threats May 9, 2022](https://securityintelligence.com/category/x-force/threats/) ## New DOJ Team Focuses on Ransomware and Cryptocurrency Crime While no security officer would rely on this alone, it’s good to know the U.S. Department of Justice is increasing efforts to fight cyber crime. According to a recent address in Munich by Deputy Attorney General Lisa Monaco, new efforts will focus on ransomware and cryptocurrency incidents. This makes sense since the X-Force Threat Intelligence […] ----- [Banking & Finance May 3, 2022](https://securityintelligence.com/category/topics/banking-financial-services-industry/) ## SEC Proposes New Cybersecurity Rules for Financial Services Proposed new policies from the Securities and Exchange Commission (SEC) could spell [changes for how financial services firms handle cybersecurity. On Feb. 9, the SEC voted to](https://securityintelligence.com/articles/sec-proposes-new-cybersecurity-rules-financial-services/) propose cybersecurity risk management policies for registered investment advisers, registered investment companies and business development companies (funds). Next, the proposal will go through a public comment period until […] [Banking & Finance April 19, 2022](https://securityintelligence.com/category/topics/banking-financial-services-industry/) ----- ## Top Security Concerns When Accepting Crypto Payment From Microsoft to AT&T to Home Depot, more companies are accepting cryptocurrency as a way to pay for products and services. This makes perfect sense as crypto coins are a viable revenue source. Perhaps the time is ripe for businesses to learn how to receive, process and convert crypto payments into fiat currency. Still, many […] Analysis and insights from hundreds of the brightest minds in the cybersecurity industry to help you prove compliance, grow business and stop threats. -----