Windows EFI Bootloader File Modification Detection
A process writing to critical EFI bootloader files (bootmgfw.efi or bootx64.efi) within the \EFI\Boot\ directory may indicate a bootkit installation, malicious code persistence at the firmware level, or tampering with the system boot process.
This detection identifies suspicious activity related to the modification of EFI bootloader files on Windows systems. The EFI bootloader files, specifically bootmgfw.efi and bootx64.efi located in the \EFI\Boot\ directory, are critical components responsible for initializing the Windows Boot Manager during system startup. Modification or replacement of these files is highly unusual under normal circumstances. Such activity may indicate an attacker’s attempt to install a bootkit, establish persistence for malicious code at the firmware level, or otherwise compromise the integrity of the system’s boot process. The referenced HybridPetya ransomware and CVE-2024-7344 highlight the real-world threat of bootloader modification for malicious purposes.
Attack Chain
- Initial access is gained through an existing vulnerability or compromised account.
- The attacker escalates privileges to obtain necessary permissions to modify system files.
- The attacker locates the EFI bootloader files (
bootmgfw.efiorbootx64.efi) in the\EFI\Boot\directory. - The attacker modifies the bootloader file, potentially injecting malicious code or replacing it with a compromised version.
- The system is rebooted, and the modified bootloader executes, initiating the malicious payload.
- The malicious payload gains control early in the boot process, bypassing security measures.
- The attacker achieves persistence, allowing them to maintain control over the system even after reboots.
Impact
Successful modification of the EFI bootloader can result in a complete compromise of the affected system. Attackers can use this technique to install persistent malware, bypass security measures, and potentially gain control over the entire network. This can lead to data theft, system disruption, and other malicious activities. While specific victim numbers are unavailable, the criticality of the boot process means any successful attack can have severe consequences.
Recommendation
- Enable Sysmon Event ID 11 logging to monitor file creation events and activate the provided Sigma rule.
- Deploy the Sigma rule
Windows EFI Bootloader File Modificationto your SIEM and tune it for your environment to detect bootloader modifications. - Review the references provided, including the Bleeping Computer article and the ESET research on CVE-2024-7344, for additional context on bootloader attacks.
- Investigate any alerts generated by this rule immediately, as they could indicate a serious compromise.
Detection coverage 2
Windows EFI Bootloader File Modification
highDetects processes writing to critical EFI bootloader files (bootmgfw.efi or bootx64.efi) within the \EFI\Boot\ directory.
Suspicious Process Modifying EFI Bootloader via Rename
highDetects processes renaming critical EFI bootloader files, potentially to replace them with malicious versions.
Detection queries are kept inside the platform. Get full rules →