[PSA] Malware distributed on the AUR (lists.archlinux.org)
from Xylight@lemdro.id to linux@lemmy.ml on 18 Jul 21:26
https://lemdro.id/post/25813192

On the 16th of July, at around 8pm UTC+2, a malicious AUR package was uploaded to the AUR. Two other malicious packages were uploaded by the same user a few hours later. These packages were installing a script coming from the same GitHub repository that was identified as a Remote Access Trojan (RAT).

The affected malicious packages are:

  • librewolf-fix-bin
  • firefox-patch-bin
  • zen-browser-patched-bin

The Arch Linux team addressed the issue as soon as they became aware of the situation. As of today, 18th of July, at around 6pm UTC+2, the offending packages have been deleted from the AUR.

We strongly encourage users that may have installed one of these packages to remove them from their system and to take the necessary measures in order to ensure they were not compromised.

Follow up

There are more packages with this malware found.

What to do

If you installed any of these packages, check your running processes for one named systemd-initd (this is the RAT).

The suspicious packages have a patch from this now-inaccessible Codeberg repo: codeberg.org/arch_lover3/browser-patch

The Arch maintainers have been informed of all this already and are investigating.

#linux

threaded - newest

Tundra@sh.itjust.works on 18 Jul 21:34 next collapse

this is going to increase in frequency as linux gains popularity

DirkMcCallahan@lemmy.world on 18 Jul 21:56 next collapse

This is why I felt uncomfortable when I first switched to Linux and kept reading that I didn’t need to worry about viruses as long as I didn’t click on dodgy links and only installed from trusted sources. I’m sure I’m betraying my lack of security knowledge here, but that always seemed a bit too easy.

mark@social.cool110.xyz on 18 Jul 22:07 next collapse

@DirkMcCallahan @Tundra The AUR isn't a trusted source, but most of the the Arch cult forget to mention that.

slackness@lemmy.ml on 18 Jul 22:18 next collapse

At the very least aur must verify you are associated with the domain name of the project, same as flathub.

cole@lemdro.id on 19 Jul 01:40 collapse

that would literally defeat the entire purpose of the AUR

slackness@lemmy.ml on 19 Jul 04:41 collapse

flathub still allows unverified submissions which is what I proposed. So, no, it wouldn’t.

aksdb@lemmy.world on 19 Jul 05:40 collapse

AUR is the place for unverified submissions. The verified stuff typically ends up in the main repos.

slackness@lemmy.ml on 19 Jul 06:30 collapse

That’s not at all how it works.

juipeltje@lemmy.world on 19 Jul 08:41 collapse

It is. Aur isn’t even officially supported by arch. You use it at your own risk, with the advantage being that pretty much everything is in it.

copygirl@lemmy.blahaj.zone on 18 Jul 22:48 next collapse

most of the the Arch cult forget to mention that

The “Arch cult’s” holy book, the ArchWiki, states the following pretty clearly:

Warning: AUR packages are user-produced content. These PKGBUILDs are completely unofficial and have not been thoroughly vetted. Any use of the provided files is at your own risk.

Mention of one’s use of the AUR for their needs doesn’t need to come with a disclaimer.
People who don’t read or don’t use their brain are going to keep not doing so, regardless.

tehn00bi@lemmy.world on 19 Jul 04:46 next collapse

Arch is not responsible for idiots.

irotsoma@lemmy.blahaj.zone on 20 Jul 06:09 collapse

Arch is not recommended for idiots either. If you want cutting edge, you accept the risks. Works that way with all tech.

[deleted] on 19 Jul 09:46 next collapse

.

FuckBigTech347@lemmygrad.ml on 19 Jul 17:57 collapse

I feel like the people who don’t look at PKGBUILDs and install hooks and just hit Y on everything are the same people who spam “Next” and “Accept” on Windows Installers from random websites.

caseyweederman@lemmy.ca on 19 Jul 04:26 next collapse

Half the posts on the Internet are people replying to requests for help with the message “read the wiki, the aur isn’t a trusted source, dummy”

muusemuuse@sh.itjust.works on 19 Jul 07:58 collapse

Why do we have the AUR anyway?

helix@feddit.org on 19 Jul 08:03 next collapse

Because it’s convenient and a good way to start to write PKGBUILDs quickly without becoming a proper package maintainer.

muusemuuse@sh.itjust.works on 19 Jul 08:14 collapse

Isn’t that like how alpinelinux’s community repository works too?

caseyweederman@lemmy.ca on 19 Jul 16:33 next collapse

It’s super useful as long as you understand that it is just a big bucket of scripts that just anybody can push

teawrecks@sopuli.xyz on 19 Jul 18:08 collapse

It’s meant to be a convenience for people who know what they’re doing.

teawrecks@sopuli.xyz on 19 Jul 18:06 collapse

You can’t even install from AUR using pacman directly. You either need to makepkg them manually, or use an extra AUR compatible package manager like yay. It’s made as clear as possible to arch users that the AUR is not vetted in any way, it’s just for convenience.

Fecundpossum@lemmy.world on 18 Jul 22:12 next collapse

The AUR, key words “user repository” is a specific weak point. It doesn’t have the same level of oversight that the main arch repo has. Stick to main repos and verified flatpaks and it’s very unlikely that you’d ever be compromised.

Linux isn’t perfect, but it’s certainly better than windows where you just download executables willy nilly to install your software.

HaraldvonBlauzahn@feddit.org on 19 Jul 06:05 collapse

BTW python’s package index has roughly the same problem - but a far less technical, experienced and critical user base. NPM has this problem since years.

Expect these problems to rise with every percent more of new Linux users which never learned the difference between opening / viewing untrusted data, and running untrusted code, because Windows basically ignores this essential concept and Android tries to solve that with sandboxing each app.

Nibodhika@lemmy.world on 18 Jul 22:13 next collapse

That is sound advice, the AUR is most definitely not a trusted source though. For the normal arch repos the people who put the stuff there are known, they work for the project, you’re as likely to get malware from one of those as you are to read an article bashing gamespot in gamespot, the people in charge of putting the packages there are the ones with more vested interest in things working so they won’t knowingly introduce malicious code (plus it’s a handful of people who know each other by first name).

The AUR is a different story, because anyone can put stuff there it’s very easy to have malicious code end up there. It doesn’t happen that often because most of the time it’s fairly obvious and it gets flagged straight away, plus if people start doing that people will migrate away from the AUR, so it’s a high risk low reward situation. But as more and more people start to use Arch derivatives that come with the AUR enabled without understanding any of this it becomes a more rewarding thing to exploit.

Dudewitbow@lemmy.zip on 18 Jul 23:03 collapse

like git repositories, AUR in its name itself says what it is, a User repository. its trust like repositories is fully based on how much you trust the user who uploaded it

caseyweederman@lemmy.ca on 19 Jul 04:27 collapse

In fact, most PKGBUILDs just clone git repos and build them

juipeltje@lemmy.world on 19 Jul 08:47 collapse

Yeah i think the aur is pretty much completely source based, with the exception of bin packages where they pull down a precompiled binary.

NuXCOM_90Percent@lemmy.zip on 18 Jul 22:14 collapse

Yeah. The I’m A Mac crowd had the same problem… god damn it, two or three decades ago.

As market share increases, platforms become a much bigger target for malware. And a lot of the “I don’t need to run virus scans” crowds learn the hard way.

Its the same with open source. Obviously NOBODY around here would parrot this bullshit, but there is the idea that because something is FOSS it is safe. Code is only as safe as code review and there have been a few high profile cases of social engineering to get malicious code past even fairly rigorous review. Let alone “Well, that script is FOSS so somebody probably reviewed it” that we see so often.

Mwa@thelemmy.club on 18 Jul 22:22 next collapse

True

bacon_pdp@lemmy.world on 19 Jul 01:13 collapse

Only for distributions which don’t do reproducible builds and require full and complete corresponding source code under an FSF approved license.

If you choose to download binary blobs, good fucking luck.

elvith@feddit.org on 19 Jul 03:21 collapse

As if everyone were to read every single line of source code, though. This just increases the chances of it being discovered.

Mwa@thelemmy.club on 18 Jul 22:24 next collapse

I kinda watch the Arch devs packaged more stuff rather then relying on thr aur,Chaotic-aur (third party repo) solves mostly.

voytrekk@sopuli.xyz on 18 Jul 23:59 next collapse

The arch maintainers package more software than most other distributions. Some items they leave in the AUR by choice, if the Dev prefers it there. The key is to use the AUR sparingly and only if you trust the packager.

pyssla@quokk.au on 19 Jul 04:17 next collapse

The arch maintainers package more software than most other distributions.

Sorry, but I fail to see this.

I suppose if you're accounting literally all independent distros, then you're probably right. However, if we'd be more realistic and compare it to other well-established independent distros^[I'm basically counting Alpine, Debian, Fedora, Gentoo, openSUSE, Slackware, Solus and Void. I didn't count Guix System and NixOS for how their 'repositories' are built different and therefore not easily comparable to the others.], then we notice that the vastness of the packages found in Arch's repository is rather lackluster at the very least. Heck, by virtually all metrics, Arch together with its derivatives undoubtedly belong in the upper echelons of usage stats; only being second to the Debian-family of distros. IMO, however, the size of its repository absolutely doesn't reflect this; as it's only bigger than Slackware, Solus and Void. The inclusion of these smaller projects is arguably charitable on my side*. But to drive the point home very clearly: Arch's repository is smaller than Alpine's, Debian's, Fedora's, openSUSE's and Gentoo's with a ratio of (about) two to one (except for openSUSE).

voytrekk@sopuli.xyz on 19 Jul 04:36 collapse

I don’t know if raw package counts is the best comparison. Unlike say Fedora, Arch bundles everything related to a project in the same file. If you want Qt6-base on Arch, that is one package. If you want it on Fedora, it is going to have a lib, header, docs, and maybe a few other packages.

Just from personal experience, I do not have issues with finding packages in the main repos, with only a handful of my packages coming from the AUR. This is not the case with others, like Fedora where extra repos need to be added, like EPEL and RPM Fusion.

pyssla@quokk.au on 19 Jul 05:11 collapse

Thank you for the quick response!

I don't know if raw package counts is the best comparison.

You're probably right. Do you think we got anything better to go by?

Unlike say Fedora, Arch bundles everything related to a project in the same file. If you want Qt6-base on Arch, that is one package. If you want it on Fedora, it is going to have a lib, header, docs, and maybe a few other packages.

Can't comment on this. Though, the list of packages with qt6 in their name is considerably longer in Fedora. However, I wonder if this simply reflects that Fedora, by virtue of having a larger repository, also has more stuff related to qt6. Or, as you posited it, chooses to package the same content over multiple packages instead of bundling them like it's supposedly happening on Arch.

Just from personal experience, I do not have issues with finding packages in the main repos, with only a handful of my packages coming from the AUR. This is not the case with others, like Fedora where extra repos need to be added, like EPEL and RPM Fusion.

Hmm..., I feel you might be conflating stuff. Please allow me to elaborate on what I mean.

Fedora is not able to include some packages in its own repository due to legal reasons. As such, these are relayed to RPM Fusion instead. Which means that a well-functioning Fedora installation (almost necessarily) desires to install some packages from RPM Fusion. So, RPM Fusion exists as a 'hack' of sorts to protect Fedora from legal charges and NOT because they're too lazy (or something) to ship those packages themselves. To be clear, RPM Fusion is accepted as a trusted third-party repository.

Arch, on the other hand, is rather lenient on what they can include in their repositories. Basically enabling them to package within their repositories all codecs and whatnot without them being visibly worried about the legal consequences of this ordeal.

To be honest, I don't know exactly where this discrepancy comes from. But I wouldn't be surprised if it's related to how Arch is basically a genuine community distro while Fedora has official ties to Red Hat.

Btw, small correction, AFAIK you're not supposed to install packages from the EPEL on Fedora. Perhaps you meant COPR (basically Fedora's AUR) or Terra instead?

Mwa@thelemmy.club on 19 Jul 09:13 collapse

Ok thanks, I never knew they package more stuff on the stock repos.

facow@hexbear.net on 19 Jul 01:13 collapse

I 100% agree. Everyone raves about the AUR but it really feels like more of a necessity than a value add because so little is actually packaged for arch. And the AUR is definitely more annoying and feels more jank than just having it in your default repo.

hobbsc@lemmy.sdf.org on 19 Jul 00:37 next collapse

i don’t use arch (btw).

lagoon8622@sh.itjust.works on 19 Jul 08:12 collapse

This is technically not Arch’s fault btw. I use Arch but don’t use AUR for this reason

daggermoon@lemmy.world on 19 Jul 08:21 next collapse

Also same problem adding random PPA’s on Debian and Ubuntu.

lagoon8622@sh.itjust.works on 19 Jul 08:23 collapse

Agreed. Or piping random curl things into sh. Or downloading random exes on Windows etc

hobbsc@lemmy.sdf.org on 19 Jul 13:43 collapse

it was a joke. perhaps a /s was warranted. it could happen in any package manager/repo and I’d be surprised if it hasn’t yet.

lagoon8622@sh.itjust.works on 19 Jul 17:28 next collapse

Oh definitely, I wasn’t trying to correct you or anything. Just having conversation

balsoft@lemmy.ml on 20 Jul 21:10 collapse

It has already happened a few times with other repos. Although AUR is especially susceptible because there’s no vetting at all, it’s a free-for-all that everyone can publish to within a few clicks. This will for sure happen again within a couple months, but better hidden the next time.

Ulrich@feddit.org on 19 Jul 01:55 next collapse

The affected malicious packages are:

librewolf-fix-bin firefox-patch-bin zen-browser-patched-bin

So…did someone just like create a new package cloning these or did they somehow get into the “official” repository? Is there no attestation process?

forbiddenlake@lemmy.world on 19 Jul 02:31 collapse

Aur is completely user controlled, it is not official and not trusted. Someone just decided to use those names and upload something.

Ulrich@feddit.org on 19 Jul 02:33 next collapse

Oof. Does this happen often?

tehn00bi@lemmy.world on 19 Jul 04:44 next collapse

It’s a known risk.

Ulrich@feddit.org on 19 Jul 05:24 collapse

Not what I asked.

HERRAX@sopuli.xyz on 19 Jul 05:30 next collapse

It’s surprisingly rare imo

jenesaisquoi@feddit.org on 19 Jul 05:32 collapse

The frequency of this happening does not inform you of the risk. Because there is no attestation it could happen rarely for some time and then suddenly a lot. Or the inverse. No way to tell.

MentalEdge@sopuli.xyz on 19 Jul 08:27 collapse

To be clear, they created new packages with these names. Anyone can make anything available on the AUR, but you cannot issue updates under someone elses existing package name.

MentalEdge@sopuli.xyz on 19 Jul 08:25 collapse

To be clear, when projects distribute their software via the aur, someone else can’t just issue an update using their package name.

This person appended “fix” and “patched” to appear in searches next to legitimate packages, and seem worth installing instead.

Jolteon@lemmy.zip on 19 Jul 05:25 next collapse

To be fair the AUR is known to be very susceptible to that kind of thing due to the effective absence of entry requirements.

MentalEdge@sopuli.xyz on 19 Jul 08:22 collapse

Absolutely.

The Arch User Repository is a way for anyone to easily distribite software.

Hence it has never been secure, and rather than claim it is, you mostly see people and documentation warn you about this, and to be careful if using it.

Any schmuck can make whatever they want available via the AUR. That’s how even the tiniest niche project can often be installed via the AUR. But you trade in some security for that convenience.

derpgon@programming.dev on 19 Jul 09:08 collapse

It shouldn’t be used as a marketplace, it should be used as a repository. You can probably find a lot of malware on GitHub, doesn’t mean you go there to choose your text editor.

I never search the AUR directly, I only use it if some README tells me I can install their software via an AUR package.

Dima@feddit.uk on 19 Jul 12:02 collapse

Yeah, I search the AUR not to discover packages, but to see if something I want to install is in there, if it is I check the PKGBUILD and make sure none of the sources/commands/patches are suspicious.
People need to remember it’s not some carefully vetted app store and that they need to be the ones vetting any packages they install and any changes when updating.

HaraldvonBlauzahn@feddit.org on 19 Jul 06:09 next collapse

The affected malicious packages are:

  • librewolf-fix-bin
  • firefox-patch-bin
  • zen-browser-patched-bin

What a nice attack on privacy-friendly infrastructure.

And then, Arch AUR has such suspicious things like the Brave browser which claims to reduce tracking… and works together with advertisers.

To be clear, AUR is fantastic if you develop some experimental package and you want to give it to your friends to try it out easily. But not as a general distribution mechanism.

HaraldvonBlauzahn@feddit.org on 19 Jul 06:43 next collapse

Wait what happens once some government or state actor hacks rust’s install script rustup with its curl | bash install procedure and relying on TLS certificates which are e.g. issued by the Russian government. (No, the rust project won’t use a Russian/Chinese/US Gov certificate but your browser will trust near all of them…)

Ephera@lemmy.ml on 19 Jul 08:40 collapse

You’re using that to download a program. If they can MitM the shell script, they can just as well MitM the program that you’ll run right after the download…

JackbyDev@programming.dev on 19 Jul 08:45 next collapse

This is why we invented hash checking. Good thing they can’t MITM where that’s stored! /s

HaraldvonBlauzahn@feddit.org on 19 Jul 09:03 collapse

That is why Debian uses digital pgp signatures for all packages. And the GNU project uses strong cryptographic hashes for install packages.

wewbull@feddit.uk on 19 Jul 10:12 next collapse

As does Arch.

Ephera@lemmy.ml on 19 Jul 14:14 collapse

Sure, I guess, if you’ve got a distro installed on your PC and use the distro-provided packages to install the Rust compiler, then you can’t be subject to such certificate MitM attacks.

Your comment sounded like you were primarily concerned about the shell script piping rather it just being a program which can be downloaded without going through distro packages.

HaraldvonBlauzahn@feddit.org on 19 Jul 16:22 collapse

Your comment sounded like you were primarily concerned about the shell script piping rather it just being a program which can be downloaded without going through distro packages.

The AUR install scripts are just downloaded shell scripts which are executed (hopefully after inspection).

curl | bash just skips the inspection step - curl downloads to stdout, bash executes from stdin.

muusemuuse@sh.itjust.works on 19 Jul 07:57 next collapse

We are getting to the point where inviting more people in means we will need an automated babysitter to watch for this shit and to pull it once it’s discovered. Apple has a walled garden approach that’s certainly taken a big chunk of malware threats out of their devices but their walled garden approach is ridiculous and impractical for Linux. The Microsoft method of monitoring and second guessing everything with antimalware programs is also suspect because it is super easy to abuse and resource intensive. We have clamAV but clam kinda sucks.

Linux is at the point where we need something that audits what’s going in and automatically yanks it back out remotely if it’s found to be a problem. Things can only be added by the user, but the bot can remove them without interaction of the user.

I don’t see this happening though. Instead, I see this as more of a rust vs C thing all over again, where valid critiques are drowned out by “improve your skills bro.”

mazzilius_marsti@lemmy.world on 19 Jul 19:10 collapse

Heard OpenSuse has OpenQA - apparently it is like an automatic test tool for packages.

oo1@lemmings.world on 19 Jul 10:01 next collapse

I already assumed aur was riddled with stuff like that.

Use a condom when fucking around in there.

AceFuzzLord@lemmy.zip on 19 Jul 10:49 next collapse

minecraft-cracked

Gotta assume that if any Arch users actually fell for that one, that they either let their kids use their device or they’re generally not smart ( which absolutely goes against my stereotypical view of an arch user ).

pfr@lemmy.sdf.org on 19 Jul 11:45 collapse

The stereotype of arch uses generally being smart is no longer. The “I use arch btw” meme brought a whole new user base to arch. You’ll find them on r/unixporn showing off their hyperland rice that they copied from some other user…

moseschrute@lemmy.ml on 19 Jul 13:35 collapse

I had no idea that existed but I’ve just returned from r/unixporn. There are some sick setups. Also we all copy. My entire neovim config is copied and modified from a couple dozen setups I admired. Nothing wrong with copying things you like. Don’t gate keep Linux.

However… Minecraft cracked is pretty funny lol.

lattrommi@lemmy.ml on 19 Jul 19:17 collapse

I agree that gatekeeping is no good and people should not do that.

However…

we all copy

I do not feel that assuming all people copy, should be done either, in my opinion.

pfr@lemmy.sdf.org on 19 Jul 22:30 collapse

I never said there was anything wrong with copying. I was simply pointing out a stereotype.

lattrommi@lemmy.ml on 20 Jul 15:35 collapse

I don’t know if there is a word for what I was trying to point out.

Like an opposite to gatekeeping, sort of.

I do not like when people use ‘we’, in ways that include people that it does not apply to. Lumping everyone together inaccurately into a group.

teawrecks@sopuli.xyz on 19 Jul 18:15 next collapse

Why are they called “patched” and “fix” and who is installing them?

mazzilius_marsti@lemmy.world on 19 Jul 19:08 next collapse

the firefox, zen browser and libre wolf packages are concerning. The ttf ms font too. Those are very normal apps and unless you pay attention to the package name when doing “pacman -Syu”, you would fall for the malware.

If only we can compartmentalize all AUR packages. The download AUR sources iirc are already in something like $HOME/.paru. Installing is a different story, because these packages can put their executable all over the places: /usr/local/bin, $HOME/local/bin.

Cysioland@lemmygrad.ml on 19 Jul 22:48 next collapse

If only we can compartmentalize all AUR packages

at this point you’ll be reinventing Flatpak

Cyber@feddit.uk on 20 Jul 09:17 collapse

With respect, you wouldn’t install these by just doing an update, so pacman -Syu is fine.

You would have needed to install these manually, or a package that depended on them - both from AUR - so you’d also need to use yay (etc) to install them.

But - I totally agree with your points that tge names look innocent enough for someone to install those over other packages.

Always look at the AUR (website) at the package details - if it’s new(ish) and has 0 or 1 votes, then be suspicious.

redxef@feddit.org on 20 Jul 09:05 next collapse

To check your system for those packages (assuming you are using bash):

comm -1 -2 <(pacman -Q | awk '{print $1}' | sort) <(sort vulnerable_packages.txt)

With vulnerable_packages.txt containing one package name per line.

[deleted] on 20 Jul 09:24 collapse

.