1---2name: windows-mitigations-bypass3description: Use when bypassing a Windows exploit/platform mitigation — ASLR/DEP/CFG/XFG/CET, ACG/CIG, WDAC/App Control, ASR/AMSI/ETW, PPL/LSA Protection, BYOVD/VBS/HVCI4metadata:5 source: https://skillmd.com/skills/hypnguyen1209/windows-mitigations-bypass6 type: offensive7 phase: exploitation8 tools: [WinDbg, IDA, x64dbg, Process Hacker, ROPgadget, mona.py, PPLmedic, nanodump, EDRSandblast]9 mitre: [T1211, T1218, T1562.001, T1562.004, T1562.006, T1003.001, T1068, T1620, T1140]10kill_chain:11 phase: [exploit, installation]12 step: [4, 5]13 attck_tactics: [TA0002, TA0004, TA0005]14 attck_techniques: [T1211, T1218, T1562.001, T1562.004, T1562.006, T1003.001, T1068, T1620, T1112]15depends_on: [exploit-development, reverse-engineering]16feeds_into: [shellcode-dev, edr-evasion, windows-boundaries]17inputs: [mitigation_config, binary_analysis, target_os_build]18outputs: [bypass_technique, finding_record, mitigation_fingerprint]19references:20 - references/memory-safety-mitigations.md21 - references/acg-cig-dynamic-code.md22 - references/wdac-app-control-bypass.md23 - references/asr-amsi-etw-blinding.md24 - references/ppl-lsa-protection.md25 - references/byovd-vbs-hvci.md26scripts:27 - scripts/mitigation_recon.ps128 - scripts/Get-ProcessMitigationMap.ps129 - scripts/find_nonaslr_modules.py30 - scripts/cfg_dispatch_gadget_finder.py31 - scripts/extract_asr_exclusions.py32 - scripts/check_driver_blocklist.py33---3435# Windows Mitigations & Bypass3637Defeating both **exploit mitigations** (ASLR/DEP/CFG/XFG/CET/ACG) and **platform security controls**38(WDAC, ASR, AMSI/ETW, PPL/LSA Protection, VBS/HVCI). Every technique is paired with detection +39OPSEC so it doubles as defensive hardening guidance. Assumes an authorized engagement.4041## When to Activate4243- Fingerprinting a target's mitigation landscape before weaponizing an exploit44- Designing a memory-corruption exploit that must defeat ASLR + DEP + CFG/CET in one chain45- Bypassing application control (WDAC / App Control for Business) to run unsigned code46- Disabling or blinding telemetry (ASR, AMSI, ETW) ahead of post-exploitation47- Dumping a PPL/LSA-protected process (LSASS) or killing a PPL-protected EDR48- Deciding between userland-only vs BYOVD/kernel approaches based on VBS/HVCI state4950## Technique Map5152| Technique | ATT&CK | CWE | Reference | Script |53|-----------|--------|-----|-----------|--------|54| ASLR/HEASLR defeat (info leak, partial overwrite, non-ASLR module) | T1211 | CWE-330 | references/memory-safety-mitigations.md | scripts/find_nonaslr_modules.py |55| DEP/NX bypass (ROP→VirtualProtect, ret2libc) | T1211 | CWE-119 | references/memory-safety-mitigations.md | scripts/cfg_dispatch_gadget_finder.py |56| CFG/XFG bypass (valid-target dispatch gadget, type-hash collision) | T1211 | CWE-1240 | references/memory-safety-mitigations.md | scripts/cfg_dispatch_gadget_finder.py |57| CET shadow stack / IBT evasion (non-CET process, JOP, exception unwind) | T1211 | CWE-1419 | references/memory-safety-mitigations.md | scripts/Get-ProcessMitigationMap.ps1 |58| ACG/CIG bypass (signed-code reuse, JIT exemption, cross-process) | T1211, T1055 | CWE-94 | references/acg-cig-dynamic-code.md | scripts/Get-ProcessMitigationMap.ps1 |59| WDAC / App Control bypass (LOLBin, signed Electron/V8, sideload) | T1218 | CWE-693 | references/wdac-app-control-bypass.md | scripts/mitigation_recon.ps1 |60| ASR rule bypass (excluded path/process hollow, COM, syscalls) | T1562.001 | CWE-693 | references/asr-amsi-etw-blinding.md | scripts/extract_asr_exclusions.py |61| AMSI bypass (amsiInitFailed, AmsiScanBuffer patch, hardware bp) | T1562.001 | CWE-693 | references/asr-amsi-etw-blinding.md | scripts/mitigation_recon.ps1 |62| ETW blinding (EtwEventWrite patch, provider disable, NtTraceControl) | T1562.006 | CWE-778 | references/asr-amsi-etw-blinding.md | scripts/mitigation_recon.ps1 |63| PPL / LSA Protection bypass (PPLmedic userland chain, BYOVD) | T1003.001, T1562.001 | CWE-269 | references/ppl-lsa-protection.md | scripts/Get-ProcessMitigationMap.ps1 |64| BYOVD kernel R/W (unblocked driver, EPROCESS.Protection wipe) | T1068, T1562.001 | CWE-822 | references/byovd-vbs-hvci.md | scripts/check_driver_blocklist.py |65| VBS/HVCI/Credential Guard evasion (blocklist evasion, data-only) | T1068, T1562.001 | CWE-693 | references/byovd-vbs-hvci.md | scripts/check_driver_blocklist.py |6667## Quick Start6869```powershell70# 1. Fingerprint system + per-process mitigations, AMSI/ETW/ASR/WDAC/VBS state71powershell -ep bypass -f scripts/mitigation_recon.ps1 -OutJson recon.json72powershell -ep bypass -f scripts/Get-ProcessMitigationMap.ps1 # rank weak processes7374# 2. If memory-corruption target: locate non-ASLR modules + CFG-valid dispatch gadgets75python scripts/find_nonaslr_modules.py C:\Target\*.dll76python scripts/cfg_dispatch_gadget_finder.py target.dll # ROP/JOP under CFG/CET7778# 3. If application control (WDAC) blocks execution: pick a signed bypass vessel79# MSBuild inline C#, signed legacy Teams (Electron), or signed Node .node module8081# 4. Blind telemetry before post-ex (use sparingly — patching is itself an IOC)82# AMSI: patch AmsiScanBuffer / amsiInitFailed ETW: patch EtwEventWrite8384# 5. Credential access vs PPL/LSA: userland PPLmedic chain (no driver) or BYOVD85python scripts/extract_asr_exclusions.py # find ASR-excluded paths86python scripts/check_driver_blocklist.py mydriver.sys # is driver blocklisted/HVCI-safe?87```8889## OPSEC & Detection (summary)9091| Technique | Telemetry / IOC | Detection (Sigma / EDR) | OPSEC note |92|-----------|-----------------|--------------------------|------------|93| ROP/JOP exploit | crash dumps, WER, #CP/#PF exceptions, RWX alloc | EDR stack-walk on VirtualProtect/VirtualAlloc; CFG/CET #CP telemetry | prefer data-only; reuse signed gadgets; avoid RWX |94| WDAC LOLBin | 4688 w/ MSBuild/mshta parent, child of office/explorer | Sigma proc_creation_win_lolbin_*; CodeIntegrity 3076/3077 audit | use Microsoft-signed Electron/V8 — looks like normal app |95| AMSI patch | RWX in amsi.dll, AMSI scan gaps | AMSI bypass detections, mem scan of amsi.dll .text | indirect syscalls; restore bytes; HWBP avoids byte edits |96| ETW patch | EtwEventWrite first byte = 0xC3/0xCC | ETW-TI sensor; integrity scan of ntdll EtwEventWrite | restore after use; or disable provider not whole API |97| PPL LSASS dump | handle to lsass w/ VM_READ, MiniDump call, 4656/4663 | Sysmon 10 GrantedAccess 0x1010/0x1410; Defender ASR 9e6c... | userland PPLmedic avoids driver IOC; rename per ASR excl. |98| BYOVD | Sysmon 6 driver load, svc create reg, unsigned-by-MS driver | Sysmon EID6 + reg EID13; MDE LOLDrivers hash hunt; blocklist | pick driver NOT in MS blocklist/LOLDrivers; HVCI may still block |99| VBS/HVCI off | bcdedit hypervisorlaunchtype off, DeviceGuard reg writes | reg EID13 on DeviceGuard; boot config change events | requires admin+reboot — loud; data-only attack instead |100101## Deep Dives102103- **references/memory-safety-mitigations.md** — ASLR/HEASLR, DEP/NX, CFG/XFG, Intel CET shadow stack + IBT, SEHOP: how each works on Win11 24H2 and concrete bypass chains (info leak → dispatch gadget → VirtualProtect).104- **references/acg-cig-dynamic-code.md** — Arbitrary Code Guard, Code Integrity Guard, Dynamic Code policy: signed-code-only reuse, JIT/browser exemptions, cross-process pivots, SEC_IMAGE section abuse.105- **references/wdac-app-control-bypass.md** — WDAC / App Control for Business: recommended-block-rule LOLBins, signed Electron (Loki C2) + signed Node `.node`/V8 exploitation, DLL sideloading, allow-list reality check.106- **references/asr-amsi-etw-blinding.md** — ASR rule bypasses (global exclusion abuse, process hollowing into trusted images), AMSI bypass variants, ETW blinding (full patch vs selective provider disable).107- **references/ppl-lsa-protection.md** — PPL levels & LSA Protection (RunAsPPL), userland PPLmedic exploit chain, PPLBlade/nanodump dumping, Credential Guard reality, BYOVD PPL kill.108- **references/byovd-vbs-hvci.md** — BYOVD kernel R/W primitive build, Microsoft driver blocklist + LOLDrivers + HVCI/Secure Boot evasion (Silver Fox amsdk.sys case), VBS/Credential Guard limits, kernel shadow stack.