Detects indicators of compromise from the Atomic Arch supply chain attack (June 2026) that compromised 400+ AUR packages to deploy an infostealer and eBPF rootkit.
⚠️ This script is READ-ONLY. It never modifies files, never installs packages, never downloads anything, and never sends data anywhere.
- 11-stage scan covering all known IoCs
- 100% read-only — never modifies files or system state
- No dependencies — uses standard Arch Linux tools (
find,ss,ps,pacman,stat) - eBPF rootkit detection via
bpftooland pinned BPF map checks (requires root) - Offline/air-gap safe — all IoCs (package list, C2 IPs, file hashes) are embedded
| # | Check | Description |
|---|---|---|
| 1 | Pacman History | Scans /var/log/pacman.log for installs/upgrades in the last 4 days, flags AUR packages |
| 2 | Known Malicious AUR | Cross-references pacman -Qm against 40+ known compromised packages |
| 3 | Chaos RAT | Detects /tmp/systemd-initd binary and connections to 130.162.225.47:8080 |
| 4 | NPM/Bun Cache | Looks for atomic-lockfile, js-digest, lockfile-js, nextfile-js in caches |
| 5 | Infostealer Binary | Searches for deps ELF binary at common locations, verifies SHA-256 |
| 6 | eBPF Rootkit | Checks pinned BPF maps (/sys/fs/bpf/hidden_*) and lists loaded BPF programs |
| 7 | Systemd Persistence | Inspects systemd service unit files for suspicious Restart=always + /dev/null patterns |
| 8 | Cron & Shell RC | Scans crontabs, /etc/cron.* dirs, .bashrc, .zshrc, .profile for remote execution payloads |
| 9 | Network & Processes | Checks for active C2 connections, high listening ports >10000, Tor expert bundle, deps processes |
| 10 | SSH & Credentials | Flags recently modified authorized_keys, ~/.ssh/config, and exposed .git-credentials |
| 11 | SUID & Kernel | Lists new SUID binaries and kernel modules modified in the last 4 days |
chmod +x aur_scanner.sh
./aur_scanner.shRoot is recommended for full coverage (eBPF check, kernel module scan, pacman log reading). Without root, the script skips root-only checks and prints [SKIP] for each.
sudo ./aur_scanner.shNo arguments or configuration files needed.
- DANGER > 0 — Positive infection indicators found. Disconnect network, rotate all credentials, back up data, clean install.
- WARN > 0, DANGER = 0 — No confirmed infection but anomalies detected that need manual investigation.
- WARN = 0, DANGER = 0 — System appears clean.
The scan window is hardcoded to the last 4 days from the moment the script runs. This matches the June 11–17, 2026 attack window. All timestamp comparisons use -newermt "4 days ago" (GNU find) and date -d "4 days ago".
All indicators are stored in arrays at the top of the script:
ATOMIC_NPM_PACKAGES— malicious npm package namesCHAOS_RAT_IP,CHAOS_RAT_PORT— Chaos RAT C2 endpointC2_ONION,C2_UPLOAD_DOMAIN— Atomic Arch C2 infrastructureDEPS_SHA256,DEPS_MD5,DIGEST_SHA256,COINMINER_SHA256— known malicious file hashesBPF_PINNED_PATHS— eBPF rootkit pinned map pathsKNOWN_MALICIOUS_AUR— 40+ confirmed compromised AUR package namesMALICIOUS_AUR_ACCOUNTS— attacker AUR account names
- Arch Linux or derivative (Manjaro, EndeavourOS, Garuda, CachyOS)
bash4+- Optional:
bpftool(for eBPF check, install viasudo pacman -S bpftool)
- Does not download anything from the internet
- Does not install or remove packages
- Does not modify any file on disk
- Does not send data anywhere
| Prefix | Meaning |
|---|---|
[OK] |
No indicators found for this check |
[WARN] |
Anomaly detected — needs manual review |
[DANGER] |
Positive match with known IoC |
[SKIP] |
Check skipped (missing tool or insufficient privileges) |
[*] |
Informational message |
MIT — free to use, modify, and distribute.