本文へスキップ
Skillpedia
分析とスプレッドシート35k · #7945

hunting-bootkits-in-efi-system-partition

できること

このツールは、コンピューターの起動領域(ESPと呼ばれます)に隠された悪意のあるプログラムを探します。システムを起動するプログラムが正規のものかどうかを確認し、不審な変更がないかを調べます。

使う場面

  • ✓オペレーティングシステムより前に動く悪意のあるソフトウェアがインストールされていないことを確かめたいとき。
  • ✓攻撃者がコンピューターへの継続的なアクセスを維持するために何かを仕込んだ可能性があると疑うとき。
  • ✓起動領域が安全で、不正な変更がないかを定期的に確認したいとき。

スキルのリンク

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-bootkits-in-efi-system-partition/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-bootkits-in-efi-system-partition/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のコンピューターの起動領域に、悪意のあるプログラムがないか確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

ツールは起動領域をマウントし、システム起動用のプログラムを信頼できるリストと照合して検証します。また、見慣れないファイルや最近行われた変更がないかも調べます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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.efi on 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
    
  • UEFITool for 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.UEFI artifact

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, modified bootmgfw.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

…
よくある質問

EFIシステムパーティション(ESP)とは何ですか?

ハードディスク上の小さな領域で、オペレーティングシステムの読み込みが始まる前に必要となるプログラムが格納されています。

悪意のあるプログラムはなぜそこに隠れたがるのですか?

ESPに隠れた悪意のあるプログラムは、ウイルス対策ソフトやセキュリティソフトより前に動作するため、検出や削除が非常に困難です。さらに、システムを再インストールしても残り続けます。

ブートキットとは何ですか?

ESPのような起動領域に自らを組み込み、起動プロセスの非常に早い段階でコンピューターを制御しようとする悪意のあるプログラムの一種です。

詳細

作者による元の説明

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

repo: mukul975/Anthropic-Cybersecurity-Skills

人気

GitHubのスター
35k
ランキング
#7945
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル