Skip to content
KitploitKITPLOIT
ИнструментыБлог
Отправить
ИнструментыБлог
Отправить

Инструменты для хакинга, пентеста и кибербезопасности — ваш арсенал защиты!

Kitploit — это каталог инструментов для хакинга, кибербезопасности и пентестинга. Находите последние обновления проектов для поиска уязвимостей, анализа систем, автоматизации тестирования и усиления вашей безопасности.

··Ленты·Контакты·Конфиденциальность·© 2026 Kitploit

Каталог инструментов

Категории

Все категории
Loading categories
CVE-2025-4275 — Analysis and exploitation of CVE-2025-4275 (Hydr0ph0bia), a Secure Boot trust-chain weakness where firmware variables are used to introduce attacker-controlled certificates trusted by subsequent boot components. | Kitploit
Инструменты/GitHubGitHub/themalwareguardian/cve-2025-4275
Persistence MechanismsVulnerability AnalysisExploitationReverse EngineeringHardware SecurityBinary AnalysisLearning & EducationFirmware Analysis

Популярное

Смотреть все →

Откройте для себя самые используемые инструменты нашего сообщества.

Изучить все инструменты

Просмотрите нашу коллекцию инструментов

Смотреть все инструменты →
GitHub
themalwareguardian/cve-2025-4275

CVE-2025-4275

Analysis and exploitation of CVE-2025-4275 (Hydr0ph0bia), a Secure Boot trust-chain weakness where firmware variables are used to introduce attacker-controlled certificates trusted by subsequent boot components.

Репозиторий
14 дней назадЕщё не проверено
Поделиться
Контент недоступен на запрошенном языке. Показываем английскую версию.

🐞 CVE-2025-4275: Hydroph0bia SecureFlash Certificate Shadowing

This repository contains research material related to CVE-2025-4275, a Secure Boot bypass vulnerability affecting UEFI-compatible firmware based on Insyde H2O. It centralizes technical analysis of the vulnerability, the binaries involved in the issue, as well as documentation and tooling intended to help researchers better understand, study, and experiment with this vulnerability in both real-world and educational contexts.




📑 Table of Contents

  • Original Discovery & Official References
  • Vulnerability Overview (Analysis, Exploitation, PoC)
  • 📂
    • NVRAM & Secure Boot in Insyde H2O
NVRAM Variable Shadowing
  • Exploiting the Vulnerability
  • Affected Vendors



  • 🧠 Original Discovery & Official References

    CVE-2025-4275 was originally discovered and responsibly disclosed by Nikolaj Schlej, with coordination handled through CERT/CC. Official and community references:

    • Researcher Blog - Part 1 (Secure Boot bypass)
      • Hydroph0bia: A trivial SecureBoot bypass for UEFI-compatible firmware based on Insyde H2O, part 1
    • Researcher Blog - Part 2 (DXE volume takeover)
      • Hydroph0bia: A bit more than just a trivial SecureBoot bypass for UEFI-compatible firmware based on Insyde H2O, part 2
    • Researcher Blog - Part 3 (Patch analysis)
      • Hydroph0bia: A fixed SecureBoot bypass for UEFI-compatible firmware based on Insyde H2O, part 3
    • Official Insyde advisory (June 10, 2025)
      • INSYDE-SA-2025002
    • Community reference collection
      • Awesome Bring Your Own Vulnerable UEFI Application



    🧪 Vulnerability Overview (Analysis, Exploitation, PoC)

    CVE-2025-4275, dubbed Hydroph0bia (a pun on Insyde H2O), is a Secure Boot bypass vulnerability affecting UEFI-compatible firmware built on the Insyde H2O platform. The vulnerability stems from a design flaw in the firmware update subsystem: a signing certificate meant to be loaded into a volatile NVRAM variable by a trusted driver can instead be pre-populated as a non-volatile variable by an attacker, causing the firmware to trust arbitrary external code as if it had been signed by Insyde themselves.

    What makes this vulnerability particularly impactful is the combination of its simplicity and its reach. Exploitation only requires local administrator privileges, enough to write files to the EFI System Partition and create NVRAM variables, and affects any system running Insyde H2O firmware built before June 10, 2025. The attack is OEM-agnostic, meaning it applies broadly across Acer, Dell, Framework, Fujitsu, HP, Huawei, Lenovo, and any other vendor shipping Insyde-based firmware.


    🔐 NVRAM & Secure Boot in Insyde H2O

    UEFI provides an abstract interface to non-volatile variable storage known as NVRAM. One long-standing quirk of this interface is that a non-volatile variable with a given name and GUID can coexist with, and shadow, a volatile variable with the same identity. If code expects a volatile variable (created at runtime by a trusted driver) but a non-volatile one with the same name already exists, the non-volatile version may be consumed instead. This behavior, sometimes called NVRAM variable shadowing, is the foundation of this vulnerability.

    Insyde H2O's firmware update subsystem relies on two NVRAM variables to communicate a signing certificate between drivers:

    • SecureFlashSetupMode: a trigger variable read by SecurityStubDxe to activate certificate-based verification.
    • SecureFlashCertData: a variable carrying the signing certificate in EFI_SIGNATURE_LIST format, used to authenticate the firmware updater application (isflash.bin).

    In the expected flow, both variables are created as volatile by BdsDxe during the firmware update process. SecurityStubDxe then consumes them to verify that isflash.bin is signed by Insyde's certificate before allowing it to execute. The critical flaw is that SecurityStubDxe does not validate whether these variables are volatile or non-volatile before trusting their contents.


    💣 NVRAM Variable Shadowing

    The root cause of CVE-2025-4275 is that SecurityStubDxe uses a generic library function to read SecureFlashSetupMode and SecureFlashCertData instead of calling the GetVariable runtime service directly. This means it cannot distinguish between a volatile variable set by a trusted BdsDxe and a non-volatile one pre-populated by an attacker (for a detailed explanation of this specific technique, refer to the following repository "TheMalwareGuardian: Exploitation Technique NVRAM Variable Shadowing").

    Скачать инструмент

    As a result, an attacker with local administrator privileges can:

    • Create a non-volatile SecureFlashSetupMode trigger variable before the firmware update flow begins.
    • Create a non-volatile SecureFlashCertData variable containing an attacker-controlled certificate in EFI_SIGNATURE_LIST format.

    On the next boot, SecurityStubDxe will find both variables, treat them as legitimate, and trust any UEFI executable signed with the attacker's certificate, effectively bypassing Secure Boot entirely. No firmware-level interaction, hardware access, or exploitation of a memory corruption primitive is required. The attack surface is simply the UEFI NVRAM write interface, accessible from a privileged OS session.


    💥 Finding & Exploiting the Vulnerability

    The vulnerability was discovered during a security review of a HUAWEI MateBook 14 2023, running an Insyde H2O-based firmware with Secure Boot, firmware password, and other modern security features enabled. Despite these protections, full exploitation was achieved using only OS-level administrator privileges.

    The initial exploitation stage requires a small Windows tool (SFCD) that:

    • Acquires the SeSystemEnvironmentPrivilege privilege necessary to call SetFirmwareEnvironmentVariable.
    • Creates the non-volatile SecureFlashCertData variable containing an attacker-controlled certificate.
    • Creates the non-volatile SecureFlashSetupMode trigger variable set to 1.

    After rebooting, SecurityStubDxe reads both variables and begins trusting anything signed by the attacker's certificate. A practical demonstration of this first stage is the loading of a custom-certificate-signed CrScreenshotDxe UEFI driver, which successfully captures a screenshot of the BIOS Setup screen, with Secure Boot enabled, as proof of arbitrary code execution in the firmware environment.

    An important nuance: the IhisiParamBuffer variable present in CVE-2025-3052 is often locked on Insyde-based platforms, making direct exploitation harder there. CVE-2025-4275 requires no such variable to be writable and does not depend on any memory corruption primitive. The attack works on any Insyde H2O system where the attacker can write to NVRAM, which is the default behavior on unpatched firmware.


    🎯 Attack (Part 1 - Secure Boot Bypass)

    The following describes the end-to-end attack for the initial Secure Boot bypass stage, assuming a privileged attacker with OS-level access:

    1. Generate a custom certificate: The attacker generates a key pair and wraps the public certificate in EFI_SIGNATURE_LIST format.
    2. Set the NVRAM variables: Using the SFCD tool from a Windows Administrator session, the attacker creates non-volatile SecureFlashCertData (containing the custom certificate) and SecureFlashSetupMode (set to 1).
    3. Sign a payload: The attacker signs any UEFI application or driver with their custom private key.
    4. Register the payload: The signed payload is registered as a UEFI driver via the DriverXXXX boot option mechanism, or placed as a boot entry in the UEFI Boot Manager.
    5. Reboot: On the next boot, SecurityStubDxe reads the shadowed NVRAM variables, trusts the attacker's certificate, and allows the signed payload to execute regardless of Secure Boot state.

    🔺 Escalation (Part 2 - DXE Volume Takeover)

    The Secure Boot bypass achieved in Part 1 opens the door to a significantly more impactful second stage: full takeover of the DXE volume, achieved by hijacking the Insyde firmware update process itself.

    The firmware update subsystem in Insyde H2O works as follows: the OS updater places a firmware capsule and the signed updater application (isflash.bin) onto the EFI System Partition, then sets a SecureFlashTrigger=1 flag inside the SecureFlashInfo NVRAM variable. On the next boot, the firmware detects the trigger, disables flash write protections during PEI, and eventually calls LoadImage on isflash.bin after verifying it against the Insyde certificate, the same certificate mechanism that CVE-2025-4275 allows an attacker to replace.

    Three additional technical steps are required to escalate from Secure Boot bypass to DXE takeover:

    • Bypassing SecureFlashCertData deletion : SecureFlashDxe attempts to delete the certificate variable before calling LoadImage, using a naked SetVariable call that cannot remove Insyde Authenticated Write (AW) special variables. The attacker re-sets the certificate as an AW-attributed special variable to survive this deletion attempt.
    • Unlocking InsydeVariableLock: VariableRuntimeDxe sets a global flag (InsydeVariableLock) that prevents creation of AW variables after BDS starts. By registering a UEFI driver via DriverXXXX (which runs before this lock is engaged), the attacker locates the flag in memory by parsing the BdsArchProtocol->Entry hook chain and flips it from 1 to 0.
    • Setting SecureFlashInfo: The SecureFlashInfo variable is normally protected by VariableLockProtocol, but this lock is only engaged at ReadyToBoot. A driver registered via DriverXXXX runs before this event and can freely set SecureFlashTrigger=1 to initiate the firmware update flow.

    Once all three conditions are met, the firmware reboots into update mode, loads the attacker's custom isflash.bin (signed with the attacker's certificate, now trusted due to the shadowed SecureFlashCertData), and executes it with the SPI flash unprotected. From this position, the attacker can write arbitrary content to the DXE volume, installing persistent drivers or modifying firmware components in ways that survive OS reinstallation and most security controls.


    🩹 Fix (Part 3 - Patch Analysis)

    Insyde released a fix as part of the June 10, 2025 patch cycle. The fix was analyzed by comparing two consecutive Dell BIOS updates (one pre-patch, one post-patch) using UEFITool-generated reports and binary diffing via Diaphora.

    The changes were concentrated in three drivers:

    • BdsDxe: Replaced the naked gRT->SetVariable call (which could not remove AW-attributed special variables) with a LibSetSecureVariable call that uses SMM communication and can remove such variables.
    • SecureFlashDxe: Applied the same LibSetSecureVariable replacement, added explicit deletion of SecureFlashSetupMode and SecureFlashCertData at driver entry point, and registered a VariablePolicy for both variables to block their creation from OS-level code.
    • SecurityStubDxe: Minor unrelated fix to the`ExitBootServices event handler; the core vulnerability path remains structurally unchanged.

    The fix is effective under the assumption that an attacker cannot bypass VariablePolicy or LibSetSecureVariable. However, the VariablePolicy default EDK2 implementation uses a global flag internally, which is structurally similar to InsydeVariableLock defeated in Part 2. Physical NVRAM editing via SPI programming hardware would also bypass the fix entirely, though physical attacks are conventionally out of scope for Secure Boot threat models.

    The researcher's recommended remediation, removing NVRAM entirely from the certificate relay mechanism between BdsDxe and SecurityStubDxe, was attempted by Insyde but caused regressions and was deferred to a future engineering cycle.


    📦 Affected Vendors

    Any vendor shipping Insyde H2O-based firmware built before June 10, 2025 is potentially affected. Confirmed status at time of disclosure:

    VendorStatus
    DellFixed - BIOS updates released shortly after embargo end
    LenovoVulnerable - fixes announced, delivery from 2025-07-30 onward
    FrameworkVulnerable - no delivery estimate provided at time of disclosure
    AcerNo advisory or fix published at time of disclosure
    FujitsuNo advisory or fix published at time of disclosure
    HPNo advisory or fix published at time of disclosure
    HuaweiOriginal test device vendor - fix status unknown



    🤝 Research & Collaboration

    Working on something similar? Researching UEFI, Kernel security, exploitation, or another interesting security topic? If you need a hand developing an exploit, exploring a technique, or just want to exchange ideas, don't hesitate to reach out. I'm always open to discussing research, helping where I can, and collaborating on interesting projects. Feel free to contact me on LinkedIn.