The Arch Linux team has taken the emergency step of temporarily disabling the "adoption" feature within the Arch User Repository (AUR). This decisive action follows a surge in malicious actors hijacking orphaned packages and actively maintained repositories to inject malware into the software supply chain. For defenders, this is a critical signal: the implicit trust placed in community-maintained repositories has been weaponized.
While the AUR has always operated on a "use at your own risk" basis, the current campaign involves the mass takeover of established packages, turning trusted tools into delivery mechanisms for backdoors and cryptominers. Security teams managing Arch Linux endpoints must treat the current state of the AUR as hostile until further notice.
Technical Analysis
Affected Platform: Arch Linux (specifically systems utilizing the Arch User Repository - AUR).
Threat Vector: Supply Chain Compromise via Account Takeover and Package Adoption.
Attack Mechanism: The attackers are exploiting the social and procedural mechanics of the AUR. By "adopting" orphaned packages—projects where the original maintainer has stepped down—or compromising maintainer accounts, actors gain the ability to push updates to packages that users already trust and have installed.
- Initial Access: Attacker identifies an orphaned, popular package or compromises a maintainer's account credentials.
- Persistence/Abuse: The attacker adopts the package within the AUR web interface.
- Payload Injection: The attacker uploads a modified
PKGBUILDor upstream source archive. The maliciousPKGBUILDtypically includes aprepare()orbuild()function that executes arbitrary shell commands during the package build process on the victim's machine. - Execution: When the user (or an automated system) updates the package using an AUR helper (like
yayorparu), the build process runs locally, executing the malicious payload with the user's permissions.
Exploitation Status: Confirmed Active Exploitation. Arch Linux officials have cited a "surge" in malicious takeovers, indicating an ongoing, automated campaign rather than isolated incidents.
Detection & Response
Detecting supply chain attacks on Linux endpoints requires focusing on the build process. Since AUR packages are built locally, we must hunt for anomalies in the parent-child process relationships of build tools and network connections spawned by them.
SIGMA Rules
---
title: Arch Linux AUR Helper Spawning Network Shell
date: 2026/04/22
id: 8c7d3e2a-1f9b-4a5c-9b6d-1e2f3a4b5c6d
status: experimental
description: Detects AUR helpers or makepkg spawning network tools like curl or wget, often indicative of malicious PKGBUILD scripts downloading payloads.
author: Security Arsenal
references:
- https://wiki.archlinux.org/title/Arch_User_Repository
logsource:
product: linux
category: process_creation
detection:
selection:
ParentImage|endswith:
- '/makepkg'
- '/yay'
- '/paru'
- '/trizen'
- '/pacaur'
Image|endswith:
- '/curl'
- '/wget'
- '/python'
- '/perl'
- '/bash'
- '/sh'
condition: selection
falsepositives:
- Legitimate package downloads from official sources (verify destination IPs)
level: high
tags:
- attack.execution
- attack.t1059.004
- attack.supply_chain
---
title: Suspicious Execution from AUR Cache Directories
date: 2026/04/22
id: 9d8e4f3b-2a0c-5b6d-0c7e-2f3a4b5c6d7e
status: experimental
description: Detects execution of scripts or binaries directly from AUR build cache directories, a common technique for malware staged during build.
author: Security Arsenal
logsource:
product: linux
category: process_creation
detection:
selection:
Image|startswith:
- '/home/'
- '/var/tmp/'
Image|contains:
- '/.cache/yay/'
- '/.cache/paru/'
- '/.cache/trizen/'
- '/.srcinfo-git/'
condition: selection
falsepositives:
- Legitimate testing or debugging by package maintainers
level: medium
tags:
- attack.defense_evasion
- attack.t1564.001
KQL (Microsoft Sentinel / Defender)
// Hunt for AUR helpers spawning suspicious network processes
DeviceProcessEvents
| where Timestamp > ago(7d)
| where InitiatingProcessFileName in~ ("makepkg", "yay", "paru", "trizen", "pacaur")
| where FileName in~ ("curl", "wget", "python", "python3", "perl", "bash", "sh")
| project Timestamp, DeviceName, AccountName, InitiatingProcessCommandLine, CommandLine, FolderPath
| order by Timestamp desc
Velociraptor VQL
-- Hunt for PKGBUILD files in common AUR cache directories containing suspicious network indicators
SELECT FullPath, Mtime, Size
FROM glob(globs="/home/*/.cache/yay/*/PKGBUILD")
WHERE read_file(filename=FullPath, length=10000) =~ '(curl|wget|http|https|base64)'
OR read_file(filename=FullPath, length=10000) =~ '(eval|exec)'
-- Scan for recent process executions spawned by makepkg
SELECT Pid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE Exe =~ 'makepkg'
LIMIT 50
Remediation Script (Bash)
#!/bin/bash
# Audit script to check for recently installed AUR packages and verify integrity.
# Requires root privileges for full log access.
echo "[*] Auditing Arch Linux System for AUR Compromise..."
# 1. List all foreign packages (typically AUR) installed in the last 7 days
echo "[+] Detecting AUR packages installed in the last 7 days..."
pacman -Qmq | while read pkg; do
# Get install date from local database (approximate check)
if pacman -Qi "$pkg" | grep -q "Install Date"; then
# Parse logic depends on locale, simpler to check log if available
if grep -q "installed $pkg" /var/log/pacman.log 2>/dev/null; then
# Extract date logic (simplified for demo)
last_log=$(grep "installed $pkg" /var/log/pacman.log | tail -1)
echo "Recent AUR Install Found: $pkg"
echo "Log Entry: $last_log"
fi
fi
done
# 2. Check for active network connections from build processes (optional snapshot)
echo "[+] Checking for active connections from build tools..."
ss -tulpen | grep -E '(makepkg|yay|paru)' || echo "No suspicious active connections found."
echo "[*] Audit complete. Manually review the PKGBUILD of any suspicious packages."
Remediation
- Immediate Restriction: Stop installing new packages from the AUR immediately. Disable AUR helpers or remove execution permissions temporarily until the Arch team lifts the adoption freeze.
- Audit Existing Packages: Review all "foreign" packages (packages not in the official repos) currently installed on critical systems. Use
pacman -Qmto list them. Cross-reference the maintainer and the last update date. - Manual Verification: For essential AUR packages, manually inspect the
PKGBUILDfile on the official AUR website (or local cache if you still have it) before building. Look for:curlorwgetcommands pointing to external IPs.- Base64 encoded strings.
prepare()orbuild()functions that execute arbitrary shell code.
- Rebuild from Trusted Sources: If a package was updated during the current threat window, uninstall it and reinstall from a known clean commit or source, or wait for official all-clear signals.
- Vendor Advisory: Monitor the official Arch Linux news feed (https://archlinux.org) and the AUR status page for the re-enabling of the adoption feature and further instructions.
Related Resources
Security Arsenal Incident Response Services AlertMonitor Platform Book a SOC Assessment incident-response Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.