Arch Linux PDF reader package poisoned

Trust nobody: abandoned code was adopted by a miscreant

danger

Arch Linux has pulled a user-provided AUR (Arch User Repository) package, because it contained malware.

If you're an Arch Linux user who downloaded a PDF viewer named "acroread" in the short time it was compromised, you'll need to delete it. While the breach isn't regarded as serious, it sparked a debate about the security of untrusted software.

The user repository included the acroread package, which had been abandoned by its maintainer. Someone using the handle “xeactor” adopted the package and modified it to download malicious scripts from a remote server.

Young guy facepalms while holding a laptop

Gentoo GitHub repo hack made possible by these 3 rookie mistakes

READ MORE

When that was discovered, maintainer Eli Schwartz reverted the commits, suspended xeactor's account, and discovered (and removed) two other packages with similar modifications.

A later post in the Arch Linux mailing list suggested the “attack” was a warning of another issue. As Bennett Piater wrote: “A script that creates 'compromised.txt' in the root and all home folders looks like a warning to me.”

Here's the code that created the “warning” text file:

for x in /root /home/*; do
        if [[ -w "$x/compromised.txt" ]]; then
                echo "$FULL_LOG" > "$x/compromised.txt"
        fi
done

The aim of the modified lines in acroread was to use curl to download scripts from a remote site, and the script would (if it worked) reconfigure systemd to restart on a regular basis.

Lending further weight to its status as a warning was another message from Schwartz: “Side note on the acroread pastes: https://ptpb.pw/~x was executed by the PKGBUILD, which in turn executed https://ptpb.pw/~u. But the thing it installed declares an ssupload() function then tries to execute the contents of $uploader to actually upload the data collection.”

Schwartz said that “as-is”, that code wouldn't work.

Arch's Giancarlo Razzolini suggested warning that user-provided (and therefore untrusted) AURs might contain bad code is an overreaction.

“This thread is attracting way more attention than warranted,” he wrote (oh, and now it's in the media … sorry). “I'm surprised that this type of silly package takeover and malware introduction doesn't happen more often”, Razzolini added. ®




Biting the hand that feeds IT © 1998–2018