Fake Laravel Packages on Packagist Deploy RAT on Windows, macOS, and Linux

Published: (March 4, 2026 at 04:37 AM EST)
3 min read

Source: The Hacker News

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) functional on Windows, macOS, and Linux systems.

PHP illustration

Packages

The malicious packages are published under the user nhattuanbl on Packagist:

  • nhattuanbl/lara-helper (37 downloads)
  • nhattuanbl/simple-queue (29 downloads)
  • nhattuanbl/lara-swagger (49 downloads) – this package does not contain malicious code itself but lists nhattuanbl/lara-helper as a Composer dependency, causing the RAT to be installed.

All three packages remain available for download from the PHP package registry.

Threat illustration

RAT Functionality

Both lara-helper and simple-queue contain a PHP file src/helper.php that employs several obfuscation techniques (control‑flow obfuscation, encoded domain names, randomized identifiers, etc.) to hinder static analysis.

Once loaded, the payload:

  1. Connects to a C2 server at helper.leuleu[.]net:2096 via TCP using PHP’s stream_socket_client().
  2. Sends system reconnaissance data.
  3. Waits for commands, giving the operator full remote access to the host.

Supported Commands

CommandDescription
pingSends a heartbeat automatically every 60 seconds
infoSends system reconnaissance data to the C2 server
cmdExecutes a shell command
powershellExecutes a PowerShell command
runExecutes a shell command in the background
screenshotCaptures the screen using imagegrabscreen()
downloadReads a file from disk and returns its contents
uploadWrites a file to disk and grants read/write/execute permissions to all users
stopCloses the socket and exits

For command execution, the RAT probes disable_functions and uses the first available function from the following list: popen, proc_open, exec, shell_exec, system, passthru. This makes it resilient against common PHP hardening configurations.

Report illustration

The C2 server is currently non‑responsive, but the RAT is configured to retry the connection every 15 seconds in a persistent loop, posing a continuous security risk.

Mitigation

  • Assume compromise if any of the listed packages have been installed.
  • Remove the malicious packages from your project (composer remove nhattuanbl/lara-helper nhattuanbl/simple-queue).
  • Rotate all secrets accessible from the application environment (e.g., database credentials, API keys, .env values).
  • Audit outbound traffic for connections to helper.leuleu.net (port 2096).
  • Review your codebase for the presence of src/helper.php or suspicious obfuscated PHP files.

Additional Packages from the Same Author

The threat actor also published three clean libraries, likely to build credibility:

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

These packages do not contain malicious code but should be scrutinized before use, given the actor’s history.

0 views
Back to Blog

Related posts

Read more »