Fake Laravel Packages on Packagist Deploy RAT on Windows, macOS, and Linux
好的,我现在需要帮用户总结这篇文章的内容,控制在100个字以内。首先,我得仔细阅读文章,抓住关键点。 文章主要讲的是恶意的PHP包伪装成Laravel工具,实际上是一个跨平台的远程访问木马(RAT)。这些包通过Composer依赖关系传播,比如lara-swagger依赖lara-helper,从而安装RAT。恶意代码使用了控制流混淆、编码域名等手段来躲避静态分析。一旦加载,就会连接到C2服务器,发送系统信息并等待命令执行。 用户的需求是用中文总结,不需要特定的开头,直接描述内容。所以我要把主要信息浓缩进去:恶意包、伪装成Laravel工具、传播方式、技术手段、功能以及影响。 还要注意字数限制,确保在100字以内。可能需要合并一些信息点,比如提到三个包和它们的下载量,但为了简洁可能只提包名而不具体数字。 最后检查是否有遗漏的重要信息,比如建议用户删除包和旋转密钥等安全措施,但可能因为字数限制无法全部包含。 总结下来,应该涵盖恶意包伪装、传播方式、技术手段、RAT的功能以及影响范围。 </think> 恶意PHP包伪装成Laravel工具传播跨平台远程访问木马(RAT),通过Composer依赖关系感染系统。这些包使用混淆技术隐藏恶意代码,并连接C2服务器执行远程命令。受影响应用面临数据泄露和系统控制风险。 2026-3-4 09:37:0 Author: thehackernews.com(查看原文) 阅读量:11 收藏

Threat Intelligence / Application Security

Cybersecurity researchers have flagged malicious Packagist PHP packages masquerading as Laravel utilities that act as a conduit for a cross-platform remote access trojan (RAT) that's functional on Windows, macOS, and Linux systems.

The names of the packages are listed below -

  • nhattuanbl/lara-helper (37 Downloads)
  • nhattuanbl/simple-queue (29 Downloads)
  • nhattuanbl/lara-swagger (49 Downloads)

According to Socket, the package "nhattuanbl/lara-swagger" does not directly embed malicious code, lists "nhattuanbl/lara-helper" as a Composer dependency, causing it to install the RAT. The packages are still available for download from the PHP package registry.

Both lara-helper and simple-queue have been found to contain a PHP file named "src/helper.php," which employs a number of tricks to complicate static analysis by making use of techniques like control flow obfuscation, encoding domain names, command names, and file paths, and randomized identifiers for variable and function names. 

"Once loaded, the payload connects to a C2 server at helper.leuleu[.]net:2096, sends system reconnaissance data, and waits for commands -- giving the operator full remote access to the host," security researcher Kush Pandya said.

This includes sending system information and parsing commands received from the C2 server for subsequent execution on the compromised host. The communication occurs over TCP using PHP's stream_socket_client(). The list of supported commands is below -

  • ping, to send a heartbeat automatically every 60 seconds
  • info, to send system reconnaissance data to the C2 server
  • cmd, to run a shell command
  • powershell, to run a PowerShell command
  • run, to run a shell command in the background
  • screenshot, to capture the screen using imagegrabscreen()
  • download, to read a file from disk
  • upload, to a file on disk and grant it read, write, and execute permissions to all users
  • stop, to the socket, and exit

"For shell execution, the RAT probes disable_functions and picks the first available method from: popen, proc_open, exec, shell_exec, system, passthru," Pandya said. 'This makes it resilient to common PHP hardening configurations."

While the C2 server is currently non-responsive, the RAT is configured such that it retries the connection every 15 seconds in a persistent loop, making it a security risk. Users who have installed the packages are advised to assume compromise, remove them, rotate all secrets accessible from the application environment, and audit outbound traffic to the C2 server.

Besides the aforementioned three packages, the threat actor behind the operation has published three other libraries ("nhattuanbl/lara-media," "nhattuanbl/snooze," and "nhattuanbl/syslog") that are clean, likely in an effort to build credibility and trick users into installing the malicious ones.

"Any Laravel application that installed lara-helper or simple-queue is running a persistent RAT. The threat actor has full remote shell access, can read and write arbitrary files, and receives an ongoing system profile for each connected host," Socket said.

"Because activation happens at application boot (via service provider) or class autoloads (via simple-queue), the RAT runs in the same process as the web application with the same filesystem permissions and environment variables, including database credentials, API keys, and .env contents."

Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.


文章来源: https://thehackernews.com/2026/03/fake-laravel-packages-on-packagist.html
如有侵权请联系:admin#unsafe.sh