They discovered that they can introduce malicious packages into AUR through expired domains

vulnerability

If exploited, these flaws can allow attackers to gain unauthorized access to sensitive information or generally cause problems

They recently published a blog post detailing the results of an experiment demonstrating how to take control of packages in the AUR repository.

For those unfamiliar with the Arch User Repository (AUR), it's a software repository for Arch Linux. It differs from the official Arch Linux repositories because its packages are provided by users and are not officially supported by Arch Linux.

AUR is used by external developers to distribute their packages without being included in the main repositories of the Arch Linux distribution.

In this case , an investigation was carried out due to the lack of support, which is more of a feature than a bug, as it allows the AUR to contain packages that are difficult to support (e.g., due to licensing issues) or that are only used by a handful of users.

However, the lack of support also means less quality control, allowing bad actors to introduce malicious packages. To warn users of this risk, AUR has a huge disclaimer on the main page (a legend that many ignore or are simply unaware of):

DISCLAIMER: AUR packages are user-produced content. Any use of the provided files is at your own risk.

Regarding the experiment, the researchers prepared a script that checks the expiration of domain registrations appearing in the PKGBUILD and SRCINFO files. Running this script identified 14 expired domains used in 20 file upload packages.

This allowed them to identify several ways to introduce a malicious package (or malicious changes to a legitimate package) into the AUR. For example, by becoming the maintainer of orphaned packages (i.e., packages that are no longer supported by their previous maintainers) or by typing popular package names.

Another option is to find packages that use URLs with expired domains during their creation process, register the domain, and host malicious files. How many of the packets are vulnerable to such an attack? Let's find out!

It is mentioned that the process is not as simple as it might seem; simply registering a domain is no longer enough to falsify the package, as the downloaded content is compared to the checksum already loaded in the AUR. However, the maintainers of approximately 35% of the packages in the AUR appear to use the "SKIP" parameter in the PKGBUILD file to bypass the checksum verification (for example, specifying sha256sums=('SKIP')). Of the 20 packages with expired domains, the SKIP parameter was used in 4.

To demonstrate the possibility of carrying out an attack, the researchers purchased the domain of one of the packages that do not verify checksums and placed a file with the code and a modified installation script.

Unfortunately, there is no standardized way to check if a domain is available. The WHOIS responses for the most popular TLDs contain something like “domain not matched” for available domains, but this is not true for all TLDs. A good first step is to filter out any domains that have a DNS Record Set, as those domains will (most likely) still be in use. To quickly make many DNS requests, we use blechschmidt/massdns . This is a great tool that allows us to resolve thousands of domains in seconds.

Instead of the actual content, a warning about third-party code execution has been added to the script. An attempt to install the package led to the download of spoofed files and, since the checksum was not verified, to the successful installation and execution of the code added by the experimenters.

Finally, it is mentioned that AUR packet hijacking is not a new concept , as AUR packet hijacking has always been possible (in multiple ways) and is a known risk.

If you are interested in learning more , you can find the details at the following link.


Add as preferred source in Google