De UEFI-bootkit Bootkitty is ontdekt, die schadelijke code invoegt in de opstartbare Linux-kernel

Onderzoekers van ESET hebben een nieuwe bootkit 'Bootkitty' ontdekt, die na een systeemhack in plaats van de GRUB-bootloader wordt geĆÆnstalleerd. Deze bootkit wordt gebruikt om kwaadaardige componenten in de Linux-kernel in te voegen, waardoor een aanvaller het systeem onopgemerkt kan gecontroleerd en zijn acties kan uitvoeren. Het wordt beweerd dat dit de eerste UEFI-bootkit is die gericht is op het infecteren van Linux-systemen.

Bootkitty wordt geplaatst in het bestand grubx64.efi in de EFI-systeempartitie (/boot/efi/EFI/ubuntu) in plaats van de standaard GRUB-bootloader. Na activatie door de UEFI-firmware laadt de bootkit de echte GRUB2-bootloader naar het geheugen en brengt wijzigingen aan in de GRUB2-code die in het geheugen is geladen, waarmee de integriteitscontrole van de in latere stadia geladen componenten wordt uitgeschakeld. Daarnaast voegt het een handler toe die wordt aangeroepen na het uitpakken van de Linux-kernelafbeelding in het geheugen. Deze handler maakt wijzigingen in de in het geheugen geladen kernelfuncties (waarbij de controle op modules met digitale handtekeningen wordt uitgeschakeld) en verandert de opstartregel van het initialisatieproces van '/init' naar 'LD_PRELOAD=/opt/injector.so /init'.

De injector.so-bibliotheek onderschept bepaalde SELinux-operaties en de init_module-functie, die vervolgens wordt gebruikt om de kernelmodule /opt/dropper.ko te laden. De kernelmodule dropper.ko creƫert en start het uitvoerbare bestand /opt/observer, verbergt zichzelf in de lijst van kernelmodules en stelt system call-handlers in, zoals getdents en tcp4_seq_show, om het bestand /opt/observer en bepaald netwerkverkeer te verbergen. Het uitvoerbare bestand /opt/observer laadt de kernelmodule /opt/rootkit_loader.ko, die de rootkit /opt/rootkit laadt.

De UEFI-bootkit Bootkitty is ontdekt, die schadelijke code invoegt in de opstartbare Linux-kernel

Voor de installatie van de bootkit is toegang met verhoogde rechten tot het systeem vereist. Dergelijke malware wordt doorgaans door aanvallers gebruikt na een succesvolle hack of compromittering van het systeem om hun verdere aanwezigheid te verankeren en hun kwaadaardige activiteiten te verbergen. De injector.so-bibliotheek en de kwaadaardige kernelmodules worden door de aanvaller in de afbeelding van de init RAM-disk of het bestandssysteem geplaatst. De bootloader grubx64.efi wordt in de partitie met bestanden voor UEFI geplaatst.

In the Bootkitty variant examined by researchers, modifications to the kernel memory functions were carried out at predefined offsets without verifying the correctness of these offsets for the loaded kernel version. The offsets used in Bootkitty were applicable only to certain versions of the kernel and GRUB provided in specific releases of Ubuntu; in other systems, they caused boot failures. To verify the Bootkitty bootloader (grubx64.efi), a self-signed certificate was used, which prevented the application of the bootkit on systems with UEFI Secure Boot enabled without adding the attacker's certificate to the trusted certificate list in UEFI. Such characteristics led researchers to believe that Bootkitty is merely a prototype of a bootkit that has not yet been used for real attacks.

After studying the published ESET information, researchers from Binarly Research noticed among the artifacts related to Bootkitty BMP images used to exploit the LogoFAIL vulnerability, which allows executing code at the UEFI firmware level and bypassing the UEFI Secure Boot mechanism. In the context of Bootkitty, the exploitation of the LogoFAIL vulnerability was used to add the attacker's self-signed certificate, which signed the Bootkitty bootloader grubx64.efi, to the list of approved UEFI certificates, allowing the bootkit to run on systems with active UEFI Secure Boot without manually adding the certificate.

The attack is conducted by placing a specially crafted BMP image in the ESP (EFI System Partition) for it to be displayed by the UEFI firmware as the manufacturer's logo. Due to the use of vulnerable libraries for image processing in UEFI firmwares, processing the specially crafted image can lead to a buffer overflow and the execution of code with UEFI firmware privileges. The LogoFAIL vulnerability was discovered a year ago and affected UEFI firmwares, including those used in laptops from Acer, HP, Fujitsu, and Lenovo. In new versions of UEFI firmwares, the issue has been addressed, but many commonly used devices continue to operate with vulnerable firmware versions.

De UEFI-bootkit Bootkitty is ontdekt, die schadelijke code invoegt in de opstartbare Linux-kernel


Bron: opennet.ru
Koop betrouwbare webhosting met bescherming tegen DDoS, VPS VDS servers šŸ”„ Koop betrouwbare webhosting met bescherming tegen DDoS, VPS VDS servers | ProHoster