A Short History of Windows Exploit Mitigations (2000–2026)
- 1Getting Started with Windows Kernel Drivers, a Debugging Setup and the Basics
- 2Rereading 0day Security (1), Stack Overflows and Shellcode Basics
- 3Rereading 0day Security (2), the NT5 Heap, DWORD SHOOT and the First Heap Protections
- 4Rereading 0day Security (3), SEH Hijacking, Plus GS, SafeSEH and SEHOP
- 5Rereading 0day Security (4), Early Ways Around DEP and ASLR
- 6A Short History of Windows Exploit Mitigations (2000–2026)This article
This is the last post in my “Rereading 0day Security” series, and it also works best as an index for the whole thing. The first four posts went through how the attacks worked, one trick at a time. This one turns it around and lines the defenses up in a row. The table and the first half come from my 2020 notes on 0day Security: Software Vulnerability Analysis Techniques, 2nd edition (by failwest and others). Everything after Win8 I added while tidying up in 2026, carrying it all the way to today’s Windows 11.
After the first four posts, one thing feels very clear to me. Every generation of defense is an answer to the attacks of the generation before. You could jump anywhere on the stack, so GS came along. SEH could be overwritten, so SafeSEH and SEHOP came along. Data pages could execute, so DEP came along. Addresses were fixed, so ASLR came along. And every time a new defense went up, attackers found the crack in it. ret2libc got around DEP, partial overwrites and heap spraying got around ASLR… The tug of war never stopped. The battlefield just moved from “overwrite the return address” to “overwrite a function pointer”, and then to “leak an address first”.
XP to Win7, the first generation
This is how things looked when 0day Security was written, and it covers the mechanisms from the labs in the earlier posts.
| Windows XP | Windows 2003 | Windows Vista | Windows 2008 | Windows 7 | |
|---|---|---|---|---|---|
| GS stack cookie | |||||
| Security cookie | √ | √ | √ | √ | √ |
| Variable reordering | √ | √ | √ | √ | √ |
| SafeSEH | |||||
| SEH handler validation | √ | √ | √ | √ | √ |
| Heap protection | |||||
| safe unlink | √(SP2) | √ | √ | √ | √ |
| Safe lookaside lists | × | × | √ | √ | √ |
| heap cookie | √(SP2) | √ | √ | √ | √ |
| Metadata encoding | × | × | √ | √ | √ |
| DEP | |||||
| NX support | √ | √ | √ | √ | √ |
| Permanent DEP | × | × | √ | √ | √ |
| ASLR | |||||
| PEB/TEB | √ | √ | √ | √ | √ |
| Heap | × | × | √ | √ | √ |
| Stack | × | × | √ | √ | √ |
| Image | × | × | √ | √ | √ |
| SEHOP | |||||
| SEH chain validation | × | × | √(SP1) | √ | √ |
A few dates worth remembering. GS has been on by default since Visual Studio 2002/2003. DEP and the heap protections came in with XP SP2 (2004). ASLR that actually helps, for images, heap and stack, only arrived with Vista (2007). SEHOP was added in Vista SP1 / Server 2008 (2008). By Win7, this generation of defenses had more or less settled.
What this generation has in common is that most of it lives in software and in the compiler. It relies on the compiler inserting code (the GS cookie), on PE header flags (SafeSEH, /NXCOMPAT, /dynamicbase), and on the system loader playing along. So the bypasses in the first four posts were all, at heart, about finding cracks at the software level: a module without SafeSEH, a module at a fixed address, ret2libc so you never touch a data page, partial overwrites and heap spraying so you never need a full address.
Win8 to Win11, the second generation
After Win7, attackers shifted their focus to “overwrite a function pointer or vtable” and “indirect calls”. Defenders upgraded too, and more and more they lean on hardware and virtualization instead of the compiler alone.
| Mechanism | Since | What it covers | Which earlier attacks it answers |
|---|---|---|---|
| Forced ASLR / high-entropy ASLR | Windows 8 (2012) | Randomizes even modules built without /dynamicbase; high entropy on 64-bit | Borrowing modules without ASLR, heap sprays claiming fixed addresses |
| CFG (Control Flow Guard) | Win8.1 Update 3 (2014), on by default in Win10 | Before an indirect call, checks that the target is a valid function entry | Vtable hijacking, overwriting function pointers |
| ACG (Arbitrary Code Guard) | Windows 10 (2017, RS3) | Once a code page is executable it can’t be changed, and no new executable pages can be created | ret2libc changing permissions, writing your own shellcode |
| CIG (Code Integrity Guard) | Windows 10 (2017, RS3) | The process can only load images signed by Microsoft or another trusted signer | Using third-party modules as trampolines or carriers |
| CET shadow stack (Hardware-enforced Stack Protection) | Windows 10 2004/20H2 (2020) | The CPU keeps a second copy of the return address, and a mismatch on ret raises an exception | Overwriting the return address, the ret chain of ROP |
| XFG (eXtended Flow Guard) | Windows 10 2004 (2020) | A stronger CFG that checks indirect call targets against the type signature of the function prototype | Getting around CFG with functions that are “valid but the wrong type” |
| KDP (Kernel Data Protection) | Windows 10 2004 (2020) | Uses VBS to mark parts of kernel memory read-only | Overwriting kernel data and function pointers |
| VBS / HVCI | Since Windows 10, required by default on Win11 | Virtualization walls off a trusted zone, and HVCI checks code integrity inside it | Patching code in kernel mode, loading unsigned drivers |
This generation answers exactly the things that kept coming up in the “Looking at it again today” sections of the first four posts:
- The CET shadow stack answers the oldest and most stubborn trick of all, overwriting the return address. From the stack overflow in part one to ROP chains, it all comes down to making
retgo where we want. The shadow stack has the CPU keep its own copy of the return address in hardware to compare against, and on 64-bit processes that support CET, that road is basically closed. - CFG / XFG answer the gap from part four, “neither GS nor the SEH protections can guard a vtable”. Once GS was everywhere, vtable hijacking became the main road, so CFG checks before every indirect call that the target is valid, and XFG tightens that further by type signature.
- ACG / CIG answer the “finishing move” of the DEP bypasses. ret2libc/ROP usually ends by calling
VirtualProtectto make the payload executable, or by borrowing a third-party module to land the shellcode in. ACG makes “executable pages can’t be changed again” and CIG makes “only trusted signed images can load”, which shuts both of those footholds at once. - Forced / high-entropy ASLR answers the two ASLR gaps from part four. Since people used to borrow “some module that forgot to turn on ASLR”, now every module is forced to randomize. Since 32 bits of entropy wasn’t enough, 64-bit gets high entropy.
- KDP / VBS / HVCI push the front line into the kernel. They make key kernel data read-only and use virtualization to wall off a trusted zone for code integrity checks, aimed at the idea of moving an attack from user mode up into kernel mode (including kernel exploitation, which this series didn’t really get into).
Where this line points today
With both generations stacked up, a full exploit chain on modern Windows looks like this. You almost certainly need an info leak first, to get the real address of some module or heap (because ASLR means you can’t guess). Then you build the logic with ROP (because DEP won’t let you execute data directly, and CET keeps pushing ROP in harder directions). If you want to hijack an indirect call, you also have to get past CFG/XFG. And if you want a foothold in the kernel, you’re up against HVCI/KDP. In other words, every single trick from the first four posts is useless on its own today, but each one is the “ancestor” of a link in this modern chain. You need to get stack overflows to see what CET is defending against, vtable hijacking to see what CFG is for, and ret2libc to see what ACG is for.
There’s also a rather different road that came out of the ARM world. Windows 11 on ARM uses ideas along the lines of Pointer Authentication, which tucks a cryptographic signature into a pointer and checks it before the pointer is used. It answers the old question of “can someone just change return addresses and function pointers” from another direction, and ends up in the same place as CET.
This tug of war isn’t going to stop, and defense will always be answering the last round of attacks. But that’s exactly why the best place to start, if you want to understand attack and defense today, is going back twenty years and looking at how the first overflows worked. That’s also why I reread this book and put this series together.
Share Article
If this article helped you, please share it with others!




