Detection and analysis tools for the atomic-lockfile supply-chain attack on the Arch User Repository (AUR), generalized to a campaign-based architecture that handles multiple concurrent and historical attack waves (CHAOS RAT 2025, Russian spam packages, and future campaigns declared via
campaigns.json).
簡單的說,有人把惡意代碼放到 AUR 已經沒維護的套件裏面,然後上傳 。所以安裝了以後,就被惡意代碼植入了,也因為是 npm 套件的關係,相依性相對複雜,影響層面也較為廣泛。
社群因應此狀況,開了一個 repository 放檢測腳本:https://github.com/lenucksi/aur-malware-check
使用方法如下
# 安裝 uv
pacman -S uv
# 下載代碼
git clone https://github.com/lenucksi/aur-malware-check.git
# 進入目錄
cd aur-malware-check
# 建立 python venv 環境,並安裝模組
uv sync
# 執行
uv run python -m aur_check --refresh --list
其他使用方法可以參考 repository README.md 裡的 quickstart
如果發現了被植入惡意代碼,可以參考 repository 裡的 What to do If I Infected
- 保留系統:不要關機,改用可信媒體進行鑑識擷取。
- 重設所有憑證:Discord、GitHub、npm、Slack、Teams、SSH 金鑰、Vault token、雲端供應商金鑰。
- 檢查持久化:
systemctl list-units --type=service --state=running(查看是否有不明服務)。 - 檢查 eBPF rootkit:
ls -la /sys/fs/bpf/hidden_* - 使用可信媒體清理:從 Arch ISO 開機,掛載檔案系統,移除惡意的 systemd 單元。
- 考慮重裝:rootkit 會讓系統失去可信度。
- 回報發現:
https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/