威胁行为者滥用 Cloudflare 隧道来传播远程访问木马
Threat actor abuses Cloudflare tunnels to deliver remote access trojans

原始链接: https://www.proofpoint.com/us/blog/threat-insight/threat-actor-abuses-cloudflare-tunnels-deliver-rats

Proofpoint 报告称,利用 Cloudflare Tunnel 服务的网络攻击有所增加。 这些攻击旨在传播远程访问木马 (RAT),并可追溯到经济动机。 这些活动于 2024 年 2 月开始,在 5 月至 7 月期间升级,最近的活动导致 Xworm RAT 感染。 在这些活动中,会发送包含 URL 链接或附加互联网快捷方式 (.URL) 文件的电子邮件。 执行后,.URL 文件通常通过 WebDAV 启动与外部文件共享的连接,以下载 Microsoft 链接 (.LNK) 或 Visual Basic 脚本 (VBS) 文件。 运行 .LNK/.VBS 文件后,将执行批处理 (BAT) 或命令 (CMD) 文件,随后下载 Python 安装程序包以及一系列 Python 脚本,最终安装恶意软件。 有时,文件暂存过程使用 search-ms 协议处理程序从 WebDAV 共享获取 .LNK 文件。 许多活动中的电子邮件都附带合法出现的 PDF 文档。 最初的策略采用了基本代码,并在脚本中明确描述了其功能。 但自 2024 年 6 月以来,威胁行为者已采用代码混淆来增强隐蔽性。 值得注意的是,“trycloudflare”隧道在 2023 年经常被滥用,并且在网络犯罪分子中继续流行。 使用时随机创建的单个子域通过 Cloudflare 代理将流量引导至运营商的本地服务器。 多个案例研究以 AsyncRAT 和 Xworm 活动的形式说明了这一策略的实施。 对 2024 年 5 月 28 日 AsyncRAT 和 Xworm 分发的分析显示,税务主题消息包含压缩的 .URL 文件。 2024 年 7 月 11 日的活动涉及超过 1500 条消息,其中包含订单发票主题电子邮件,其中包含 HTML 附件,利用指向 .LNK 文件的 search-ms 查询。 尽管归因仍不确定,但 Proofpoint 认为这些事件属于不同威胁群的一部分。 他们强调,由于所用基础设施的瞬态性,检测这些威胁非常困难

恶意软件分发方法已经演变,从可疑的俄罗斯域名地址和不安全的 IP 位置转向主流基础设施,例如 Google Cloud Platform (GCP)、Amazon Web Services (AWS)、Microsoft Azure、Cloudflare 等。 网络犯罪分子利用常见的虚拟专用网络 (VPN) 进行网络连接,类似于普通消费者用于流媒体内容的网络连接。 随着互联网加密和私人信息保护的增加,基于 IP 地址或域识别威胁变得越来越困难。 由于流量巨大,阻止流行的 VPN 或大型基础设施提供商是不切实际的。 此外,网络运营商的流量分析无法洞察用户活动。 这种转变的积极方面是由于模糊用户操作、减少对网络安全解决方案的依赖以及促使调查安全问题的根本原因而带来的隐私优势。 Krebs 最近发表的一篇关于安全的文章显示,.com 在网络钓鱼域名总数中处于领先地位,但相对于其他顶级域名 (TLD) 而言,其事件较少。 排名最低但非常流行的 TLD 是 .lol。 因此,重点阻止高比率 TLD 可增强整体系统安全性。 基于声誉的评分策略可能会变得越来越普遍,反映了评估电子邮件安全性的现有实践。 服务提供商必须进行自我监管,以防止将基础设施用于非法目的。 忽视其平台上潜在的非法活动可能会导致需要法律干预的更严格的审查。 由于监管不严、疏忽以及由此造成的财务损失,规模太大而无法管理风险的互联网公司可能会面临犯罪同谋的指控。 拆分被认为“太大而不能倒闭/存在”的公司仍然是一个有争议的立场,但确保互联网提供商采取负责任的行为并维护安全的环境似乎是更好的方法。 总之,向混淆和增加加密的转变需要服务提供商更加努力地防止其基础设施被滥用于邪恶目的。 通过提高透明度、改进内部安全措施并授权个人负责任地报告可疑活动,网络社区可以有效地应对威胁。 不太安全的选择的最终消亡会鼓励网络犯罪分子花费精力去发现新平台,最终提高整体互联网安全性。
相关文章

原文

Key findings 

  • Proofpoint has observed an increase in malware delivery via TryCloudflare Tunnel abuse. 
  • The activity is financially motivated and delivers exclusively remote access trojans (RATs).  
  • Since initial observation, the threat activity set behind the campaigns has modified tactics, techniques, and procedures in attempts to bypass detection and improve efficacy. 
  • Proofpoint does not attribute this activity to a tracked TA, but research is ongoing. 

Overview 

Proofpoint is tracking a cluster of cybercriminal threat activity leveraging Cloudflare Tunnels to deliver malware. Specifically, the activity abuses the TryCloudflare feature that allows an attacker to create a one-time tunnel without creating an account. Tunnels are a way to remotely access data and resources that are not on the local network, like using a virtual private network (VPN) or secure shell (SSH) protocol.  

First observed in February 2024, the cluster increased activity in May through July, with most campaigns leading to Xworm, a remote access trojan (RAT), in recent months.  

In most campaigns, messages contain a URL or attachment leading to an internet shortcut (.URL) file. When executed, it establishes a connection to an external file share, typically via WebDAV, to download an LNK or VBS file. When executed, the LNK/VBS executes a BAT or CMD file that downloads a Python installer package and a series of Python scripts leading to malware installation. In some cases, file staging leverages the search-ms protocol handler to retrieve the LNK from a WebDAV share. Typically in campaigns, a benign PDF is displayed to the user to appear legitimate.   

In June and July, nearly all observed campaigns delivered Xworm, but previous campaigns also delivered AsyncRAT, VenomRAT, GuLoader, and Remcos. Some campaigns will lead to multiple different malware payloads, with each unique Python script leading to the installation of a different malware. 

Malware observed in related campaigns leveraging “trycloudflare” tunnels.  

Malware observed in related campaigns leveraging “trycloudflare” tunnels.  

Campaign message volumes range from hundreds to tens of thousands of messages impacting dozens to thousands of organizations globally. In addition to English, researchers observed French, Spanish, and German language lures. Xworm, AsyncRAT, and VenomRAT campaigns are often higher volume than campaigns delivering Remcos or GuLoader. Lure themes vary, but typically include business-relevant topics like invoices, document requests, package deliveries, and taxes.  

While the tactics, techniques and procedures (TTPs) of the campaigns remain consistent, the threat actor does appear to modify different parts of the attack chain to increase sophistication and defense evasion. For example, initial campaigns used little to no obfuscation in their helper scripts. The scripts often included detailed comments about the functionality of the code. However, this changed in June when the threat actors began to incorporate obfuscation in their code. 

Helper script without obfuscation (May 2024 campaign example).

Helper script without obfuscation (May 2024 campaign example). 

Helper script with obfuscation (June 2024 campaign example).  

Helper script with obfuscation (June 2024 campaign example).

Threat actor abuse of TryCloudflare tunnels became popular in 2023 and appears to be increasing among cybercriminal threat actors. Each use of TryCloudflare Tunnels will generate a random subdomain on trycloudflare[.]com, for example ride-fatal-italic-information[.]trycloudflare[.]com. Traffic to the subdomains is proxied through Cloudflare to the operators’ local server. 

Campaign examples 

AsyncRAT / Xworm Campaign 28 May 2024 

Proofpoint observed a campaign on 28 May 2024 delivering AsyncRAT and Xworm. In this campaign, tax-themed messages contained URLs leading to a zipped .URL file. The campaign targeted organizations in law and finance and included less than 50 total messages. 

Figure: 28 May 2024 email lure using 2023 tax themes.

28 May 2024 email lure using 2023 tax themes.  

The .URL file pointed to a remote .LNK file. If executed, it led to a CMD helper script which called PowerShell to download a zipped Python package and Python scripts. The Python package and scripts led to the installation of AsyncRAT and Xworm. 

28 May 2024 Attack Chain

28 May 2024 attack chain  

AsyncRAT / Xworm Campaign 11 July 2024 

Researchers observed another campaign leveraging Cloudflare tunnels to distribute AsyncRAT and Xworm on 11 July 2024. This campaign included over 1,500 messages targeting organizations in finance, manufacturing, technology and others. 

July 11 lure using order invoicing themes.

July 11 lure using order invoicing themes. 

Interestingly, in this campaign messages contained HTML attachments with a search-ms query which pointed to a LNK file. If executed, it led to an obfuscated BAT file which invoked PowerShell to download a Python installer package and scripts to run AsyncRAT and Xworm. 

11 July 2024 attack chain.

11 July 2024 attack chain. 

Attribution 

Based on the tactics, techniques and procedures (TTPs) observed in campaigns, Proofpoint assesses they can be attributed to one cluster of related activity. Researchers have not attributed a specific threat actor to this activity, but research is ongoing.  

Why it matters  

The use of Cloudflare tunnels provide the threat actors a way to use temporary infrastructure to scale their operations providing flexibility to build and take down instances in a timely manner. This makes it harder for defenders and traditional security measures such as relying on static blocklists. Temporary Cloudflare instances allow attackers a low-cost method to stage attacks with helper scripts, with limited exposure for detection and takedown efforts. 

Attackers’ use of Python scripts for malware delivery is notable. Packaging Python libraries and an executable installer alongside the Python scripts ensures the malware can be downloaded and run on hosts that did not previously have Python installed. Organizations should restrict the use of Python if it is not required for individuals’ job functions. This is not the first-time researchers have observed software packages delivered alongside malware files. In recent months Proofpoint has observed campaigns delivering Java-based malware that bundle a JAR and the Java Runtime Environment (JRE) inside a ZIP to ensure the correct software is installed before executing the downloader or dropper. 

The attack chain requires significant victim interaction in order to detonate the final payload, including clicking on the malicious link, double clicking on multiple files such as the LNK or VBS files, and unzipping compressed scripts. This gives the recipient multiple opportunities to identify suspicious activity and disrupt the attack chain before successful execution.  

Threat actors are increasingly using WebDAV and Server Message Block (SMB) for payload staging and delivery as the cybercriminal ecosystem continues to experiment with different TTPs. Organizations should restrict access to external file sharing services to only known, safelisted servers.  

Emerging Threats signatures 

The Emerging Threats ruleset contains detections for the malware identified in these campaigns. 

Examples: 

2853193 | ETPRO MALWARE Win32/Xworm V3 CnC Command – PING Outbound 

2852870 | ETPRO MALWARE Win32/Xworm CnC Checkin – Generic Prefix Bytes 

2852923 | ETPRO MALWARE Win32/Xworm CnC Checkin – Generic Prefix Bytes (Client) 

2855924 | ETPRO MALWARE Win32/Xworm V3 CnC Command – PING Outbound 

2857507 | ETPRO ATTACK_RESPONSE Suspicious HTML Serving Abused URL Linking Method Observed 

Example Indicators of Compromise 

Indicator 

Description 

First Observed 

spectrum-exactly-knitting-rural[.]trycloudflare[.]com 

Trycloudflare Host 

May 2024 

53c32ea384894526992d010c0c49ffe250d600b9b4472cce86bbd0249f88eada 

.URL SHA256 

May 2024 

a79fbad625a5254d4f7f39461c2d687a1937f3f83e184bd62670944462b054f7 

LNK SHA256 

May 2024 

0f1118b30b2da0b6e82f95d9bbf87101d8298a85287f4de58c9655eb8fecd3c6 

CMD SHA256 

May 2024 

157[.]20[.]182[.]172 

Xworm C2 IP 

May 2024 

dcxwq1[.]duckdns[.]org 

AsyncRAT C2 

May 2024 

a40f194870b54aeb102089108ecf18b3af9b449066a240f0077ff4edbb556e81 

HTML SHA256 

July 2024 

3867de6fc23b11b3122252dcebf81886c25dba4e636dd1a3afed74f937c3b998 

LNK SHA256 

July 2024 

ride-fatal-italic-information[.]trycloudflare[.]com 

Trycloudflare Host 

July 2024 

0fccf3d1fb38fa337baf707056f97ef011def859901bb922a4d0a1f25745e64f 

BAT SHA256 

July 2024 

todfg[.]duckdns[.]org 

AsyncRAT C2 

July 2024 

welxwrm[.]duckdns[.]org 

Xworm C2 

July 2024 

xwor3july[.]duckdns[.]org 

Xworm C2 

July 2024 

联系我们 contact @ memedata.com