AUR malware (11/June/2026) #4
gustavo-iniguez-goya
started this conversation in
Malware analysis
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It's only been 5 days since attackers started infecting AUR packages with an infostealer + rootkit, yet it feels like two weeks has already passed.
Context
On June 11, a number of malicious packages appeared in the AUR repository:
https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/thread/FGXPCB3ZVCJIV7FX323SBAX2JHYB7ZS4/
https://www.reddit.com/r/linux_gaming/comments/1u34pe3/alvr_aur_package_has_been_compromised/
https://www.reddit.com/r/linux/comments/1u3alhe/roughly_400_aur_packages_compromised/
https://www.virustotal.com/gui/file/6144d433f8a0316869877b5f834c801251bbb936e5f1577c5680878c7443c98b/detection
https://ioctl.fail/preliminary-analysis-of-aur-malware/
https://markdownpastebin.com/?id=d2a04939f1d7461ea0d36e438a49538c
Analyzing an infected machine with decloaker and OpenSnitch
When installing a malicious AUR package, it installs an additional npm package which contains the malware:
https://aur.archlinux.org/cgit/aur.git/commit/?h=forgecode-bin&id=1f8be77f62c64eeeeed5155cd94e2acc49524fac
The malicious npm package in this case is
atomic-lockfile. As soon as you install it, it'll execute the filesrc/hooks/depsfrom the package, copy it to another location (/var/lib, /home//.npm/, ...) and open an outbound connection to 1.1.1.1 or 8.8.8.8 on port 443 (image copied from a reddit thread):If we use decloaker to look for suspicious processes, we'll see that it detects a process impersonating a kernel thread:
With this information, you can copy, stop (kill -STOP) or kill the process.
Note
One interesting feature of this malware is that the name of the process (the cmdline) changes dynamically while it's running:
This malware also scans continuously for the running processes, collecting information about them:
The eBPF rootkit
If the package is installed with root privileges, besides executing the
depsbinary, it'll load an eBPF rootkit (embedded inside thedepsbinary), which hides PIDs and connections:root@xubuntu:/home/xubuntu# ./decloaker2 scan hidden-sockets --log-level=detection [!] 1 HIDDEN connections found LISTEN 39144 0 8738 127.0.0.1 0.0.0.0 0 8298 8298 xubuntu comm=kworker/R-inet_ exe=/var/lib/ticimi/ticimi root@xubuntu:/home/xubuntu#OpenSnitch can inspect some hidden PIDs, but you won't be able to analyze them with regular tools (ps, top, lsof, etc) because the rootkit hides them:
After a few minutes running, the malware extracts and executes a Tor binary, used to exfiltrate the data:
root@xubuntu:/home/xubuntu# ls /var/lib/ticimi/bin/ dbus-daemon libcrypto.so.3 libevent-2.1.so.7 libssl.so.3 root@xubuntu:/home/xubuntu# md5sum /var/lib/ticimi/bin/* 55033ac86d8983efb7610893b130c835 /var/lib/ticimi/bin/dbus-daemon 469c1329030d28894ce235c86cb704ea /var/lib/ticimi/bin/libcrypto.so.3 76ecc59cf03a14776096ab705379dbb9 /var/lib/ticimi/bin/libevent-2.1.so.7 479886651ffa2d60edc5fa60febe6b19 /var/lib/ticimi/bin/libssl.so.3Once extracted, it establishes connections every ~7 minutes to several Tor ips: https://www.virustotal.com/gui/ip-address/64.65.63.56
On the other hand, the process
dbus-daemonis hidden by the rootkit. Since the rootkit exposes several paths under/sys/fs/bpf/<random_chars>, used to debug what processes it's hiding, we can inspect them:or by using bpftool:
root@xubuntu:/home/xubuntu# bpftool map dump pinned /sys/fs/bpf/3b731db6/hidden_names [{ "key": "dbus-daemon", "value": 1 } #] root@xubuntu:/home/xubuntu# bpftool map dump pinned /sys/fs/bpf/3b731db6/hidden_inodes [{ "key": 39144, "value": 1 } ]Source code of the eBPF rootkit
Beta Was this translation helpful? Give feedback.
All reactions