Fake Laravel Packages on Packagist Install RAT Malware on Windows, macOS, and Linux

by

in

IT Consultancy

IT Consultancy Get expert guidance to leverage technology for your business growth. We help you identify the right IT solutions, optimize infrastructure, and ensure your digital environment is secure,…

Digital Marketing

Digital Marketing Grow your brand and reach the right audience with data-driven marketing strategies. We help you create campaigns that convert, manage social channels effectively, and optimize your d…

Privacy Policy

Privacy Policy At CometSoul, accessible from https://cometsoul.com, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collec…

Terms and Conditions

Welcome to CometSoul! These terms and conditions outline the rules and regulations for the use of CometSoul’s Website, located at https://cometsoul.com. By accessing this website we assume you a…

Disclaimer

If you require any more information or have any questions about our site’s disclaimer, please feel free to contact us. Disclaimers for CometSoul All the information on this website – https…

Post

Tutorial

Wifi Managed Service

Managed Wi-Fi Service

Managed Wi-Fi Service Build a fast, stable, and secure Wi-Fi for your business at Zero depreciation cost. Enterprise-Grade Guest Wi-Fi With $0 Upfront Hardware Costs. We provide, install, and support …

System Integrator

Smart Business System Integrator

Smart Business System Integrator Simplify your daily operations with smart systems that automate bookings, schedules, and routine tasks so you can focus on growing your business. We set up and integra…

Cybersecurity researchers have discovered malicious Laravel packages on Packagist that secretly install a Remote Access Trojan (RAT) capable of infecting Windows, macOS, and Linux systems. These packages appear to be helpful Laravel utilities but are actually designed to give attackers remote control over compromised servers.

The malicious packages include:

  • nhattuanbl/lara-helper
  • nhattuanbl/simple-queue
  • nhattuanbl/lara-swagger

Security researchers from Socket reported that the package lara-swagger does not contain malicious code directly, but it installs lara-helper as a dependency through Composer, which then deploys the RAT. Despite the discovery, these packages remained available on Packagist at the time of the report.

Obfuscated Code Used to Hide Malware

Both lara-helper and simple-queue contain a PHP file named src/helper.php that hides malicious functionality using several obfuscation techniques. These include control flow obfuscation, encoded domain names, encoded command strings, randomized function names, and hidden file paths to avoid detection during static analysis.

Once the malicious code runs, it connects to a command-and-control (C2) server at helper.leuleu[.]net:2096. The infected system sends reconnaissance data to the attacker and waits for further instructions, effectively giving the threat actor full remote access to the compromised host.

RAT Capabilities and Commands

The malware communicates with the C2 server using TCP connections via PHP’s stream_socket_client() function. It supports several commands that allow attackers to control the system remotely, including:

  • ping – send heartbeat every 60 seconds
  • info – collect system information
  • cmd – execute shell commands
  • powershell – run PowerShell commands
  • run – execute commands in the background
  • screenshot – capture screen images
  • download – retrieve files from the system
  • upload – upload files and grant execution permissions
  • stop – terminate the connection

To ensure command execution works even on hardened PHP environments, the RAT checks available functions and uses the first working method from popen, proc_open, exec, shell_exec, system, or passthru.

Persistent Backdoor Risk

Although the command server is currently inactive, the malware continuously attempts to reconnect every 15 seconds, creating a persistent security risk for affected systems.

Security experts recommend that any organization that installed these packages should assume system compromise, remove the packages immediately, rotate credentials such as database passwords and API keys, and monitor outbound network traffic for connections to the known C2 server.

Attackers Published Legitimate Packages to Build Trust

Researchers also found that the same developer published several other packages that appear legitimate, including:

  • nhattuanbl/lara-media
  • nhattuanbl/snooze
  • nhattuanbl/syslog

These clean packages were likely released to build credibility and trick developers into installing the malicious ones.

Because the RAT runs during application startup or class autoloading, it operates within the same process as the Laravel application. This means attackers can access sensitive information such as database credentials, API keys, environment variables, and application files.

Developers are advised to carefully review dependencies from third-party sources and regularly audit installed packages to prevent supply chain attacks.

Source: https://thehackernews.com/2026/03/fake-laravel-packages-on-packagist.html