A Short History of Windows Exploit Mitigations (2000–2026)

1236 words
6 minutes
A Short History of Windows Exploit Mitigations (2000–2026)
This post is also available in 简体中文.

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 XPWindows 2003Windows VistaWindows 2008Windows 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.

MechanismSinceWhat it coversWhich earlier attacks it answers
Forced ASLR / high-entropy ASLRWindows 8 (2012)Randomizes even modules built without /dynamicbase; high entropy on 64-bitBorrowing modules without ASLR, heap sprays claiming fixed addresses
CFG (Control Flow Guard)Win8.1 Update 3 (2014), on by default in Win10Before an indirect call, checks that the target is a valid function entryVtable 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 createdret2libc 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 signerUsing 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 exceptionOverwriting 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 prototypeGetting 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-onlyOverwriting kernel data and function pointers
VBS / HVCISince Windows 10, required by default on Win11Virtualization walls off a trusted zone, and HVCI checks code integrity inside itPatching 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 ret go 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 VirtualProtect to 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!

A Short History of Windows Exploit Mitigations (2000–2026)
https://blog.lumysia.net/posts/windows-mitigation-history-2000-2026/
Author
Livia
Published at
2020-11-28
Related PostsSmart
1
Rereading 0day Security (4), Early Ways Around DEP and ASLR
Turning DEP off with ret2libc, making memory executable with VirtualProtect/VirtualAlloc, beating ASLR with partial overwrites, heap spraying to land on 0x0C0C0C0C, vtable hijacking, and how those ideas grew into today's ROP and info leaks.
2
Rereading 0day Security (3), SEH Hijacking, Plus GS, SafeSEH and SEHOP
From overwriting SEH to hijack exception handling, to the GS cookie, SafeSEH's RtlIsValidHandler decision tree and SEHOP's chain integrity check, and how each one gets bypassed.
3
Rereading 0day Security (2), the NT5 Heap, DWORD SHOOT and the First Heap Protections
Debugging the free lists and lookaside lists on Windows 2000, using unlink for a DWORD SHOOT that overwrites a function pointer in the PEB, then a look at safe unlink, heap cookies and metadata encoding from XP SP2 on.
4
Rereading 0day Security (1), Stack Overflows and Shellcode Basics
My first round of labs from the book 0day Security, covering PE address conversion, overwriting a return address with a stack overflow, the jmp esp trampoline, finding kernel32 through the PEB, encoding shellcode, plus a little format string bug at the end.
5
Getting Started with Windows Kernel Drivers, a Debugging Setup and the Basics
Setting up kernel debugging with KDNET and WinDbg, reading EPROCESS and the PEB through symbols, then writing a first driver and looking at the System process context, IRQL, strings, lists, spinlocks, pool allocation and kernel objects.
Random PostsRandom

Comments

Table of Contents