September 15, 2017 By Larry Loeb 2 min read

Security research firm ESET found that content delivery networks (CDNs) offer more than just ways to optimize bandwidth: They can also be a source of malware.

ESET observed certain methods that are being put into use as the basis for a new kind of attack, including the use of remote scripts and command-and-control (C&C) techniques, reported We Live Security.

The first step in the attack is to store a small bit of JavaScript code in a file located at a particular address on the CDN, according to SecurityWeek.

This bit of JavaScript is used by a Nullsoft Scriptable Installer System (NSIS) program to perform the first part of the malware installation. The threat actors have to get the victim to activate the NSIS, and that is where the social engineering part comes into action. They make the victim believe that this NSIS downloader is something else they want, and the victim does whatever action is needed to execute the NSIS.

The downloader will then go to the JavaScript snippet and obtain it. Next, the eval function is called to evaluate the snippet and create additional parts to the snippet. The form of the addition is: downAndExec(\”<parameter_1>\”, \”<parameter_2>\”). ESET said that the first parameter (<parameter_1>) will correspond to the URL where the C&C is hosted, and the second parameter (<parameter_2>) contains the “x-id” data that is necessary to download other payloads.

This framework has enough functionality to get various modules from the C&C and execute them individually. One example of this technique used Facebook’s content delivery network to load a banking Trojan that worked only for Brazilian banks.

SecurityWeek noted that protection against sandboxing has been implemented in the bank Trojan downloader. That means the malicious code will not be executed if the JavaScript snippet is analyzed separately, which would indicate a sandbox function. The script also directly identifies whether the machine meets its needs by performing other checks before it takes any malicious action.

Content delivery networks present a number of problems for malware detection along with their intended use. For example, the IP of such a network is virtually unblockable if it is delivering malware. Blocking the IP will not work in this case due to a flood of uncompromised information originating from the malware. Additionally, finding appropriate IoCs may be hard due to the high volume of traffic originating from such a site.

Like fileless malware, this kind of security challenge requires different methods to both detect it and to mitigate it. However, the advice of not clicking on unknown links or documents remains as apt as ever.

More from

Exploiting GOG Galaxy XPC service for privilege escalation in macOS

7 min read - Being part of the Adversary Services team at IBM, it is important to keep your skills up to date and learn new things constantly. macOS security was one field where I decided to put more effort this year to further improve my exploitation and operation skills in macOS environments. During my research, I decided to try and discover vulnerabilities in software that I had pre-installed on my laptop, which resulted in the discovery of this vulnerability. In this article, I…

Taking the complexity out of identity solutions for hybrid environments

4 min read - For the past two decades, businesses have been making significant investments to consolidate their identity and access management (IAM) platforms and directories to manage user identities in one place. However, the hybrid nature of the cloud has led many to realize that this ultimate goal is a fantasy. Instead, businesses must learn how to consistently and effectively manage user identities across multiple IAM platforms and directories. As cloud migration and digital transformation accelerate at a dizzying pace, enterprises are left…

IBM identifies zero-day vulnerability in Zyxel NAS devices

12 min read - While investigating CVE-2023-27992, a vulnerability affecting Zyxel network-attached storage (NAS) devices, the IBM X-Force uncovered two new flaws, which when used together, allow for pre-authenticated remote code execution. Zyxel NAS devices are typically used by consumers as cloud storage devices for homes or small to medium-sized businesses. When used together, the flaws X-Force discovered allow a remote attacker to execute arbitrary code on the device with superuser permissions and without requiring any credentials. This results in complete control over the…

What cybersecurity pros can learn from first responders

4 min read - Though they may initially seem very different, there are some compelling similarities between cybersecurity professionals and traditional first responders like police and EMTs. After all, in a world where a cyberattack on critical infrastructure could cause untold damage and harm, cyber responders must be ready for anything. But are they actually prepared? Compared to the readiness of traditional first responders, how do cybersecurity professionals in incident response stand up? Let’s dig deeper into whether the same sense of urgency exists…

Topic updates

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