Arch Linux AUR Breach Chaos RAT Delivered Through Malicious Packages

 

The open-source ecosystem faced a major security scare this month as Arch Linux pulled three malicious packages from its Arch User Repository (AUR) after they were found to be installing the CHAOS remote access trojan (RAT) on Linux systems.

The Incident

On July 16, 2025, a threat actor using the handle “danikpapas” uploaded three seemingly benign packages to the AUR:

  • librewolf-fix-bin

  • firefox-patch-bin

  • zen-browser-patched-bin

Within hours, these packages began infecting Linux machines during installation.

The malicious PKGBUILDs pointed to a GitHub repository controlled by the attacker (zenbrowser-patch.git). Instead of containing legitimate browser patches, the repo executed a script that deployed CHAOS RAT, giving attackers full control over compromised devices.

The packages remained live until July 18, when the Arch Linux team removed them after community members flagged suspicious behavior.


🕵️ How the Attack Worked

  1. Upload to AUR: Attacker publishes altered PKGBUILDs disguised as “browser patches.”

  2. Malicious Source Entry: PKGBUILD fetched code from the attacker’s GitHub repo.

  3. Execution During Build: The cloned repo executed malicious scripts during package installation.

  4. Payload: CHAOS RAT was installed and persisted as a suspicious binary (systemd-initd) often located in /tmp.

  5. C2 Communication: Infected systems repeatedly connected to a remote C2 at 130.162[.]225[.]47:8080.


⚔️ What is CHAOS RAT?

CHAOS RAT is an open-source remote access trojan that runs on both Windows and Linux. Once deployed, it gives attackers full control of a victim’s system:

  • Upload/download files

  • Execute arbitrary commands

  • Open reverse shells

  • Harvest credentials and steal data

  • Deploy cryptocurrency miners

  • Conduct cyber espionage

It’s lightweight, stealthy, and commonly reused by multiple threat actors due to its open-source nature.


Community Detection

The malicious packages might have gone unnoticed longer if not for the Arch Linux user community. Reddit users flagged suspicious activity when a dormant account suddenly began promoting the compromised packages. One user uploaded a file sample to VirusTotal, which confirmed the presence of CHAOS RAT.

This community-driven detection once again underscores both the strength and weakness of open-source ecosystems: transparent code but minimal pre-review.


 Impact & Risks

  • Scope: Unknown number of infected systems, limited to Arch Linux users who installed the packages between July 16–18.

  • Persistence: Infected devices may host a malicious systemd-initd process, granting attackers ongoing access.

  • Potential Damage: Credential theft, cryptomining, espionage, or lateral movement into enterprise networks.


Mitigation & Recommendations

The Arch Linux team issued a strong warning:

  • Uninstall Immediately: Remove librewolf-fix-bin, firefox-patch-bin, and zen-browser-patched-bin.

  • Check for Infection: Look for a suspicious systemd-initd process, especially in /tmp. If present, delete it.

  • Reinstall Securely: Rebuild compromised systems from trusted backups if infection is suspected.

  • Practice Vigilance: Always review PKGBUILD files before building AUR packages. Trust, but verify.


Strategic Takeaway

This incident highlights the supply-chain risks in community-driven repositories. While the AUR is a powerful feature of Arch Linux, its lack of pre-publication review makes it fertile ground for attackers.

  • For users: Review code before building.

  • For organizations: Treat open-source repos as untrusted sources, and route builds through internal package vetting pipelines.

  • For defenders: Monitor unusual binaries (systemd-initd), network traffic to suspicious IPs, and unreviewed AUR installations.


Closing Note

The CHAOS RAT episode is not just an Arch Linux problem it’s a warning shot across the open-source supply chain. Attackers are not breaking into systems through zero-days alone; they are exploiting the trust model of community software distribution.

If you don’t audit your code sources, you’re not installing software you’re installing risk


Comments

Popular Posts