Az ESET kutatói felfedezték az új "Bootkitty" bootkitet, amelyet a rendszer feltörése után telepítenek a GRUB betöltő helyett, és amelyet a Linux kernelbe való káros összetevők becsempészésére használnak, lehetővé téve a támadó számára, hogy észrevétlenül irányítsa a rendszert és végezze el tevékenységeit. Állítólag ez az első UEFI bootkit, amely a Linux rendszereket célozza meg.
A Bootkitty a grubx64.efi fájlban található az EFI rendszerpartíción (EFI system partition, /boot/efi/EFI/ubuntu) a szokásos GRUB betöltő helyett. Az UEFI firmware aktiválása után a bootkit betölti a GRUB2 valódi betöltőjét a memóriába, és módosítja a memóriában elhelyezett GRUB2 kódot, letiltva a később betöltött összetevők integritásának ellenőrzését, valamint hozzáad egy kezelőt, amely a Linux kernel képének memóriába való kibővítése után aktiválódik. A megadott kezelő módosítja a memóriába betöltött kernel funkciókat (leállítja a modulok digitális aláírásának ellenőrzését), és módosítja az inicializáló folyamat indítási sorát "init"-ről "LD_PRELOAD=/opt/injector.so /init"-re.
Az injector.so könyvtár egyes SELinux műveleteket és az init_module funkciót figyeli, amelyet ezután a /opt/dropper.ko kernel modul betöltésére használnak. A dropper.ko kernel modul létrehozza és elindítja az /opt/observer végrehajtható fájlt, majd eltitkolja magát a kernel modulok listájában, és beállítja a rendszerhívások kezelőit, például a getdents és tcp4_seq_show hívásokat, hogy elrejtse az /opt/observer fájlt és bizonyos hálózati forgalmat. Az /opt/observer végrehajtható fájl betölti a /opt/rootkit_loader.ko kernel modult, amely a /opt/rootkit rootkit betöltője.

A bootkit telepítéséhez privilégiumos hozzáférés szükséges a rendszerhez, és az ilyen jellegű rosszindulatú szoftvereket a támadók általában a rendszer sikeres feltörése vagy kompromittálása után használják további jelenlétük megerősítésére és a végrehajtott rosszindulatú tevékenység elrejtésére. Az injector.so könyvtár és a rosszindulatú kernel modulok a támadó által az initial RAM disk képébe vagy a fájlrendszerbe kerülnek. A grubx64.efi betöltőt az UEFI fájlokkal rendelkező partícióra helyezik.
A Bootkitty variant, which came into the hands of researchers, modified kernel functions in memory according to predefined offsets without checking the validity 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, causing boot failures in other systems. To verify the Bootkitty bootloader (grubx64.efi), a self-signed certificate was used, which did not allow the bootkit to be applied on systems with UEFI Secure Boot enabled without installing the attacker's certificate in the list of trusted certificates in UEFI. Such features led researchers to believe that Bootkitty is merely a prototype of a bootkit, not yet 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 code execution at the UEFI firmware level and bypasses the UEFI Secure Boot mechanism. In the context of Bootkitty, the exploit of the LogoFAIL vulnerability was used to add the attacker's self-signed certificate, which signed the Bootkitty loader 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 logo. Due to the use of vulnerable libraries in UEFI firmwares for image handling, processing the specially crafted image may lead to a buffer overflow and execution of code with UEFI firmware privileges. The LogoFAIL vulnerability was identified a year ago and affected UEFI firmwares used, among others, on laptops from Acer, HP, Fujitsu, and Lenovo. In newer versions of UEFI firmwares, the issue has been resolved, but many commonly used devices continue to operate with vulnerable versions of the firmware.

Forrás: opennet.ru
