If exploited, these flaws can allow attackers to gain unauthorized access to sensitive information or generally cause problems
Here on the blog I like to share a lot of news about the discoveries of bugs and vulnerabilities that are detected in Linux within its different subsystems, as well as some popular applications.
As many of you know, the vulnerability disclosure process typically includes a grace period to allow developers time to fix the flaw and release corrective versions or patches. In most cases, the flaws are fixed before the vulnerability is disclosed, but this isn't always the case, and sometimes the information and prepared exploits are made public.
The issue with reaching this point is that it is not the first time that an exploit of a vulnerability has resulted in a "hidden reward", since in mid-June, a vulnerability (cataloged under CVE-2023-35829) in the Linux kernel module rkvdec was reported.
In this case, the PoC is a wolf in sheep's clothing, harboring malicious intent under the guise of a harmless learning tool. Its hidden backdoor presents a stealthy and persistent threat. Operating as a downloader, it silently downloads and executes a Linux bash script, while disguising its operations as a kernel-level process.
Its persistence methodology is quite astute. Used to build executables from source files, it takes advantage of the make command to create a kworker file and adds its file path to the bashrc file, allowing the malware to continuously operate within the victim's system.
The vulnerability detected allows access to a memory area after it has been freed due to a race condition during driver unloading. It was initially assumed that the issue was limited to a denial-of-service attack, but recently, information has surfaced in some Telegram and Twitter communities indicating that the vulnerability can be exploited to grant root privileges to an unprivileged user.
To demonstrate this, two functional exploit prototypes were released as evidence, which were published on Github and subsequently deleted , because backdoors were found in them.
An analysis of the published exploits showed that they contain malicious code that installs malware on Linux , as they set up a backdoor for remote login and send some files to the attackers.
The malicious exploit only simulated gaining root access by displaying diagnostic messages about the attack's progress, creating a separate user ID space with its own root user, and running the /bin/bash shell in an environment isolated from the main one, creating the impression of having root access when running utilities like whoami.
The malicious code was activated by calling the executable file aclocal.m4 from the Makefile build script (the researchers who discovered the malicious code were alarmed by the fact that when compiling the exploit, an executable file in ELF format is called as an autoconf script). After starting, this executable creates a file on the system that it appends to "~/.bashrc" for automatic startup.
In this way, the process changes its name, which suggests that the user would not notice it in the process list in the context of the abundance of kworker processes in the Linux kernel.
The kworker process would then download a bash script from an external server and execute it on the system. This downloaded script adds a key to connect the attackers via SSH and saves a file containing the user's home directory and some system files, such as /etc/passwd, to the transfer.sh storage service. This file is then sent as a link to the attacker's server.
Finally, it is worth mentioning that if you are an enthusiast who likes to test xploits or vulnerabilities that are disclosed, take your precautions and it never hurts to perform these tests in an isolated environment (VM) or on another secondary system/equipment that is specific for this.
If you are interested in learning more, you can find the details at the following link.