1---2name: windows-boundaries3description: Use when crossing a Windows security boundary or escaping a sandbox — kernel/user crossing (win32k/dxgkrnl UAF CVE-2025-24983), BYOVD kernel R/W, UAC/COM elevation, AppContainer/LPAC & Chromium-Mojo sandbox escape (CVE-2025-2783), PPL bypass, RPC/ALPC & named-pipe impersonation4metadata:5 source: https://skillmd.com/skills/hypnguyen1209/windows-boundaries6 type: offensive7 phase: exploitation8 tools: WinDbg, OleViewDotNet, NtObjectManager, PrintSpoofer, GodPotato, PPLBlade, UACME, loldrivers, Sysmon9 mitre: TA000410kill_chain:11 phase: [exploit, install]12 step: [4, 5]13 attck_tactics: [TA0002, TA0004, TA0005]14 attck_techniques: [T1068, T1211, T1548.002, T1134.001, T1134.002, T1543.003, T1559, T1112, T1003.001, T1014]15depends_on: [privesc-windows, exploit-development]16feeds_into: [red-team-ops, edr-evasion]17inputs: [sandbox_config, kernel_info, foothold_token]18outputs: [boundary_escape, elevated_access, kernel_rw_primitive, system_token]19references:20 - references/kernel-user-boundary.md21 - references/byovd-kernel-rw.md22 - references/integrity-uac-com.md23 - references/sandbox-appcontainer-escape.md24 - references/ppl-protected-process.md25 - references/rpc-alpc-boundary.md26scripts:27 - scripts/enum_boundaries.ps128 - scripts/ioctl_fuzzer.py29 - scripts/byovd_kernel_rw.c30 - scripts/uac_com_elevate.cpp31 - scripts/sandbox_escape_probe.py32 - scripts/ppl_byovdll.c33 - scripts/named_pipe_impersonate.c34---3536# Windows Security Boundaries3738## When to Activate3940- Planning a privilege-escalation path that crosses a Windows security boundary41 (integrity level, AppContainer/LPAC, PPL, or the kernel/user line)42- Sandbox-escape research: browser renderer (Chromium/Edge Mojo), Office WebView, packaged43 apps, AppContainer/LPAC brokers44- Reaching Ring 0 via win32k/dxgkrnl bugs or BYOVD for a kernel read/write primitive45- Defeating PPL to dump LSASS or tamper with EDR self-defense46- Going from a `SeImpersonate` service account to SYSTEM via RPC/ALPC/named-pipe abuse47- UAC bypass (Medium → High) via auto-elevating COM or registry hijack4849## Boundary stack (high → low): VTL1 (Secure Kernel/Cred Guard) > Ring 0 (ntoskrnl/win32k/drivers) > Ring 3: System > High > Medium > Low > AppContainer/LPAC. PPL is an orthogonal wall guarding LSASS/EDR even from SYSTEM.5051## Technique Map5253| Technique | ATT&CK | CWE | Reference | Script |54|-----------|--------|-----|-----------|--------|55| win32k / dxgkrnl UAF → kernel R/W → token steal | T1068 | CWE-416 | references/kernel-user-boundary.md | scripts/ioctl_fuzzer.py |56| Driver IOCTL abuse (METHOD_NEITHER arb-R/W) | T1068 | CWE-781 | references/kernel-user-boundary.md | scripts/ioctl_fuzzer.py |57| BYOVD load + MSR/LSTAR or phys R/W → SYSTEM | T1068, T1543.003 | CWE-1188 | references/byovd-kernel-rw.md | scripts/byovd_kernel_rw.c |58| BYOVD EDR-kill (callback nulling) | T1562.001, T1014 | CWE-1188 | references/byovd-kernel-rw.md | scripts/byovd_kernel_rw.c |59| UAC bypass — ICMLuaUtil elevated COM moniker | T1548.002 | CWE-269 | references/integrity-uac-com.md | scripts/uac_com_elevate.cpp |60| UAC bypass — fodhelper HKCU registry hijack | T1548.002, T1112 | CWE-269 | references/integrity-uac-com.md | scripts/uac_com_elevate.cpp |61| AppContainer/LPAC broker abuse / cap over-grant | T1211 | CWE-668 | references/sandbox-appcontainer-escape.md | scripts/sandbox_escape_probe.py |62| Chromium/Edge Mojo IPC sandbox escape | T1211 | CWE-501 | references/sandbox-appcontainer-escape.md | scripts/sandbox_escape_probe.py |63| Named-object / symbolic-link squatting | T1211 | CWE-59 | references/sandbox-appcontainer-escape.md | scripts/sandbox_escape_probe.py |64| PPL bypass — BYOVDLL (old signed DLL into PPL) | T1003.001, T1211 | CWE-426 | references/ppl-protected-process.md | scripts/ppl_byovdll.c |65| PPL bypass — live-dump / WER / Protection-clear | T1003.001, T1562.001 | CWE-269 | references/ppl-protected-process.md | scripts/byovd_kernel_rw.c |66| RPC server spoof / endpoint squat (PhantomRPC) | T1559, T1134.001 | CWE-287 | references/rpc-alpc-boundary.md | scripts/named_pipe_impersonate.c |67| Named-pipe client impersonation (Potato family) | T1134.002, T1134.001 | CWE-294 | references/rpc-alpc-boundary.md | scripts/named_pipe_impersonate.c |68| Host boundary posture enumeration | T1082 | CWE-693 | (all) | scripts/enum_boundaries.ps1 |6970## Quick Start7172```cmd73:: 0. Map the host's boundary posture -> pick the right primitive74powershell -ep bypass -File scripts/enum_boundaries.ps175:: reports: integrity, AppContainer, SeImpersonate/SeDebug, HVCI, driver blocklist,76:: LSASS RunAsPPL, drivers loaded from user-writable paths, named-pipe count.7778:: 1. From a sandbox (renderer/packaged app): rank escape vectors79python scripts/sandbox_escape_probe.py8081:: 2. Medium -> High: UAC bypass (no file dropped via COM moniker)82uac_com_elevate.exe com "C:\Windows\System32\cmd.exe /c whoami /groups > C:\poc.txt"8384:: 3. SeImpersonate present -> SYSTEM via PhantomRPC endpoint squat85whoami /priv | findstr SeImpersonate86named_pipe_impersonate.exe \\.\pipe\W32TIME "C:\Windows\System32\cmd.exe"87w32tm /resync :: triggers the SYSTEM client to connect8889:: 4. Need Ring 0: map a driver's IOCTLs, then BYOVD kernel R/W -> token steal90python scripts/ioctl_fuzzer.py --device RTCore64 --map91byovd_kernel_rw.exe C:\test\driver.sys token9293:: 5. Dump LSASS under PPL without a driver (BYOVDLL / CNG KSP)94ppl_byovdll.exe register C:\stage\vuln_ncryptprov.dll GhostKsp95ppl_byovdll.exe trigger GhostKsp96```9798## OPSEC & Detection (summary)99100| Technique | Telemetry / IOC | Detection (Sigma / EDR) | OPSEC note |101|-----------|-----------------|--------------------------|------------|102| win32k/dxgkrnl exploit | Bugcheck EID 1001 ref win32k/dxgkrnl; process token flips to S-1-5-18 with no service genealogy | Sigma on bugchecks + token anomaly; ETW Microsoft-Windows-Win32k | Prefer data-only token copy over CFG/CET-fighting control-flow hijack; missed race = loud bugcheck |103| BYOVD | Sysmon EID 6 driver load from user-writable path; 7045/4697 kernel service; EDR telemetry goes silent | Sigma on unusual driver path + known-bad hashes (loldrivers.io); driver-load-time window | Use un-blocklisted/HVCI-compatible driver; restore LSTAR/callbacks; DeleteService + del .sys |104| UAC bypass (COM/fodhelper) | Sysmon EID 13 write to HKCU ms-settings\Shell\Open\command; dllhost /Processid:{3E5FC7F9..} spawning shell | Elastic/ManageEngine ICMLuaUtil + fodhelper rules | Rotate to a less-known AutoElevate CLSID; don't spawn cmd from dllhost; clean HKCU tree |105| Sandbox escape | Renderer/GPU process spawning cmd/powershell/rundll32; Mojo handle-transfer anomalies | Sigma on browser child-process; patch-posture alert (Edge<134.0.3124.93) | Stay in-process post-escape (IPC layer is an EDR blind spot); symlink squat is mostly dead post-2017 |106| PPL bypass | Old keyiso/ncryptprov version loaded in lsass (EID 7); EID 10 lsass read; Cryptography\Providers write; live-dump | Sigma on DLL version-mismatch + GrantedAccess to lsass | Driverless (BYOVDLL/WER/live-dump) avoids BYOVD noise; restore Protection byte; obfuscate dumps |107| RPC/ALPC impersonation | 4624 logon type 9 (Advapi); SYSTEM child of service-acct parent; RPC_S_SERVER_UNAVAILABLE (EID 1) | Elastic named-pipe impersonation rule; ETW RPC + high impersonation level | PhantomRPC endpoint squat blends w/ admin triggers (w32tm/gpupdate); RevertToSelf + close pipe |108109## Deep Dives110111- **references/kernel-user-boundary.md** — Ring 3→Ring 0 via win32k/dxgkrnl UAF112 (CVE-2025-24983, CVE-2025-62573, CVE-2025-55224, CVE-2025-62221, CVE-2026-26132), driver113 IOCTL surface, kernel R/W → EPROCESS token steal / Protection clear / PreviousMode, modern114 no-PTE-self-map constraint, KDP/HVCI considerations.115- **references/byovd-kernel-rw.md** — Bring-Your-Own-Vulnerable-Driver: load signed driver,116 MSR-LSTAR vs physical-memory primitives (CVE-2025-8061), EDRKillShifter / Qilin driver117 rotation, 2025-2026 driver+CVE catalog, blocklist/HVCI bypass, driver-load detection.118- **references/integrity-uac-com.md** — integrity model, appinfo/autoElevate internals,119 fodhelper (UACME 33) + ICMLuaUtil/CMSTPLUA (UACME 41), 2025 IEditionUpgradeManager bypass,120 finding new AutoElevate COM classes, T1548.002 ITW campaigns.121- **references/sandbox-appcontainer-escape.md** — AppContainer/LPAC model + capabilities,122 broker abuse (WinRT XmlDocument), Chromium/Edge Mojo escapes (CVE-2025-2783 ForumTroll,123 CVE-2025-4609 ipcz), symbolic-link/RtlIsSandboxToken mitigation, 3-bug renderer chain.124- **references/ppl-protected-process.md** — PS_PROTECTION/signer levels, BYOVDLL "Ghost in125 the PPL" (CVE-2023-28229/36906, BCryptRegisterProvider), NtSystemDebugControl live-dump126 (Win11 23H2), WER dump, kernel Protection-clear, PPLBlade, Credential Guard hard stop.127- **references/rpc-alpc-boundary.md** — named-pipe client impersonation primitive, ALPC128 SQoS/RequiredServerSid, PhantomRPC server-spoof/endpoint-squat (2026, unpatched), Potato129 family (PrintSpoofer/GodPotato/SigmaPotato), WER ALPC LPE, NtObjectManager enumeration.