hunting-bootkits-in-efi-system-partition
Was er macht
Dieses Tool sucht nach Schadprogrammen, die im Startbereich deines Computers versteckt sind (dem sogenannten ESP). Es prüft, ob die Programme, die das System starten, legitim sind, und sucht nach verdächtigen Änderungen.
Wann du ihn nutzt
- ✓Wenn du sicherstellen willst, dass niemand Schadsoftware installiert hat, die vor dem Betriebssystem läuft.
- ✓Wenn du vermutest, dass ein Hacker etwas installiert hat, um dauerhaften Zugriff auf deinen Computer zu behalten.
- ✓Um regelmäßig zu prüfen, ob der Startbereich sicher ist und frei von unbefugten Änderungen ist.
Link zum Skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-bootkits-in-efi-system-partition/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Prüfe den Startbereich meines Computers auf Schadprogramme.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Das Tool bindet den Startbereich deines Computers ein, vergleicht die Startprogramme des Systems mit einer vertrauenswürdigen Liste und sucht nach ungewöhnlichen Dateien oder kürzlichen Änderungen.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Hunting Bootkits in the EFI System Partition
Overview
The EFI System Partition (ESP) is a small FAT32-formatted partition that the platform firmware reads at power-on to locate and execute the operating system's boot loader. Because it executes before the operating system, kernel, and any EDR agent, the ESP is one of the most coveted persistence locations for advanced adversaries. UEFI bootkits that live on the ESP survive OS reinstallation, disk reformatting of the OS partition, and most endpoint defenses.
This skill follows the detection research published by Eclypsium ("Enhanced Threat Detection: Bootloaders, Bootkits, and Secure Boot", and the Bootkitty and Glupteba analyses) and aligns with the ESP-hunting methodology Rapid7 documented for Velociraptor (Windows.Forensics.UEFI, Windows.Detection.Yara.UEFI). The threat context is concrete and current:
- ESPecter (ESET, 2021) — a UEFI bootkit that persists on the ESP as a patched Windows Boot Manager (
bootmgfw.efi) plus malicious kernel-mode drivers. It marked the move of UEFI threats from SPI flash to the ESP, where they are far easier to deploy. - BlackLotus (2023) — the first in-the-wild UEFI bootkit able to bypass Secure Boot on fully patched Windows 11 by exploiting CVE-2022-21894 ("baton drop") and staging a vulnerable signed
bootmgfw.efion the ESP. - Bootkitty (2024) — the first UEFI bootkit targeting Linux, dropped onto the ESP.
- Glupteba — commodity malware whose UEFI variant replaces software on the EFI partition.
The core detection insight from Eclypsium and Rapid7 is that the bootloader normally changes only during a vendor or OS update; an out-of-band change to ESP binaries, an unsigned or untrusted-signed boot loader, or any file in the ESP root that is not under the EFI/ directory is a high-fidelity indicator of compromise. This skill builds that baseline and hunts deviations from it.
When to Use
- During proactive threat hunts for firmware/bootkit persistence (MITRE ATT&CK T1542.003 — Pre-OS Boot: Bootkit)
- After an incident where an adversary achieved SYSTEM/root and may have established below-OS persistence
- When validating Secure Boot posture across a fleet and confirming boot-chain integrity
- As a periodic integrity check, comparing the current ESP contents against a trusted golden baseline
- When triaging hosts that show measured-boot (TPM PCR) mismatches
Prerequisites
- Administrative/root access to the target host (mounting and reading the ESP requires elevation)
- Linux analysis tooling — install on Debian/Ubuntu:
sudo apt-get update sudo apt-get install -y sbsigntool pesign efitools efibootmgr binwalk yara pip install pefile UEFIToolfor inspecting firmware/binaries (download from https://github.com/LongSoft/UEFITool/releases)- A trusted golden baseline of EFI binary hashes for the OS/vendor versions in scope (build it once on a known-clean, freshly imaged host)
- For Windows targets: WinPE or a forensic boot environment, or Velociraptor with the
Windows.Forensics.UEFIartifact
Objectives
- Mount and enumerate the ESP read-only without altering evidence
- Inventory every EFI binary and compute cryptographic hashes
- Verify Secure Boot signatures on each boot loader against trusted keys
- Compare contents against a golden baseline to surface out-of-band changes
- YARA-scan ESP binaries for known bootkit signatures
- Flag anomalies: files outside
EFI/, unsigned loaders, modifiedbootmgfw.efi/grubx64.efi, and tampered boot entries - Confirm measured-boot (TPM PCR 0/2/4) integrity where TPM is present
MITRE ATT&CK Mapping
| ID | Name | Relevance |
|---|---|---|
| T1542.003 | Pre-OS Boot: Bootkit | Adversaries place malicious boot loaders on the ESP to execute before the OS and EDR, achieving stealthy, resilient persistence. This skill hunts exactly that artifact. |
Workflow
Step 1: Identify and mount the ESP read-only
The ESP is a FAT32 partition, usually flagged EF00 (GPT) or esp,boot. Locate it and mount read-only to preserve evidence.
# Identify the ESP (type code EF00 / "EFI System")
sudo lsblk -o NAME,FSTYPE,PARTTYPENAME,MOUNTPOINT
sudo fdisk -l | grep -i "EFI System"
# Mount the ESP read-only (replace /dev/sda1 with the identified partition)
sudo mkdir -p /mnt/esp
sudo mount -o ro,umask=077 /dev/sda1 /mnt/esp
# Confirm the canonical layout: EFI/ should be the only top-level dir
…
Häufige Fragen
Was ist die „EFI System Partition“ (ESP)?
Das ist ein kleiner Bereich auf deiner Festplatte, der die Programme enthält, die das Betriebssystem starten, noch bevor es vollständig geladen wird.
Warum verstecken sich Schadprogramme dort so gern?
Wenn sich ein Schadprogramm im ESP versteckt, läuft es vor jeder Antivirensoftware und jedem Sicherheitsprogramm. Dadurch ist es sehr schwer zu erkennen und zu entfernen. Außerdem übersteht es Neuinstallationen des Systems.
Was ist ein „Bootkit“?
Das ist eine Art Schadprogramm, das sich im Startbereich (etwa dem ESP) einnistet, um schon sehr früh beim Systemstart die Kontrolle über den Computer zu übernehmen.
Details
Originalbeschreibung des Autors
Baseline the EFI System Partition and hunt malicious EFI binaries such as ESPecter, BlackLotus, Bootkitty, and Glupteba by mounting the ESP, hashing and verifying boot loaders, scanning with YARA, and flagging anomalous non-EFI files or out-of-band bootloader changes. Use during proactive threat hunts for firmware/bootkit persistence (MITRE ATT&CK T1542.003) or when investigating suspected UEFI-le
Beliebtheit
- GitHub-Sterne
- 35k
- Platz im Ranking
- #7945
- Lizenz
- Apache-2.0
- Aktualisiert
- 31.8.2026
Kommentare
- …
Weitere Skills aus diesem Repository
abusing-dpapi-for-credential-access
35kGibt deinem KI-Agenten fertige Anweisungen für eine bestimmte Aufgabe, damit er sie besser und schneller erledigt.
abusing-shadow-credentials-for-privesc
35kBringt deinem KI-Agenten bei, klare und gut strukturierte Texte zu schreiben.
achieving-cmmc-level-2-compliance
35kHilft deinem Agenten, eine Umgebung für CMMC-Level-2-Konformität vorzubereiten. Setzt Sicherheitsanforderungen um und verwaltet nötige Dokumentation.
acquiring-disk-image-with-dd-and-dcfldd
35kHilft deinem Agenten, exakte Festplattenkopien zu erstellen. Wichtig, damit bei Ermittlungen keine Informationen verloren gehen oder verändert werden.
Ähnliche Skills
gitcrawl
394kLässt deinen Agenten ein gespeichertes Archiv von GitHub-Issues und Pull Requests durchsuchen, Duplikate gruppieren und ihren aktuellen Status auf GitHub prüfen.
slacrawl
394kLässt deinen Agenten Nachrichten in einem lokalen Slack-Archiv durchsuchen und zählen, dessen Aktualität prüfen und es bei Bedarf auffrischen.
goplaces
394kHilft deinem Agenten, mit Google Places nach Orten zu suchen, Details und Bewertungen abzurufen und Ortsnamen aufzulösen, mit JSON-Ausgabe für Skripte.