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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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.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
…
자주 묻는 질문
‘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
인기도
- GitHub 스타
- 35k
- 순위
- #7945
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.