Windows EFI Bootloader File Modification
Description
Detects where a process writes to critical EFI bootloader files (bootmgfw.efi or bootx64.efi) within the \EFI\Boot\ directory. These files are responsible for initializing the Windows Boot Manager during system startup. Modification or replacement of these files is highly unusual in normal operations and may indicate an attempt to install a bootkit, persist malicious code at the firmware level, or otherwise tamper with the system boot process.
Query · spl
| tstats `security_content_summariesonly`
count min(_time) as firstTime
max(_time) as lastTime
from datamodel=Endpoint.Filesystem where
Filesystem.file_path IN (
"*\\EFI\\Boot\\bootmgfw.efi",
"*\\EFI\\Boot\\bootx64.efi"
)
by Filesystem.dest Filesystem.file_create_time Filesystem.process_path
Filesystem.process_guid Filesystem.process_id Filesystem.file_path Filesystem.file_name
Filesystem.user Filesystem.vendor_product Filesystem.action
| `drop_dm_object_name(Filesystem)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_efi_bootloader_file_modification_filter`
Implementation guide
The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the Processes node of the Endpoint data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process.
Known false positives
- Legitimate system updates or authorized IT maintenance may modify EFI bootloader files. Review changes against approved maintenance windows and tools.
Analyst notes
Known false positives: Legitimate system updates or authorized IT maintenance may modify EFI bootloader files. Review changes against approved maintenance windows and tools.