How to Check the EFI System Partition for a Bootkit Offline
Collect the EFI system partition on Windows and Linux, learn what a normal one holds, and check signers, the BCD store, file times and BlackLotus traces.
TL;DR. The EFI system partition (ESP) is a small FAT32 partition that the firmware reads before any operating system starts, which makes it the home of UEFI bootkits such as BlackLotus, ESPecter, the FinSpy UEFI bootkit and Bootkitty. Copy the whole partition, not only EFI\Microsoft\Boot, and list it with times and hashes. Then compare it with what a normal Windows or Linux ESP holds, read the Authenticode signer of every EFI binary, read the BCD store, and look for the files and folders public reports describe. A clean result rules out a file-based bootkit on that partition at the time of collection. It says nothing about firmware in flash, UEFI variables or code in memory.
What lives on the ESP
At power-on, UEFI firmware runs the boot entry stored in its NVRAM, which names a file on the ESP. Without a usable entry it falls back to \EFI\BOOT\BOOTX64.EFI, the default path that Microsoft's BCDBoot documentation cites from the UEFI specification. Everything after that, the Windows Boot Manager or shim and GRUB, is a PE file on the ESP. With Secure Boot on, the firmware checks each loader's signature against its db and dbx databases. A bootkit on this partition either replaces a loader, adds one that a trusted loader agrees to run, or relies on Secure Boot being off.
Windows gives the ESP no drive letter, and most triage collections skip it. That is why it has to be collected on purpose.
Collect it
Windows, live
From an elevated PowerShell prompt:
$case = 'E:\case\FIN-WKS-07'
New-Item -ItemType Directory -Force -Path "$case\ESP" | Out-Null
mountvol S: /S
# Copy the partition, list it with times, hash every file
robocopy S:\ "$case\ESP" /E /COPY:DAT /DCOPY:T /R:0 /W:0 /LOG:"$case\esp-robocopy.log"
Get-ChildItem S:\ -Recurse -Force |
Select-Object FullName, Length, CreationTimeUtc, LastWriteTimeUtc |
Export-Csv "$case\esp-listing.csv" -NoTypeInformation
Get-ChildItem S:\ -Recurse -Force -File | Get-FileHash -Algorithm SHA256 |
Export-Csv "$case\esp-sha256.csv" -NoTypeInformation
mountvol S: /D
# Context for the comparison
robocopy C:\Windows\Boot\EFI "$case\C\Windows\Boot\EFI" /E /COPY:DAT /DCOPY:T /R:0 /W:0
robocopy C:\Windows\Logs\MeasuredBoot "$case\C\Windows\Logs\MeasuredBoot" /COPY:DAT /R:0 /W:0
bcdedit /enum all /v > "$case\bcdedit-enum-all.txt"
Confirm-SecureBootUEFI > "$case\secureboot-state.txt"
Get-TimeZone > "$case\timezone.txt"
mountvol /s mounts the ESP on the drive letter you give and /d removes it. /R:0 makes robocopy log a locked file instead of retrying. Keep that log: Microsoft's BlackLotus guidance notes that the bootkit's driver locks winload.efi, bootmgfw.efi and grubx64.efi on the ESP, so a sharing violation on those files is itself a finding.
Linux, live
case="$HOME/case/fin-jump-01"; mkdir -p "$case"
findmnt /boot/efi
sudo tar -C / -cpf "$case/esp.tar" boot/efi
sudo efibootmgr -v > "$case/efibootmgr.txt"
mokutil --sb-state > "$case/mokutil-sb-state.txt"
mokutil --list-enrolled > "$case/mokutil-list-enrolled.txt"
sudo cp /sys/kernel/security/tpm0/binary_bios_measurements "$case/"
sudo sh -c 'sha256sum /boot/efi/EFI/ubuntu/*.efi /usr/lib/shim/*.efi* \
/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed' > "$case/esp-vs-packages.sha256"
Ubuntu mounts the ESP readable by root only, so the hashing runs in a root shell, where the globs can expand.
The archive keeps the boot/efi/EFI/... paths and the file times. efibootmgr -v and mokutil read what lives in NVRAM rather than on disk: the boot entries, the Secure Boot state and the Machine Owner Keys (MOK) that shim trusts. The Debian wiki warns that mokutil --sb-state is only as trustworthy as the system that answers it. The TPM event log is covered in Reading Measured Boot logs.
From a disk image
Imaging the partition keeps what a file copy loses: deleted directory entries. Microsoft notes that BlackLotus's staging files may be recoverable after the installer deletes them. With The Sleuth Kit:
mmls disk.raw # find the EFI system partition and its start sector
fls -r -p -o 2048 disk.raw > esp-files.txt # every file, with its path
fls -r -d -p -o 2048 disk.raw # deleted entries only
Replace 2048 with the start sector mmls reports. On a live Linux host, sudo dd if=/dev/nvme0n1p1 of="$case/esp.img" bs=1M status=progress images the partition; check the device name with lsblk -o NAME,SIZE,FSTYPE,PARTTYPE,MOUNTPOINT first. Hash every image and copy.
What normal looks like
Windows
| Path on the ESP | What it is |
|---|---|
EFI\Microsoft\Boot\bootmgfw.efi | Windows Boot Manager, signed by Microsoft |
EFI\Microsoft\Boot\BCD and its .LOG files | The Boot Configuration Data store, a registry hive |
Other files in EFI\Microsoft\Boot\ | The boot environment BCDBoot copies from C:\Windows\Boot\EFI: language folders, fonts, the memory test |
EFI\Boot\bootx64.efi | The default loader for the fallback path |
EFI\<vendor>\ | Folders added by the PC maker or other installed systems |
The simplest test is the one Microsoft suggests: compare names, hashes and times in EFI\Microsoft\Boot with C:\Windows\Boot\EFI on the same host. Files that exist only on the ESP, such as a grubx64.efi or a winload.efi next to the boot manager, need an explanation. Nothing belongs in a system32 folder at the root of the ESP.
Linux (Ubuntu)
| Path on the ESP | What it is |
|---|---|
EFI/ubuntu/shimx64.efi | shim, the first-stage loader the firmware trusts |
EFI/ubuntu/grubx64.efi | GRUB, verified by shim |
EFI/ubuntu/mmx64.efi | MokManager |
EFI/ubuntu/BOOTX64.CSV, grub.cfg | Fallback entry list; small GRUB config that points to /boot/grub |
EFI/BOOT/BOOTX64.EFI, EFI/BOOT/fbx64.efi | shim and the fallback loader on the default path |
The file names come from Ubuntu's shim-signed and grub-efi-amd64-signed packages, which keep reference copies in /usr/lib/shim/ and /usr/lib/grub/x86_64-efi-signed/. Shim's fallback notes describe the EFI/BOOT layout and the CSV. Other distributions use their own folder name. A hash that differs from the package copy is the strongest offline test on Linux: ESET's Bootkitty analysis implies the bootkit as grubx64.efi and the real GRUB moved to grubx64-real.efi.
Check the signers
Read the Authenticode signature of every .efi file. On Windows, Get-AuthenticodeSignature <file> | Format-List shows the signer certificate and its issuer. On Linux, sbverify --list <file> from sbsigntools lists the signatures. Then compare with what each file should carry:
| File | Expected signer |
|---|---|
| Windows Boot Manager | Microsoft, under Microsoft Windows Production PCA 2011 or, on updated devices, Windows UEFI CA 2023 |
| shim | Microsoft's third-party UEFI CA (Microsoft UEFI CA 2011 or its 2023 successor) |
| GRUB, kernel | The distribution's own key, which shim trusts; not Microsoft |
| Vendor tools | The vendor, or Microsoft's third-party CA |
Microsoft's certificate expiration article lists the 2011 certificates, their 2023 replacements and their expiry dates in June and October 2026. It also says devices without the new certificates keep booting, so a boot manager signed under the 2011 PCA is still normal on many hosts.
Three readings matter:
- Unsigned or self-signed in the boot path. BlackLotus's
grubx64.efiand Bootkitty's loader are self-signed. A loader that only boots because of an enrolled MOK, or because Secure Boot is off, is a finding. - The right signature in the wrong place. On a Windows-only machine, a shim signed by Microsoft's third-party CA sitting at
bootmgfw.efiis the BlackLotus layout. Microsoft's guidance adds that machines that do not need the third-party CA can remove it from Secure Boot. - A valid but revoked signature. BlackLotus uses old, vulnerable boot managers that Microsoft signed. They pass a signature check until the
dbxrevokes them. KB5025885 shows how to check, on the live host, whether Windows UEFI CA 2023 is indband the 2011 PCA is indbx.
A broken signature is a finding too: ESET found that ESPecter's patched bootmgfw.efi no longer validates, which only works with Secure Boot off.
Read the BCD store
The BCD is a registry hive. On a Windows analysis machine, work on a copy:
bcdedit /store E:\case\FIN-WKS-07\ESP\EFI\Microsoft\Boot\BCD /enum all /v
Check that {bootmgr} points to \EFI\Microsoft\Boot\bootmgfw.efi and the Windows loader to \Windows\system32\winload.efi, and look for entries nobody installed. Look at the verification settings BCDEdit documents: testsigning lets Windows load test-signed kernel code, and nointegritychecks turns integrity checks off and cannot be set while Secure Boot is on. Debug settings deserve the same look. According to ESET, BlackLotus brings its own BCD during installation, in the staging folder, and keeps the original as BCDR until it restores it; the BlackLotus page has the details.
BlackLotus, as an example
ESET's analysis and Microsoft's guidance give a clear ESP picture:
| Trace | What it means |
|---|---|
system32\ at the ESP root | The exploit's staging folder. The files are deleted after installation; the folder stays |
EFI\Microsoft\Boot\grubx64.efi, self-signed | The bootkit, loaded by shim because the attacker enrolled a MOK |
EFI\Microsoft\Boot\bootmgfw.efi signed by the third-party CA | The shim, in place of the boot manager |
EFI\Microsoft\Boot\winload.efi | The original boot manager, renamed |
| Recent, mismatched times on these files | The installation, compared with C:\Windows\Boot\EFI |
| Sharing violations when copying or hashing them | The bootkit's driver holding the files open |
Other families leave other shapes: FinSpy's bootkit replaced bootmgfw.efi and hid the original in a language folder, according to Kaspersky. Each family page lists the traces its sources report.
File times
FAT stores times in local time with no time zone, and its write time has a two-second resolution, as Microsoft's file times documentation explains. Tools convert those times with the time zone of the machine that reads them, so record the source host's zone and convert. Recent times on boot files are not proof on their own: Windows servicing rewrites the boot manager, for instance when it applies the KB5025885 mitigations, which log System events such as 1799 when the new boot manager is installed. Compare the ESP times with update history and with C:\Windows\Boot\EFI.
What an offline ESP check cannot prove
- Firmware. Implants in the SPI flash, such as MoonBounce, CosmicStrand and LoJax, leave the ESP untouched.
- UEFI variables.
MokList, theBoot####entries,dbanddbxlive in NVRAM. Read them on the live host withmokutil,efibootmgrorGet-SecureBootUEFI, knowing an active bootkit may control the answer. - Memory. Kernel drivers and injected code that a bootkit starts later never sit on the ESP.
- Revocation state. A signature check on a copy does not know which
dbxthe host had. - A live copy under a running bootkit can be incomplete. An image taken from a clean boot medium is better.
Checking with rootkits.dev
The checker reads the collection in your browser; nothing is uploaded. Put each host in its own folder: for Windows, the partition under ESP/ (a bare EFI/ at the host root also works) and system files under C/; for Linux, the archive's boot/efi/EFI/... paths. Its esp module lists every EFI binary with its Authenticode signer, recomputed digest and time, reads every BCD store, and flags:
- unsigned, self-signed or changed binaries, and a
bootmgfw.efinot signed through Microsoft's Windows chain; - files that do not belong in
EFI\Microsoft\Boot\, asystem32folder at the root, executables outside the usual folders; - an
.efifile a week or more newer than the median of its folder; - BCD settings: test signing, integrity checks off, debugging, another BCD store, the memory options BlackLotus uses, changed boot application paths.
It checks signatures offline: it does not validate chains against a trust store and does not read db, dbx or the MOK list, so a revoked but validly signed boot manager passes. A collection holds files, not empty folders, so an emptied system32 folder only shows in an image.
The "Try a sample" host LAB-VM-02 reproduces a BlackLotus-like layout, after an installer run on 2026-11-02 at 14:21 UTC:
| File | Findings |
|---|---|
EFI\Microsoft\Boot\BCD (14:21:37) | "The boot manager is told to load another BCD store" (\system32\bcd); "The BCD sets avoidlowmemory" |
EFI\Microsoft\Boot\BCDR (2026-10-30 08:02:11) | "BCDR does not belong in the Windows boot folder" |
EFI\Microsoft\Boot\bootmgfw.efi (14:21:36) | "The Windows Boot Manager is not signed by a Windows production CA"; "is much newer than the other files in its folder" (124 days) |
EFI\Microsoft\Boot\grubx64.efi (14:21:36) | "A self-signed signature on" the file; "grubx64.efi does not belong in the Windows boot folder"; newer than its folder |
EFI\Microsoft\Boot\winload.efi (2026-03-02) | "winload.efi does not belong in the Windows boot folder"; "An unsigned EFI binary" |
system32\bcd (14:21:34) | "A system32 folder at the root of the EFI system partition"; its loader object: test signing, integrity checks off, "The BCD sets truncatememory" |
Its binaries are do-nothing placeholders with synthetic certificates, so their signature results differ from a real infection. A real bootmgfw.efi would be a shim signed through Microsoft's third-party UEFI CA, which also links that finding to BlackLotus, and a real winload.efi would be Microsoft's own boot manager, signed and renamed, so it would not be flagged as unsigned. The sample walk-through reads all four hosts.
FAQ
How do I see the EFI system partition on Windows?
From an elevated prompt, mountvol S: /S gives it the drive letter S:. Copy it with robocopy or list it with PowerShell from the same elevated prompt, then remove the letter with mountvol S: /D.
Is a Microsoft signature on bootmgfw.efi enough to call the ESP clean?
No. BlackLotus boots through old boot managers that Microsoft signed and that stayed valid until they were revoked in the DBX, and it puts a Microsoft-signed shim in place of bootmgfw.efi. Check which certificate signed each file, whether it belongs in that place, and whether the host has applied Microsoft's revocations.
Why do the ESP file times look an hour off?
FAT stores times in the local time of the machine that wrote them, with no time zone. Tools convert them with the time zone of the machine that reads them. Record the source host's time zone and convert before you build a timeline.
Can an offline ESP check find a firmware implant?
No. Implants such as MoonBounce, CosmicStrand and LoJax live in the SPI flash chip, not in files on the disk. Their traces, if any, are in firmware dumps, Measured Boot logs and the files they drop into Windows.
Related articles
Frequently asked questions
How do I see the EFI system partition on Windows?
From an elevated prompt, mountvol S: /S gives it the drive letter S:. Copy it with robocopy or list it with PowerShell from the same elevated prompt, then remove the letter with mountvol S: /D.
Is a Microsoft signature on bootmgfw.efi enough to call the ESP clean?
No. BlackLotus boots through old boot managers that Microsoft signed and that stayed valid until they were revoked in the DBX, and it puts a Microsoft-signed shim in place of bootmgfw.efi. Check which certificate signed each file, whether it belongs in that place, and whether the host has applied Microsoft's revocations.
Why do the ESP file times look an hour off?
FAT stores times in the local time of the machine that wrote them, with no time zone. Tools convert them with the time zone of the machine that reads them. Record the source host's time zone and convert before you build a timeline.
Can an offline ESP check find a firmware implant?
No. Implants such as MoonBounce, CosmicStrand and LoJax live in the SPI flash chip, not in files on the disk. Their traces, if any, are in firmware dumps, Measured Boot logs and the files they drop into Windows.