Skip to content

About

Aur malware scanner

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Atomic Arch Malware Scanner v2

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.

Features

  • 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 bpftool and pinned BPF map checks (requires root)
  • Offline/air-gap safe — all IoCs (package list, C2 IPs, file hashes) are embedded

What It Checks

# 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

Usage

chmod +x aur_scanner.sh
./aur_scanner.sh

Root 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.sh

No arguments or configuration files needed.

Exit Behavior

  • 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.

Scan Scope

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".

Embedded IoC Database

All indicators are stored in arrays at the top of the script:

  • ATOMIC_NPM_PACKAGES — malicious npm package names
  • CHAOS_RAT_IP, CHAOS_RAT_PORT — Chaos RAT C2 endpoint
  • C2_ONION, C2_UPLOAD_DOMAIN — Atomic Arch C2 infrastructure
  • DEPS_SHA256, DEPS_MD5, DIGEST_SHA256, COINMINER_SHA256 — known malicious file hashes
  • BPF_PINNED_PATHS — eBPF rootkit pinned map paths
  • KNOWN_MALICIOUS_AUR — 40+ confirmed compromised AUR package names
  • MALICIOUS_AUR_ACCOUNTS — attacker AUR account names

Requirements

  • Arch Linux or derivative (Manjaro, EndeavourOS, Garuda, CachyOS)
  • bash 4+
  • Optional: bpftool (for eBPF check, install via sudo pacman -S bpftool)

What It Does NOT Do

  • 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

Output Legend

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

License

MIT — free to use, modify, and distribute.

References

About

Aur malware scanner

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages