Malware Found in Arch Linux AUR Package Repository (bleepingcomputer.com)
An anonymous reader shares a report: Malware has been discovered in at least three Arch Linux packages available on AUR (Arch User Repository), the official Arch Linux repository of user-submitted packages. The malicious code has been removed thanks to the quick intervention of the AUR team. The incident happened because AUR allows anyone to take over "orphaned" repositories that have been abandoned by their original authors. On Saturday, a user going by the pseudonym of "xeactor" took over one such orphaned package named "acroread" that allows Arch Linux users to view PDF files. According to a Git commit to the packag's source code, xeactor added malicious code that would download a file named "~x" from ptpb [dot] pw, a lightweight site mimicking Pastebin that allows users to share small pieces of texts.
From the looks of it the bad actor xeactor didn't have any expectation beyond finding out if his little trick would work or not.
On the other side this could be a case study about the immune system that open source provides.
This is IMPOSSIBLE in a Linux environment. There are MANY EYES that guarantee this CANNOT happen.
Trump 2020
I'm more interested in why there is so little malware. I would have expected lots of malware without any packages needing to be hijacked.
First, post-install script runs as root. Second, it runs during installation. If putting it in the program (e.g. acroread), the user has to run it to trigger. Most Linus package systems support post-install script. e.g. https://docs-old.fedoraproject...
He was caught within a few hours, because all changes all public:
https://aur.archlinux.org/cgit...
Possibly bad guys would rather add trojans to iPhone and Android apps, which may stay in the store for months without detection. You can't tell what changes have been made to compiled apps you download on iPhone, Android, or Windows.
I recommend either installing AUR packages by hand, during which you can check the Post-Install, or using a AUR Helper that allows viewing of said script. True, it takes time to verify yourself. But, a precursory glance helps screen some of the stupid stuff like pulling a script from a pastebin clone.
And yes, it takes time. That's always a tradeoff, convenience vs security.
I used Arch for about 7 years until last year. I *always* inspected every AUR package by hand to make sure it wasn't doing anything suspicious. And 95% of the time I would hack around to make it install without any root privileges whatsoever, unlike the default.
The amount of AUR install scripts I had to edit or modify was quite high too. For example you would install an AUR package but the program would be out of date, so you have to update the package location and the verification hash. Or it would pull a file from some unofficial place and instead I would update it to be from the official github repositories, etc.
You can tell a lot of less popular AUR packages are put together by non linux power users, to say the least.
If you wanted to inject a bunch of malware with new AUR files it would be pretty easy, I bet there is a lot more uncaught ones. Because the script pulling files from random servers and passing the hash check (that the malware creator provides) gives a huge false sense of security.
Arch scares the iSimple crowd that prays their daily KISS (keep it simply stupid) mantra. Fans of AOL^WApple haven't invaded it yet nor demanded it becomes a "Desktop" to suite their lighs-out-upper-storey needs, like with Noobuntu.
I use Arch. Packages from the AUR are supposed to be manually reviewed by the user, so a user playing by the rules should not be affected by things like this. Plus, this "malware" was so badly coded that it didn't even do anything.
According to posts on aur-general, the known affected packages are:
According to comments on the AUR acroread package, the script the compromised package installed (to upload system details) contained an error and wouldn't function properly. The script also installed a systemd timer, and the comments advise checking your system for:
As a side-comment, for those unfamiliar with Arch, these compromised packages are not part of the official Arch repositories. The AUR is a "user repository": a collection of user-supplied packages which require deliberate download and installation. AUR packages should [i]always[/i] be reviewed before installing them, and not installed if you don't trust the package. As the AUR documentation explains, "Warning: Carefully check all files. Carefully check the PKGBUILD and any .install file for malicious commands. PKGBUILDs are bash scripts containing functions to be executed by makepkg: these functions can contain any valid commands or Bash syntax, so it is totally possible for a PKGBUILD to contain dangerous commands through malice or ignorance on the part of the author. Since makepkg uses fakeroot (and should never be run as root), there is some level of protection but you should never count on it. If in doubt, do not build the package and seek advice on the forums or mailing list."
https://lists.archlinux.org/pi...
Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
"At least" - why the sensationalism? You could equally write "just" or, preferably nothing.
If you read the mailing lista thread you understand where the real problem is.
"Users should check what they install". What's been tour latest package check?
Have you checksummed tour ISO download?
And why shouldn't I check the downloafs from the ma in website? Because of trust?
There fan always ne a crack I can use to slip into, if I have enough motivation.
I think the whole system is screwed up. I think "we can't rewind we've gone to far".
Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
It is written basically everywhere in the AUR official documentation: do not trust AUR packages, verify everything before install! AUR packages are like Ubuntu PPAs, there is no security policy and no patch policy. But that is totally fine! It is entirely the point of AUR; anybody can contribute to it. For AUR packages security, you are on your own and you should check the sources thoroughly when you install an AUR package!
Stupidity is the root of all evil.
And anyone smart enough to build malware is usually smart enough to know it's bad, wrong and probably a criminal offense of some kind anywhere on the planet.
What a piece of garbage article, its like a pastebin with changable ownership. Would you also post a news article for every pastebin that contains bullshit? No, right? There isn't much of a difference compared to the AUR where random people upload random content. If you use it without carefully reviewing you are the one to blame.
Next in line for malware pwnage, if it isn't already, is FreeBSD. There, you can create a bugzilla account with no-one checking who you are, and submit a patch to any port. If the port is badly maintained, and the maintainer does not see or react to it (which most of those ports are), any committer will take the patch and commit it, if it builds, USUALLY WITHOUT checking for what it does. If it builds, it passes, is committed.
The only thing surprising here is the fact all this wasn't discovered earlier. An Ubuntu snap, Gentoo GitHub repo, Arch AUR, all in few weeks. 2018 will be the year of Pwnage (and it started so well with Meltdown and Spectre).
packages compromised according to mailing list
* acrored 9.5.5-8
* balz 1.20-3
* minergate 8.1-2
According to #archlinux "jelle" "we decided not to talk about it"