rapid7/metasploit-framework

View on GitHub
external/source/exploits/CVE-2022-21882/exploit.h

Summary

Maintainability
Test Coverage
#pragma once
#include <windows.h>
#include <intrin.h>

// Kernel tagWND
#pragma pack(1)
typedef struct _tagWND
{
    HWND hWnd;                   // + 0x00
    ULONG64 OffsetToDesktopHeap; // + 0x08
    ULONG64 state;               // + 0x10
    DWORD dwExStyle;             // + 0x18
    DWORD dwStyle;               // + 0x1C
    BYTE gap[0xa8];
    ULONG64 cbWndExtra;          // + 0xC8
    BYTE gap2[0x18];
    DWORD dwExtraFlag;           // + 0xE8
    BYTE gap3[0x3c];
    ULONG64 pExtraBytes;         // + 0x128
} tagWND;
typedef tagWND* ptagWND;

#pragma pack(1)
typedef struct _tagMENU
{
    ULONG64 field_0;
    ULONG64 field_8;
    ULONG64 field_10;
    ULONG64 field_18;
    ULONG64 field_20;
    ULONG64 obj28;
    ULONG64 field_30;
    ULONG64 field_38;
    DWORD cxMenu;
    DWORD cyMenu;
    ULONG64 field_48;
    ULONG64 spwndNotify;         // + 0x50
    ULONG64 rgItems;             // + 0x58
    ULONG64 field_60;
    ULONG64 field_68;
    ULONG64 field_70;
    ULONG64 field_78;
    ULONG64 field_80;
    ULONG64 field_88;
    ULONG64 field_90;
    PVOID *ref;                  // + 0x98
} tagMENU;
typedef tagMENU* ptagMENU;