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

A spotlight on Akira ransomware from X-Force Incident Response and Threat Intelligence

7 min read - This article was made possible thanks to contributions from Aaron Gdanski.IBM X-Force Incident Response and Threat Intelligence teams have investigated several Akira ransomware attacks since this threat actor group emerged in March 2023. This blog will share X-Force’s unique perspective on Akira gained while observing the threat actors behind this ransomware, including commands used to deploy the ransomware, active exploitation of CVE-2023-20269 and analysis of the ransomware binary.The Akira ransomware group has gained notoriety in the current cybersecurity landscape, underscored…

New proposed federal data privacy law suggests big changes

3 min read - After years of work and unsuccessful attempts at legislation, a draft of a federal data privacy law was recently released. The United States House Committee on Energy and Commerce released the American Privacy Rights Act on April 7, 2024. Several issues stood in the way of passing legislation in the past, such as whether states could issue tougher rules and if individuals could sue companies for privacy violations. With the American Privacy Rights Act of 2024, the U.S. government established…

AI cybersecurity solutions detect ransomware in under 60 seconds

2 min read - Worried about ransomware? If so, it’s not surprising. According to the World Economic Forum, for large cyber losses (€1 million+), the number of cases in which data is exfiltrated is increasing, doubling from 40% in 2019 to almost 80% in 2022. And more recent activity is tracking even higher.Meanwhile, other dangers are appearing on the horizon. For example, the 2024 IBM X-Force Threat Intelligence Index states that threat group investment is increasingly focused on generative AI attack tools.Criminals have been…

Topic updates

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