[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DBJ9JB2HRWHE6CE724RX21":3,"skill-same:01M7DBJ9JB2HRWHE6CE724RX21":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7DBJ9JB2HRWHE6CE724RX21","windows-kernel",null,"alicewe1\u002Falice_skill","alicewe1","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F102134151?v=4","01M7D9STCM8HAESM958JP0989K","Alice_we","01M7D9STDR22MTD9FTTWPAZNV8",64,"GPL-3.0","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002F_modules\u002Fwindows-kernel\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: windows-kernel-security\ndescription: Guide for Windows kernel internals and security mechanisms used in game protection and low-level research. Use this skill when working with drivers, IRQL-sensitive callbacks, EPROCESS, ETHREAD, MMVAD internals, IOCTL paths, DSE, PatchGuard, HVCI, PiDDBCache, MmUnloadedDrivers, or kernel memory inspection.\nx-alice-class: reverse\n---# Windows Kernel Security\n\n## Overview\n\nThis skill covers Windows kernel internals that matter for game security research: object callbacks, process and image notifications, APC behavior, driver loading, trust enforcement, memory manager structures, and the bookkeeping anti-cheats inspect to detect hostile drivers or hidden executable code.\n\nTreat undocumented structures, offsets, globals, and allocator internals as\nbuild-specific. Verify them against symbols and runtime observations for the\nexact Windows build; use [`research-rigor`](..\u002Fresearch-rigor\u002FSKILL.md) before\ngeneralizing a PoC or forensic heuristic.\n\n## README Coverage\n\n- `Cheat > PatchGuard-related`\n- `Cheat > Driver Signature enforcement`\n- `Cheat > Windows Kernel Explorer`\n- `Cheat > EFI Driver` (cross-reference with game-hacking skill)\n- `Cheat > Vulnerable Driver`\n- `Anti Cheat > Detection:Attach`\n- `Anti Cheat > Detection:Hide`\n- `Anti Cheat > Detection:Vulnerable Driver`\n- `Anti Cheat > Detection:Spoof Stack`\n- `Anti Cheat > Windows Ring3 Callback`\n- `Anti Cheat > Windows Ring0 Callback`\n- `Anti Cheat > Information System & Forensics`\n- `Some Tricks > Windows Ring0`\n- `Windows Security Features`\n\n## Core Kernel Concepts\n\n### Important Structures\n- EPROCESS \u002F ETHREAD\n- KTHREAD \u002F KAPC \u002F KAPC_STATE\n- MMVAD \u002F VAD tree nodes\n- PEB \u002F TEB\n- DRIVER_OBJECT\n- DEVICE_OBJECT\n- IRP (I\u002FO Request Packet)\n\n### Key Tables\n- SSDT (System Service Descriptor Table)\n- IDT (Interrupt Descriptor Table)\n- GDT (Global Descriptor Table)\n- PspCidTable (Process\u002FThread handle table)\n- PiDDBCacheTable \u002F MmUnloadedDrivers \u002F PoolBigPageTable\n\n## User-Mode Kernel Symbol Walking\n\n### Methodology\n```\n- Load local ntoskrnl image (typically C:\\Windows\\System32\\ntoskrnl.exe)\n- Use dbghelp + symbol server path (srv*cache*https:\u002F\u002Fmsdl.microsoft.com\u002Fdownload\u002Fsymbols)\n  to resolve exported symbol RVAs and type information\n- Build structure-aware field lookup:\n  - Query field offset directly (e.g., _EPROCESS.Token)\n  - Enumerate all members of a target struct (_TOKEN, _EPROCESS, etc.)\n  - Search a field name across all known structs (useful when parent type is unknown)\n- Keep symbol path configurable for offline\u002Fprivate symbol repositories\n```\n\n### Why It Matters in Game Security\n```\n- Reduces hardcoded-offset fragility across Windows builds\n- Helps map kernel object layouts used by anti-cheat and drivers\n- Supports rapid adaptation when anti-cheat-relevant fields shift\n  (EPROCESS, ETHREAD, token\u002Fhandle\u002Fsecurity-related members)\n```\n\n### Gadget Scanning Workflow\n```\n- Map executable sections of ntoskrnl image in user mode\n- Scan for short control-flow gadgets (e.g., pop rcx ; ret, jmp rax)\n- Use as a research primitive for:\n  - ROP chain feasibility analysis\n  - Kernel exploit mitigation evaluation\n  - Anti-cheat hardening review against gadget-dependent attack paths\n```\n\n## Security Features\n\n### PatchGuard (Kernel Patch Protection)\n```\n- Protects critical kernel structures\n- Periodic verification checks\n- BSOD on tampering detection\n- Multiple trigger mechanisms\n```\n\n### Driver Signature Enforcement (DSE)\n```\n- Requires signed drivers\n- CI.dll verification\n- Test signing mode\n- WHQL certification\n```\n\n### Virtualization-Based Security (VBS)\n```\nArchitecture:\n- Uses the Windows hypervisor to create an isolated execution environment\n- Splits the system into Virtual Trust Levels (VTLs)\n  - VTL0: Normal world — standard Windows kernel and user-mode processes\n  - VTL1: Secure world — Secure Kernel, security policy enforcement\n- VTL1 is designed to remain isolated from a compromised VTL0, assuming the\n  hypervisor, secure kernel, hardware, and configuration path remain trustworthy\n- Three main buckets:\n  - Memory-protection features (HVCI)\n  - Virtual Trust Levels (VTL0\u002FVTL1 separation)\n  - VBS enclaves (isolated execution for selected workloads)\n```\n\n### Hypervisor-Enforced Code Integrity (HVCI)\n```\n- Also known as Memory Integrity\n- Ensures only trusted, validated code executes in kernel mode\n- Combines Windows hypervisor + Secure Kernel (VTL1) for enforcement\n- Key mechanism: W→X transition restriction\n  - Enforced code pages are not intended to be writable from VTL0\n  - Executability is granted only after the configured code-integrity checks\n- Enforcement pipeline:\n  - Code integrity policy defines what is trusted\n  - Hypervisor memory enforcement via second-stage address translation (EPT\u002FSLAT)\n  - Once a kernel page is validated, strict execution rules are enforced\n- Driver compatibility requirements: drivers must be HVCI-compatible\n```\n\n### Secure Boot\n```\n- UEFI-based boot verification\n- Boot loader chain validation\n- Kernel signature checks\n- DBX (forbidden signatures)\n- Foundation for attestation and DMA-hardening assumptions\n```\n\n## Kernel Callbacks\n\n### Process Callbacks\n```cpp\nPsSetCreateProcessNotifyRoutine\nPsSetCreateProcessNotifyRoutineEx\nPsSetCreateProcessNotifyRoutineEx2\n```\n\n### Thread Callbacks\n```cpp\nPsSetCreateThreadNotifyRoutine\nPsSetCreateThreadNotifyRoutineEx\n```\n\n### Image Load Callbacks\n```cpp\nPsSetLoadImageNotifyRoutine\nPsSetLoadImageNotifyRoutineEx\n```\n\n### Object Callbacks\n```cpp\nObRegisterCallbacks\n\u002F\u002F OB_OPERATION_HANDLE_CREATE\n\u002F\u002F OB_OPERATION_HANDLE_DUPLICATE\n```\n\n### APC \u002F Execution Context\n```cpp\nKeInitializeApc\nKeInsertQueueApc\nKeStackAttachProcess\nRtlWalkFrameChain\n```\n\n### Registry Callbacks\n```cpp\nCmRegisterCallback\nCmRegisterCallbackEx\n```\n\n### Minifilter Callbacks\n```cpp\nFltRegisterFilter\n\u002F\u002F IRP_MJ_CREATE, IRP_MJ_READ, etc.\n```\n\n## Driver Development\n\n### Basic Structure\n```cpp\nNTSTATUS DriverEntry(\n    PDRIVER_OBJECT DriverObject,\n    PUNICODE_STRING RegistryPath\n) {\n    DriverObject->DriverUnload = DriverUnload;\n    DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreate;\n    DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchIoctl;\n    \u002F\u002F Create device, symbolic link...\n    return STATUS_SUCCESS;\n}\n```\n\n### Communication Methods\n- IOCTL (DeviceIoControl)\n- Direct I\u002FO\n- Buffered I\u002FO\n- Shared memory\n\n## Vulnerable Driver Exploitation\n\n### Common Vulnerability Types\n- Arbitrary read\u002Fwrite primitives\n- IOCTL handler vulnerabilities\n- Pool overflow\n- Use-after-free\n\n### Notable Vulnerable Drivers\n```\n- gdrv.sys (Gigabyte)\n- iqvw64e.sys (Intel)\n- MsIo64.sys\n- Mhyprot2.sys (Genshin Impact)\n- dbutil_2_3.sys (Dell)\n- RTCore64.sys (MSI)\n- Capcom.sys\n```\n\n### Exploitation Steps\n1. Load vulnerable signed driver\n2. Trigger vulnerability\n3. Achieve kernel read\u002Fwrite\n4. Disable DSE or load unsigned driver\n5. Execute arbitrary kernel code\n\n## PatchGuard Bypass Techniques\n\n### Timing-Based\n- Predict PG timer\n- Modify between checks\n\n### Context Manipulation\n- Exception handling\n- DPC manipulation\n- Thread context tampering\n\n### Hypervisor-Based\n- EPT manipulation\n- Memory virtualization\n- Intercept PG checks\n\n## Kernel Hooking\n\n### ETW (Event Tracing for Windows)\n```\n- InfinityHook technique\n- HalPrivateDispatchTable\n- System call tracing\n```\n\n## ETW Internals\n\n### Provider \u002F Consumer Model\n```\nArchitecture:\n- Providers: kernel or user-mode components that emit events\n  - Manifest-based providers (registered via wevtutil)\n  - TraceLogging providers (self-describing, no manifest)\n  - MOF providers (legacy WMI-based)\n- Consumers: tools that subscribe to and process events\n  - Real-time consumers (ETW sessions)\n  - Log file consumers (.etl files)\n- Controllers: manage sessions (xperf, tracelog, logman)\n\nKey kernel providers:\n  Microsoft-Windows-Kernel-Process (process\u002Fthread lifecycle)\n  Microsoft-Windows-Kernel-File (file I\u002FO)\n  Microsoft-Windows-Kernel-Audit-API-Calls (security-sensitive APIs)\n```\n\n### ThreatIntel ETW Provider\n```\n- Microsoft-Windows-Threat-Intelligence\n- Available to PPL (Protected Process Light) and above\n- Events: NtReadVirtualMemory, NtWriteVirtualMemory, NtMapViewOfSection on protected processes\n- Used by EDR and anti-cheat for detecting memory access to protected processes\n- Attackers target: patch EtwThreatIntProvRegHandle or EtwpEventWriteFull\n```\n\n### Common ETW Bypass Patterns\n```\n- Patch EtwEventWrite in ntdll.dll (user-mode ETW silencing)\n- Patch nt!EtwpEventWriteFull in kernel (kernel-mode ETW silencing)\n- NtSetInformationThread(ThreadHideFromDebugger) — hides thread from ETW\n- Remove provider registration by walking EtwRegistration list\n- EPT-based protection can defend ETW structures from tampering\n```\n\n## Kernel Segment Heap Architecture\n\n### Timeline\n```\nWindows NT ~ 1809   : Legacy NT Pool Manager (ExAllocatePoolWithTag)\nWindows 10 19H1     : Kernel Segment Heap introduced (March 2019, build 1903)\n                      └─ User-mode Segment Heap ported to the kernel\nWindows 10 2004     : ExAllocatePool2 \u002F ExAllocatePool3 added\n                      └─ ExAllocatePoolWithTag officially deprecated\nWindows 10 20H2~    : Dynamic KDP (Kernel Data Protection) stabilized\nWindows 11          : VBS\u002FHVCI enabled by default; Secure Pool usage expanded\n\nCommon misconception: Many sources claim \"the Segment Heap was introduced\nin Windows 10 2004,\" but the kernel segment heap was actually introduced\nin 19H1 (1903). Windows 10 2004 added the new Pool APIs built on top of it.\n```\n\n### Legacy NT Pool Structure (_POOL_HEADER, pre-19H1)\n```\n_POOL_HEADER (16 bytes, x64):\nOffset  Field           Size   Description\n0x00    PoolIndex        1 B    Pool descriptor index\n0x01    PreviousSize     1 B    Previous chunk size\n0x02    PoolType         1 B    Pool type (Paged, NonPaged, etc.)\n0x03    BlockSize        1 B    Current chunk size (>> 4)\n0x04    PoolTag          4 B    4-byte ASCII tag\n0x08    ProcessBilled    8 B    KPROCESS pointer (valid only with PoolQuota)\n\nMemory layout:\n[POOL_HEADER 16B][user data ...][POOL_HEADER 16B][user data ...]\n      ↑ plaintext, predictable        ↑ adjacent → overwritable\n\nSecurity weaknesses:\n- Pool Walking: traverse chunks linearly via BlockSize\n- Pool Overflow: corrupt adjacent header for arbitrary write on free\n- PoolIndex Overwrite: OOB dereference into pool descriptor array\n- ProcessBilled Overwrite: arbitrary address dereference on free path\n\nWindows 8 partial mitigation:\n  ProcessBilled = KPROCESS_PTR ^ ExpPoolQuotaCookie ^ CHUNK_ADDR\n  But plaintext _POOL_HEADER remained until 19H1.\n```\n\n### _SEGMENT_HEAP Core Structure\n```\nEach pool type is managed by its own independent _SEGMENT_HEAP instance.\n\n_SEGMENT_HEAP (illustrative kernel offsets observed for 20H2; verify symbols):\n0x000   EnvHandle (10 B)     — heap environment handle\n0x010   Signature (4 B)      — commonly 0xDDEEDDEE on this layout\n0x028   UserContext (8 B)\n0x048   AllocatedBase (8 B)  — LFH structure allocation base\n0x058   SegContexts[2] (0x180 B) — segment context array\n0x100   VsContext (0xC0 B)   — VS allocator context\n0x280   LfhContext (0x4C0 B) — LFH allocator context\nhigher  LargeAllocMetadata   — large allocation metadata\nhigher  LargeReservedPages \u002F LargeCommittedPages\n\nPer pool type instances (nt!PoolVector \u002F HEAP_POOL_NODES):\n├── NonPagedPool (NP)       → _SEGMENT_HEAP instance #1\n├── NonPagedPoolNx (NPNx)   → _SEGMENT_HEAP instance #2  ← primary target\n├── PagedPool (PP)          → _SEGMENT_HEAP instance #3\n├── PagedPoolSession        → _SEGMENT_HEAP stored in current thread\n└── (other special pools)\n```\n\n### Allocation Routing Flow\n```\nExAllocatePoolWithTag \u002F ExAllocatePool2 \u002F ExAllocatePool3\n        │\n        ▼\n  ExAllocateHeapPool (internal)\n        │\n        ├─ size ≤ 0x200 AND LFH activated  ──▶  kLFH\n        │   └─ RtlpHpLfhContextAllocate\n        │\n        ├─ 0x1e1 ≤ size ≤ 0xfe0            ──▶  VS Allocator\n        │   └─ RtlpHpVsContextAllocateInternal\n        │\n        ├─ page-aligned (0x20000~0x7f0000)  ──▶  Segment Allocator\n        │   └─ RtlpHpSegAlloc\n        │\n        └─ large (> 0x7f0000)              ──▶  Large Allocator\n            └─ RtlpHpLargeAlloc\n```\n\n### kLFH (Low Fragmentation Heap)\n```\nSize range:       ≤ 0x200 bytes (512 B), when LFH activated for that size class\nActivation:       After 18 consecutive allocations of the same size\nKey function:     RtlpHpLfhContextAllocate\nChunk header:     _POOL_HEADER (16 B, still present)\nMetadata:         _HEAP_LFH_SUBSEGMENT (isolated, not inline)\nBucket count:     129 (Buckets[129])\n\nBucket structure:\n_HEAP_LFH_CONTEXT\n└── Buckets[129]\n     ├── Bucket #0:   size 1~8 B\n     ├── Bucket #1:   size 9~16 B\n     ├── ...\n     └── Bucket #128: size ~0x1FF B\n         (each bucket has AffinitySlots → _HEAP_LFH_SUBSEGMENT)\n\nSecurity properties:\n- Block placement within subsegment is randomized\n- Next allocation position managed through FreeHint, encoded with LfhKey\n- Adjacent chunk overflow cannot directly corrupt management structure\n```\n\n### VS Allocator (Variable Size)\n```\nSize range:       (a) ≤ 0x1e0 && LFH inactive; (b) 0x1e1~0xfe0;\n                  (c) 0x1001~0xffff && non-page-aligned\nKey function:     RtlpHpVsContextAllocateInternal\nChunk header:     _HEAP_VS_CHUNK_HEADER (16 B, HeapKey XOR encoded)\nFree management:  Red-Black Tree (FreeChunkTree)\nAlgorithm:        Best-fit\n\n_HEAP_VS_CHUNK_HEADER (allocated state):\n┌──────────────────────────────────────────────────────────┐\n│  Sizes (8 B) — XOR encoded: HeaderBits ^ self_addr ^ HeapKey\n│    ├─ UnsafeSize      : chunk size \u002F 16\n│    ├─ UnsafePrevSize  : previous chunk size \u002F 16\n│    ├─ MemoryCost      : pages occupied\n│    └─ UnusedBytes     : whether unused bytes exist\n│  EncodedSegmentPageOffset (1 B)\n│    — (self_addr ^ self ^ HeapKey) & 0xFF\n│    — page distance to VS subsegment start\n└──────────────────────────────────────────────────────────┘\n\nMemory layout:\n[_HEAP_VS_CHUNK_HEADER 16B][_POOL_HEADER 16B][user data ...]\n       ↑ HeapKey XOR             ↑ PoolTag etc. still present\n\nVS subsegment structure (_HEAP_VS_SUBSEGMENT):\n├── ListEntry      — subsegment linked list\n├── CommitBitmap   — page commit state bitmap\n├── CommitLock     — lock used during commit\n├── Size (2 B)     — subsegment size (>> 4)\n└── Signature (15 bit) + FullCommit (1 bit) — integrity check\n```\n\n### Segment Allocator (Backend)\n```\nSize range #1:    0x20000 \u003C size ≤ 0x7f000 (128 KB ~ 508 KB)\nSize range #2:    0x7f000 \u003C size ≤ 0x7f0000 (508 KB ~ ~7 MB)\nCore structure:   _HEAP_PAGE_SEGMENT + 256 page descriptors\nSegment mask:     0xFFFFFFFFFFF00000\n\nThe kernel uses two independent SegContexts (unlike user-mode's single context).\n\nPage segment signature encoding:\ncheck = page_segment ^ page_segment->Signature\n      ^ 0xA2E64EADA2E64EAD ^ RtlpHpHeapGlobals.HeapKey\n```\n\n### Large Allocator\n```\nSize range:       > 0x7f0000 (typically page-aligned)\nKey function:     RtlpHpLargeAlloc\nMetadata:         _SEGMENT_HEAP.LargeAllocMetadata\nTracking:         BigPagePoolTable (PoolTrackTable)\nNo inline header; metadata recorded externally.\n```\n\n### Header Layout Per Allocation Path\n```\nPath          Memory layout (chunk start → user data)\n────────────────────────────────────────────────────────────────\nkLFH          [_POOL_HEADER 16B] [data]\nVS            [_HEAP_VS_CHUNK_HEADER 16B] [_POOL_HEADER 16B] [data]\nSegment       [_HEAP_PAGE_SEGMENT header] ... [page descriptors]\nLarge         Metadata in BigPagePoolTable; no inline header\nCacheAligned  [_POOL_HEADER #1] ... [_POOL_HEADER #2 (CacheAligned)] [data]\n```\n\n### Residual _POOL_HEADER Under Segment Heap\n```\n_POOL_HEADER was not fully removed. Remaining usage:\n\nField           Status under Segment Heap\nPoolTag         Still recorded (for debugging\u002Ftracing)\nPoolType        Recorded, not used for allocator selection on free\nBlockSize       Unused in VS path; still present in kLFH\nPreviousSize    Unused, set to 0\nPoolIndex       Unused, set to 0\nProcessBilled   Valid only with PoolQuota flag (encoded with ExpPoolQuotaCookie)\n```\n\n### Pointer Encoding Mechanisms\n```\nGlobal key structure: _RTLP_HP_HEAP_GLOBALS (nt!RtlpHpHeapGlobals)\nGenerated randomly at boot time; global in ntoskrnl.\n\n{\n    UINT64 HeapKey;   \u002F\u002F VS Allocator + Segment Allocator header encoding\n    UINT64 LfhKey;    \u002F\u002F LFH callback pointer encoding\n}\n\nEncoding formulas:\n\nVS chunk header — Sizes field:\n  encoded = (real Sizes) ^ (address of vs_chunk_header) ^ HeapKey\n\nVS chunk — EncodedSegmentPageOffset:\n  encoded = ((real page distance) ^ vs_chunk_header ^ HeapKey) & 0xFF\n\nSegment context signature:\n  check = page_segment ^ page_segment->Signature\n        ^ 0xA2E64EADA2E64EAD ^ HeapKey\n\nLFH callback function pointer:\n  encoded = real function address ^ HeapKey ^ address of LfhContext\n\nProcessBilled (POOL_HEADER, Windows 8+):\n  encoded = KPROCESS_PTR ^ ExpPoolQuotaCookie ^ CHUNK_ADDR\n\nImplications for attackers:\n- Must leak HeapKey and LfhKey from RtlpHpHeapGlobals\n- Must know chunk's own virtual address (self-referential XOR)\n- Failing encoding validation triggers:\n  BugCheck 0x139 (KERNEL_SECURITY_CHECK_FAILURE) or\n  BugCheck 0x13A (KERNEL_MODE_HEAP_CORRUPTION)\n```\n\n### Dynamic Lookaside and Delay Free\n```\nDynamic Lookaside:\n_HEAP_VS_CONTEXT\n└── Lookaside buckets (_RTL_DYNAMIC_LOOKASIDE)\n     ├── Per-size singly-linked lists\n     ├── Depth (2 B)     — current list depth\n     └── NextEntry (8 B) — pointer to next cached chunk\n\nRebalancing (every 3 Balance Set Manager scans):\n- alloc count \u003C 25 → Depth decreases by 10\n- miss ratio ≥ 0.5% → Depth increases\n- miss ratio \u003C 0.5% → Depth decreases by 1\n- Range: minimum 4 ~ MaximumDepth\n\nDelay Free (VS Allocator):\n- size \u003C 1 KB AND Config.Flags bit 4 == 1:\n  → stored in DelayFreeContext list\n  → batch freed after 32 entries accumulate\n- Otherwise: inserted immediately into FreeChunkTree\n- Security: disrupts UAF timing (cannot immediately reuse freed chunk)\n```\n\n### New Pool APIs: ExAllocatePool2 \u002F ExAllocatePool3\n```\nEvolution:\nExAllocatePool                 (legacy, no tag)\nExAllocatePoolWithTag          (pre-19H1 standard, deprecated in 2004)\nExAllocatePoolWithTagPriority  (priority support)\nExAllocatePoolWithQuotaTag     (quota tracking)\n        ↓\nExAllocatePool2                (general case, zero-initialized by default)\nExAllocatePool3                (extended parameters, priority + Secure Pool)\n\nExAllocatePool2:\n  PVOID ExAllocatePool2(POOL_FLAGS Flags, SIZE_T NumberOfBytes, ULONG Tag);\n  - Zero-initialized by default (no RtlZeroMemory needed)\n  - Returns NULL on failure by default\n  - POOL_FLAG_RAISE_ON_FAILURE converts to exception\n  - POOL_FLAG_USE_QUOTA integrates legacy PoolQuota\n\nExAllocatePool3:\n  PVOID ExAllocatePool3(POOL_FLAGS Flags, SIZE_T NumberOfBytes, ULONG Tag,\n                        PCPOOL_EXTENDED_PARAMETER ExtendedParameters, ULONG Count);\n  Extended parameter types:\n  - PoolExtendedParameterPriority: allocation priority (e.g., HighPoolPriority)\n  - PoolExtendedParameterSecurePool: KDP Secure Pool (VTL0 write-protected)\n\nDown-level compatibility:\n  #define POOL_ZERO_DOWN_LEVEL_SUPPORT\n  ExInitializeDriverRuntime(DriversRuntimeInitSupportFlags);\n  → ExAllocatePool2 internally falls back to alloc + memset on older OS\n```\n\n### Kernel Data Protection (KDP) and Secure Pool\n```\nKDP leverages Segment Heap's Secure Pool feature to allocate\nkernel memory whose ordinary VTL0 writes are blocked while the VTL1 policy,\nhypervisor, and configuration path remain trustworthy.\n\nIllustrative implementation layout (verify on the target build):\n  Dedicated Secure Pool region (reported as one PML4 entry on relevant builds)\n  Base address: randomized at boot\n  Managed by: Secure Kernel (VTL1)\n  VTL0 writes: blocked via NAR (Node Address Range)\n\nInitialization flow:\n1. NT Memory Manager boot Phase 1\n2. Randomly calculate 512 GB Secure Pool virtual address\n3. INITIALIZE_SECURE_POOL Secure Call → Secure Kernel\n4. Secure Kernel creates NAR + initializes NTE (Node Table Entry)\n\nAnti-cheat usage:\n  \u002F\u002F Create Secure Pool context\n  ExCreatePool(POOL_FLAG_NON_PAGED, tag, &securePoolHandle);\n\n  \u002F\u002F Allocate detection rule table (immutable after init)\n  POOL_EXTENDED_PARAMS_SECURE_POOL sp = {\n      .Cookie           = MY_COOKIE,\n      .SecurePoolHandle = securePoolHandle,\n      .Buffer           = &detectionRuleTable,\n      .SecurePoolFlags  = SECURE_POOL_FLAGS_FREEABLE\n      \u002F\u002F MODIFIABLE flag omitted → write-protected after init\n  };\n  g_DetectionRules = ExAllocatePool3(POOL_FLAG_NON_PAGED,\n      sizeof(detectionRuleTable), 'DRul', &extParams, 1);\n  \u002F\u002F Protected from ordinary VTL0 writes while KDP policy remains intact\n```\n\n### Attack Technique Evolution (Segment Heap Era)\n```\nTechnique comparison:\nTechnique                    NT Pool (pre-19H1)    Segment Heap (19H1+)\n─────────────────────────────────────────────────────────────────────────\nAdjacent header overwrite    Direct metadata       Encoding\u002Fcookies complicate use\nPool Walking                 Legacy linear walk    Path-specific metadata\u002Fsymbols needed\nProcessBilled overwrite      Requires Win8+ cookie Requires cookie + HeapKey\nkLFH pool spray              Predictable           Possible but needs precise control\nVS FreeChunkTree corruption  N\u002FA                   Requires HeapKey bypass\nLarge chunk BigPool tracking PoC exists             PoC exists (PoolTrackTable)\n\nModern kLFH exploit requirements:\n1. Find target object of same size (same kLFH bucket)\n2. Target must contain exploitable members (pointer, function table)\n3. Target allocation must be triggerable from user mode\n4. Vulnerable and target objects must be in same pool type\n   (NonPagedPoolNx and PagedPool use separate _SEGMENT_HEAP instances)\n\nVS chunk overflow recovery (must restore to avoid BugCheck):\n  ghost_chunk->Sizes.HeaderBits =\n      (real_sizes) ^ (ULONG_PTR)ghost_chunk ^ HeapKey;\n  ghost_chunk->EncodedSegmentPageOffset =\n      ((real_page_offset) ^ (ULONG_PTR)ghost_chunk ^ HeapKey) & 0xFF;\n  \u002F\u002F Failure → BugCheck 0x13A\n\nRequired pre-exploit leak values:\nSymbol                          Purpose               Source\nnt!RtlpHpHeapGlobals           HeapKey, LfhKey        Pattern scan ExFreePoolWithTag\nnt!ExpPoolQuotaCookie           Decode ProcessBilled   Pattern scan ExAllocatePoolWithQuotaTag\nnt!PsInitialSystemProcess      EPROCESS chain         ntoskrnl import analysis\nChunk's own virtual address    Self-referential XOR   Requires info-leak primitive\n```\n\n### BugCheck Codes (Segment Heap Related)\n```\nCode    Name                               Trigger\n0x139   KERNEL_SECURITY_CHECK_FAILURE      VS\u002FLFH header integrity check failure\n0x13A   KERNEL_MODE_HEAP_CORRUPTION        Heap metadata corruption detected\n0xC5    DRIVER_CORRUPTED_EXPOOL            Pool accessed at incorrect IRQL\n0x19    BAD_POOL_HEADER                    _POOL_HEADER validation failure (LFH path)\n```\n\n## Pool Allocation & Forensics\n\n### Pool Forensics Artifacts\n```\nPiDDBCacheTable:\n- Tracks historically loaded drivers by hash + timestamp\n- Anti-cheat inspects this to detect BYOVD or test-signed driver loads\n- Attackers attempt to remove entries post-load\n\nMmUnloadedDrivers:\n- Circular buffer of recently unloaded drivers (name + address range)\n- Cannot be cleared from user mode\n- Anti-cheat uses to detect load-unload-reload patterns\n\nPoolBigPageTable:\n- Maps large pool allocations (>= PAGE_SIZE) to owning driver tag\n- Used for: identifying hidden drivers, finding leaked pool allocations\n- Anti-cheat walks this to detect manually mapped driver memory\n```\n\n### Pool Tag Forensics\n```\n- ExAllocatePoolWithTag \u002F ExAllocatePool2: every allocation carries a 4-byte tag\n- Pool tag scanning: identify driver presence by known tags\n- Tool: pooltag.txt (Microsoft), PoolMon, WinDbg !poolfind\n- Anti-cheat technique: scan pool tags for known cheat driver signatures\n```\n\n### Modern Pool Scanning (Segment Heap Era)\n```\nLegacy method (pre-19H1) — NO LONGER WORKS:\n  Follow BlockSize in inline header to traverse linearly.\n  PPOOL_HEADER h = startAddr;\n  while (h->BlockSize != 0) {\n      if (h->PoolTag == TARGET_TAG) { \u002F* ... *\u002F }\n      h += h->BlockSize;  \u002F\u002F Invalid under segment heap\n  }\n\nModern alternatives:\n\nBigPool detection (Large Alloc path):\n  Reference nt!PoolBigPageTable (or nt!PoolTrackTable)\n  └─ Traverse BigPagePoolTable entries\n  └─ Find allocations without corresponding driver objects\n\nSmall allocation detection:\n  _SEGMENT_HEAP → VsContext → SubsegmentList traversal\n  _SEGMENT_HEAP → LfhContext → Buckets[] → AffinitySlots → Subsegments\n\nVS Chunk Header decoding (requires HeapKey):\n  real_sizes = encoded_header ^ chunk_address ^ HeapKey\n  → Decode to determine chunk size, PoolTag, allocation legitimacy\n\nAnti-cheat scanning targets:\n- Suspicious PoolTags: cheat drivers use custom\u002Frare tags; maintain blacklist\n- Executable permission pages: NonPagedPool chunks with X permission\n  from suspicious sources (no corresponding loaded module)\n- Shellcode patterns: scan decoded chunk contents for known cheat signatures,\n  ROP gadgets, specific syscall sequences\n- kLFH allocation pattern anomalies: unusual allocation patterns in\n  specific size buckets can indicate pool grooming\n\nWinDbg commands:\n  dt nt!_RTLP_HP_HEAP_GLOBALS nt!RtlpHpHeapGlobals  \u002F\u002F HeapKey, LfhKey\n  dt nt!_SEGMENT_HEAP \u003Caddress>\n  dt nt!_HEAP_VS_CHUNK_HEADER \u003Caddress>\n  dt nt!_HEAP_LFH_CONTEXT \u003Caddress>\n  !pool \u003Caddress>\n  !poolfind \u003CTag> [pool_type]\n  !poolused [flags]                    \u002F\u002F stats by PoolTag\n  dt nt!_POOL_TRACKER_BIG_PAGES nt!PoolBigPageTable\n\nVS chunk header decode (manual):\n  HeaderBits_raw = poi(\u003Cchunk_addr>)\n  real Sizes = HeaderBits_raw ^ \u003Cchunk_addr> ^ HeapKey\n```\n\n### Driver Development Migration Checklist\n```\n□ ExAllocatePoolWithTag          → ExAllocatePool2\n□ ExAllocatePool (without tag)   → Remove or ExAllocatePool2\n□ ExAllocatePoolWithTagPriority  → ExAllocatePool3 + Priority param\n□ ExAllocatePoolWithQuotaTag     → ExAllocatePool2 + POOL_FLAG_USE_QUOTA\n□ RtlZeroMemory after alloc     → Remove (ExAllocatePool2 zero-initializes)\n□ Review POOL_FLAG_RAISE_ON_FAILURE (NULL check vs exception)\n□ Critical read-only data       → ExAllocatePool3 + Secure Pool\n```\n\n### SSDT Hooking (Legacy)\n```\n- Modify service table entries\n- Requires PG bypass\n- High detection risk\n```\n\n### IRP Hooking\n```\n- Hook driver dispatch routines\n- Less monitored than SSDT\n- Per-driver targeting\n```\n\n## Memory Manipulation\n\n### Physical Memory Access\n```cpp\nMmMapIoSpace\nMmCopyMemory\n\\\\Device\\\\PhysicalMemory\n```\n\n### Virtual Memory\n```cpp\nZwReadVirtualMemory\nZwWriteVirtualMemory\nKeStackAttachProcess\nMmCopyVirtualMemory\n```\n\n### MDL Operations\n```cpp\nIoAllocateMdl\nMmProbeAndLockPages\nMmMapLockedPagesSpecifyCache\n```\n\n## Research Tools\n\n### Analysis\n- WinDbg \u002F WinDbg Preview\n- Process Hacker \u002F System Informer\n- OpenArk\n- WinArk\n\n### Utilities\n- KDU (Kernel Driver Utility)\n- OSR Driver Loader\n- DriverView\n\n### Monitoring\n- Process Monitor\n- API Monitor\n- ETW consumers\n\n## EFI\u002FBoot-Time Threats\n\n### EFI Driver Cross-Reference\n```\nThe README's > EFI Driver subcategory (under Cheat) contains 30+ projects:\n- EFI bootkit frameworks: UEFI DXE drivers that persist across boots\n- Boot-time memory mappers: inject code before Windows kernel initializes\n- ExitBootServices hooks: intercept Windows boot handoff\n- EFI runtime service abuse: GetVariable\u002FSetVariable for kernel ↔ EFI comm\n\nSee also: game-hacking skill for EFI cheat workflows\n```\n\n### Boot-Time Access\n```\n- EFI runtime services persist after ExitBootServices\n- DXE (Driver Execution Environment) phase: full hardware access\n- Pre-kernel execution: no DSE, no PatchGuard, no HVCI enforcement\n- Secure Boot is the primary mitigation (firmware signature verification)\n```\n\n### Memory Access\n```\n- GetVariable\u002FSetVariable: pass data between EFI and OS runtime\n- Runtime memory mapping via EFI memory map\n- Physical memory access before Windows memory manager initializes\n- ACPI table injection for persistent low-level modifications\n```\n\n## Hypervisor Development\n\n### Hypervisor Types\n```\nType 1 (bare-metal):\n- Runs directly on hardware\n- Examples: VMware ESXi, Microsoft Hyper-V, Xen\n- Used for VBS, production security enforcement\n\nType 2 (hosted):\n- Runs on top of a host operating system\n- Examples: Oracle VirtualBox, VMware Workstation\n- Common for research, development, and testing\n```\n\n### Hardware Virtualization Platforms\n```\nIntel VT-x:\n- Introduced 2005, widely supported on modern Intel CPUs\n- Foundation for VMCS, EPT, VM exits\n\nAMD-V (SVM):\n- AMD's counterpart to VT-x, also introduced 2005\n- VMCB structure, NPT (Nested Page Tables)\n\nARM Virtualization Extensions:\n- EL2 (hypervisor mode) and stage-2 memory translation\n- Used on ARM platforms for mobile and embedded security\n```\n\n### Intel VT-x Core Concepts\n\n#### VMCS (Virtual Machine Control Structure)\n```\nCentral data structure for Intel VT-x:\n- Describes guest state, host state, and virtualization controls\n- Tells the processor:\n  - What state to restore on VM entry\n  - What state to save on VM exit\n  - Which events transfer control back to the hypervisor\n\nGuest\u002FHost State Areas:\n- Control registers (CR0, CR3, CR4)\n- Segment registers (CS, SS, DS, ES, FS, GS)\n- Debug registers (DR7 — hardware breakpoints)\n- Descriptor-table registers (GDTR, IDTR)\n- Key fields:\n  - CR3: root of guest page tables, central to virtual memory\n  - GDTR\u002FIDTR: Global\u002FInterrupt Descriptor Tables\n  - CS\u002FSS: code and stack segments\n  - DR7: hardware breakpoint control\n\nControl Fields:\n- Pin-based controls\n- Primary processor-based controls\n- Secondary processor-based controls\n- Events that cause VM exits:\n  - CPUID interception\n  - INVLPG interception\n  - Control-register access\n  - EPT violations\n  - MSR access\n```\n\n#### EPT (Extended Page Tables)\n```\nIntel's implementation of SLAT (Second-Level Address Translation):\n- Gives the hypervisor independent control over guest memory\n- Two-stage address translation pipeline:\n  1. GVA → GPA: Guest Virtual → Guest Physical (via guest page tables, rooted at CR3)\n  2. GPA → HPA: Guest Physical → Host Physical (via EPT, rooted at EPTP in VMCS)\n- Guest believes it owns its own memory mappings\n- Hypervisor has a second, independent layer controlling:\n  - What physical memory is reachable\n  - What permissions apply (read\u002Fwrite\u002Fexecute)\n\nEPT Hierarchy:\n- PML4 → PDPT → PD → PT (4-level page table)\n- Each entry carries read\u002Fwrite\u002Fexecute permissions\n- EPT violations trigger VM exits when access permissions are violated\n\nPage Table Entries (PTE):\n- Maps GVA to GPA\n- Carries: read\u002Fwrite, supervisor-only, caching, software-defined bits\n- Guest PTEs and EPT serve different roles:\n  - Guest PTE: controls guest's view of memory\n  - EPT: controls hypervisor's view of the guest\n```\n\n#### VM Exits & VMCALL\n```\nVM Exits:\n- Occur when configured events happen in the guest\n- Triggers: CPUID, CR access, I\u002FO instructions, EPT violations, MSR access\n- On exit: processor saves guest state (per VMCS), restores host state,\n  records exit reason for hypervisor handler\n\nVMCALL:\n- Guest intentionally transfers control to hypervisor\n- Similar in concept to a system call (guest → hypervisor)\n- Used for guest-hypervisor communication interfaces\n```\n\n#### Nested Virtualization\n```\n- Running a hypervisor inside a VM managed by another hypervisor\n- Useful for research, testing, and development\n- Adds complexity: multiple layers participate in the same virtualization flow\n- Relevant for testing hypervisor-based defense under VMware\u002FHyper-V\n```\n\n### AMD-V (SVM)\n- VMCB (Virtual Machine Control Block) structure\n- NPT (Nested Page Tables) — AMD's SLAT equivalent\n- SVM operations (VMRUN, VMSAVE, VMLOAD)\n\n### Use Cases\n- Memory hiding\n- Syscall interception\n- Security monitoring\n- Anti-cheat evasion\n- EPT-based memory protection and introspection\n\n### Windows Hypervisor Platform (WHP) API\n```\nUser-mode hypervisor interface (Windows 10+):\n- WHvCreatePartition \u002F WHvSetupPartition: create VM partition\n- WHvCreateVirtualProcessor: add vCPU\n- WHvMapGpaRange: map host memory into guest physical address space\n- WHvRunVirtualProcessor: enter guest execution, blocks until VM exit\n- WHvGetVirtualProcessorRegisters \u002F Set: read\u002Fwrite guest CPU state\n\nKey capability:\n- Enables hypervisor-assisted analysis from user mode (no kernel driver)\n- Page-level trap handling: set R\u002FW\u002FX permissions per guest page\n- VM exit reasons: memory access violation, CPUID, MSR access, I\u002FO port, syscall\n- Controlled execution: the host controls modeled guest CPU state and mapped\n  memory; external timing, devices, concurrency, and unmodeled dependencies\n  still need explicit handling\n\nPrerequisites:\n- Enable Windows features: Microsoft-Hyper-V-Hypervisor + HypervisorPlatform\n- Hardware: VT-x or AMD-V support\n- Note: WHP coexists with Hyper-V but conflicts with some third-party hypervisors\n\nSee also: reverse-engineering skill → User-Mode Hypervisor-Assisted Tracing\nfor analysis workflows built on WHP\n```\n\n## Hypervisor-Based Defense\n\n### Concept\n```\n- Security approach using virtualization primitives to enforce protections\n  from a higher privilege level than the guest kernel\n- Moves security decisions into an isolated execution environment\n  that a compromised kernel cannot easily tamper with\n- Present across major OS platforms:\n  - Windows: Virtualization-Based Security (VBS)\n  - Android: Android Virtualization Framework (AVF)\n  - Apple: Secure execution environments, hardware-backed isolation\n```\n\n### EPT Hooks as Defensive Primitives\n```\nMechanism:\n- Instead of patching the guest kernel, modify EPT permissions\n- Specific memory accesses trigger EPT violations → VM exit\n- Hypervisor inspects the access and decides: allow, deny, or log\n\nExample: Watching writes to a sensitive region\n1. Remove write permission from the EPT entry for target region\n2. Guest runs normally until it attempts a write to that region\n3. EPT violation → VM exit → hypervisor receives control\n4. Hypervisor evaluates context:\n   - Which module performed the access\n   - What memory was touched\n   - Whether the access is authorized\n5. Decision: allow write, deny and return, or log and continue\n\nAdvantages over traditional kernel hooks:\n- Operate outside the guest OS\n- Can remain effective after guest-kernel compromise if the hypervisor and\n  policy\u002Fconfiguration channel remain trustworthy\n- Avoid guest-kernel patching, although hypervisor presence and effects may be\n  observable\n- Ordinary guest-kernel writes cannot directly remove correctly enforced\n  second-stage permissions\n```\n\n### Protectable Assets via EPT\n```\n- Executable pages of EPP (Endpoint Protection Platform) drivers\n  → Prevents silent patching of security software\n- ETW-related structures\n  → Unauthorized writes fault into hypervisor\n- Callback\u002Fcallout\u002Froutine lists (PsSetCreateProcessNotifyRoutine, etc.)\n  → Write authorization moved outside the guest kernel\n- Critical kernel data structures\n  → PatchGuard-protected regions, SSDT, IDT\n```\n\n### Threat Model for Hypervisor Defense\n```\nAssumes kernel compromise has already happened:\n- Attacker has kernel code execution\n- Attacker can load vulnerable drivers (BYOVD)\n- Attacker can modify kernel memory\n- Traditional kernel-resident protections are untrustworthy\n\nHypervisor advantage:\n- Sits above the guest kernel in privilege hierarchy\n- Enforces policies from a higher privilege layer\n- Guest-kernel rootkits cannot directly rewrite hypervisor policy under the\n  stated threat model; hypervisor vulnerabilities, DMA\u002FSMM, configuration\n  weaknesses, and hardware compromise remain separate attack paths\n```\n\n### Attack Scenario: BYOVD vs EPT Protection\n```\nWithout hypervisor defense:\n1. Attacker loads vulnerable signed driver\n2. Gains kernel R\u002FW primitives\n3. Patches callback list to remove EPP callbacks\n4. EPP is blinded — attacker operates undetected\n\nWith EPT-based defense:\n1. Attacker loads vulnerable signed driver\n2. Gains kernel R\u002FW primitives\n3. Attempts to patch callback list\n4. EPT violation triggers VM exit\n5. Hypervisor catches the write, evaluates context\n6. Write is denied — callback list remains intact\n```\n\n## Resource Organization\n\nThe README contains categorized links for:\n- PatchGuard research and bypasses\n- DSE bypass techniques\n- Vulnerable driver exploits\n- Kernel callback enumeration\n- ETW\u002FPMI\u002FNMI handlers\n- Intel PT integration\n\n---\n\n## Data Source\n\n**Important**: This skill provides conceptual guidance and overview information. For detailed information use the following sources:\n\n### 1. Project Overview & Resource Index\n\nFetch the main README for the full curated list of repositories, tools, and descriptions:\n\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002FREADME.md\n```\n\nThe main README contains thousands of curated links organized by category. When users ask for specific tools, projects, or implementations, retrieve and reference the appropriate sections from this source.\n\n### 2. Repository Code Details (Archive)\n\nFor detailed repository information (file structure, source code, implementation details), the project maintains a local archive. If a repository has been archived, **always prefer fetching from the archive** over cloning or browsing GitHub directly.\n\n**Archive URL format:**\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Farchive\u002F{owner}\u002F{repo}.txt\n```\n\n**Examples:**\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Farchive\u002Fufrisk\u002Fpcileech.txt\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Farchive\u002F000-aki-000\u002FGameDebugMenu.txt\n```\n\n**How to use:**\n1. Identify the GitHub repository the user is asking about (owner and repo name from the URL).\n2. Construct the archive URL: replace `{owner}` with the GitHub username\u002Forg and `{repo}` with the repository name (no `.git` suffix).\n3. Fetch the archive file — it contains a full code snapshot with file trees and source code generated by `code2prompt`.\n4. If the fetch returns a 404, the repository has not been archived yet; fall back to the README or direct GitHub browsing.\n\n### 3. Repository Descriptions\n\nFor a concise English summary of what a repository does, the project maintains auto-generated description files.\n\n**Description URL format:**\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Fdescription\u002F{owner}\u002F{repo}\u002Fdescription_en.txt\n```\n\n**Examples:**\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Fdescription\u002F00christian00\u002FUnityDecompiled\u002Fdescription_en.txt\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Fdescription\u002Fufrisk\u002Fpcileech\u002Fdescription_en.txt\n```\n\n**How to use:**\n1. Identify the GitHub repository the user is asking about (owner and repo name from the URL).\n2. Construct the description URL: replace `{owner}` with the GitHub username\u002Forg and `{repo}` with the repository name.\n3. Fetch the description file — it contains a short, human-readable summary of the repository's purpose and contents.\n4. If the fetch returns a 404, the description has not been generated yet; fall back to the README entry or the archive.\n\n**Priority order when answering questions about a specific repository:**\n1. Description (quick summary) — fetch first for concise context\n2. Archive (full code snapshot) — fetch when deeper implementation details are needed\n3. README entry — fallback when neither description nor archive is available\n\n---\n\n## Compiled wiki\n\nPrefer the compiled domain overview at `wiki\u002Foverviews\u002Fwindows-kernel.md` (see `wiki\u002Findex.md` and `wiki\u002FAGENTS.md`) before re-deriving synthesis from raw README\u002Farchive material.\n","## Overview\n\nThis skill covers Windows kernel internals that matter for game security research: object callbacks, process and image notifications, APC behavior, driver loading, trust enforcement, memory manager structures, and the bookkeeping anti-cheats inspect to detect hostile drivers or hidden executable code.\n\nTreat undocumented structures, offsets, globals, and allocator internals as\nbuild-specific. Verify them against symbols and runtime observations for the\nexact Windows build; use [`research-rigor`](..\u002Fresearch-rigor\u002FSKILL.md) before\ngeneralizing a PoC or forensic heuristic.\n\n## README Coverage\n\n- `Cheat > PatchGuard-related`\n- `Cheat > Driver Signature enforcement`\n- `Cheat > Windows Kernel Explorer`\n- `Cheat > EFI Driver` (cross-reference with game-hacking skill)\n- `Cheat > Vulnerable Driver`\n- `Anti Cheat > Detection:Attach`\n- `Anti Cheat > Detection:Hide`\n- `Anti Cheat > Detection:Vulnerable Driver`\n- `Anti Cheat > Detection:Spoof Stack`\n- `Anti Cheat > Windows Ring3 Callback`\n- `Anti Cheat > Windows Ring0 Callback`\n- `Anti Cheat > Information System & Forensics`\n- `Some Tricks > Windows Ring0`\n- `Windows Security Features`\n\n## Core Kernel Concepts\n\n### Important Structures\n- EPROCESS \u002F ETHREAD\n- KTHREAD \u002F KAPC \u002F KAPC_STATE\n- MMVAD \u002F VAD tree nodes\n- PEB \u002F TEB\n- DRIVER_OBJECT\n- DEVICE_OBJECT\n- IRP (I\u002FO Request Packet)\n\n### Key Tables\n- SSDT (System Service Descriptor Table)\n- IDT (Interrupt Descriptor Table)\n- GDT (Global Descriptor Table)\n- PspCidTable (Process\u002FThread handle table)\n- PiDDBCacheTable \u002F MmUnloadedDrivers \u002F PoolBigPageTable\n\n## User-Mode Kernel Symbol Walking\n\n### Methodology\n```\n- Load local ntoskrnl image (typically C:\\Windows\\System32\\ntoskrnl.exe)\n- Use dbghelp + symbol server path (srv*cache*https:\u002F\u002Fmsdl.microsoft.com\u002Fdownload\u002Fsymbols)\n  to resolve exported symbol RVAs and type information\n- Build structure-aware field lookup:\n  - Query field offset directly (e.g., _EPROCESS.Token)\n  - Enumerate all members of a target struct (_TOKEN, _EPROCESS, etc.)\n  - Search a field name across all known structs (useful when parent type is unknown)\n- Keep symbol path configurable for offline\u002Fprivate symbol repositories\n```\n\n### Why It Matters in Game Security\n```\n- Reduces hardcoded-offset fragility across Windows builds\n- Helps map kernel object layouts used by anti-cheat and drivers\n- Supports rapid adaptation when anti-cheat-relevant fields shift\n  (EPROCESS, ETHREAD, token\u002Fhandle\u002Fsecurity-related members)\n```\n\n### Gadget Scanning Workflow\n```\n- Map executable sections of ntoskrnl image in user mode\n- Scan for short control-flow gadgets (e.g., pop rcx ; ret, jmp rax)\n- Use as a research primitive for:\n  - ROP chain feasibility analysis\n  - Kernel exploit mitigation evaluation\n  - Anti-cheat hardening review against gadget-dependent attack paths\n```\n\n## Security Features\n\n### PatchGuard (Kernel Patch Protection)\n```\n- Protects critical kernel structures\n- Periodic verification checks\n- BSOD on tampering detection\n- Multiple trigger mechanisms\n```\n\n### Driver Signature Enforcement (DSE)\n```\n- Requires signed drivers\n- CI.dll verification\n- Test signing mode\n- WHQL certification\n```\n\n### Virtualization-Based Security (VBS)\n```\nArchitecture:\n- Uses the Windows hypervisor to create an isolated execution environment\n- Splits the system into Virtual Trust Levels (VTLs)\n  - VTL0: Normal world — standard Windows kernel and user-mode processes\n  - VTL1: Secure world — Secure Kernel, security policy enforcement\n- VTL1 is designed to remain isolated from a compromised VTL0, assuming the\n  hypervisor, secure kernel, hardware, and configuration path remain trustworthy\n- Three main buckets:\n  - Memory-protection features (HVCI)\n  - Virtual Trust Levels (VTL0\u002FVTL1 separation)\n  - VBS enclaves (isolated execution for selected workloads)\n```\n\n### Hypervisor-Enforced Code Integrity (HVCI)\n```\n- Also known as Memory Integrity\n- Ensures only trusted, validated code executes in kernel mode\n- Combines Windows hypervisor + Secure Kernel (VTL1) for enforcement\n- Key mechanism: W→X transition restriction\n  - Enforced code pages are not intended to be writable from VTL0\n  - Executability is granted only after the configured code-integrity checks\n- Enforcement pipeline:\n  - Code integrity policy defines what is trusted\n  - Hypervisor memory enforcement via second-stage address translation (EPT\u002FSLAT)\n  - Once a kernel page is validated, strict execution rules are enforced\n- Driver compatibility requirements: drivers must be HVCI-compatible\n```\n\n### Secure Boot\n```\n- UEFI-based boot verification\n- Boot loader chain validation\n- Kernel signature checks\n- DBX (forbidden signatures)\n- Foundation for attestation and DMA-hardening assumptions\n```\n\n## Kernel Callbacks\n\n### Process Callbacks\n```cpp\nPsSetCreateProcessNotifyRoutine\nPsSetCreateProcessNotifyRoutineEx\nPsSetCreateProcessNotifyRoutineEx2\n```\n\n### Thread Callbacks\n```cpp\nPsSetCreateThreadNotifyRoutine\nPsSetCreateThreadNotifyRoutineEx\n```\n\n### Image Load Callbacks\n```cpp\nPsSetLoadImageNotifyRoutine\nPsSetLoadImageNotifyRoutineEx\n```\n\n### Object Callbacks\n```cpp\nObRegisterCallbacks\n\u002F\u002F OB_OPERATION_HANDLE_CREATE\n\u002F\u002F OB_OPERATION_HANDLE_DUPLICATE\n```\n\n### APC \u002F Execution Context\n```cpp\nKeInitializeApc\nKeInsertQueueApc\nKeStackAttachProcess\nRtlWalkFrameChain\n```\n\n### Registry Callbacks\n```cpp\nCmRegisterCallback\nCmRegisterCallbackEx\n```\n\n### Minifilter Callbacks\n```cpp\nFltRegisterFilter\n\u002F\u002F IRP_MJ_CREATE, IRP_MJ_READ, etc.\n```\n\n## Driver Development\n\n### Basic Structure\n```cpp\nNTSTATUS DriverEntry(\n    PDRIVER_OBJECT DriverObject,\n    PUNICODE_STRING RegistryPath\n) {\n    DriverObject->DriverUnload = DriverUnload;\n    DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreate;\n    DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchIoctl;\n    \u002F\u002F Create device, symbolic link...\n    return STATUS_SUCCESS;\n}\n```\n\n### Communication Methods\n- IOCTL (DeviceIoControl)\n- Direct I\u002FO\n- Buffered I\u002FO\n- Shared memory\n\n## Vulnerable Driver Exploitation\n\n### Common Vulnerability Types\n- Arbitrary read\u002Fwrite primitives\n- IOCTL handler vulnerabilities\n- Pool overflow\n- Use-after-free\n\n### Notable Vulnerable Drivers\n```\n- gdrv.sys (Gigabyte)\n- iqvw64e.sys (Intel)\n- MsIo64.sys\n- Mhyprot2.sys (Genshin Impact)\n- dbutil_2_3.sys (Dell)\n- RTCore64.sys (MSI)\n- Capcom.sys\n```\n\n### Exploitation Steps\n1. Load vulnerable signed driver\n2. Trigger vulnerability\n3. Achieve kernel read\u002Fwrite\n4. Disable DSE or load unsigned driver\n5. Execute arbitrary kernel code\n\n## PatchGuard Bypass Techniques\n\n### Timing-Based\n- Predict PG timer\n- Modify between checks\n\n### Context Manipulation\n- Exception handling\n- DPC manipulation\n- Thread context tampering\n\n### Hypervisor-Based\n- EPT manipulation\n- Memory virtualization\n- Intercept PG checks\n\n## Kernel Hooking\n\n### ETW (Event Tracing for Windows)\n```\n- InfinityHook technique\n- HalPrivateDispatchTable\n- System call tracing\n```\n\n## ETW Internals\n\n### Provider \u002F Consumer Model\n```\nArchitecture:\n- Providers: kernel or user-mode components that emit events\n  - Manifest-based providers (registered via wevtutil)\n  - TraceLogging providers (self-describing, no manifest)\n  - MOF providers (legacy WMI-based)\n- Consumers: tools that subscribe to and process events\n  - Real-time consumers (ETW sessions)\n  - Log file consumers (.etl files)\n- Controllers: manage sessions (xperf, tracelog, logman)\n\nKey kernel providers:\n  Microsoft-Windows-Kernel-Process (process\u002Fthread lifecycle)\n  Microsoft-Windows-Kernel-File (file I\u002FO)\n  Microsoft-Windows-Kernel-Audit-API-Calls (security-sensitive APIs)\n```\n\n### ThreatIntel ETW Provider\n```\n- Microsoft-Windows-Threat-Intelligence\n- Available to PPL (Protected Process Light) and above\n- Events: NtReadVirtualMemory, NtWriteVirtualMemory, NtMapViewOfSection on protected processes\n- Used by EDR and anti-cheat for detecting memory access to protected processes\n- Attackers target: patch EtwThreatIntProvRegHandle or EtwpEventWriteFull\n```\n\n### Common ETW Bypass Patterns\n```\n- Patch EtwEventWrite in ntdll.dll (user-mode ETW silencing)\n- Patch nt!EtwpEventWriteFull in kernel (kernel-mode ETW silencing)\n- NtSetInformationThread(ThreadHideFromDebugger) — hides thread from ETW\n- Remove provider registration by walking EtwRegistration list\n- EPT-based protection can defend ETW structures from tampering\n```\n\n## Kernel Segment Heap Architecture\n\n### Timeline\n```\nWindows NT ~ 1809   : Legacy NT Pool Manager (ExAllocatePoolWithTag)\nWindows 10 19H1     : Kernel Segment Heap introduced (March 2019, build 1903)\n                      └─ User-mode Segment Heap ported to the kernel\nWindows 10 2004     : ExAllocatePool2 \u002F ExAllocatePool3 added\n                      └─ ExAllocatePoolWithTag officially deprecated\nWindows 10 20H2~    : Dynamic KDP (Kernel Data Protection) stabilized\nWindows 11          : VBS\u002FHVCI enabled by default; Secure Pool usage expanded\n\nCommon misconception: Many sources claim \"the Segment Heap was introduced\nin Windows 10 2004,\" but the kernel segment heap was actually introduced\nin 19H1 (1903). Windows 10 2004 added the new Pool APIs built on top of it.\n```\n\n### Legacy NT Pool Structure (_POOL_HEADER, pre-19H1)\n```\n_POOL_HEADER (16 bytes, x64):\nOffset  Field           Size   Description\n0x00    PoolIndex        1 B    Pool descriptor index\n0x01    PreviousSize     1 B    Previous chunk size\n0x02    PoolType         1 B    Pool type (Paged, NonPaged, etc.)\n0x03    BlockSize        1 B    Current chunk size (>> 4)\n0x04    PoolTag          4 B    4-byte ASCII tag\n0x08    ProcessBilled    8 B    KPROCESS pointer (valid only with PoolQuota)\n\nMemory layout:\n[POOL_HEADER 16B][user data ...][POOL_HEADER 16B][user data ...]\n      ↑ plaintext, predictable        ↑ adjacent → overwritable\n\nSecurity weaknesses:\n- Pool Walking: traverse chunks linearly via BlockSize\n- Pool Overflow: corrupt adjacent header for arbitrary write on free\n- PoolIndex Overwrite: OOB dereference into pool descriptor array\n- ProcessBilled Overwrite: arbitrary address dereference on free path\n\nWindows 8 partial mitigation:\n  ProcessBilled = KPROCESS_PTR ^ ExpPoolQuotaCookie ^ CHUNK_ADDR\n  But plaintext _POOL_HEADER remained until 19H1.\n```\n\n### _SEGMENT_HEAP Core Structure\n```\nEach pool type is managed by its own independent _SEGMENT_HEAP instance.\n\n_SEGMENT_HEAP (illustrative kernel offsets observed for 20H2; verify symbols):\n0x000   EnvHandle (10 B)     — heap environment handle\n0x010   Signature (4 B)      — commonly 0xDDEEDDEE on this layout\n0x028   UserContext (8 B)\n0x048   AllocatedBase (8 B)  — LFH structure allocation base\n0x058   SegContexts[2] (0x180 B) — segment context array\n0x100   VsContext (0xC0 B)   — VS allocator context\n0x280   LfhContext (0x4C0 B) — LFH allocator context\nhigher  LargeAllocMetadata   — large allocation metadata\nhigher  LargeReservedPages \u002F LargeCommittedPages\n\nPer pool type instances (nt!PoolVector \u002F HEAP_POOL_NODES):\n├── NonPagedPool (NP)       → _SEGMENT_HEAP instance #1\n├── NonPagedPoolNx (NPNx)   → _SEGMENT_HEAP instance #2  ← primary target\n├── PagedPool (PP)          → _SEGMENT_HEAP instance #3\n├── PagedPoolSession        → _SEGMENT_HEAP stored in current thread\n└── (other special pools)\n```\n\n### Allocation Routing Flow\n```\nExAllocatePoolWithTag \u002F ExAllocatePool2 \u002F ExAllocatePool3\n        │\n        ▼\n  ExAllocateHeapPool (internal)\n        │\n        ├─ size ≤ 0x200 AND LFH activated  ──▶  kLFH\n        │   └─ RtlpHpLfhContextAllocate\n        │\n        ├─ 0x1e1 ≤ size ≤ 0xfe0            ──▶  VS Allocator\n        │   └─ RtlpHpVsContextAllocateInternal\n        │\n        ├─ page-aligned (0x20000~0x7f0000)  ──▶  Segment Allocator\n        │   └─ RtlpHpSegAlloc\n        │\n        └─ large (> 0x7f0000)              ──▶  Large Allocator\n            └─ RtlpHpLargeAlloc\n```\n\n### kLFH (Low Fragmentation Heap)\n```\nSize range:       ≤ 0x200 bytes (512 B), when LFH activated for that size class\nActivation:       After 18 consecutive allocations of the same size\nKey function:     RtlpHpLfhContextAllocate\nChunk header:     _POOL_HEADER (16 B, still present)\nMetadata:         _HEAP_LFH_SUBSEGMENT (isolated, not inline)\nBucket count:     129 (Buckets[129])\n\nBucket structure:\n_HEAP_LFH_CONTEXT\n└── Buckets[129]\n     ├── Bucket #0:   size 1~8 B\n     ├── Bucket #1:   size 9~16 B\n     ├── ...\n     └── Bucket #128: size ~0x1FF B\n         (each bucket has AffinitySlots → _HEAP_LFH_SUBSEGMENT)\n\nSecurity properties:\n- Block placement within subsegment is randomized\n- Next allocation position managed through FreeHint, encoded with LfhKey\n- Adjacent chunk overflow cannot directly corrupt management structure\n```\n\n### VS Allocator (Variable Size)\n```\nSize range:       (a) ≤ 0x1e0 && LFH inactive; (b) 0x1e1~0xfe0;\n                  (c) 0x1001~0xffff && non-page-aligned\nKey function:     RtlpHpVsContextAllocateInternal\nChunk header:     _HEAP_VS_CHUNK_HEADER (16 B, HeapKey XOR encoded)\nFree management:  Red-Black Tree (FreeChunkTree)\nAlgorithm:        Best-fit\n\n_HEAP_VS_CHUNK_HEADER (allocated state):\n┌──────────────────────────────────────────────────────────┐\n│  Sizes (8 B) — XOR encoded: HeaderBits ^ self_addr ^ HeapKey\n│    ├─ UnsafeSize      : chunk size \u002F 16\n│    ├─ UnsafePrevSize  : previous chunk size \u002F 16\n│    ├─ MemoryCost      : pages occupied\n│    └─ UnusedBytes     : whether unused bytes exist\n│  EncodedSegmentPageOffset (1 B)\n│    — (self_addr ^ self ^ HeapKey) & 0xFF\n│    — page distance to VS subsegment start\n└──────────────────────────────────────────────────────────┘\n\nMemory layout:\n[_HEAP_VS_CHUNK_HEADER 16B][_POOL_HEADER 16B][user data ...]\n       ↑ HeapKey XOR             ↑ PoolTag etc. still present\n\nVS subsegment structure (_HEAP_VS_SUBSEGMENT):\n├── ListEntry      — subsegment linked list\n├── CommitBitmap   — page commit state bitmap\n├── CommitLock     — lock used during commit\n├── Size (2 B)     — subsegment size (>> 4)\n└── Signature (15 bit) + FullCommit (1 bit) — integrity check\n```\n\n### Segment Allocator (Backend)\n```\nSize range #1:    0x20000 \u003C size ≤ 0x7f000 (128 KB ~ 508 KB)\nSize range #2:    0x7f000 \u003C size ≤ 0x7f0000 (508 KB ~ ~7 MB)\nCore structure:   _HEAP_PAGE_SEGMENT + 256 page descriptors\nSegment mask:     0xFFFFFFFFFFF00000\n\nThe kernel uses two independent SegContexts (unlike user-mode's single context).\n\nPage segment signature encoding:\ncheck = page_segment ^ page_segment->Signature\n      ^ 0xA2E64EADA2E64EAD ^ RtlpHpHeapGlobals.HeapKey\n```\n\n### Large Allocator\n```\nSize range:       > 0x7f0000 (typically page-aligned)\nKey function:     RtlpHpLargeAlloc\nMetadata:         _SEGMENT_HEAP.LargeAllocMetadata\nTracking:         BigPagePoolTable (PoolTrackTable)\nNo inline header; metadata recorded externally.\n```\n\n### Header Layout Per Allocation Path\n```\nPath          Memory layout (chunk start → user data)\n────────────────────────────────────────────────────────────────\nkLFH          [_POOL_HEADER 16B] [data]\nVS            [_HEAP_VS_CHUNK_HEADER 16B] [_POOL_HEADER 16B] [data]\nSegment       [_HEAP_PAGE_SEGMENT header] ... [page descriptors]\nLarge         Metadata in BigPagePoolTable; no inline header\nCacheAligned  [_POOL_HEADER #1] ... [_POOL_HEADER #2 (CacheAligned)] [data]\n```\n\n### Residual _POOL_HEADER Under Segment Heap\n```\n_POOL_HEADER was not fully removed. Remaining usage:\n\nField           Status under Segment Heap\nPoolTag         Still recorded (for debugging\u002Ftracing)\nPoolType        Recorded, not used for allocator selection on free\nBlockSize       Unused in VS path; still present in kLFH\nPreviousSize    Unused, set to 0\nPoolIndex       Unused, set to 0\nProcessBilled   Valid only with PoolQuota flag (encoded with ExpPoolQuotaCookie)\n```\n\n### Pointer Encoding Mechanisms\n```\nGlobal key structure: _RTLP_HP_HEAP_GLOBALS (nt!RtlpHpHeapGlobals)\nGenerated randomly at boot time; global in ntoskrnl.\n\n{\n    UINT64 HeapKey;   \u002F\u002F VS Allocator + Segment Allocator header encoding\n    UINT64 LfhKey;    \u002F\u002F LFH callback pointer encoding\n}\n\nEncoding formulas:\n\nVS chunk header — Sizes field:\n  encoded = (real Sizes) ^ (address of vs_chunk_header) ^ HeapKey\n\nVS chunk — EncodedSegmentPageOffset:\n  encoded = ((real page distance) ^ vs_chunk_header ^ HeapKey) & 0xFF\n\nSegment context signature:\n  check = page_segment ^ page_segment->Signature\n        ^ 0xA2E64EADA2E64EAD ^ HeapKey\n\nLFH callback function pointer:\n  encoded = real function address ^ HeapKey ^ address of LfhContext\n\nProcessBilled (POOL_HEADER, Windows 8+):\n  encoded = KPROCESS_PTR ^ ExpPoolQuotaCookie ^ CHUNK_ADDR\n\nImplications for attackers:\n- Must leak HeapKey and LfhKey from RtlpHpHeapGlobals\n- Must know chunk's own virtual address (self-referential XOR)\n- Failing encoding validation triggers:\n  BugCheck 0x139 (KERNEL_SECURITY_CHECK_FAILURE) or\n  BugCheck 0x13A (KERNEL_MODE_HEAP_CORRUPTION)\n```\n\n### Dynamic Lookaside and Delay Free\n```\nDynamic Lookaside:\n_HEAP_VS_CONTEXT\n└── Lookaside buckets (_RTL_DYNAMIC_LOOKASIDE)\n     ├── Per-size singly-linked lists\n     ├── Depth (2 B)     — current list depth\n     └── NextEntry (8 B) — pointer to next cached chunk\n\nRebalancing (every 3 Balance Set Manager scans):\n- alloc count \u003C 25 → Depth decreases by 10\n- miss ratio ≥ 0.5% → Depth increases\n- miss ratio \u003C 0.5% → Depth decreases by 1\n- Range: minimum 4 ~ MaximumDepth\n\nDelay Free (VS Allocator):\n- size \u003C 1 KB AND Config.Flags bit 4 == 1:\n  → stored in DelayFreeContext list\n  → batch freed after 32 entries accumulate\n- Otherwise: inserted immediately into FreeChunkTree\n- Security: disrupts UAF timing (cannot immediately reuse freed chunk)\n```\n\n### New Pool APIs: ExAllocatePool2 \u002F ExAllocatePool3\n```\nEvolution:\nExAllocatePool                 (legacy, no tag)\nExAllocatePoolWithTag          (pre-19H1 standard, deprecated in 2004)\nExAllocatePoolWithTagPriority  (priority support)\nExAllocatePoolWithQuotaTag     (quota tracking)\n        ↓\nExAllocatePool2                (general case, zero-initialized by default)\nExAllocatePool3                (extended parameters, priority + Secure Pool)\n\nExAllocatePool2:\n  PVOID ExAllocatePool2(POOL_FLAGS Flags, SIZE_T NumberOfBytes, ULONG Tag);\n  - Zero-initialized by default (no RtlZeroMemory needed)\n  - Returns NULL on failure by default\n  - POOL_FLAG_RAISE_ON_FAILURE converts to exception\n  - POOL_FLAG_USE_QUOTA integrates legacy PoolQuota\n\nExAllocatePool3:\n  PVOID ExAllocatePool3(POOL_FLAGS Flags, SIZE_T NumberOfBytes, ULONG Tag,\n                        PCPOOL_EXTENDED_PARAMETER ExtendedParameters, ULONG Count);\n  Extended parameter types:\n  - PoolExtendedParameterPriority: allocation priority (e.g., HighPoolPriority)\n  - PoolExtendedParameterSecurePool: KDP Secure Pool (VTL0 write-protected)\n\nDown-level compatibility:\n  #define POOL_ZERO_DOWN_LEVEL_SUPPORT\n  ExInitializeDriverRuntime(DriversRuntimeInitSupportFlags);\n  → ExAllocatePool2 internally falls back to alloc + memset on older OS\n```\n\n### Kernel Data Protection (KDP) and Secure Pool\n```\nKDP leverages Segment Heap's Secure Pool feature to allocate\nkernel memory whose ordinary VTL0 writes are blocked while the VTL1 policy,\nhypervisor, and configuration path remain trustworthy.\n\nIllustrative implementation layout (verify on the target build):\n  Dedicated Secure Pool region (reported as one PML4 entry on relevant builds)\n  Base address: randomized at boot\n  Managed by: Secure Kernel (VTL1)\n  VTL0 writes: blocked via NAR (Node Address Range)\n\nInitialization flow:\n1. NT Memory Manager boot Phase 1\n2. Randomly calculate 512 GB Secure Pool virtual address\n3. INITIALIZE_SECURE_POOL Secure Call → Secure Kernel\n4. Secure Kernel creates NAR + initializes NTE (Node Table Entry)\n\nAnti-cheat usage:\n  \u002F\u002F Create Secure Pool context\n  ExCreatePool(POOL_FLAG_NON_PAGED, tag, &securePoolHandle);\n\n  \u002F\u002F Allocate detection rule table (immutable after init)\n  POOL_EXTENDED_PARAMS_SECURE_POOL sp = {\n      .Cookie           = MY_COOKIE,\n      .SecurePoolHandle = securePoolHandle,\n      .Buffer           = &detectionRuleTable,\n      .SecurePoolFlags  = SECURE_POOL_FLAGS_FREEABLE\n      \u002F\u002F MODIFIABLE flag omitted → write-protected after init\n  };\n  g_DetectionRules = ExAllocatePool3(POOL_FLAG_NON_PAGED,\n      sizeof(detectionRuleTable), 'DRul', &extParams, 1);\n  \u002F\u002F Protected from ordinary VTL0 writes while KDP policy remains intact\n```\n\n### Attack Technique Evolution (Segment Heap Era)\n```\nTechnique comparison:\nTechnique                    NT Pool (pre-19H1)    Segment Heap (19H1+)\n─────────────────────────────────────────────────────────────────────────\nAdjacent header overwrite    Direct metadata       Encoding\u002Fcookies complicate use\nPool Walking                 Legacy linear walk    Path-specific metadata\u002Fsymbols needed\nProcessBilled overwrite      Requires Win8+ cookie Requires cookie + HeapKey\nkLFH pool spray              Predictable           Possible but needs precise control\nVS FreeChunkTree corruption  N\u002FA                   Requires HeapKey bypass\nLarge chunk BigPool tracking PoC exists             PoC exists (PoolTrackTable)\n\nModern kLFH exploit requirements:\n1. Find target object of same size (same kLFH bucket)\n2. Target must contain exploitable members (pointer, function table)\n3. Target allocation must be triggerable from user mode\n4. Vulnerable and target objects must be in same pool type\n   (NonPagedPoolNx and PagedPool use separate _SEGMENT_HEAP instances)\n\nVS chunk overflow recovery (must restore to avoid BugCheck):\n  ghost_chunk->Sizes.HeaderBits =\n      (real_sizes) ^ (ULONG_PTR)ghost_chunk ^ HeapKey;\n  ghost_chunk->EncodedSegmentPageOffset =\n      ((real_page_offset) ^ (ULONG_PTR)ghost_chunk ^ HeapKey) & 0xFF;\n  \u002F\u002F Failure → BugCheck 0x13A\n\nRequired pre-exploit leak values:\nSymbol                          Purpose               Source\nnt!RtlpHpHeapGlobals           HeapKey, LfhKey        Pattern scan ExFreePoolWithTag\nnt!ExpPoolQuotaCookie           Decode ProcessBilled   Pattern scan ExAllocatePoolWithQuotaTag\nnt!PsInitialSystemProcess      EPROCESS chain         ntoskrnl import analysis\nChunk's own virtual address    Self-referential XOR   Requires info-leak primitive\n```\n\n### BugCheck Codes (Segment Heap Related)\n```\nCode    Name                               Trigger\n0x139   KERNEL_SECURITY_CHECK_FAILURE      VS\u002FLFH header integrity check failure\n0x13A   KERNEL_MODE_HEAP_CORRUPTION        Heap metadata corruption detected\n0xC5    DRIVER_CORRUPTED_EXPOOL            Pool accessed at incorrect IRQL\n0x19    BAD_POOL_HEADER                    _POOL_HEADER validation failure (LFH path)\n```\n\n## Pool Allocation & Forensics\n\n### Pool Forensics Artifacts\n```\nPiDDBCacheTable:\n- Tracks historically loaded drivers by hash + timestamp\n- Anti-cheat inspects this to detect BYOVD or test-signed driver loads\n- Attackers attempt to remove entries post-load\n\nMmUnloadedDrivers:\n- Circular buffer of recently unloaded drivers (name + address range)\n- Cannot be cleared from user mode\n- Anti-cheat uses to detect load-unload-reload patterns\n\nPoolBigPageTable:\n- Maps large pool allocations (>= PAGE_SIZE) to owning driver tag\n- Used for: identifying hidden drivers, finding leaked pool allocations\n- Anti-cheat walks this to detect manually mapped driver memory\n```\n\n### Pool Tag Forensics\n```\n- ExAllocatePoolWithTag \u002F ExAllocatePool2: every allocation carries a 4-byte tag\n- Pool tag scanning: identify driver presence by known tags\n- Tool: pooltag.txt (Microsoft), PoolMon, WinDbg !poolfind\n- Anti-cheat technique: scan pool tags for known cheat driver signatures\n```\n\n### Modern Pool Scanning (Segment Heap Era)\n```\nLegacy method (pre-19H1) — NO LONGER WORKS:\n  Follow BlockSize in inline header to traverse linearly.\n  PPOOL_HEADER h = startAddr;\n  while (h->BlockSize != 0) {\n      if (h->PoolTag == TARGET_TAG) { \u002F* ... *\u002F }\n      h += h->BlockSize;  \u002F\u002F Invalid under segment heap\n  }\n\nModern alternatives:\n\nBigPool detection (Large Alloc path):\n  Reference nt!PoolBigPageTable (or nt!PoolTrackTable)\n  └─ Traverse BigPagePoolTable entries\n  └─ Find allocations without corresponding driver objects\n\nSmall allocation detection:\n  _SEGMENT_HEAP → VsContext → SubsegmentList traversal\n  _SEGMENT_HEAP → LfhContext → Buckets[] → AffinitySlots → Subsegments\n\nVS Chunk Header decoding (requires HeapKey):\n  real_sizes = encoded_header ^ chunk_address ^ HeapKey\n  → Decode to determine chunk size, PoolTag, allocation legitimacy\n\nAnti-cheat scanning targets:\n- Suspicious PoolTags: cheat drivers use custom\u002Frare tags; maintain blacklist\n- Executable permission pages: NonPagedPool chunks with X permission\n  from suspicious sources (no corresponding loaded module)\n- Shellcode patterns: scan decoded chunk contents for known cheat signatures,\n  ROP gadgets, specific syscall sequences\n- kLFH allocation pattern anomalies: unusual allocation patterns in\n  specific size buckets can indicate pool grooming\n\nWinDbg commands:\n  dt nt!_RTLP_HP_HEAP_GLOBALS nt!RtlpHpHeapGlobals  \u002F\u002F HeapKey, LfhKey\n  dt nt!_SEGMENT_HEAP \u003Caddress>\n  dt nt!_HEAP_VS_CHUNK_HEADER \u003Caddress>\n  dt nt!_HEAP_LFH_CONTEXT \u003Caddress>\n  !pool \u003Caddress>\n  !poolfind \u003CTag> [pool_type]\n  !poolused [flags]                    \u002F\u002F stats by PoolTag\n  dt nt!_POOL_TRACKER_BIG_PAGES nt!PoolBigPageTable\n\nVS chunk header decode (manual):\n  HeaderBits_raw = poi(\u003Cchunk_addr>)\n  real Sizes = HeaderBits_raw ^ \u003Cchunk_addr> ^ HeapKey\n```\n\n### Driver Development Migration Checklist\n```\n□ ExAllocatePoolWithTag          → ExAllocatePool2\n□ ExAllocatePool (without tag)   → Remove or ExAllocatePool2\n□ ExAllocatePoolWithTagPriority  → ExAllocatePool3 + Priority param\n□ ExAllocatePoolWithQuotaTag     → ExAllocatePool2 + POOL_FLAG_USE_QUOTA\n□ RtlZeroMemory after alloc     → Remove (ExAllocatePool2 zero-initializes)\n□ Review POOL_FLAG_RAISE_ON_FAILURE (NULL check vs exception)\n□ Critical read-only data       → ExAllocatePool3 + Secure Pool\n```\n\n### SSDT Hooking (Legacy)\n```\n- Modify service table entries\n- Requires PG bypass\n- High detection risk\n```\n\n### IRP Hooking\n```\n- Hook driver dispatch routines\n- Less monitored than SSDT\n- Per-driver targeting\n```\n\n## Memory Manipulation\n\n### Physical Memory Access\n```cpp\nMmMapIoSpace\nMmCopyMemory\n\\\\Device\\\\PhysicalMemory\n```\n\n### Virtual Memory\n```cpp\nZwReadVirtualMemory\nZwWriteVirtualMemory\nKeStackAttachProcess\nMmCopyVirtualMemory\n```\n\n### MDL Operations\n```cpp\nIoAllocateMdl\nMmProbeAndLockPages\nMmMapLockedPagesSpecifyCache\n```\n\n## Research Tools\n\n### Analysis\n- WinDbg \u002F WinDbg Preview\n- Process Hacker \u002F System Informer\n- OpenArk\n- WinArk\n\n### Utilities\n- KDU (Kernel Driver Utility)\n- OSR Driver Loader\n- DriverView\n\n### Monitoring\n- Process Monitor\n- API Monitor\n- ETW consumers\n\n## EFI\u002FBoot-Time Threats\n\n### EFI Driver Cross-Reference\n```\nThe README's > EFI Driver subcategory (under Cheat) contains 30+ projects:\n- EFI bootkit frameworks: UEFI DXE drivers that persist across boots\n- Boot-time memory mappers: inject code before Windows kernel initializes\n- ExitBootServices hooks: intercept Windows boot handoff\n- EFI runtime service abuse: GetVariable\u002FSetVariable for kernel ↔ EFI comm\n\nSee also: game-hacking skill for EFI cheat workflows\n```\n\n### Boot-Time Access\n```\n- EFI runtime services persist after ExitBootServices\n- DXE (Driver Execution Environment) phase: full hardware access\n- Pre-kernel execution: no DSE, no PatchGuard, no HVCI enforcement\n- Secure Boot is the primary mitigation (firmware signature verification)\n```\n\n### Memory Access\n```\n- GetVariable\u002FSetVariable: pass data between EFI and OS runtime\n- Runtime memory mapping via EFI memory map\n- Physical memory access before Windows memory manager initializes\n- ACPI table injection for persistent low-level modifications\n```\n\n## Hypervisor Development\n\n### Hypervisor Types\n```\nType 1 (bare-metal):\n- Runs directly on hardware\n- Examples: VMware ESXi, Microsoft Hyper-V, Xen\n- Used for VBS, production security enforcement\n\nType 2 (hosted):\n- Runs on top of a host operating system\n- Examples: Oracle VirtualBox, VMware Workstation\n- Common for research, development, and testing\n```\n\n### Hardware Virtualization Platforms\n```\nIntel VT-x:\n- Introduced 2005, widely supported on modern Intel CPUs\n- Foundation for VMCS, EPT, VM exits\n\nAMD-V (SVM):\n- AMD's counterpart to VT-x, also introduced 2005\n- VMCB structure, NPT (Nested Page Tables)\n\nARM Virtualization Extensions:\n- EL2 (hypervisor mode) and stage-2 memory translation\n- Used on ARM platforms for mobile and embedded security\n```\n\n### Intel VT-x Core Concepts\n\n#### VMCS (Virtual Machine Control Structure)\n```\nCentral data structure for Intel VT-x:\n- Describes guest state, host state, and virtualization controls\n- Tells the processor:\n  - What state to restore on VM entry\n  - What state to save on VM exit\n  - Which events transfer control back to the hypervisor\n\nGuest\u002FHost State Areas:\n- Control registers (CR0, CR3, CR4)\n- Segment registers (CS, SS, DS, ES, FS, GS)\n- Debug registers (DR7 — hardware breakpoints)\n- Descriptor-table registers (GDTR, IDTR)\n- Key fields:\n  - CR3: root of guest page tables, central to virtual memory\n  - GDTR\u002FIDTR: Global\u002FInterrupt Descriptor Tables\n  - CS\u002FSS: code and stack segments\n  - DR7: hardware breakpoint control\n\nControl Fields:\n- Pin-based controls\n- Primary processor-based controls\n- Secondary processor-based controls\n- Events that cause VM exits:\n  - CPUID interception\n  - INVLPG interception\n  - Control-register access\n  - EPT violations\n  - MSR access\n```\n\n#### EPT (Extended Page Tables)\n```\nIntel's implementation of SLAT (Second-Level Address Translation):\n- Gives the hypervisor independent control over guest memory\n- Two-stage address translation pipeline:\n  1. GVA → GPA: Guest Virtual → Guest Physical (via guest page tables, rooted at CR3)\n  2. GPA → HPA: Guest Physical → Host Physical (via EPT, rooted at EPTP in VMCS)\n- Guest believes it owns its own memory mappings\n- Hypervisor has a second, independent layer controlling:\n  - What physical memory is reachable\n  - What permissions apply (read\u002Fwrite\u002Fexecute)\n\nEPT Hierarchy:\n- PML4 → PDPT → PD → PT (4-level page table)\n- Each entry carries read\u002Fwrite\u002Fexecute permissions\n- EPT violations trigger VM exits when access permissions are violated\n\nPage Table Entries (PTE):\n- Maps GVA to GPA\n- Carries: read\u002Fwrite, supervisor-only, caching, software-defined bits\n- Guest PTEs and EPT serve different roles:\n  - Guest PTE: controls guest's view of memory\n  - EPT: controls hypervisor's view of the guest\n```\n\n#### VM Exits & VMCALL\n```\nVM Exits:\n- Occur when configured events happen in the guest\n- Triggers: CPUID, CR access, I\u002FO instructions, EPT violations, MSR access\n- On exit: processor saves guest state (per VMCS), restores host state,\n  records exit reason for hypervisor handler\n\nVMCALL:\n- Guest intentionally transfers control to hypervisor\n- Similar in concept to a system call (guest → hypervisor)\n- Used for guest-hypervisor communication interfaces\n```\n\n#### Nested Virtualization\n```\n- Running a hypervisor inside a VM managed by another hypervisor\n- Useful for research, testing, and development\n- Adds complexity: multiple layers participate in the same virtualization flow\n- Relevant for testing hypervisor-based defense under VMware\u002FHyper-V\n```\n\n### AMD-V (SVM)\n- VMCB (Virtual Machine Control Block) structure\n- NPT (Nested Page Tables) — AMD's SLAT equivalent\n- SVM operations (VMRUN, VMSAVE, VMLOAD)\n\n### Use Cases\n- Memory hiding\n- Syscall interception\n- Security monitoring\n- Anti-cheat evasion\n- EPT-based memory protection and introspection\n\n### Windows Hypervisor Platform (WHP) API\n```\nUser-mode hypervisor interface (Windows 10+):\n- WHvCreatePartition \u002F WHvSetupPartition: create VM partition\n- WHvCreateVirtualProcessor: add vCPU\n- WHvMapGpaRange: map host memory into guest physical address space\n- WHvRunVirtualProcessor: enter guest execution, blocks until VM exit\n- WHvGetVirtualProcessorRegisters \u002F Set: read\u002Fwrite guest CPU state\n\nKey capability:\n- Enables hypervisor-assisted analysis from user mode (no kernel driver)\n- Page-level trap handling: set R\u002FW\u002FX permissions per guest page\n- VM exit reasons: memory access violation, CPUID, MSR access, I\u002FO port, syscall\n- Controlled execution: the host controls modeled guest CPU state and mapped\n  memory; external timing, devices, concurrency, and unmodeled dependencies\n  still need explicit handling\n\nPrerequisites:\n- Enable Windows features: Microsoft-Hyper-V-Hypervisor + HypervisorPlatform\n- Hardware: VT-x or AMD-V support\n- Note: WHP coexists with Hyper-V but conflicts with some third-party hypervisors\n\nSee also: reverse-engineering skill → User-Mode Hypervisor-Assisted Tracing\nfor analysis workflows built on WHP\n```\n\n## Hypervisor-Based Defense\n\n### Concept\n```\n- Security approach using virtualization primitives to enforce protections\n  from a higher privilege level than the guest kernel\n- Moves security decisions into an isolated execution environment\n  that a compromised kernel cannot easily tamper with\n- Present across major OS platforms:\n  - Windows: Virtualization-Based Security (VBS)\n  - Android: Android Virtualization Framework (AVF)\n  - Apple: Secure execution environments, hardware-backed isolation\n```\n\n### EPT Hooks as Defensive Primitives\n```\nMechanism:\n- Instead of patching the guest kernel, modify EPT permissions\n- Specific memory accesses trigger EPT violations → VM exit\n- Hypervisor inspects the access and decides: allow, deny, or log\n\nExample: Watching writes to a sensitive region\n1. Remove write permission from the EPT entry for target region\n2. Guest runs normally until it attempts a write to that region\n3. EPT violation → VM exit → hypervisor receives control\n4. Hypervisor evaluates context:\n   - Which module performed the access\n   - What memory was touched\n   - Whether the access is authorized\n5. Decision: allow write, deny and return, or log and continue\n\nAdvantages over traditional kernel hooks:\n- Operate outside the guest OS\n- Can remain effective after guest-kernel compromise if the hypervisor and\n  policy\u002Fconfiguration channel remain trustworthy\n- Avoid guest-kernel patching, although hypervisor presence and effects may be\n  observable\n- Ordinary guest-kernel writes cannot directly remove correctly enforced\n  second-stage permissions\n```\n\n### Protectable Assets via EPT\n```\n- Executable pages of EPP (Endpoint Protection Platform) drivers\n  → Prevents silent patching of security software\n- ETW-related structures\n  → Unauthorized writes fault into hypervisor\n- Callback\u002Fcallout\u002Froutine lists (PsSetCreateProcessNotifyRoutine, etc.)\n  → Write authorization moved outside the guest kernel\n- Critical kernel data structures\n  → PatchGuard-protected regions, SSDT, IDT\n```\n\n### Threat Model for Hypervisor Defense\n```\nAssumes kernel compromise has already happened:\n- Attacker has kernel code execution\n- Attacker can load vulnerable drivers (BYOVD)\n- Attacker can modify kernel memory\n- Traditional kernel-resident protections are untrustworthy\n\nHypervisor advantage:\n- Sits above the guest kernel in privilege hierarchy\n- Enforces policies from a higher privilege layer\n- Guest-kernel rootkits cannot directly rewrite hypervisor policy under the\n  stated threat model; hypervisor vulnerabilities, DMA\u002FSMM, configuration\n  weaknesses, and hardware compromise remain separate attack paths\n```\n\n### Attack Scenario: BYOVD vs EPT Protection\n```\nWithout hypervisor defense:\n1. Attacker loads vulnerable signed driver\n2. Gains kernel R\u002FW primitives\n3. Patches callback list to remove EPP callbacks\n4. EPP is blinded — attacker operates undetected\n\nWith EPT-based defense:\n1. Attacker loads vulnerable signed driver\n2. Gains kernel R\u002FW primitives\n3. Attempts to patch callback list\n4. EPT violation triggers VM exit\n5. Hypervisor catches the write, evaluates context\n6. Write is denied — callback list remains intact\n```\n\n## Resource Organization\n\nThe README contains categorized links for:\n- PatchGuard research and bypasses\n- DSE bypass techniques\n- Vulnerable driver exploits\n- Kernel callback enumeration\n- ETW\u002FPMI\u002FNMI handlers\n- Intel PT integration\n\n---\n\n## Data Source\n\n**Important**: This skill provides conceptual guidance and overview information. For detailed information use the following sources:\n\n### 1. Project Overview & Resource Index\n\nFetch the main README for the full curated list of repositories, tools, and descriptions:\n\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002FREADME.md\n```\n\nThe main README contains thousands of curated links organized by category. When users ask for specific tools, projects, or implementations, retrieve and reference the appropriate sections from this source.\n\n### 2. Repository Code Details (Archive)\n\nFor detailed repository information (file structure, source code, implementation details), the project maintains a local archive. If a repository has been archived, **always prefer fetching from the archive** over cloning or browsing GitHub directly.\n\n**Archive URL format:**\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Farchive\u002F{owner}\u002F{repo}.txt\n```\n\n**Examples:**\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Farchive\u002Fufrisk\u002Fpcileech.txt\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Farchive\u002F000-aki-000\u002FGameDebugMenu.txt\n```\n\n**How to use:**\n1. Identify the GitHub repository the user is asking about (owner and repo name from the URL).\n2. Construct the archive URL: replace `{owner}` with the GitHub username\u002Forg and `{repo}` with the repository name (no `.git` suffix).\n3. Fetch the archive file — it contains a full code snapshot with file trees and source code generated by `code2prompt`.\n4. If the fetch returns a 404, the repository has not been archived yet; fall back to the README or direct GitHub browsing.\n\n### 3. Repository Descriptions\n\nFor a concise English summary of what a repository does, the project maintains auto-generated description files.\n\n**Description URL format:**\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Fdescription\u002F{owner}\u002F{repo}\u002Fdescription_en.txt\n```\n\n**Examples:**\n```\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Fdescription\u002F00christian00\u002FUnityDecompiled\u002Fdescription_en.txt\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Fgmh5225\u002Fawesome-game-security\u002Frefs\u002Fheads\u002Fmain\u002Fdescription\u002Fufrisk\u002Fpcileech\u002Fdescription_en.txt\n```\n\n**How to use:**\n1. Identify the GitHub repository the user is asking about (owner and repo name from the URL).\n2. Construct the description URL: replace `{owner}` with the GitHub username\u002Forg and `{repo}` with the repository name.\n3. Fetch the description file — it contains a short, human-readable summary of the repository's purpose and contents.\n4. If the fetch returns a 404, the description has not been generated yet; fall back to the README entry or the archive.\n\n**Priority order when answering questions about a specific repository:**\n1. Description (quick summary) — fetch first for concise context\n2. Archive (full code snapshot) — fetch when deeper implementation details are needed\n3. README entry — fallback when neither description nor archive is available\n\n---\n\n## Compiled wiki\n\nPrefer the compiled domain overview at `wiki\u002Foverviews\u002Fwindows-kernel.md` (see `wiki\u002Findex.md` and `wiki\u002FAGENTS.md`) before re-deriving synthesis from raw README\u002Farchive material.\n",{},"main","19a54ac988e9929160334271f5c1924ddd9b227e","_modules\u002Fwindows-kernel",19,"https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill","https:\u002F\u002Fgithub.com\u002Falicewe1","写一些自己用得上的工具，能自动化就绝不手动 · 自动化 \u002F 工程效率 \u002F Agent 技能生态 · 保持好奇，持续构建","2026-09-30 00:41:20",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add alicewe1\u002Falice_skill --skill windows-kernel",{"tool":37,"command":38},"bunx","bunx skills add alicewe1\u002Falice_skill --skill windows-kernel",{"tool":40,"command":41},"pnpm","pnpm dlx skills add alicewe1\u002Falice_skill --skill windows-kernel","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002F_modules\u002Fwindows-kernel\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7DBMD9P6R27SWQCW5HYVWG0","alice","Alice 六类技能总路由。用户输入 Alice 或要求查看 Alice 技能菜单时，严格输出固定菜单；输入攻\u002F防模式、六类入口或直接描述任务时，按类别→领域→模块渐进路由。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Faliceskill\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M7DBM8X5M7YXPYBVFMWF8HRC","alice-reverse","逆向分析渐进路由（二进制 \u002F 移动端 \u002F 协议 \u002F 取证 \u002F 保护机制 \u002F 运行时观测）。触发词：二进制\u002F移动端\u002F反编译\u002FFrida\u002FIDA\u002FGhidra\u002FPE\u002FELF\u002FAPK\u002F协议\u002F取证；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-reverse\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M7DBM630E2YKQP29194TT7HC","alice-pentest","web安全渐进路由（Web \u002F API \u002F 资产发现 \u002F 漏洞验证 \u002F 云与网络安全）。触发词：Web\u002FAPI\u002F资产发现\u002F端口\u002F漏洞验证\u002F云与网络安全；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-pentest\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7DBM20M2VDYV5D3MYDGBTQX","alice-game","游戏攻防渐进路由（游戏客户端 \u002F 内存 \u002F 图形 \u002F 反作弊 \u002F 安全研究）。触发词：游戏客户端\u002F内存\u002F图形\u002F偏移\u002F反作弊\u002F模拟器\u002F覆盖层；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-game\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7DBKXVEKB8931MZG23VACFN","alice-crack","卡密授权渐进路由（卡密 \u002F 激活 \u002F 授权验证 \u002F 许可证管理 \u002F 本地授权分析）。触发词：卡密\u002F激活\u002F授权验证\u002Flicense\u002F机器码\u002F试用状态；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-crack\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7DBKTMT90MGV2WP8K73TMQD","alice-assist","技能指令渐进路由（技能路由 \u002F 评分 \u002F 吸收 \u002F 迁移 \u002F 自动化 \u002F 文档与平台集成）。触发词：技能创建\u002F吸收\u002F评分\u002F迁移\u002F自动化\u002F文档\u002F平台指令；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-assist\u002FSKILL.md",[],[]]