June 11, 2019 By David Bisson 2 min read

A fileless attack is leveraging PCASTLE to distribute samples of XMRig, a well-known Monero-mining malware family.

Trend Micro first observed the campaign on May 17 when it spotted a series of attacks targeting systems based in China. These attacks, which peaked on May 22 before leveling off, used a scheduled task or RunOnce registry key to download the first-stage PowerShell script. The script then searched for a URL inside of itself to download, execute and save a PowerShell command as a scheduled task.

At this stage in the infection chain, the scheduled task launched a PowerShell script that downloaded and executed the attacks’ second-stage PowerShell script. This asset then collected and reported system information to its command-and-control (C&C) server before downloading the third-stage PowerShell script. At this point, the attacks leveraged PCASTLE, an obfuscated PowerShell script to be used in additional propagation efforts and an XMRig module.

A Brief History of PCASTLE and XMRig Activity

XMRig has been a popular code base for cryptomining since the rise of this type of threat in mid-2017. In May 2018, ThreatPost reported on a new malware strain called WinstarNssmMiner that dropped XMRig as an additional payload under certain circumstances. A few months earlier, Palo Alto Networks found a large-scale operation that exposed as many as 15 million people to XMRig over a four-month period.

Both PCASTLE and XMRig have been active in recent months. In April 2019, Trend Micro spotted an attack campaign leveraging EternalBlue and PowerShell to target systems in Japan with PCASTLE and a Monero coin miner. Several months later, the security firm came across a new family of malware called BlackSquid that used eight notorious exploits to infect vulnerable machines with XMRig.

Protect Your Organization Against Monero-Mining Malware

Security professionals can help defend their organizations against Monero-mining malware like XMRig by disabling JavaScript in web browsers and restricting outbound calls to cryptomining pools as part of a general, concerted effort to defend against cryptocurrency miners. As always, ongoing security awareness training is critical to help the workforce avoid fileless attacks, including campaigns that leverage PowerShell to install malware.

More from

Hive0137 and AI-supplemented malware distribution

12 min read - IBM X-Force tracks dozens of threat actor groups. One group in particular, tracked by X-Force as Hive0137, has been a highly active malware distributor since at least October 2023. Nominated by X-Force as having the “Most Complex Infection Chain” in a campaign in 2023, Hive0137 campaigns deliver DarkGate, NetSupport, T34-Loader and Pikabot malware payloads, some of which are likely used for initial access in ransomware attacks. The crypters used in the infection chains also suggest a close relationship with former…

Unveiling the latest banking trojan threats in LATAM

9 min read - This post was made possible through the research contributions of Amir Gendler.In our most recent research in the Latin American (LATAM) region, we at IBM Security Lab have observed a surge in campaigns linked with malicious Chrome extensions. These campaigns primarily target Latin America, with a particular emphasis on its financial institutions.In this blog post, we’ll shed light on the group responsible for disseminating this campaign. We’ll delve into the method of web injects and Man in the Browser, and…

Crisis communication: What NOT to do

4 min read - Read the 1st blog in this series, Cybersecurity crisis communication: What to doWhen an organization experiences a cyberattack, tensions are high, customers are concerned and the business is typically not operating at full capacity. Every move you make at this point makes a difference to your company’s future, and even a seemingly small mistake can cause permanent reputational damage.Because of the stress and many moving parts that are involved, businesses often fall short when it comes to communication in a crisis.…

Topic updates

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